aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuss Cox <russcox@gmail.com>2009-09-11 13:51:50 -0400
committerRuss Cox <russcox@gmail.com>2009-09-11 13:51:50 -0400
commitfa662c9571e92d5fc4f36414723bbaed1e11b278 (patch)
treefa5953ca28ab8687e1186b4183d480a98feed2bc /src
parenta673ea22035ad986afc84d44543cd232218ddbe9 (diff)
downloadplan9port-fa662c9571e92d5fc4f36414723bbaed1e11b278.tar.gz
plan9port-fa662c9571e92d5fc4f36414723bbaed1e11b278.tar.bz2
plan9port-fa662c9571e92d5fc4f36414723bbaed1e11b278.zip
INSTALL: fix build on Snow Leopard
http://codereview.appspot.com/116073
Diffstat (limited to 'src')
-rw-r--r--src/cmd/eqn/e.h2
-rw-r--r--src/cmd/grap/grap.h3
-rw-r--r--src/cmd/pic/pic.h3
-rw-r--r--src/cmd/tpic/pic.h3
-rw-r--r--src/cmd/troff/tdef.h2
-rw-r--r--src/lib9/dirread.c4
-rw-r--r--src/libthread/threadimpl.h3
7 files changed, 20 insertions, 0 deletions
diff --git a/src/cmd/eqn/e.h b/src/cmd/eqn/e.h
index 432f4eac..07dc4df6 100644
--- a/src/cmd/eqn/e.h
+++ b/src/cmd/eqn/e.h
@@ -18,6 +18,8 @@ extern int class[LAST][LAST];
#define max(x,y) (((x) >= (y)) ? (x) : (y)) /* beware of side effects */
#define min(x,y) (((x) <= (y)) ? (x) : (y))
+#undef sprintf /* Snow Leopard */
+
extern char errbuf[200];
extern char *cmdname;
#define ERROR sprintf(errbuf,
diff --git a/src/cmd/grap/grap.h b/src/cmd/grap/grap.h
index bab62478..b392539c 100644
--- a/src/cmd/grap/grap.h
+++ b/src/cmd/grap/grap.h
@@ -1,4 +1,7 @@
extern char errbuf[200];
+
+#undef sprintf /* Snow Leopard */
+
#define ERROR sprintf(errbuf,
#define FATAL ), yyerror(errbuf), exit(1)
#define WARNING ), yyerror(errbuf)
diff --git a/src/cmd/pic/pic.h b/src/cmd/pic/pic.h
index a4f7a6a4..928d38dd 100644
--- a/src/cmd/pic/pic.h
+++ b/src/cmd/pic/pic.h
@@ -10,6 +10,9 @@
extern void yyerror(char *);
extern char errbuf[200];
+
+#undef sprintf /* Snow Leopard */
+
#define ERROR sprintf(errbuf,
#define FATAL ), yyerror(errbuf), exit(1)
#define WARNING ), yyerror(errbuf)
diff --git a/src/cmd/tpic/pic.h b/src/cmd/tpic/pic.h
index 50e58009..438e71a6 100644
--- a/src/cmd/tpic/pic.h
+++ b/src/cmd/tpic/pic.h
@@ -12,6 +12,9 @@
#define dprintf if(dbg)printf
extern char errbuf[200];
+
+#undef sprintf /* Snow Leopard */
+
#define ERROR sprintf(errbuf,
#define FATAL ), yyerror(errbuf), exit(1)
#define WARNING ), yyerror(errbuf)
diff --git a/src/cmd/troff/tdef.h b/src/cmd/troff/tdef.h
index 7944dd85..25c9270c 100644
--- a/src/cmd/troff/tdef.h
+++ b/src/cmd/troff/tdef.h
@@ -68,6 +68,8 @@ typedef struct Tbuf Tbuf;
#define oputs(a) OUT "%s", a PUT
#define oput(c) ( *obufp++ = (c), obufp > obuf+BUFSIZ ? flusho() : 1 )
+#undef sprintf /* Snow Leopard */
+
extern char errbuf[];
#define ERROR sprintf(errbuf,
#define WARN ), errprint()
diff --git a/src/lib9/dirread.c b/src/lib9/dirread.c
index 74dd1422..58fdfdbd 100644
--- a/src/lib9/dirread.c
+++ b/src/lib9/dirread.c
@@ -1,3 +1,7 @@
+#if defined(__APPLE__)
+#define _DARWIN_NO_64_BIT_INODE /* Snow Leopard */
+#endif
+
#include <u.h>
#define NOPLAN9DEFINES
#include <libc.h>
diff --git a/src/libthread/threadimpl.h b/src/libthread/threadimpl.h
index da98e5eb..8b00694e 100644
--- a/src/libthread/threadimpl.h
+++ b/src/libthread/threadimpl.h
@@ -6,6 +6,9 @@
#include <sched.h>
#include <signal.h>
#if !defined(__OpenBSD__)
+# if defined(__APPLE__)
+# define _XOPEN_SOURCE /* for Snow Leopard */
+# endif
# include <ucontext.h>
#endif
#include <sys/utsname.h>