tapple - 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 a8ec4910fd7d67df09ca79179dff8a344cc13cf2
 (DIR) parent f462256db27f827590a5867e046d0bbbb8eb368a
 (HTM) Author: rsc <devnull@localhost>
       Date:   Wed, 13 Jul 2005 21:34:11 +0000
       
       apple
       
       Diffstat:
         M include/u.h                         |       7 +++++--
         M src/cmd/acidtypes/stabs.c           |       1 +
         M src/cmd/acme/edit.c                 |       1 +
         M src/cmd/acme/look.c                 |       2 ++
         M src/cmd/auxstats/Darwin.c           |       3 +++
         M src/cmd/ed.c                        |       2 +-
         M src/cmd/hist.c                      |       2 +-
         M src/cmd/pic/pltroff.c               |       5 -----
         M src/cmd/postscript/tr2post/Bgetfie… |       2 +-
         M src/lib9/await.c                    |       2 +-
         M src/libauth/auth_proxy.c            |       1 +
         M src/libsunrpc/nfs3.c                |       2 +-
       
       12 files changed, 18 insertions(+), 12 deletions(-)
       ---
 (DIR) diff --git a/include/u.h b/include/u.h
       t@@ -10,8 +10,10 @@ extern "C" {
        #define _BSD_SOURCE 1
        #define _NETBSD_SOURCE 1        /* NetBSD */
        #define _SVID_SOURCE 1
       -#define _XOPEN_SOURCE 1000
       -#define _XOPEN_SOURCE_EXTENDED 1
       +#ifndef __APPLE__
       +#        define _XOPEN_SOURCE 1000
       +#        define _XOPEN_SOURCE_EXTENDED 1
       +#endif
        #define _LARGEFILE64_SOURCE 1
        #define _FILE_OFFSET_BITS 64
        
       t@@ -78,6 +80,7 @@ typedef long p9jmp_buf[sizeof(sigjmp_buf)/sizeof(long)];
        #        endif
        #        undef _ANSI_SOURCE
        #        undef _POSIX_C_SOURCE
       +#        undef _XOPEN_SOURCE
        #        if !defined(NSIG)
        #                define NSIG 32
        #        endif
 (DIR) diff --git a/src/cmd/acidtypes/stabs.c b/src/cmd/acidtypes/stabs.c
       t@@ -146,6 +146,7 @@ parseinfo(char *desc, char **pp)
                Type *t;
                char *attr;
        
       +        n1 = n2 = 0;
                parsenum(desc, &n1, &n2, &desc);
                t = typebynum(n1, n2);
                if(*desc != '='){
 (DIR) diff --git a/src/cmd/acme/edit.c b/src/cmd/acme/edit.c
       t@@ -605,6 +605,7 @@ simpleaddr(void)
                Addr addr;
                Addr *ap, *nap;
        
       +        addr.num = 0;
                addr.next = 0;
                addr.u.left = 0;
                switch(cmdskipbl()){
 (DIR) diff --git a/src/cmd/acme/look.c b/src/cmd/acme/look.c
       t@@ -696,6 +696,8 @@ openfile(Text *t, Expand *e)
                Rune *rp;
                uint dummy;
        
       +        r.q0 = 0;
       +        r.q1 = 0;
                if(e->nname == 0){
                        w = t->w;
                        if(w == nil)
 (DIR) diff --git a/src/cmd/auxstats/Darwin.c b/src/cmd/auxstats/Darwin.c
       t@@ -83,6 +83,7 @@ kread(ulong addr, char *buf, int size)
        void
        xnet(int first)
        {
       +#if 0
                ulong out, in, outb, inb, err;
                static ulong ifnetaddr;
                ulong addr;
       t@@ -123,6 +124,8 @@ xnet(int first)
                Bprint(&bout, "ethererr %lud\n", err);
                Bprint(&bout, "ether %lud\n", in+out);
                Bprint(&bout, "etherb %lud\n", inb+outb);
       +#endif
       +        USED(first);
        }
        
        
 (DIR) diff --git a/src/cmd/ed.c b/src/cmd/ed.c
       t@@ -929,7 +929,7 @@ callunix(void)
                *p = 0;
                pid = fork();
                if(pid == 0) {
       -                execlp("rc", "rc", "-c", buf, 0);
       +                execlp("rc", "rc", "-c", buf, (char*)0);
                        sysfatal("exec failed: %r");
                        exits("execl failed");
                }
 (DIR) diff --git a/src/cmd/hist.c b/src/cmd/hist.c
       t@@ -144,7 +144,7 @@ ysearch(char *file)
                                        print("diff %s %s\n", pair[toggle^1], pair[toggle]);
                                switch(rfork(RFFDG|RFPROC)){
                                case 0:
       -                                execlp("diff", "diff", diffb ? "-cb" : "-c", pair[toggle], pair[toggle ^ 1], 0);
       +                                execlp("diff", "diff", diffb ? "-cb" : "-c", pair[toggle], pair[toggle ^ 1], (char*)0);
                                        fprint(2, "can't exec diff: %r\n");
                                        exits(0);
                                case -1:
 (DIR) diff --git a/src/cmd/pic/pltroff.c b/src/cmd/pic/pltroff.c
       t@@ -144,11 +144,6 @@ void vgoto(double n)
                vpos = n;
        }
        
       -double fabs(double x)
       -{
       -        return x < 0 ? -x : x;
       -}
       -
        void hvflush(void)        /* get to proper point for output */
        {
                if (fabs(hpos-htrue) >= 0.0005) {
 (DIR) diff --git a/src/cmd/postscript/tr2post/Bgetfield.c b/src/cmd/postscript/tr2post/Bgetfield.c
       t@@ -108,7 +108,7 @@ Bgetfield(Biobuf *bp, int type, void *thing, int size) {
                        while (!bailout && (r = Bgetrune(bp))>=0) {
                                switch (sindex++) {
                                case 0:
       -                                if (*c == '0') {
       +                                if (r == '0') {
                                                base = 8;
                                                continue;
                                        }
 (DIR) diff --git a/src/lib9/await.c b/src/lib9/await.c
       t@@ -4,9 +4,9 @@
        
        #include <signal.h>
        #include <sys/types.h>
       +#include <sys/wait.h>
        #include <sys/time.h>
        #include <sys/resource.h>
       -#include <sys/wait.h>
        
        #ifndef WCOREDUMP        /* not on Mac OS X Tiger */
        #define WCOREDUMP(status) 0
 (DIR) diff --git a/src/libauth/auth_proxy.c b/src/libauth/auth_proxy.c
       t@@ -91,6 +91,7 @@ auth_getinfo(AuthRpc *rpc)
        
                if(auth_rpc(rpc, "authinfo", nil, 0) != ARok)
                        return nil;
       +        a = nil;
                if(convM2AI((uchar*)rpc->arg, rpc->narg, &a) == nil){
                        werrstr("bad auth info from factotum");
                        return nil;
 (DIR) diff --git a/src/libsunrpc/nfs3.c b/src/libsunrpc/nfs3.c
       t@@ -115,7 +115,7 @@ static struct {
        };
        
        void
       -nfs3errstr(SunStatus status)
       +nfs3errstr(Nfs3Status status)
        {
                int i;