tmore thread support, also add freebsd 5 - 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 39b3054a5fbec1e662ebcc6377c4e8a588b097ec
 (DIR) parent 3286afda88e1446d5763d2fbf11d37c843f2a997
 (HTM) Author: rsc <devnull@localhost>
       Date:   Sat, 25 Dec 2004 22:00:27 +0000
       
       more thread support, also add freebsd 5
       
       Diffstat:
         M include/u.h                         |      34 +++++++++++++++++++------------
       
       1 file changed, 21 insertions(+), 13 deletions(-)
       ---
 (DIR) diff --git a/include/u.h b/include/u.h
       t@@ -4,13 +4,14 @@
        extern "C" {
        #endif
        
       +#define __BSD_VISIBLE 1 /* FreeBSD 5.x */
       +#define __EXTENSIONS__ 1 /* SunOS */
        #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
       -#define __EXTENSIONS__ 1 /* SunOS */
        
        #include <unistd.h>
        #include <string.h>
       t@@ -43,34 +44,41 @@ typedef long p9jmp_buf[sizeof(sigjmp_buf)/sizeof(long)];
        #                undef _NEEDULONG
        #        endif
        #        if defined(__Linux26__)
       -#                include <pthread.h>
       -#                define PLAN9_PTHREADS 1
       +#                define PLAN9PORT_USING_PTHREADS 1
        #        endif
       -#endif
       -#if defined(__sun__)
       +#elif defined(__sun__)
        #        include <sys/types.h>
        #        undef _NEEDUSHORT
        #        undef _NEEDUINT
        #        undef _NEEDULONG
       -#        include <pthread.h>
       -#        define PLAN9_PTHREADS
       -#endif
       -#if defined(__FreeBSD__)
       +#        define PLAN9PORT_USING_PTHREADS 1
       +#elif defined(__FreeBSD__)
        #        include <sys/types.h>
        #        if !defined(_POSIX_SOURCE)
        #                undef _NEEDUSHORT
        #                undef _NEEDUINT
        #        endif
       -#endif
       -#if defined(__APPLE__)
       +#        if defined(__FreeBSD5__)
       +#                define PLAN9PORT_USING_PTHREADS 1
       +#        endif
       +#elif defined(__APPLE__)
        #        include <sys/types.h>
        #        undef _NEEDUSHORT
        #        undef _NEEDUINT
        #        define _NEEDLL 1
       -#        include <pthread.h>
       -#        define PLAN9_PTHREADS
       +#        define PLAN9PORT_USING_PTHREADS 1
       +#else
       +        /* No idea what system this is -- try some defaults */
       +#        define PLAN9PORT_USING_PTHREADS 1
       +#endif
       +
       +#ifndef O_DIRECT
       +#define O_DIRECT 0
        #endif
        
       +#ifdef PLAN9PORT_USING_PTHREADS
       +#include <pthread.h>
       +#endif
        
        typedef signed char schar;
        typedef unsigned int u32int;