OSDN Git Service

Eliminate some potential definition inconsistencies.
authorKeith Marshall <keithmarshall@users.sourceforge.net>
Tue, 23 Dec 2014 21:40:16 +0000 (21:40 +0000)
committerKeith Marshall <keithmarshall@users.sourceforge.net>
Tue, 23 Dec 2014 21:40:16 +0000 (21:40 +0000)
mingwrt/ChangeLog
mingwrt/include/stdio.h
mingwrt/include/unistd.h

index d4d0a8c..31dcb14 100644 (file)
@@ -1,5 +1,14 @@
 2014-12-23  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
+       Eliminate some potential definition inconsistencies.
+
+       * include/stdio.h: Cosmetic formatting change, relating to...
+       * include/unistd.h (SEEK_SET, SEEK_CUR, SEEK_END): Define them
+       unconditionally; this allows the compiler to check for consistency
+       with their primary definitions in stdio.h
+
+2014-12-23  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
        Suppress expected warning diagnostics in LIBIMPL builds.
 
        * Makefile.in (LIBIMPL_CFLAGS): Redefine it; it now incorporates...
index 1248081..02fb4df 100644 (file)
 
 /* Constants for nOrigin indicating the position relative to which fseek
  * 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
+ * say they are defined here.
+ */
+#define SEEK_SET  0
+#define SEEK_CUR  1
+#define SEEK_END  2
 
 #ifndef        RC_INVOKED
 
index b6bd05e..26df7ba 100644 (file)
 #include <process.h>
 #include <getopt.h>
 
-/* 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
+/* These are defined in stdio.h.  POSIX also requires that they
+ * are to be consistently defined here; don't guard against prior
+ * definitions, as this might conceal inconsistencies.
+ */
+#define SEEK_SET   0
+#define SEEK_CUR   1
+#define SEEK_END   2
 
 #if _POSIX_C_SOURCE
 /*