Browse Source

Plan 9 from Bell Labs 2008-06-02

David du Colombier 13 years ago
parent
commit
ba18c61f41

+ 31 - 13
dist/replica/_plan9.db

@@ -113,7 +113,7 @@
 386/bin/aux/lines - 775 sys sys 1209614153 60657
 386/bin/aux/listen - 775 sys sys 1209614155 107731
 386/bin/aux/listen1 - 775 sys sys 1209614157 94801
-386/bin/aux/lpdaemon - 775 sys sys 1173754553 170710
+386/bin/aux/lpdaemon - 775 sys sys 1212291179 170620
 386/bin/aux/lpdsend - 775 sys sys 1173754553 157339
 386/bin/aux/lpsend - 775 sys sys 1178568255 51124
 386/bin/aux/mapd - 775 sys sys 1210392535 191190
@@ -432,7 +432,7 @@
 386/bin/syscall - 775 sys sys 1178568305 73944
 386/bin/tail - 775 sys sys 1209614631 66347
 386/bin/tar - 775 sys sys 1210392975 94658
-386/bin/tbl - 775 sys sys 1209614634 113431
+386/bin/tbl - 775 sys sys 1212291181 113459
 386/bin/tcs - 775 sys sys 1209614642 320140
 386/bin/tee - 775 sys sys 1148500692 38463
 386/bin/telco - 775 sys sys 1178568305 102103
@@ -6070,9 +6070,9 @@ sys/include/ape/select.h - 664 sys sys 944948760 779
 sys/include/ape/setjmp.h - 664 sys sys 944948760 421
 sys/include/ape/signal.h - 664 sys sys 944948760 2619
 sys/include/ape/stddef.h - 664 sys sys 1121977155 376
-sys/include/ape/stdio.h - 664 sys sys 1121977155 5006
+sys/include/ape/stdio.h - 664 sys sys 1212357943 5102
 sys/include/ape/stdlib.h - 664 sys sys 1038237536 1680
-sys/include/ape/string.h - 664 sys sys 1146061100 1250
+sys/include/ape/string.h - 664 sys sys 1212357943 1386
 sys/include/ape/sys - 20000000775 sys sys 1039727356 0
 sys/include/ape/sys/ioctl.h - 664 sys sys 969500381 341
 sys/include/ape/sys/limits.h - 664 sys sys 944948759 494
@@ -6090,9 +6090,9 @@ sys/include/ape/sys/un.h - 664 sys sys 944948759 1011
 sys/include/ape/sys/utsname.h - 664 sys sys 944948759 279
 sys/include/ape/sys/wait.h - 664 sys sys 1210370471 697
 sys/include/ape/termios.h - 664 sys sys 944948760 2745
-sys/include/ape/time.h - 664 sys sys 944948760 1016
+sys/include/ape/time.h - 664 sys sys 1212357943 1212
 sys/include/ape/u.h - 664 sys sys 1146097783 430
-sys/include/ape/unistd.h - 664 sys sys 1121977155 3993
+sys/include/ape/unistd.h - 664 sys sys 1212357944 4064
 sys/include/ape/utf.h - 664 sys sys 1070327359 1595
 sys/include/ape/utime.h - 664 sys sys 944948760 259
 sys/include/ar.h - 664 sys sys 1014929061 244
@@ -8711,7 +8711,7 @@ sys/src/ape/lib/ap/gen/strrchr.c - 664 sys sys 1014921988 162
 sys/src/ape/lib/ap/gen/strspn.c - 664 sys sys 1014921988 237
 sys/src/ape/lib/ap/gen/strstr.c - 664 sys sys 1014921987 382
 sys/src/ape/lib/ap/gen/strtod.c - 664 sys sys 1014921987 1434
-sys/src/ape/lib/ap/gen/strtok.c - 664 sys sys 1014921988 425
+sys/src/ape/lib/ap/gen/strtok.c - 664 sys sys 1212357942 505
 sys/src/ape/lib/ap/gen/strtol.c - 664 sys sys 1014921987 1223
 sys/src/ape/lib/ap/gen/strtoll.c - 664 sys sys 1038237525 1326
 sys/src/ape/lib/ap/gen/strtoul.c - 664 sys sys 1014921987 1220
@@ -8790,8 +8790,8 @@ sys/src/ape/lib/ap/plan9/close.c - 664 sys sys 1014921984 545
 sys/src/ape/lib/ap/plan9/convD2M.c - 664 sys sys 1014921986 1376
 sys/src/ape/lib/ap/plan9/convM2D.c - 664 sys sys 1014921986 1178
 sys/src/ape/lib/ap/plan9/creat.c - 664 sys sys 1014921984 226
-sys/src/ape/lib/ap/plan9/ctermid.c - 664 sys sys 1014921983 191
-sys/src/ape/lib/ap/plan9/ctime.c - 664 sys sys 1014921983 4916
+sys/src/ape/lib/ap/plan9/ctermid.c - 664 sys sys 1212357941 253
+sys/src/ape/lib/ap/plan9/ctime.c - 664 sys sys 1212357941 5234
 sys/src/ape/lib/ap/plan9/cuserid.c - 664 sys sys 1014921983 343
 sys/src/ape/lib/ap/plan9/dir.h - 664 sys sys 1048644334 2092
 sys/src/ape/lib/ap/plan9/dirread.c - 664 sys sys 1014921986 1659
@@ -8816,7 +8816,7 @@ sys/src/ape/lib/ap/plan9/getgid.c - 664 sys sys 1014921984 306
 sys/src/ape/lib/ap/plan9/getgrgid.c - 664 sys sys 1014921984 405
 sys/src/ape/lib/ap/plan9/getgrnam.c - 664 sys sys 1014921984 413
 sys/src/ape/lib/ap/plan9/getgroups.c - 664 sys sys 1014921985 142
