tC little bugs . wq VS: ---------------------------------------------------------------------- - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit 983990c806eb019cb490449cac70032417222a41
parent 631fe87f4c4bdcbc5785c8eb928d20d063f47e0c
Author: rsc 
Date:   Fri, 14 May 2004 20:19:53 +0000

C
little bugs
.
wq
VS: ----------------------------------------------------------------------

Diffstat:
  M src/lib9/create.c                   |       3 +++
  M src/lib9/ffork-pthread.c            |       1 +
  M src/lib9/open.c                     |       3 +++
  M src/libbio/mkfile                   |       2 +-
  A src/libmp/PowerMacintosh/mkfile     |       2 ++
  A src/libmp/sun4u/mkfile              |       2 ++
  A src/libsec/PowerMacintosh/mkfile    |       2 ++
  A src/libsec/PowerMacintosh/x         |       1 +
  A src/libsec/sun4u/mkfile             |       2 ++
  A src/libsec/sun4u/x                  |       1 +
  M src/mkfile                          |       1 +
  M src/mkmk.sh                         |      14 +++++++++-----
  M src/mksyslib                        |       2 +-

13 files changed, 29 insertions(+), 7 deletions(-)
---
diff --git a/src/lib9/create.c b/src/lib9/create.c
t@@ -3,6 +3,9 @@
 #define NOPLAN9DEFINES
 #include 
 #include 
+#ifndef O_DIRECT
+#define O_DIRECT 0
+#endif
 
 int
 p9create(char *path, int mode, ulong perm)
diff --git a/src/lib9/ffork-pthread.c b/src/lib9/ffork-pthread.c
t@@ -2,6 +2,7 @@
 #include 
 #include 
 #include 
+#include "9proc.h"
 
 extern int __isthreaded;
 int
diff --git a/src/lib9/open.c b/src/lib9/open.c
t@@ -2,6 +2,9 @@
 #include 
 #define NOPLAN9DEFINES
 #include 
+#ifndef O_DIRECT
+#define O_DIRECT 0
+#endif
 
 int
 p9open(char *name, int mode)
diff --git a/src/libbio/mkfile b/src/libbio/mkfile
t@@ -27,5 +27,5 @@ HFILES=\
 <$PLAN9/src/mksyslib
 
 bcat: bcat.$O $PLAN9/lib/$LIB
-        $LD -o bcat bcat.$O -lbio -lfmt -lutf
+        $LD -o bcat bcat.$O -lbio -l9
 
diff --git a/src/libmp/PowerMacintosh/mkfile b/src/libmp/PowerMacintosh/mkfile
t@@ -0,0 +1,2 @@
+%:Q:
+        #
diff --git a/src/libmp/sun4u/mkfile b/src/libmp/sun4u/mkfile
t@@ -0,0 +1,2 @@
+%:Q:
+        #
diff --git a/src/libsec/PowerMacintosh/mkfile b/src/libsec/PowerMacintosh/mkfile
t@@ -0,0 +1,2 @@
+%:Q:
+        #
diff --git a/src/libsec/PowerMacintosh/x b/src/libsec/PowerMacintosh/x
t@@ -0,0 +1 @@
+placeholder
diff --git a/src/libsec/sun4u/mkfile b/src/libsec/sun4u/mkfile
t@@ -0,0 +1,2 @@
+%:Q:
+        #
diff --git a/src/libsec/sun4u/x b/src/libsec/sun4u/x
t@@ -0,0 +1 @@
+placeholder
diff --git a/src/mkfile b/src/mkfile
t@@ -28,6 +28,7 @@ mkmk.sh:VD:
         ) | sed '
                 s/'$SYSNAME'/$SYSNAME/g
                 s/'$OBJTYPE'/$OBJTYPE/g
+                s/`membername \$newprereq`/*.o/g
                 s/9[ac] *getcallerpc-.*/9a getcallerpc-$OBJTYPE.s || 9c getcallerpc-$OBJTYPE.c/
                 s/^9[ac] *tas-.*/9a tas-$OBJTYPE.s || 9c tas-$OBJTYPE.c/
         ' >$target
diff --git a/src/mkmk.sh b/src/mkmk.sh
t@@ -34,6 +34,7 @@ cd lib9
 9c  errstr.c
 9c  exec.c
 9c  fcallfmt.c
+9c  fork.c
 9c  ffork-$SYSNAME.c
 9c  get9root.c
 9a getcallerpc-$OBJTYPE.s || 9c getcallerpc-$OBJTYPE.c
t@@ -52,6 +53,7 @@ cd lib9
 9c  mallocz.c
 9c  nan.c
 9c  needsrcquote.c
+9c  needstack.c
 9c  netmkaddr.c
 9c  notify.c
 9c  nrand.c
t@@ -72,9 +74,11 @@ cd lib9
 9c  sleep.c
 9c  strecpy.c
 9c  sysfatal.c
+9c  sysname.c
 9a tas-$OBJTYPE.s || 9c tas-$OBJTYPE.c
 9c  time.c
 9c  tokenize.c
