tOS X Tiger changes - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit bc7da02954403d4b46285b8f87a62d60c5eb58f8
 (DIR) parent 857072dc11b02d7edc4892613b8d176dc273e92f
 (HTM) Author: rsc <devnull@localhost>
       Date:   Sat,  7 May 2005 22:41:59 +0000
       
       OS X Tiger changes
       
       Diffstat:
         M include/u.h                         |      17 ++++++++++++-----
         M src/lib9/notify.c                   |       2 ++
         M src/libthread/daemonize.c           |       7 ++++++-
       
       3 files changed, 20 insertions(+), 6 deletions(-)
       ---
 (DIR) diff --git a/include/u.h b/include/u.h
       t@@ -72,8 +72,15 @@ typedef long p9jmp_buf[sizeof(sigjmp_buf)/sizeof(long)];
        #        include <sys/types.h>
        #        include <pthread.h>
        #        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 <sched.h>
       t@@ -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
 (DIR) diff --git a/src/lib9/notify.c b/src/lib9/notify.c
       t@@ -66,7 +66,9 @@ static Sig sigs[] = {
                SIGVTALRM,        0,
                SIGUSR1,                0,
                SIGUSR2,                0,
       +#ifdef SIGWINCH
                SIGWINCH,        Restart|Ignore,
       +#endif
        #ifdef SIGINFO
                SIGINFO,                Restart|Ignore,
        #endif
 (DIR) diff --git a/src/libthread/daemonize.c b/src/libthread/daemonize.c
       t@@ -74,7 +74,12 @@ static int sigs[] =
                SIGALRM, SIGTERM, SIGCHLD, SIGSTOP,
                /*SIGTSTP, SIGTTIN, SIGTTOU,*/ SIGURG, 
                SIGXCPU, SIGXFSZ, SIGVTALRM, SIGPROF,
       -        SIGWINCH, SIGIO, 
       +#ifdef SIGWINCH
       +        SIGWINCH,
       +#endif
       +#ifdef SIGIO
       +        SIGIO,
       +#endif
        #ifdef SIGEMT
                SIGEMT,
        #endif