-sys/src/ape/lib/ap/plan9/getlogin.c - 664 sys sys 1014921984 301
+sys/src/ape/lib/ap/plan9/getlogin.c - 664 sys sys 1212357941 392
 sys/src/ape/lib/ap/plan9/getpgrp.c - 664 sys sys 1014921985 442
 sys/src/ape/lib/ap/plan9/getpid.c - 664 sys sys 1014921984 308
 sys/src/ape/lib/ap/plan9/getppid.c - 664 sys sys 1014921984 339
@@ -8966,10 +8966,10 @@ sys/src/ape/lib/ap/stdio/sopenw.c - 664 sys sys 1014921982 287
 sys/src/ape/lib/ap/stdio/sprintf.c - 664 sys sys 1134052382 295
 sys/src/ape/lib/ap/stdio/sscanf.c - 664 sys sys 1014921982 238
 sys/src/ape/lib/ap/stdio/stdio.c - 664 sys sys 1014921982 209
-sys/src/ape/lib/ap/stdio/strerror.c - 664 sys sys 1184449249 2091
+sys/src/ape/lib/ap/stdio/strerror.c - 664 sys sys 1212357940 2214
 sys/src/ape/lib/ap/stdio/strtod.c - 664 sys sys 1014921983 14375
 sys/src/ape/lib/ap/stdio/tmpfile.c - 664 sys sys 1014921982 706
-sys/src/ape/lib/ap/stdio/tmpnam.c - 664 sys sys 1014921982 314
+sys/src/ape/lib/ap/stdio/tmpnam.c - 664 sys sys 1212357942 405
 sys/src/ape/lib/ap/stdio/ungetc.c - 664 sys sys 1038237533 491
 sys/src/ape/lib/ap/stdio/vfprintf.c - 664 sys sys 1087406384 14746
 sys/src/ape/lib/ap/stdio/vfscanf.c - 664 sys sys 1014921983 9100
@@ -9018,6 +9018,7 @@ sys/src/ape/lib/bsd/readv.c - 664 sys sys 1014921995 482
 sys/src/ape/lib/bsd/rresvport.c - 664 sys sys 1014921995 638
 sys/src/ape/lib/bsd/send.c - 664 sys sys 1014921995 446
 sys/src/ape/lib/bsd/sendto.c - 664 sys sys 1014921995 502
+sys/src/ape/lib/bsd/sethostent.c - 664 sys sys 1212357943 35
 sys/src/ape/lib/bsd/setlinebuf.c - 664 sys sys 1014921995 111
 sys/src/ape/lib/bsd/shutdown.c - 664 sys sys 1014921995 117
 sys/src/ape/lib/bsd/socket.c - 664 sys sys 1014921995 2810
@@ -9836,7 +9837,7 @@ sys/src/cmd/aux/gps/mkfile - 664 sys sys 1108397331 219
 sys/src/cmd/aux/gps/util.c - 664 sys sys 1107448815 2795
 sys/src/cmd/aux/lines.c - 664 sys sys 1015008782 546
 sys/src/cmd/aux/lis - 775 sys sys 944960794 45
-sys/src/cmd/aux/listen.c - 664 sys sys 1181789265 9292
+sys/src/cmd/aux/listen.c - 664 sys sys 1212348329 10009
 sys/src/cmd/aux/listen1.c - 664 sys sys 1143759349 2005
 sys/src/cmd/aux/mkfile - 664 sys sys 1191473306 1008
 sys/src/cmd/aux/mklatinkbd.c - 664 sys sys 953253425 3813
@@ -15893,3 +15894,20 @@ usr/glenda/lib/profile - 664 glenda glenda 1105128663 890
 usr/glenda/readme.acme - 664 glenda glenda 1019860628 4753
 usr/glenda/readme.rio - 664 glenda glenda 1019860628 6370
 usr/glenda/tmp - 20000000775 glenda glenda 1018802620 0
+386/bin/eqn - 775 sys sys 1212377326 245242
+386/bin/games/mp3dec - 775 sys sys 1212377334 389058
+386/bin/grap - 775 sys sys 1212377340 283153
+386/bin/gs - 775 sys sys 1212377531 10248192
+386/bin/ape/diff - 775 sys sys 1212377290 352888
+386/bin/ape/diff3 - 775 sys sys 1212377294 190748
+386/bin/ape/kill - 775 sys sys 1212377297 140453
+386/bin/ape/patch - 775 sys sys 1212377302 306636
+386/bin/ape/sh - 775 sys sys 1212377310 482209
+386/bin/aux/listen - 775 sys sys 1212377312 108405
+386/bin/aux/lpdaemon - 775 sys sys 1212377314 170862
+386/bin/aux/lpdsend - 775 sys sys 1212377318 157412
+386/bin/compress - 775 sys sys 1212377321 167330
+386/bin/troff - 775 sys sys 1212377603 361398
+386/lib/ape/libap.a - 664 sys sys 1212377617 822090
+386/lib/ape/libbsd.a - 664 sys sys 1212377620 183900
+386/lib/ape/libdraw.a - 664 sys sys 1212377621 49152

+ 30 - 29
dist/replica/plan9.db

@@ -24,16 +24,16 @@
 386/bin/ape - 20000000775 sys sys 1016944144 0
 386/bin/ape/basename - 775 sys sys 1173754547 134719
 386/bin/ape/cc - 775 sys sys 1168402263 70642
-386/bin/ape/diff - 775 sys sys 1184529896 352356
-386/bin/ape/diff3 - 775 sys sys 1184529897 190456
+386/bin/ape/diff - 775 sys sys 1212377290 352888
+386/bin/ape/diff3 - 775 sys sys 1212377294 190748
 386/bin/ape/dirname - 775 sys sys 1173754549 134498
 386/bin/ape/expr - 775 sys sys 1173754549 144138
-386/bin/ape/kill - 775 sys sys 1184529897 140159
+386/bin/ape/kill - 775 sys sys 1212377297 140453
 386/bin/ape/make - 775 sys sys 1173754550 211605
