summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2008-07-13 15:32:37 -0400
committerTheodore Ts'o <tytso@mit.edu>2008-07-13 16:06:57 -0400
commitebabf2ad6d19af5c674b624bafe619dedbc94403 (patch)
treee7f98d372231e705177b3e296b8d68de05c837c2
parent5a299b56857c20273a43add86ecdaf9a6db0e2b8 (diff)
downloade2fsprogs-ebabf2ad6d19af5c674b624bafe619dedbc94403.tar.gz
Define _XOPEN_SOURCE to 600 consistently for Solaris C99 support
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>
-rw-r--r--debugfs/util.c2
-rw-r--r--e2fsck/unix.c2
-rw-r--r--lib/ext2fs/tdb.c2
-rw-r--r--misc/fsck.c2
-rw-r--r--misc/logsave.c2
-rw-r--r--misc/mke2fs.c2
-rw-r--r--misc/tune2fs.c2
7 files changed, 11 insertions, 3 deletions
diff --git a/debugfs/util.c b/debugfs/util.c
index 28abe526..4f9c44a9 100644
--- a/debugfs/util.c
+++ b/debugfs/util.c
@@ -6,7 +6,7 @@
*
*/
-#define _XOPEN_SOURCE /* needed for strptime */
+#define _XOPEN_SOURCE 600 /* needed for strptime */
#include <stdio.h>
#include <unistd.h>
diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index a02c666d..4262906d 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -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>
diff --git a/lib/ext2fs/tdb.c b/lib/ext2fs/tdb.c
index c8689582..b7cf43d4 100644
--- a/lib/ext2fs/tdb.c
+++ b/lib/ext2fs/tdb.c
@@ -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>
diff --git a/misc/fsck.c b/misc/fsck.c
index 95102610..28c8d6c4 100644
--- a/misc/fsck.c
+++ b/misc/fsck.c
@@ -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>
diff --git a/misc/logsave.c b/misc/logsave.c
index c6fd3f8c..aa3235ee 100644
--- a/misc/logsave.c
+++ b/misc/logsave.c
@@ -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>
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 7ee3dee1..71719904 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -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>
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 8eb7451d..19b04cbc 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -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>