Whamcloud - gitweb
Define _XOPEN_SOURCE to 600 consistently for Solaris C99 support
authorTheodore Ts'o <tytso@mit.edu>
Sun, 13 Jul 2008 19:32:37 +0000 (15:32 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 13 Jul 2008 20:06:57 +0000 (16:06 -0400)
Solaris's header files are very picky about which C compiler can be
used for SUSv3 conformance.  Use of C99 is not compatible with SUSv2
(_XOPEN_SOURCE=500), and C89 is not compatible with SUSv3
(_XOPEN_SOURCE=600).  Since we need some SUSv3 functions, consistently
use SUSv3 so that e2fsprogs will build on Solaris using c99.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
debugfs/util.c
e2fsck/unix.c
lib/ext2fs/tdb.c
misc/fsck.c
misc/logsave.c
misc/mke2fs.c
misc/tune2fs.c

index 28abe52..4f9c44a 100644 (file)
@@ -6,7 +6,7 @@
  *
  */
 
-#define _XOPEN_SOURCE /* needed for strptime */
+#define _XOPEN_SOURCE 600 /* needed for strptime */
 
 #include <stdio.h>
 #include <unistd.h>
index a02c666..4262906 100644 (file)
@@ -9,6 +9,8 @@
  * %End-Header%
  */
 
+#define _XOPEN_SOURCE 600 /* for inclusion of sa_handler in Solaris */
+
 #include <stdio.h>
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
index c868958..b7cf43d 100644 (file)
@@ -36,7 +36,7 @@ Last Changed Date: 2007-06-22 13:36:10 -0400 (Fri, 22 Jun 2007)
 #define HAVE_UTIME_H
 #define HAVE_UTIME
 #endif
-#define _XOPEN_SOURCE 500
+#define _XOPEN_SOURCE 600
 
 #include <unistd.h>
 #include <stdio.h>
index 9510261..28c8d6c 100644 (file)
@@ -25,6 +25,8 @@
  * %End-Header%
  */
 
+#define _XOPEN_SOURCE 600 /* for inclusion of sa_handler in Solaris */
+
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/signal.h>
index c6fd3f8..aa3235e 100644 (file)
@@ -10,6 +10,8 @@
  * %End-Header%
  */
 
+#define _XOPEN_SOURCE 600 /* for inclusion of sa_handler in Solaris */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
index 7ee3dee..7171990 100644 (file)
@@ -16,6 +16,8 @@
  * enforced (but it's not much fun on a character device :-). 
  */
 
+#define _XOPEN_SOURCE 600 /* for inclusion of PATH_MAX in Solaris */
+
 #include <stdio.h>
 #include <string.h>
 #include <fcntl.h>
index 8eb7451..19b04cb 100644 (file)
@@ -25,7 +25,7 @@
  * 94/03/06    - Added the checks interval from Uwe Ohse (uwe@tirka.gun.de)
  */
 
-#define _XOPEN_SOURCE 500 /* for inclusion of strptime() */
+#define _XOPEN_SOURCE 600 /* for inclusion of strptime() */
 #define _BSD_SOURCE /* for inclusion of strcasecmp() */
 #include <fcntl.h>
 #include <grp.h>