+9c  truerand.c
 9c  u16.c
 9c  u32.c
 9c  u64.c
t@@ -134,7 +138,7 @@ cd lib9
 9c  utf/utfrrune.c
 9c  utf/utfrune.c
 9c  utf/utfutf.c
-9ar rvc ../../lib/lib9.a _exits.o _p9dialparse.o _p9dir.o _p9proc.o announce.o argv0.o atexit.o atoi.o atol.o atoll.o atnotify.o await.o cistrcmp.o cistrncmp.o cistrstr.o cleanname.o convD2M.o convM2D.o convM2S.o convS2M.o create.o ctime.o date.o dial.o dirfstat.o dirfwstat.o dirmodefmt.o dirread.o dirstat.o dirwstat.o dup.o encodefmt.o errstr.o exec.o fcallfmt.o ffork-$SYSNAME.o get9root.o getcallerpc-$OBJTYPE.o getenv.o getfields.o getns.o getuser.o getwd.o jmp.o lrand.o lnrand.o lock.o main.o malloc.o malloctag.o mallocz.o nan.o needsrcquote.o netmkaddr.o notify.o nrand.o nulldir.o open.o opentemp.o pipe.o post9p.o postnote.o qlock.o quote.o read9pmsg.o readn.o rendez-$SYSNAME.o rfork.o seek.o sendfd.o sleep.o strecpy.o sysfatal.o tas-$OBJTYPE.o time.o tokenize.o u16.o u32.o u64.o unsharp.o wait.o waitpid.o dofmt.o fltfmt.o fmt.o fmtfd.o fmtfdflush.o fmtlock.o fmtprint.o fmtquote.o fmtrune.o fmtstr.o fmtvprint.o fprint.o nan64.o print.o runefmtstr.o runeseprint.o runesmprint.o runesnprint.o runesprint.o runevseprint.o runevsmprint.o runevsnprint.o seprint.o smprint.o snprint.o sprint.o strtod.o vfprint.o vseprint.o vsmprint.o vsnprint.o charstod.o pow10.o rune.o runestrcat.o runestrchr.o runestrcmp.o runestrcpy.o runestrdup.o runestrlen.o runestrecpy.o runestrncat.o runestrncmp.o runestrncpy.o runestrrchr.o runestrstr.o runetype.o utfecpy.o utflen.o utfnlen.o utfrrune.o utfrune.o utfutf.o
+9ar rvc $PLAN9/lib/lib9.a *.o
 cd ..
 cd libbio
 9c  bbuffered.c
t@@ -154,7 +158,7 @@ cd libbio
 9c  bwrite.c
 9c  bgetrune.c
 9c  bputrune.c
-9ar rvc ../../lib/libbio.a bbuffered.o bfildes.o bflush.o bfmt.o bgetc.o bgetd.o binit.o boffset.o bprint.o bputc.o brdline.o brdstr.o bread.o bseek.o bwrite.o bgetrune.o bputrune.o
+9ar rvc $PLAN9/lib/libbio.a *.o
 cd ..
 cd libregexp
 9c  regcomp.c
t@@ -164,7 +168,7 @@ cd libregexp
 9c  regaux.c
 9c  rregexec.c
 9c  rregsub.c
-9ar rvc ../../lib/libregexp9.a regcomp.o regerror.o regexec.o regsub.o regaux.o rregexec.o rregsub.o
+9ar rvc $PLAN9/lib/libregexp9.a *.o
 cd ..
 cd cmd/mk
 9c  arc.c
t@@ -189,6 +193,6 @@ cd cmd/mk
 9c  varsub.c
 9c  word.c
 9c  unix.c
-9l -o o.mk arc.o archive.o bufblock.o env.o file.o graph.o job.o lex.o main.o match.o mk.o parse.o recipe.o rule.o run.o sh.o shprint.o symtab.o var.o varsub.o word.o unix.o ../../../lib/libregexp9.a ../../../lib/libbio.a ../../../lib/lib9.a 
-install -c o.mk ../../../bin/mk
+9l -o o.mk arc.o archive.o bufblock.o env.o file.o graph.o job.o lex.o main.o match.o mk.o parse.o recipe.o rule.o run.o sh.o shprint.o symtab.o var.o varsub.o word.o unix.o /Users/rsc/plan9/lib/libregexp9.a /Users/rsc/plan9/lib/libbio.a /Users/rsc/plan9/lib/lib9.a 
+install -c o.mk /Users/rsc/plan9/bin/mk
 cd ..
diff --git a/src/mksyslib b/src/mksyslib
t@@ -5,7 +5,7 @@ default:V:        $PLAN9/lib/$LIB
 
 $PLAN9/lib/$LIB(%):N: %
 $PLAN9/lib/$LIB:        ${OFILES:%=$PLAN9/lib/$LIB(%)}
-        ar rvc $PLAN9/lib/$LIB `membername $newprereq`
+        $AR rvc $PLAN9/lib/$LIB `membername $newprereq`
 
 &:n:        &.$O
         $AR rvc $PLAN9/lib/$LIB $stem.$O