diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-01-28 00:11:23 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-01-28 00:11:23 +0000 |
commit | b47750fee3f5e555c9e7cfdaa9a5f8e97aed9327 (patch) | |
tree | e556d9efac8830063bb2c5d686ff91bf69678944 /libgo | |
parent | b91b9ad43e67a984fef611ec9d5df0bfb226f35b (diff) | |
download | gcc-b47750fee3f5e555c9e7cfdaa9a5f8e97aed9327.zip gcc-b47750fee3f5e555c9e7cfdaa9a5f8e97aed9327.tar.gz gcc-b47750fee3f5e555c9e7cfdaa9a5f8e97aed9327.tar.bz2 |
mksysinfo: Add #defines for Solaris.
From-SVN: r169345
Diffstat (limited to 'libgo')
-rwxr-xr-x | libgo/mksysinfo.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh index af7b77a..63b3680 100755 --- a/libgo/mksysinfo.sh +++ b/libgo/mksysinfo.sh @@ -24,6 +24,14 @@ set -e rm -f sysinfo.c cat > sysinfo.c <<EOF #include "config.h" + +#define _GNU_SOURCE +#if defined(__sun__) && defined(__svr4__) +/* Needed by Solaris header files. */ +#define _XOPEN_SOURCE 600 +#define _EXTENSIONS_ +#endif + #include <sys/types.h> #include <dirent.h> #include <errno.h> @@ -56,7 +64,7 @@ cat > sysinfo.c <<EOF #include <unistd.h> EOF -${CC} -D_GNU_SOURCE -fdump-go-spec=gen-sysinfo.go -S -o sysinfo.s sysinfo.c +${CC} -fdump-go-spec=gen-sysinfo.go -S -o sysinfo.s sysinfo.c echo 'package syscall' > ${OUT} |