URI: 
       tsunos fixes - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit c345061e8d81a737b2926da7ecad4b4389677fe8
   DIR parent 190857f93ec5743f7c3209ac8544440b3cedfcee
  HTML Author: rsc <devnull@localhost>
       Date:   Fri,  7 Jan 2005 07:47:37 +0000
       
       sunos fixes
       
       Diffstat:
         M include/u.h                         |       1 +
         M src/cmd/draw/colors.c               |       2 +-
         M src/lib9/fmt/dofmt.c                |       1 -
         M src/lib9/fmt/strtod.c               |       1 -
         M src/lib9/qlock.c                    |       1 -
         M src/lib9/utf/utflen.c               |       1 -
         M src/lib9/utf/utfrrune.c             |       1 -
         M src/lib9/utf/utfrune.c              |       1 -
         M src/libString/s_getline.c           |       1 -
         M src/libbio/brdstr.c                 |       1 -
         M src/libdraw/x11-draw.c              |       3 ++-
         M src/libthread/pthread.c             |       6 +++---
         M src/libthread/sysofiles.sh          |       8 +++++++-
       
       13 files changed, 14 insertions(+), 14 deletions(-)
       ---
   DIR diff --git a/include/u.h b/include/u.h
       t@@ -6,6 +6,7 @@ extern "C" {
        
        #define __BSD_VISIBLE 1 /* FreeBSD 5.x */
        #define __EXTENSIONS__ 1 /* SunOS */
       +#define __MAKECONTEXT_V2_SOURCE 1 /* SunOS */
        #define _BSD_SOURCE 1
        #define _SVID_SOURCE 1
        #define _XOPEN_SOURCE 1000
   DIR diff --git a/src/cmd/draw/colors.c b/src/cmd/draw/colors.c
       t@@ -106,7 +106,7 @@ main(int argc, char *argv[])
                        exits("usage");
                }
        
       -        if(initdraw(nil, nil, "colors") < 0)
       +        if(initdraw(0, 0, "colors") < 0)
                        sysfatal("initdraw failed: %r");
                einit(Emouse);
        
   DIR diff --git a/src/lib9/fmt/dofmt.c b/src/lib9/fmt/dofmt.c
       t@@ -78,7 +78,6 @@ dofmt(Fmt *f, char *fmt)
                        if(fmt == nil)
                                return -1;
                }
       -        return 0;        /* not reached */
        }
        
        void *
   DIR diff --git a/src/lib9/fmt/strtod.c b/src/lib9/fmt/strtod.c
       t@@ -377,7 +377,6 @@ fpcmp(char *a, ulong* f)
                        a++;
                cont:;
                }
       -        return 0;
        }
        
        static void
   DIR diff --git a/src/lib9/qlock.c b/src/lib9/qlock.c
       t@@ -100,7 +100,6 @@ canrlock(RWLock *l)
                        l->readers++;
                        return 1;
                }
       -        return 1;
        }
        
        void
   DIR diff --git a/src/lib9/utf/utflen.c b/src/lib9/utf/utflen.c
       t@@ -34,5 +34,4 @@ utflen(char *s)
                                s += chartorune(&rune, s);
                        n++;
                }
       -        return 0;
        }
   DIR diff --git a/src/lib9/utf/utfrrune.c b/src/lib9/utf/utfrrune.c
       t@@ -42,5 +42,4 @@ utfrrune(char *s, long c)
                                s1 = s;
                        s += c1;
                }
       -        return 0;
        }
   DIR diff --git a/src/lib9/utf/utfrune.c b/src/lib9/utf/utfrune.c
       t@@ -41,5 +41,4 @@ utfrune(char *s, long c)
                                return s;
                        s += n;
                }
       -        return 0;
        }
   DIR diff --git a/src/libString/s_getline.c b/src/libString/s_getline.c
       t@@ -68,5 +68,4 @@ s_getline(Biobuf *fp, String *to)
                        }
                        c = Bgetc(fp);
                }
       -        return 0;
        }
   DIR diff --git a/src/libbio/brdstr.c b/src/libbio/brdstr.c
       t@@ -108,5 +108,4 @@ Brdstr(Biobuf *bp, int delim, int nulldelim)
                        bp->icount = 0;
                        bp->gbuf = bp->ebuf;
                }
       -        return 0;        /* never happens */
        }
   DIR diff --git a/src/libdraw/x11-draw.c b/src/libdraw/x11-draw.c
       t@@ -115,7 +115,7 @@ xdraw(Memdrawparam *par)
                        }else{
                                /* this doesn't work on rob's mac?  */
                                return 0;
       -                        gc = _x.gcsimplesrc;
       +                        /* gc = _x.gcsimplesrc;
                                if(dst->chan == CMAP8 && _x.usetable)
                                        sdval = _x.tox11[sdval];
        
       t@@ -127,6 +127,7 @@ xdraw(Memdrawparam *par)
                                        XSetStipple(_x.display, gc, xmask->pixmap);
                                        _x.gcsimplesrcpixmap = xmask->pixmap;
                                }
       +                        */
                        }
                        XSetTSOrigin(_x.display, gc, mp.x, mp.y);
                        XFillRectangle(_x.display, xdst->pixmap, gc, dp.x, dp.y,
   DIR diff --git a/src/libthread/pthread.c b/src/libthread/pthread.c
       t@@ -74,7 +74,7 @@ _procwakeupandunlock(_Procrendez *r)
                        r->asleep = 0;
                        pthread_cond_signal(&r->cond);
                }
       -        unlock(&r->l);
       +        unlock(r->l);
        }
        
        static void
       t@@ -85,7 +85,7 @@ startprocfn(void *v)
                Proc *p;
        
                a = (void**)v;
       -        fn = a[0];
       +        fn = (void(*)(void*))a[0];
                p = a[1];
                free(a);
                p->osprocid = pthread_self();
       t@@ -104,7 +104,7 @@ _procstart(Proc *p, void (*fn)(Proc*))
                a = malloc(2*sizeof a[0]);
                if(a == nil)
                        sysfatal("_procstart malloc: %r");
       -        a[0] = fn;
       +        a[0] = (void*)fn;
                a[1] = p;
        
                if(pthread_create(&p->osprocid, nil, (void*(*)(void*))startprocfn, (void*)a) < 0){
   DIR diff --git a/src/libthread/sysofiles.sh b/src/libthread/sysofiles.sh
       t@@ -8,7 +8,13 @@ case "$tag" in
        *-FreeBSD-5.*)
                echo pthread.o
                ;;
       -*)
       +*-Linux-*)
       +        echo `uname`.o `uname`asm.o
       +        ;;
       +*-FreeBSD-*)
                echo `uname`.o `uname`asm.o
       +        ;;
       +*)
       +        echo pthread.o
        esac