-386/bin/ape/patch - 775 sys sys 1184529898 305940
+386/bin/ape/patch - 775 sys sys 1212377302 306636
 386/bin/ape/psh - 775 sys sys 1042220689 34
 386/bin/ape/sed - 775 sys sys 1173754551 160183
-386/bin/ape/sh - 775 sys sys 1184529899 481824
+386/bin/ape/sh - 775 sys sys 1212377310 482209
 386/bin/ape/stty - 775 sys sys 1148500571 41080
 386/bin/ape/tar - 775 sys sys 1168402264 62184
 386/bin/ape/uname - 775 sys sys 1173754552 134895
@@ -111,10 +111,10 @@
 386/bin/aux/hardcopy - 775 sys sys 1020319063 1699
 386/bin/aux/isvmware - 775 sys sys 1032486791 23997
 386/bin/aux/lines - 775 sys sys 1209614153 60657
-386/bin/aux/listen - 775 sys sys 1209614155 107731
+386/bin/aux/listen - 775 sys sys 1212377312 108405
 386/bin/aux/listen1 - 775 sys sys 1209614157 94801
-386/bin/aux/lpdaemon - 775 sys sys 1173754553 170710
-386/bin/aux/lpdsend - 775 sys sys 1173754553 157339
+386/bin/aux/lpdaemon - 775 sys sys 1212377314 170862
+386/bin/aux/lpdsend - 775 sys sys 1212377318 157412
 386/bin/aux/lpsend - 775 sys sys 1178568255 51124
 386/bin/aux/mapd - 775 sys sys 1210392535 191190
 386/bin/aux/mkflashfs - 775 sys sys 1210392539 67520
@@ -189,7 +189,7 @@
 386/bin/col - 775 sys sys 1209614219 63498
 386/bin/colors - 775 sys sys 1210392633 151189
 386/bin/comm - 775 sys sys 1209614221 61527
-386/bin/compress - 775 sys sys 1184529900 167036
+386/bin/compress - 775 sys sys 1212377321 167330
 386/bin/con - 775 sys sys 1203482824 78416
 386/bin/cp - 775 sys sys 1168402297 63454
 386/bin/cpp - 775 sys sys 1210392637 149307
@@ -229,7 +229,7 @@
 386/bin/echo - 775 sys sys 1168402304 57592
 386/bin/ecp - 775 sys sys 1179777651 72588
 386/bin/ed - 775 sys sys 1209614267 93474
-386/bin/eqn - 775 sys sys 1210476122 244950
+386/bin/eqn - 775 sys sys 1212377326 245242
 386/bin/execnet - 775 sys sys 1210392671 176948
 386/bin/exportfs - 775 sys sys 1210392675 162218
 386/bin/ext2srv - 775 sys sys 1210392679 178650
@@ -265,17 +265,17 @@
 386/bin/games/jukefs - 775 sys sys 1196742485 164538
 386/bin/games/mahjongg - 775 sys sys 1210392721 165427
 386/bin/games/memo - 775 sys sys 1210392726 156830
-386/bin/games/mp3dec - 775 sys sys 1198183090 388585
+386/bin/games/mp3dec - 775 sys sys 1212377334 389058
 386/bin/games/mp3enc - 775 sys sys 1196220182 530357
 386/bin/games/playlistfs - 775 sys sys 1210648934 149337
 386/bin/games/sokoban - 775 sys sys 1210563675 165646
 386/bin/games/sudoku - 775 sys sys 1210392735 171200
 386/bin/getmap - 775 sys sys 1168402311 65423
 386/bin/gif - 775 sys sys 1210476130 158695
-386/bin/grap - 775 sys sys 1193771861 282792
+386/bin/grap - 775 sys sys 1212377340 283153
 386/bin/graph - 775 sys sys 1210392743 129377
 386/bin/grep - 775 sys sys 1209614327 79510
-386/bin/gs - 775 sys sys 1188447224 13278980
+386/bin/gs - 775 sys sys 1212377531 10248192
 386/bin/gunzip - 775 sys sys 1210392746 80464
 386/bin/gview - 775 sys sys 1210392751 240948
 386/bin/gzip - 775 sys sys 1210392754 83529
@@ -432,7 +432,7 @@
 386/bin/syscall - 775 sys sys 1178568305 73944
 386/bin/tail - 775 sys sys 1209614631 66347
 386/bin/tar - 775 sys sys 1210392975 94658
-386/bin/tbl - 775 sys sys 1209614634 113431
+386/bin/tbl - 775 sys sys 1212291181 113459
 386/bin/tcs - 775 sys sys 1209614642 320140
 386/bin/tee - 775 sys sys 1148500692 38463
 386/bin/telco - 775 sys sys 1178568305 102103
@@ -449,7 +449,7 @@
 386/bin/tprof - 775 sys sys 1209614681 300993
 386/bin/tr - 775 sys sys 1168402355 62088
 386/bin/trace - 775 sys sys 1210392999 180686
-386/bin/troff - 775 sys sys 1210476137 361158
+386/bin/troff - 775 sys sys 1212377603 361398
 386/bin/troff2html - 775 sys sys 1209614684 84535
 386/bin/tweak - 775 sys sys 1210393003 193489
 386/bin/unicode - 775 sys sys 1209614690 62688
@@ -554,9 +554,9 @@
 386/lib - 20000000775 sys sys 1016826328 0
 386/lib/ape - 20000000775 sys sys 1070519112 0
 386/lib/ape/lib9.a - 664 sys sys 1205611022 8766
