Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2007-01-19 06:21:09 +0300
committerDanny Smith <dannysmith@users.sourceforge.net>2007-01-19 06:21:09 +0300
commit8dabc54e418ecd70365abd3bc0f56d79b3c40de1 (patch)
tree38137426c0caccf5745c2deed28deffe02f71d48 /winsup
parent45fa1f99c6c9f57504c36e7efb653e44d8fe99b6 (diff)
* include/stdio.h (SEEK_SET, SEEK_CUR, SEEK_END): Define
unconditionally. Change comment. * include/unistd.h (SEEK_SET, SEEK_CUR, SEEK_END): Define here too. * include/io.h (rename): Declare. (remove): Declare.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/mingw/ChangeLog11
-rw-r--r--winsup/mingw/include/io.h4
-rw-r--r--winsup/mingw/include/stdio.h19
-rw-r--r--winsup/mingw/include/unistd.h14
4 files changed, 33 insertions, 15 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
index 4d5c0e09e..72687d5d4 100644
--- a/winsup/mingw/ChangeLog
+++ b/winsup/mingw/ChangeLog
@@ -1,3 +1,12 @@
+2007-01-19 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * include/stdio.h (SEEK_SET, SEEK_CUR, SEEK_END): Define
+ unconditionally. Change comment.
+ * include/unistd.h (SEEK_SET, SEEK_CUR, SEEK_END): Define
+ here too.
+ * include/io.h (rename): Declare.
+ (remove): Declare.
+
2006-12-31 Keith Marshall <keithmarshall@users.sourceforge.net>
* include/libgen.h: New file; required by...
@@ -22,7 +31,7 @@
2006-11-21 Danny Smith <dannysmith@users.sourceforge.net>
- * Makefile.in: Add aclocal.m4:to source release.
+ * Makefile.in: Add aclocal.m4 to source release.
* mingwex/Makefile.in: Ditto.
* profile/Makefile.in: Ditto.
diff --git a/winsup/mingw/include/io.h b/winsup/mingw/include/io.h
index 66d59b5a8..c45d10650 100644
--- a/winsup/mingw/include/io.h
+++ b/winsup/mingw/include/io.h
@@ -226,6 +226,10 @@ _CRTIMP int __cdecl _open_osfhandle (long, int);
_CRTIMP int __cdecl _pipe (int *, unsigned int, int);
_CRTIMP int __cdecl _read (int, void*, unsigned int);
_CRTIMP int __cdecl _setmode (int, int);
+/* MS puts remove & rename (but not wide versions) in io.h as well
+ as in stdio.h. */
+_CRTIMP int __cdecl remove (const char*);
+_CRTIMP int __cdecl rename (const char*, const char*);
/* SH_... flags for nShFlags defined in share.h
* Optional fourth argument is unsigned unPermissions */
diff --git a/winsup/mingw/include/stdio.h b/winsup/mingw/include/stdio.h
index a7070101c..90c0dd976 100644
--- a/winsup/mingw/include/stdio.h
+++ b/winsup/mingw/include/stdio.h
@@ -101,20 +101,11 @@
#define BUFSIZ 512
/* Constants for nOrigin indicating the position relative to which fseek
- * sets the file position. Enclosed in ifdefs because io.h could also
- * define them. (Though not anymore since io.h includes this file now.) */
-#ifndef SEEK_SET
-#define SEEK_SET (0)
-#endif
-
-#ifndef SEEK_CUR
-#define SEEK_CUR (1)
-#endif
-
-#ifndef SEEK_END
-#define SEEK_END (2)
-#endif
-
+ * sets the file position. Defined unconditionally since ISO and POSIX
+ * say they are defined here. */
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
#ifndef RC_INVOKED
diff --git a/winsup/mingw/include/unistd.h b/winsup/mingw/include/unistd.h
index f3a54495e..90934a0ed 100644
--- a/winsup/mingw/include/unistd.h
+++ b/winsup/mingw/include/unistd.h
@@ -14,10 +14,24 @@
#include <getopt.h>
#undef __UNISTD_GETOPT__
+/* These are also defined in stdio.h. */
+#ifndef SEEK_SET
+#define SEEK_SET 0
+#endif
+
+#ifndef SEEK_CUR
+#define SEEK_CUR 1
+#endif
+
+#ifndef SEEK_END
+#define SEEK_END 2
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
+
/* This is defined as a real library function to allow autoconf
to verify its existence. */
int ftruncate(int, off_t);