From bc7da02954403d4b46285b8f87a62d60c5eb58f8 Mon Sep 17 00:00:00 2001 From: rsc Date: Sat, 7 May 2005 22:41:59 +0000 Subject: OS X Tiger changes --- include/u.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/u.h b/include/u.h index b9f07c40..8e889e63 100644 --- a/include/u.h +++ b/include/u.h @@ -72,8 +72,15 @@ typedef long p9jmp_buf[sizeof(sigjmp_buf)/sizeof(long)]; # include # include # define PLAN9PORT_USING_PTHREADS 1 -# undef _NEEDUSHORT -# undef _NEEDUINT +# if __GNUC__ < 4 +# undef _NEEDUSHORT +# undef _NEEDUINT +# endif +# undef _ANSI_SOURCE +# undef _POSIX_C_SOURCE +# if !defined(NSIG) +# define NSIG 32 +# endif # define _NEEDLL 1 #elif defined(__NetBSD__) # include @@ -131,10 +138,10 @@ typedef short s16int; #define AUTOLIB(x) static int __p9l_autolib_ ## x = 1; /* - * Gcc 3 is too smart for its own good. + * Gcc is too smart for its own good. */ -#if defined(__GNUC__) && !defined(__APPLE_CC__) -# if __GNUC__ >= 3 +#if defined(__GNUC__) +# if __GNUC__ >= 4 || (__GNUC__==3 && !defined(__APPLE_CC__)) # undef AUTOLIB # define AUTOLIB(x) int __p9l_autolib_ ## x __attribute__ ((weak)); # else -- cgit v1.2.3