-386/lib/ape/libap.a - 664 sys sys 1210393239 820230
-386/lib/ape/libbsd.a - 664 sys sys 1210393243 183900
-386/lib/ape/libdraw.a - 664 sys sys 1210393257 631580
+386/lib/ape/libap.a - 664 sys sys 1212377617 822090
+386/lib/ape/libbsd.a - 664 sys sys 1212377620 183900
+386/lib/ape/libdraw.a - 664 sys sys 1212377621 49152
 386/lib/ape/libfmt.a - 664 sys sys 1146156980 156706
 386/lib/ape/libl.a - 664 sys sys 1143777857 9406
 386/lib/ape/libnet.a - 664 sys sys 1203828448 24090
@@ -6070,9 +6070,9 @@ sys/include/ape/select.h - 664 sys sys 944948760 779
 sys/include/ape/setjmp.h - 664 sys sys 944948760 421
 sys/include/ape/signal.h - 664 sys sys 944948760 2619
 sys/include/ape/stddef.h - 664 sys sys 1121977155 376
-sys/include/ape/stdio.h - 664 sys sys 1121977155 5006
+sys/include/ape/stdio.h - 664 sys sys 1212357943 5102
 sys/include/ape/stdlib.h - 664 sys sys 1038237536 1680
-sys/include/ape/string.h - 664 sys sys 1146061100 1250
+sys/include/ape/string.h - 664 sys sys 1212357943 1386
 sys/include/ape/sys - 20000000775 sys sys 1039727356 0
 sys/include/ape/sys/ioctl.h - 664 sys sys 969500381 341
 sys/include/ape/sys/limits.h - 664 sys sys 944948759 494
@@ -6090,9 +6090,9 @@ sys/include/ape/sys/un.h - 664 sys sys 944948759 1011
 sys/include/ape/sys/utsname.h - 664 sys sys 944948759 279
 sys/include/ape/sys/wait.h - 664 sys sys 1210370471 697
 sys/include/ape/termios.h - 664 sys sys 944948760 2745
-sys/include/ape/time.h - 664 sys sys 944948760 1016
+sys/include/ape/time.h - 664 sys sys 1212357943 1212
 sys/include/ape/u.h - 664 sys sys 1146097783 430
-sys/include/ape/unistd.h - 664 sys sys 1121977155 3993
+sys/include/ape/unistd.h - 664 sys sys 1212357944 4064
 sys/include/ape/utf.h - 664 sys sys 1070327359 1595
 sys/include/ape/utime.h - 664 sys sys 944948760 259
 sys/include/ar.h - 664 sys sys 1014929061 244
@@ -8711,7 +8711,7 @@ sys/src/ape/lib/ap/gen/strrchr.c - 664 sys sys 1014921988 162
 sys/src/ape/lib/ap/gen/strspn.c - 664 sys sys 1014921988 237
 sys/src/ape/lib/ap/gen/strstr.c - 664 sys sys 1014921987 382
 sys/src/ape/lib/ap/gen/strtod.c - 664 sys sys 1014921987 1434
-sys/src/ape/lib/ap/gen/strtok.c - 664 sys sys 1014921988 425
+sys/src/ape/lib/ap/gen/strtok.c - 664 sys sys 1212357942 505
 sys/src/ape/lib/ap/gen/strtol.c - 664 sys sys 1014921987 1223
 sys/src/ape/lib/ap/gen/strtoll.c - 664 sys sys 1038237525 1326
 sys/src/ape/lib/ap/gen/strtoul.c - 664 sys sys 1014921987 1220
@@ -8790,8 +8790,8 @@ sys/src/ape/lib/ap/plan9/close.c - 664 sys sys 1014921984 545
 sys/src/ape/lib/ap/plan9/convD2M.c - 664 sys sys 1014921986 1376
 sys/src/ape/lib/ap/plan9/convM2D.c - 664 sys sys 1014921986 1178
 sys/src/ape/lib/ap/plan9/creat.c - 664 sys sys 1014921984 226
-sys/src/ape/lib/ap/plan9/ctermid.c - 664 sys sys 1014921983 191
-sys/src/ape/lib/ap/plan9/ctime.c - 664 sys sys 1014921983 4916
+sys/src/ape/lib/ap/plan9/ctermid.c - 664 sys sys 1212357941 253
+sys/src/ape/lib/ap/plan9/ctime.c - 664 sys sys 1212357941 5234
 sys/src/ape/lib/ap/plan9/cuserid.c - 664 sys sys 1014921983 343
 sys/src/ape/lib/ap/plan9/dir.h - 664 sys sys 1048644334 2092
 sys/src/ape/lib/ap/plan9/dirread.c - 664 sys sys 1014921986 1659
@@ -8816,7 +8816,7 @@ sys/src/ape/lib/ap/plan9/getgid.c - 664 sys sys 1014921984 306
 sys/src/ape/lib/ap/plan9/getgrgid.c - 664 sys sys 1014921984 405
 sys/src/ape/lib/ap/plan9/getgrnam.c - 664 sys sys 1014921984 413
 sys/src/ape/lib/ap/plan9/getgroups.c - 664 sys sys 1014921985 142
-sys/src/ape/lib/ap/plan9/getlogin.c - 664 sys sys 1014921984 301
+sys/src/ape/lib/ap/plan9/getlogin.c - 664 sys sys 1212357941 392
 sys/src/ape/lib/ap/plan9/getpgrp.c - 664 sys sys 1014921985 442
 sys/src/ape/lib/ap/plan9/getpid.c - 664 sys sys 1014921984 308
 sys/src/ape/lib/ap/plan9/getppid.c - 664 sys sys 1014921984 339
@@ -8966,10 +8966,10 @@ sys/src/ape/lib/ap/stdio/sopenw.c - 664 sys sys 1014921982 287
 sys/src/ape/lib/ap/stdio/sprintf.c - 664 sys sys 1134052382 295
 sys/src/ape/lib/ap/stdio/sscanf.c - 664 sys sys 1014921982 238
 sys/src/ape/lib/ap/stdio/stdio.c - 664 sys sys 1014921982 209
