aboutsummaryrefslogtreecommitdiff
path: root/include/lib9.h
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2003-11-24 00:43:41 +0000
committerrsc <devnull@localhost>2003-11-24 00:43:41 +0000
commitd2c4ee9e488f6c94865cc2f4c874d025bc2ae0d2 (patch)
tree2a0b4a292687bf21d9966692516dd439181b0ec1 /include/lib9.h
parent478ee9636fcfe3509d0a901d1250524a5c41d3a8 (diff)
downloadplan9port-d2c4ee9e488f6c94865cc2f4c874d025bc2ae0d2.tar.gz
plan9port-d2c4ee9e488f6c94865cc2f4c874d025bc2ae0d2.tar.bz2
plan9port-d2c4ee9e488f6c94865cc2f4c874d025bc2ae0d2.zip
Tweaks to build properly on Linux.
Diffstat (limited to 'include/lib9.h')
-rw-r--r--include/lib9.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/lib9.h b/include/lib9.h
index e309de71..94b0d047 100644
--- a/include/lib9.h
+++ b/include/lib9.h
@@ -10,6 +10,13 @@
extern "C" {
#endif
+#define _BSD_SOURCE 1
+#define _SVID_SOURCE 1
+#define _XOPEN_SOURCE 1000
+#define _XOPEN_SOURCE_EXTENDED 1
+#define _LARGEFILE64_SOURCE 1
+#define _FILE_OFFSET_BITS 64
+
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
@@ -35,9 +42,10 @@ extern "C" {
#define _HAVETIMEGM 1
#define _HAVETMZONE 1
#define _HAVETMTZOFF 1
-#define _HAVETIMEZONEINT 1
#define _HAVEFUTIMESAT 1
#define _HAVEFUTIMES 1
+#define _HAVEGETDENTS 1
+#define _HAVEGETDIRENTRIES 1
typedef long p9jmp_buf[sizeof(sigjmp_buf)/sizeof(long)];
@@ -48,6 +56,11 @@ typedef long p9jmp_buf[sizeof(sigjmp_buf)/sizeof(long)];
# undef _NEEDUINT
# undef _NEEDULONG
# endif
+# undef _HAVESTGEN
+# undef _HAVETMZONE
+# undef _HAVETMTZOFF
+# undef _HAVEFUTIMESAT
+# undef _HAVEGETDENTS
#endif
#if defined(__sun__)
# include <sys/types.h>
@@ -480,6 +493,7 @@ extern long time(long*);
#define getenv p9getenv
#define getwd p9getwd
#define longjmp p9longjmp
+#undef setjmp
#define setjmp p9setjmp
#define notejmp p9notejmp
#define jmp_buf p9jmp_buf