From ebabf2ad6d19af5c674b624bafe619dedbc94403 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sun, 13 Jul 2008 15:32:37 -0400 Subject: 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" --- debugfs/util.c | 2 +- e2fsck/unix.c | 2 ++ lib/ext2fs/tdb.c | 2 +- misc/fsck.c | 2 ++ misc/logsave.c | 2 ++ misc/mke2fs.c | 2 ++ misc/tune2fs.c | 2 +- 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 #include 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 #ifdef HAVE_STDLIB_H #include 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 #include 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 #include #include 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 #include #include 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 #include #include 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 #include -- cgit v1.2.3