-sys/src/ape/lib/ap/stdio/strerror.c - 664 sys sys 1184449249 2091
+sys/src/ape/lib/ap/stdio/strerror.c - 664 sys sys 1212357940 2214
 sys/src/ape/lib/ap/stdio/strtod.c - 664 sys sys 1014921983 14375
 sys/src/ape/lib/ap/stdio/tmpfile.c - 664 sys sys 1014921982 706
-sys/src/ape/lib/ap/stdio/tmpnam.c - 664 sys sys 1014921982 314
+sys/src/ape/lib/ap/stdio/tmpnam.c - 664 sys sys 1212357942 405
 sys/src/ape/lib/ap/stdio/ungetc.c - 664 sys sys 1038237533 491
 sys/src/ape/lib/ap/stdio/vfprintf.c - 664 sys sys 1087406384 14746
 sys/src/ape/lib/ap/stdio/vfscanf.c - 664 sys sys 1014921983 9100
@@ -9018,6 +9018,7 @@ sys/src/ape/lib/bsd/readv.c - 664 sys sys 1014921995 482
 sys/src/ape/lib/bsd/rresvport.c - 664 sys sys 1014921995 638
 sys/src/ape/lib/bsd/send.c - 664 sys sys 1014921995 446
 sys/src/ape/lib/bsd/sendto.c - 664 sys sys 1014921995 502
+sys/src/ape/lib/bsd/sethostent.c - 664 sys sys 1212357943 35
 sys/src/ape/lib/bsd/setlinebuf.c - 664 sys sys 1014921995 111
 sys/src/ape/lib/bsd/shutdown.c - 664 sys sys 1014921995 117
 sys/src/ape/lib/bsd/socket.c - 664 sys sys 1014921995 2810
@@ -9836,7 +9837,7 @@ sys/src/cmd/aux/gps/mkfile - 664 sys sys 1108397331 219
 sys/src/cmd/aux/gps/util.c - 664 sys sys 1107448815 2795
 sys/src/cmd/aux/lines.c - 664 sys sys 1015008782 546
 sys/src/cmd/aux/lis - 775 sys sys 944960794 45
-sys/src/cmd/aux/listen.c - 664 sys sys 1181789265 9292
+sys/src/cmd/aux/listen.c - 664 sys sys 1212348329 10009
 sys/src/cmd/aux/listen1.c - 664 sys sys 1143759349 2005
 sys/src/cmd/aux/mkfile - 664 sys sys 1191473306 1008
 sys/src/cmd/aux/mklatinkbd.c - 664 sys sys 953253425 3813

+ 31 - 0
dist/replica/plan9.log

@@ -19783,3 +19783,34 @@
 1212271204 1 c sys/src/libsec/port/rsatest.c - 664 sys sys 1212270788 1083
 1212273004 0 c sys/lib/tmac/tmac.s - 664 sys sys 1212272101 23059
 1212274804 0 c sys/man/6/style - 664 sys sys 1212274740 2813
+1212292804 0 c 386/bin/aux/lpdaemon - 775 sys sys 1212291179 170620
+1212292804 1 c 386/bin/tbl - 775 sys sys 1212291181 113459
+1212348604 0 c sys/src/cmd/aux/listen.c - 664 sys sys 1212348329 10009
+1212359404 0 c sys/include/ape/stdio.h - 664 sys sys 1212357943 5102
+1212359404 1 c sys/include/ape/string.h - 664 sys sys 1212357943 1386
+1212359404 2 c sys/include/ape/time.h - 664 sys sys 1212357943 1212
+1212359404 3 c sys/include/ape/unistd.h - 664 sys sys 1212357944 4064
+1212359404 4 c sys/src/ape/lib/ap/gen/strtok.c - 664 sys sys 1212357942 505
+1212359404 5 c sys/src/ape/lib/ap/plan9/ctermid.c - 664 sys sys 1212357941 253
+1212359404 6 c sys/src/ape/lib/ap/plan9/ctime.c - 664 sys sys 1212357941 5234
+1212359404 7 c sys/src/ape/lib/ap/plan9/getlogin.c - 664 sys sys 1212357941 392
+1212359404 8 c sys/src/ape/lib/ap/stdio/strerror.c - 664 sys sys 1212357940 2214
+1212359404 9 c sys/src/ape/lib/ap/stdio/tmpnam.c - 664 sys sys 1212357942 405
+1212359404 10 a sys/src/ape/lib/bsd/sethostent.c - 664 sys sys 1212357943 35
+1212377410 0 c 386/bin/eqn - 775 sys sys 1212377326 245242
+1212377410 1 c 386/bin/games/mp3dec - 775 sys sys 1212377334 389058
+1212377410 2 c 386/bin/grap - 775 sys sys 1212377340 283153
+1212377410 3 c 386/bin/gs - 775 sys sys 1212377531 10248192
+1212377410 4 c 386/bin/ape/diff - 775 sys sys 1212377290 352888
+1212377410 5 c 386/bin/ape/diff3 - 775 sys sys 1212377294 190748
+1212377410 6 c 386/bin/ape/kill - 775 sys sys 1212377297 140453
+1212377410 7 c 386/bin/ape/patch - 775 sys sys 1212377302 306636
+1212377410 8 c 386/bin/ape/sh - 775 sys sys 1212377310 482209
+1212377410 9 c 386/bin/aux/listen - 775 sys sys 1212377312 108405
+1212377410 10 c 386/bin/aux/lpdaemon - 775 sys sys 1212377314 170862
+1212377410 11 c 386/bin/aux/lpdsend - 775 sys sys 1212377318 157412
+1212377410 12 c 386/bin/compress - 775 sys sys 1212377321 167330
+1212377410 13 c 386/bin/troff - 775 sys sys 1212377603 361398
+1212377410 14 c 386/lib/ape/libap.a - 664 sys sys 1212377617 822090
+1212377410 15 c 386/lib/ape/libbsd.a - 664 sys sys 1212377620 183900
+1212377410 16 c 386/lib/ape/libdraw.a - 664 sys sys 1212377621 49152

+ 5 - 0
sys/include/ape/stdio.h

@@ -133,6 +133,11 @@ extern FILE* fdopen(int, const char*);
 extern char *ctermid(char *);
 #endif
 
+#ifdef _REENTRANT_SOURCE
+extern char *tmpnam_r(char *);
+extern char *ctermid_r(char *);
+#endif
+
 #ifdef _BSD_EXTENSION
 #pragma lib "/$M/lib/ape/libbsd.a"
 extern FILE *popen(char *, char *);

+ 5 - 0
sys/include/ape/string.h

@@ -31,6 +31,11 @@ extern void *memset(void *, int, size_t);
 extern char *strerror(int);
 extern size_t strlen(const char *);
 
+#ifdef _REENTRANT_SOURCE
+extern char *strerror_r(int, const char *, int);
+extern char *strtok_r(char *, const char *, char **);
+#endif
+
 #ifdef _BSD_EXTENSION
 #include <bsd.h>
 #endif

+ 6 - 0
sys/include/ape/time.h

@@ -44,6 +44,12 @@ extern struct tm *gmtime(const time_t *);
 extern struct tm *localtime(const time_t *);
 extern size_t strftime(char *, size_t, const char *, const struct tm *);
 
+#ifdef _REENTRANT_SOURCE
+extern struct tm *gmtime_r(const time_t *, struct tm *);
+extern struct tm *localtime_r(const time_t *, struct tm *);
+extern char *ctime_r(const time_t *, char *);
+#endif
+
 #ifdef _POSIX_SOURCE
 extern void tzset(void);
 #endif

+ 4 - 0
sys/include/ape/unistd.h

@@ -149,6 +149,10 @@ extern pid_t tcgetpgrp(int);
 extern int tcsetpgrp(int, pid_t);
 #endif
 
+#ifdef _REENTRANT_SOURCE
+extern char *getlogin_r(char *, int);
+#endif
+
 /* berkeley specific functions */
 #ifdef _BSD_EXTENSION
 #include <bsd.h>

+ 12 - 5
sys/src/ape/lib/ap/gen/strtok.c

@@ -3,16 +3,15 @@
 #define	N	256
 
 char*
-strtok(char *s, const char *b)
+strtok_r(char *s, const char *b, char **last)
 {
-	static char *under_rock;
 	char map[N], *os;
 
 	memset(map, 0, N);
 	while(*b)
 		map[*(unsigned char*)b++] = 1;
 	if(s == 0)
-		s = under_rock;
+		s = *last;
 	while(map[*(unsigned char*)s++])
 		;
 	if(*--s == 0)
@@ -20,10 +19,18 @@ strtok(char *s, const char *b)
 	os = s;
 	while(map[*(unsigned char*)s] == 0)
 		if(*s++ == 0) {
-			under_rock = s-1;
+			*last = s-1;
 			return os;
 		}
 	*s++ = 0;
-	under_rock = s;
+	*last = s;
 	return os;
 }
+
+char*
+strtok(char *s, const char *b)
+{
+	static char *under_rock;
+
+	return strtok_r(s, b, &under_rock);
+}

+ 6 - 0
sys/src/ape/lib/ap/plan9/ctermid.c

@@ -12,3 +12,9 @@ ctermid(char *s)
 	strncpy(s, "/dev/cons", sizeof buf);
 	return(s);
 }
+
+char *
+ctermid_r(char *s)
+{
+	return s ? ctermid(s) : NULL;
+}

+ 79 - 58
sys/src/ape/lib/ap/plan9/ctime.c

@@ -50,11 +50,12 @@ static	char	dmsize[12] =
 
 static	int	dysize(int);
 static	void	ct_numb(char*, int);
-
-#define	TZSIZE	150
 static	void	readtimezone(void);
 static	int	rd_name(char**, char*);
 static	int	rd_long(char**, long*);
+
+#define	TZSIZE	150
+
 static
 struct
 {
@@ -72,37 +73,11 @@ ctime(const time_t *t)
 }
 
 struct tm*
-localtime(const time_t *timp)
-{
-	struct tm *ct;
-	time_t t, tim;
-	long *p;
-	int i, dlflag;
-
-	tim = *timp;
-	if(timezone.stname[0] == 0)
-		readtimezone();
-	t = tim + timezone.stdiff;
-	dlflag = 0;
-	for(p = timezone.dlpairs; *p; p += 2)
-		if(t >= p[0])
-		if(t < p[1]) {
-			t = tim + timezone.dldiff;
-			dlflag++;
-			break;
-		}
-	ct = gmtime(&t);
-	ct->tm_isdst = dlflag;
-	return ct;
-}
-
-struct tm*
-gmtime(const time_t *timp)
+gmtime_r(const time_t *timp, struct tm *result)
 {
 	int d0, d1;
 	long hms, day;
 	time_t tim;
-	static struct tm xtime;
 
 	tim = *timp;
 	/*
@@ -118,11 +93,11 @@ gmtime(const time_t *timp)
 	/*
 	 * generate hours:minutes:seconds
 	 */
-	xtime.tm_sec = hms % 60;
+	result->tm_sec = hms % 60;
 	d1 = hms / 60;
-	xtime.tm_min = d1 % 60;
+	result->tm_min = d1 % 60;
 	d1 /= 60;
-	xtime.tm_hour = d1;
+	result->tm_hour = d1;
 
 	/*
 	 * day is the day number.
@@ -130,7 +105,7 @@ gmtime(const time_t *timp)
 	 * The addend is 4 mod 7 (1/1/1970 was Thursday)
 	 */
 
-	xtime.tm_wday = (day + 7340036L) % 7;
+	result->tm_wday = (day + 7340036L) % 7;
 
 	/*
 	 * year number
@@ -141,8 +116,8 @@ gmtime(const time_t *timp)
 	else
 		for (d1 = 70; day < 0; d1--)
 			day += dysize(d1-1);
-	xtime.tm_year = d1;
-	xtime.tm_yday = d0 = day;
+	result->tm_year = d1;
+	result->tm_yday = d0 = day;
 
 	/*
 	 * generate month
@@ -153,43 +128,90 @@ gmtime(const time_t *timp)
 	for(d1 = 0; d0 >= dmsize[d1]; d1++)
 		d0 -= dmsize[d1];
 	dmsize[1] = 28;
-	xtime.tm_mday = d0 + 1;
-	xtime.tm_mon = d1;
-	xtime.tm_isdst = 0;
-	return &xtime;
+	result->tm_mday = d0 + 1;
+	result->tm_mon = d1;
+	result->tm_isdst = 0;
+	return result;
+}
+
+struct tm*
+gmtime(const time_t *timp)
+{
+	static struct tm xtime;
+
+	return gmtime_r(timp, &xtime);
+}
+
+struct tm*
+localtime_r(const time_t *timp, struct tm *result)
+{
+	struct tm *ct;
+	time_t t, tim;
+	long *p;
+	int i, dlflag;
+
+	tim = *timp;
+	if(timezone.stname[0] == 0)
+		readtimezone();
+	t = tim + timezone.stdiff;
+	dlflag = 0;
+	for(p = timezone.dlpairs; *p; p += 2)
+		if(t >= p[0])
+		if(t < p[1]) {
+			t = tim + timezone.dldiff;
+			dlflag++;
+			break;
+		}
+	ct = gmtime_r(&t, result);
+	ct->tm_isdst = dlflag;
+	return ct;
+}
+
+struct tm*
+localtime(const time_t *timp)
+{
+	static struct tm xtime;
+
+	return localtime_r(timp, &xtime);
 }
 
 char*
-asctime(const struct tm *t)
+asctime_r(const struct tm *t, char *buf)
 {
 	char *ncp;
-	static char cbuf[30];
 
-	strcpy(cbuf, "Thu Jan 01 00:00:00 1970\n");
+	strcpy(buf, "Thu Jan 01 00:00:00 1970\n");
 	ncp = &"SunMonTueWedThuFriSat"[t->tm_wday*3];
-	cbuf[0] = *ncp++;
-	cbuf[1] = *ncp++;
-	cbuf[2] = *ncp;
+	buf[0] = *ncp++;
+	buf[1] = *ncp++;
+	buf[2] = *ncp;
 	ncp = &"JanFebMarAprMayJunJulAugSepOctNovDec"[t->tm_mon*3];
-	cbuf[4] = *ncp++;
-	cbuf[5] = *ncp++;
-	cbuf[6] = *ncp;
-	ct_numb(cbuf+8, t->tm_mday);
-	ct_numb(cbuf+11, t->tm_hour+100);
-	ct_numb(cbuf+14, t->tm_min+100);
-	ct_numb(cbuf+17, t->tm_sec+100);
+	buf[4] = *ncp++;
+	buf[5] = *ncp++;
+	buf[6] = *ncp;
+	ct_numb(buf+8, t->tm_mday);
+	ct_numb(buf+11, t->tm_hour+100);
+	ct_numb(buf+14, t->tm_min+100);
+	ct_numb(buf+17, t->tm_sec+100);
 	if(t->tm_year >= 100) {
-		cbuf[20] = '2';
-		cbuf[21] = '0';
+		buf[20] = '2';
+		buf[21] = '0';
 	}
-	ct_numb(cbuf+22, t->tm_year+100);
-	return cbuf;
+	ct_numb(buf+22, t->tm_year+100);
+	return buf;
+}
+
+char*
+asctime(const struct tm *t)
+{
+	static char cbuf[30];
+
+	return asctime_r(t, cbuf);
 }
 
 static
 dysize(int y)
 {
-
 	if((y%4) == 0)
 		return 366;
 	return 365;
@@ -199,7 +221,6 @@ static
 void
 ct_numb(char *cp, int n)
 {
-
 	cp[0] = ' ';
 	if(n >= 10)
 		cp[0] = (n/10)%10 + '0';

+ 11 - 3
sys/src/ape/lib/ap/plan9/getlogin.c

@@ -5,15 +5,23 @@
 #include <sys/limits.h>
 
 char *
-getlogin(void)
+getlogin_r(char *buf, int len)
 {
-	static char buf[NAME_MAX+1];
 	int f, n;
 
 	f = open("/dev/user", O_RDONLY);
 	if(f < 0)
 		return 0;
-	n = read(f, buf, NAME_MAX+1);
+	n = read(f, buf, len);
+	buf[len-1] = 0;
 	close(f);
 	return (n>=0)? buf : 0;
 }
+
+char *
+getlogin(void)
+{
+	static char buf[NAME_MAX+1];
+
+	return getlogin_r(buf, sizeof buf);
+}

+ 12 - 1
sys/src/ape/lib/ap/stdio/strerror.c

@@ -4,9 +4,11 @@
  * Shouldn't really call this sys_errlist or make it
  * externally visible, but too many programs in X assume it...
  */
+#include <string.h>
 #include <errno.h>
 
 #include "iolib.h"
+
 char *sys_errlist[] = {
 	"Error 0",
 	"Too big",
@@ -81,7 +83,9 @@ char *sys_errlist[] = {
 int sys_nerr = _IO_nerr;
 extern char _plan9err[];
 
-char *strerror(int n){
+char *
+strerror(int n)
+{
 	if(n == EPLAN9)
 		return _plan9err;
 	if(n >= 0 && n < _IO_nerr)
@@ -93,3 +97,10 @@ char *strerror(int n){
 	else
 		return "Unknown error";
 }
+
+char *
+strerror_r(int n, char *buf, int len)
+{
+	strncpy(buf, strerror(n), len);
+	buf[len-1] = 0;
+}

+ 20 - 8
sys/src/ape/lib/ap/stdio/tmpnam.c

@@ -4,18 +4,30 @@
 #include "iolib.h"
 #include <string.h>
 
-char *tmpnam(char *s){
-	static char name[]="/tmp/tn000000000000";
+char *
+tmpnam(char *s)
+{
+	static char name[] = "/tmp/tn000000000000";
 	char *p;
-	do{
-		p=name+7;
-		while(*p=='9') *p++='0';
-		if(*p=='\0') return NULL;
+
+	do {
+		p = name + 7;
+		while (*p == '9')
+			*p++ = '0';
+		if (*p == '\0')
+			return NULL;
 		++*p;
-	}while(access(name, 0)==0);
-	if(s){
+	} while (access(name, 0) == 0);
+	if (s) {
 		strcpy(s, name);
 		return s;
 	}
 	return name;
 }
+
+
+char *
+tmpnam_r(char *s)
+{
+	return s ? tmpnam(s) : NULL;
+}

+ 5 - 0
sys/src/ape/lib/bsd/sethostent.c

@@ -0,0 +1,5 @@
+int
+sethostent(int)
+{
+	return 0;
+}

+ 59 - 19
sys/src/cmd/aux/listen.c

@@ -18,6 +18,7 @@ struct Announce
 	Announce	*next;
 	char	*a;
 	int	announced;
+	int	whined;
 };
 
 int	readstr(char*, char*, char*, int);
@@ -43,7 +44,8 @@ char *namespace;
 void
 usage(void)
 {
-	error("usage: aux/listen [-q] [-n namespace] [-d servdir] [-t trustdir] [proto]");
+	error("usage: aux/listen [-q] [-n namespace] [-d servdir] [-t trustdir]"
+		" [proto]");
 }
 
 /*
@@ -150,8 +152,9 @@ void
 listendir(char *protodir, char *srvdir, int trusted)
 {
 	int ctl, pid, start;
+	char dir[40], err[128];
 	Announce *a;
-	char dir[40];
+	Waitmsg *wm;
 
 	if (srvdir == 0)
 		return;
@@ -198,9 +201,16 @@ listendir(char *protodir, char *srvdir, int trusted)
 				for(;;){
 					ctl = announce(a->a, dir);
 					if(ctl < 0) {
-						syslog(1, listenlog,
-						   "giving up on %s: %r", a->a);
-						exits("ctl");
+						errstr(err, sizeof err);
+						if (!a->whined)
+							syslog(1, listenlog,
+							   "giving up on %s: %r",
+							a->a);
+						if(strstr(err, "address in use")
+						    != nil)
+							exits("addr-in-use");
+						else
+							exits("ctl");
 					}
 					dolisten(proto, dir, ctl, srvdir, a->a);
 					close(ctl);
@@ -214,10 +224,17 @@ listendir(char *protodir, char *srvdir, int trusted)
 		/* pick up any children that gave up and sleep for at least 60 seconds */
 		start = time(0);
 		alarm(60*1000);
-		while((pid = waitpid()) > 0)
+		while((wm = wait()) != nil) {
 			for(a = announcements; a; a = a->next)
-				if(a->announced == pid)
+				if(a->announced == wm->pid) {
 					a->announced = 0;
+					if (strstr(wm->msg, "addr-in-use") !=
+					    nil)
+						/* don't fill log file */
+						a->whined = 1;
+				}
+			free(wm);
+		}
 		alarm(0);
 		start = 60 - (time(0)-start);
 		if(start > 0)
@@ -230,15 +247,9 @@ listendir(char *protodir, char *srvdir, int trusted)
  *  make a list of all services to announce for
  */
 void
-addannounce(char *fmt, ...)
+addannounce(char *str)
 {
 	Announce *a, **l;
-	char str[128];
-	va_list arg;
-
-	va_start(arg, fmt);
-	vseprint(str, str+sizeof(str), fmt, arg);
-	va_end(arg);
 
 	/* look for duplicate */
 	l = &announcements;
@@ -258,6 +269,30 @@ addannounce(char *fmt, ...)
 	*l = a;
 }
 
+/*
+ *  delete a service for announcement list
+ */
+void
+delannounce(char *str)
+{
+	Announce *a, **l;
+
+	/* look for service */
+	l = &announcements;
+	for(a = announcements; a; a = a->next){
+		if(strcmp(str, a->a) == 0)
+			break;
+		l = &a->next;
+	}
+	if (a == nil)
+		return;
+	*l = a->next;			/* drop from the list */
+	if (a->announced > 0)
+		postnote(PNPROC, a->announced, "die");
+	a->announced = 0;
+	free(a);
+}
+
 static int
 ignore(char *srvdir, char *name)
 {
@@ -276,6 +311,7 @@ scandir(char *proto, char *protodir, char *dname)
 {
 	int fd, i, n, nlen;
 	char *nm;
+	char ds[128];
 	Dir *db;
 
 	fd = open(dname, OREAD);
@@ -286,11 +322,15 @@ scandir(char *proto, char *protodir, char *dname)
 	while((n=dirread(fd, &db)) > 0){
 		for(i=0; i<n; i++){
 			nm = db[i].name;
-			if(db[i].qid.type&QTDIR ||
-			    strncmp(nm, proto, nlen) != 0 ||
-			    ignore(dname, nm))
-				continue;
-			addannounce("%s!*!%s", protodir, nm+nlen);
+			if(!(db[i].qid.type&QTDIR) &&
+			    strncmp(nm, proto, nlen) == 0) {
+				snprint(ds, sizeof ds, "%s!*!%s", protodir,
+					nm + nlen);
+				if (ignore(dname, nm))
+					delannounce(ds);
+				else
+					addannounce(ds);
+			}
 		}
 		free(db);
 	}