mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
- removed the mit-pthreads subdirectory on Monty's request (mit-pthreads
is now available as a separate downloadable tarball instead) - modified the RPM spec file according to discussions with Monty, Jani, Heikki and David (corrected build options, updated Packager tag) BitKeeper/deleted/.del-.cvsignore~a89e3e9e63c5a3bd: Delete: mit-pthreads/.cvsignore BitKeeper/deleted/.del-.cvsignore~bf28c9fe60433e24: Delete: mit-pthreads/bin/.cvsignore BitKeeper/deleted/.del-.cvsignore~d5cf75745b89100d: Delete: mit-pthreads/bin/finger/.cvsignore BitKeeper/deleted/.del-COPYING.GNU~31abf6d2809c1fef: Delete: mit-pthreads/config/COPYING.GNU BitKeeper/deleted/.del-COPYRIGHT~7842aebc82116632: Delete: mit-pthreads/COPYRIGHT BitKeeper/deleted/.del-COPYRIGHT~ef5806b6811e63ab: Delete: mit-pthreads/config/COPYRIGHT BitKeeper/deleted/.del-Changes-mysql~445374605285aaf4: Delete: mit-pthreads/Changes-mysql BitKeeper/deleted/.del-FAQ~e82ab622cd43d1c7: Delete: mit-pthreads/FAQ BitKeeper/deleted/.del-GNUmakefile~d97c072510c28842: Delete: mit-pthreads/GNUmakefile BitKeeper/deleted/.del-Makefile.in~269b19b1a2f83ee: Delete: mit-pthreads/bin/finger/Makefile.in BitKeeper/deleted/.del-Makefile.in~66f94b416da3bd74: Delete: mit-pthreads/bin/Makefile.in BitKeeper/deleted/.del-NOTES_OSR5_BUILD_SKUNKWARE97~b063fc094fa7696a: Delete: mit-pthreads/NOTES_OSR5_BUILD_SKUNKWARE97 BitKeeper/deleted/.del-NOTES~cca58e41915b6f62: Delete: mit-pthreads/NOTES BitKeeper/deleted/.del-README~2c6f3523303f43d: Delete: mit-pthreads/README BitKeeper/deleted/.del-TODO-mysql~b9a2bcd2a89b5978: Delete: mit-pthreads/TODO-mysql BitKeeper/deleted/.del-Whats_New~1a2bc87c9dbcbdc7: Delete: mit-pthreads/Whats_New BitKeeper/deleted/.del-configure~3a559fe227f8c862: Delete: mit-pthreads/configure BitKeeper/deleted/.del-finger.c~d9bfc7077dd32680: Delete: mit-pthreads/bin/finger/finger.c BitKeeper/deleted/.del-net.c~890d8753919ddb8: Delete: mit-pthreads/bin/finger/net.c BitKeeper/deleted/.del-GNUmakefile.inc~cc8eaaca8fff1bf3: Delete: mit-pthreads/gen/GNUmakefile.inc BitKeeper/deleted/.del-GNUmakefile.in~8113ff7dc43666da: Delete: mit-pthreads/config/GNUmakefile.in BitKeeper/deleted/.del-Makefile.inc~60b385fe35d2772b: Delete: mit-pthreads/gen/Makefile.inc BitKeeper/deleted/.del-Makefile.in~8d3d048cd14f625d: Delete: mit-pthreads/config/Makefile.in BitKeeper/deleted/.del-acconfig.h~ae65211ac16516de: Delete: mit-pthreads/config/acconfig.h BitKeeper/deleted/.del-aclocal.m4~440953e8e022a3c1: Delete: mit-pthreads/config/aclocal.m4 BitKeeper/deleted/.del-config.flags.in~d9f6e7aaeefa55b5: Delete: mit-pthreads/config/config.flags.in BitKeeper/deleted/.del-config.guess~cc5ba3ed9ced8a46: Delete: mit-pthreads/config/config.guess BitKeeper/deleted/.del-config.h.in~2ebc16675e442c0: Delete: mit-pthreads/config/config.h.in BitKeeper/deleted/.del-config.sub~468650a464e6eb7b: Delete: mit-pthreads/config/config.sub BitKeeper/deleted/.del-configure.in~d5a28eb1d1406fd3: Delete: mit-pthreads/config/configure.in BitKeeper/deleted/.del-configure.org~aabe00455f0cd1cd: Delete: mit-pthreads/config/configure.org BitKeeper/deleted/.del-configure~c1c1fba4cdc814dc: Delete: mit-pthreads/config/configure BitKeeper/deleted/.del-ctime.c~1746a59dfc7ef159: Delete: mit-pthreads/gen/ctime.c BitKeeper/deleted/.del-difftime.c~8fcfd3b6a3f3cdc9: Delete: mit-pthreads/gen/difftime.c BitKeeper/deleted/.del-directory.c~87f9c47e6d89abd0: Delete: mit-pthreads/gen/directory.c BitKeeper/deleted/.del-eprintf.c~3eb1d8b26d616265: Delete: mit-pthreads/gen/eprintf.c BitKeeper/deleted/.del-getcwd.c~7e2516ce4dc89e2: Delete: mit-pthreads/gen/getcwd.c BitKeeper/deleted/.del-getpwent.c~6f9f6ed37d5888c: Delete: mit-pthreads/gen/getpwent.c BitKeeper/deleted/.del-install-sh~b6baadd5cf69d54b: Delete: mit-pthreads/config/install-sh BitKeeper/deleted/.del-Makefile.inc~53c822d25e7b7426: Delete: mit-pthreads/include/Makefile.inc BitKeeper/deleted/.del-dirent.h~b4403a204fb9aaff: Delete: mit-pthreads/include/dirent.h BitKeeper/deleted/.del-endian.h~df2abfe7d3f073a8: Delete: mit-pthreads/include/endian.h BitKeeper/deleted/.del-errno.h~f042931b89230632: Delete: mit-pthreads/include/errno.h BitKeeper/deleted/.del-getpwnamuid.c~6e5cfc569738e4d: Delete: mit-pthreads/gen/getpwnamuid.c BitKeeper/deleted/.del-getwd.c~bf66001f695f6f1c: Delete: mit-pthreads/gen/getwd.c BitKeeper/deleted/.del-isatty.c~68a84b6415796322: Delete: mit-pthreads/gen/isatty.c BitKeeper/deleted/.del-math.h~1012648763b16666: Delete: mit-pthreads/include/math.h BitKeeper/deleted/.del-netdb.h~3f851aec6857840: Delete: mit-pthreads/include/netdb.h BitKeeper/deleted/.del-popen.c~bd8b11429808e0a9: Delete: mit-pthreads/gen/popen.c BitKeeper/deleted/.del-pthread.h~99c0d8a4e3137194: Delete: mit-pthreads/include/pthread.h BitKeeper/deleted/.del-pwd.h~64f4ad8cc223d808: Delete: mit-pthreads/include/pwd.h BitKeeper/deleted/.del-pwd_internal.c~19415ce777642acd: Delete: mit-pthreads/gen/pwd_internal.c BitKeeper/deleted/.del-pwd_internal.h~fac81276cc5b43fa: Delete: mit-pthreads/gen/pwd_internal.h BitKeeper/deleted/.del-resolv.h~4dbe70503fae0f80: Delete: mit-pthreads/include/resolv.h BitKeeper/deleted/.del-sched.h~aeae7302929ed88c: Delete: mit-pthreads/include/sched.h BitKeeper/deleted/.del-semaphore.h~2eb1e2f33a1ecf8: Delete: mit-pthreads/include/semaphore.h BitKeeper/deleted/.del-signal.h~d85d7c3b64ec1c91: Delete: mit-pthreads/include/signal.h BitKeeper/deleted/.del-syslog.c~e644a1f117689095: Delete: mit-pthreads/gen/syslog.c BitKeeper/deleted/.del-time.c~d1acd7761c02bfd1: Delete: mit-pthreads/gen/time.c BitKeeper/deleted/.del-ttyname.c~e55e94e55d204d4b: Delete: mit-pthreads/gen/ttyname.c BitKeeper/deleted/.del-ac-types.h~edd84b761b722949: Delete: mit-pthreads/include/pthread/ac-types.h BitKeeper/deleted/.del-cleanup.h~85623532b472039f: Delete: mit-pthreads/include/pthread/cleanup.h BitKeeper/deleted/.del-inet.h~a63ed77697f19bfd: Delete: mit-pthreads/include/arpa/inet.h BitKeeper/deleted/.del-nameser.h~e3eb676c417a4f2b: Delete: mit-pthreads/include/arpa/nameser.h BitKeeper/deleted/.del-stdio.h~268fee8536543aae: Delete: mit-pthreads/include/stdio.h BitKeeper/deleted/.del-stdlib.h~573ed67cae4670fb: Delete: mit-pthreads/include/stdlib.h BitKeeper/deleted/.del-string.h~4ac258c0d05deb95: Delete: mit-pthreads/include/string.h BitKeeper/deleted/.del-syslog.h~48f4bbe61f2f6a1d: Delete: mit-pthreads/include/syslog.h BitKeeper/deleted/.del-time.h~cceecd3939b80019: Delete: mit-pthreads/include/time.h BitKeeper/deleted/.del-timers.h~fabeca844cf2ff84: Delete: mit-pthreads/include/timers.h BitKeeper/deleted/.del-tzfile.h~79ddeb91abf126d7: Delete: mit-pthreads/include/tzfile.h BitKeeper/deleted/.del-unistd.h~8fde2359994207a0: Delete: mit-pthreads/include/unistd.h BitKeeper/deleted/.del-cond.h~89084ed43c0e3ac3: Delete: mit-pthreads/include/pthread/cond.h BitKeeper/deleted/.del-config.h~f46dd3c48bcc94ab: Delete: mit-pthreads/include/pthread/config.h BitKeeper/deleted/.del-debug_out.h~3f8b4671b82ed761: Delete: mit-pthreads/include/pthread/debug_out.h BitKeeper/deleted/.del-fd.h~c8f4e3be3bb5f5f3: Delete: mit-pthreads/include/pthread/fd.h BitKeeper/deleted/.del-fd_pipe.h~e0e1fafe68ce5368: Delete: mit-pthreads/include/pthread/fd_pipe.h BitKeeper/deleted/.del-kernel.h~5c59b74afd2139ab: Delete: mit-pthreads/include/pthread/kernel.h BitKeeper/deleted/.del-kthread.h~9c0c9a01764c400c: Delete: mit-pthreads/include/pthread/kthread.h BitKeeper/deleted/.del-mutex.h~2edf4a715b9e0032: Delete: mit-pthreads/include/pthread/mutex.h BitKeeper/deleted/.del-paths.h~a4c8285ee0e963f: Delete: mit-pthreads/include/pthread/paths.h BitKeeper/deleted/.del-prio_queue.h~76669b4c6cb1e371: Delete: mit-pthreads/include/pthread/prio_queue.h BitKeeper/deleted/.del-pthread_attr.h~b2fe2e555ebbab55: Delete: mit-pthreads/include/pthread/pthread_attr.h BitKeeper/deleted/.del-pthread_once.h~4a2f150b8fa74b4: Delete: mit-pthreads/include/pthread/pthread_once.h BitKeeper/deleted/.del-queue.h~9f3df11d262d8f44: Delete: mit-pthreads/include/pthread/queue.h BitKeeper/deleted/.del-sleep.h~460112c1e799ea50: Delete: mit-pthreads/include/pthread/sleep.h BitKeeper/deleted/.del-specific.h~2fe93df576506f20: Delete: mit-pthreads/include/pthread/specific.h BitKeeper/deleted/.del-state.def~e44c35c923990db: Delete: mit-pthreads/include/pthread/state.def BitKeeper/deleted/.del-types.h~a01c883092a76f84: Delete: mit-pthreads/include/pthread/types.h BitKeeper/deleted/.del-unistd.h~340d2c229d6178d7: Delete: mit-pthreads/include/pthread/unistd.h BitKeeper/deleted/.del-util.h~6e3b0563ae30b12d: Delete: mit-pthreads/include/pthread/util.h BitKeeper/deleted/.del-.cvsignore~79fd7b42137518a2: Delete: mit-pthreads/lib/libpthreadutil/.cvsignore BitKeeper/deleted/.del-.cvsignore~9a9597e1cddb1f1c: Delete: mit-pthreads/lib/.cvsignore BitKeeper/deleted/.del-Makefile.in~2e716f26575950cf: Delete: mit-pthreads/lib/Makefile.in BitKeeper/deleted/.del-Makefile.in~b24eca19a0e939ad: Delete: mit-pthreads/lib/libpthreadutil/Makefile.in BitKeeper/deleted/.del-engine-alpha-netbsd-1.1.c~2d9b8143d9c6e1fd: Delete: mit-pthreads/machdep/engine-alpha-netbsd-1.1.c BitKeeper/deleted/.del-engine-alpha-netbsd-1.1.h~c7971aaae9ed2909: Delete: mit-pthreads/machdep/engine-alpha-netbsd-1.1.h BitKeeper/deleted/.del-engine-alpha-netbsd-1.3.c~87f983ba7d8ccb00: Delete: mit-pthreads/machdep/engine-alpha-netbsd-1.3.c BitKeeper/deleted/.del-engine-alpha-netbsd-1.3.h~5988a19574567f7a: Delete: mit-pthreads/machdep/engine-alpha-netbsd-1.3.h BitKeeper/deleted/.del-engine-alpha-osf1.c~fe229ec950e34fe: Delete: mit-pthreads/machdep/engine-alpha-osf1.c BitKeeper/deleted/.del-engine-alpha-osf1.h~ad5b2978d5248f2d: Delete: mit-pthreads/machdep/engine-alpha-osf1.h BitKeeper/deleted/.del-engine-arm32-netbsd-1.3.c~1fb10cea8b25bbb6: Delete: mit-pthreads/machdep/engine-arm32-netbsd-1.3.c BitKeeper/deleted/.del-pthread_atexit.c~828d0386e20684da: Delete: mit-pthreads/lib/libpthreadutil/pthread_atexit.c BitKeeper/deleted/.del-pthread_tad.c~55ee53d76eed654d: Delete: mit-pthreads/lib/libpthreadutil/pthread_tad.c BitKeeper/deleted/.del-pthreadutil.h~2d8fd7687b4751e5: Delete: mit-pthreads/lib/libpthreadutil/pthreadutil.h BitKeeper/deleted/.del-version.h~db5bd05a5cecf21b: Delete: mit-pthreads/include/pthread/version.h BitKeeper/deleted/.del-xtypes.h~faf0e8127e76eb07: Delete: mit-pthreads/include/pthread/xtypes.h BitKeeper/deleted/.del-engine-arm32-netbsd-1.3.h~7f579a79c1a651e0: Delete: mit-pthreads/machdep/engine-arm32-netbsd-1.3.h BitKeeper/deleted/.del-engine-hppa-hpux-10.20.c~9f88575f8150fa54: Delete: mit-pthreads/machdep/engine-hppa-hpux-10.20.c BitKeeper/deleted/.del-engine-hppa-hpux-10.20.h~8a8103747c026f34: Delete: mit-pthreads/machdep/engine-hppa-hpux-10.20.h BitKeeper/deleted/.del-engine-hppa-hpux-9.03.c~de77b00048fb8d0a: Delete: mit-pthreads/machdep/engine-hppa-hpux-9.03.c BitKeeper/deleted/.del-engine-hppa-hpux-9.03.h~5e992ed47edbe9cd: Delete: mit-pthreads/machdep/engine-hppa-hpux-9.03.h BitKeeper/deleted/.del-engine-i386-bsdi-1.1.c~a0a970d42d8d4560: Delete: mit-pthreads/machdep/engine-i386-bsdi-1.1.c BitKeeper/deleted/.del-engine-i386-bsdi-1.1.h~9016a3781b5bfb1: Delete: mit-pthreads/machdep/engine-i386-bsdi-1.1.h BitKeeper/deleted/.del-engine-i386-bsdi-2.0.c~ce085ef56669e7e1: Delete: mit-pthreads/machdep/engine-i386-bsdi-2.0.c BitKeeper/deleted/.del-engine-i386-bsdi-2.0.h~e430992d6164c18b: Delete: mit-pthreads/machdep/engine-i386-bsdi-2.0.h BitKeeper/deleted/.del-engine-i386-freebsd-1.1.c~38bd0c4cf0ad5067: Delete: mit-pthreads/machdep/engine-i386-freebsd-1.1.c BitKeeper/deleted/.del-engine-i386-freebsd-1.1.h~3f0e0174a53a22cc: Delete: mit-pthreads/machdep/engine-i386-freebsd-1.1.h BitKeeper/deleted/.del-engine-i386-freebsd-2.0.c~47d10418ad5b7397: Delete: mit-pthreads/machdep/engine-i386-freebsd-2.0.c BitKeeper/deleted/.del-engine-i386-freebsd-2.0.h~6c8c4e7665b78151: Delete: mit-pthreads/machdep/engine-i386-freebsd-2.0.h BitKeeper/deleted/.del-engine-i386-linux-1.0.c~3e7b1cb3daa35ef: Delete: mit-pthreads/machdep/engine-i386-linux-1.0.c BitKeeper/deleted/.del-engine-i386-linux-1.0.h~6090b2c7a4bd4562: Delete: mit-pthreads/machdep/engine-i386-linux-1.0.h BitKeeper/deleted/.del-engine-i386-linux-2.0.c~371a0bcce78b6075: Delete: mit-pthreads/machdep/engine-i386-linux-2.0.c BitKeeper/deleted/.del-engine-i386-linux-2.0.h~52d63c46fcc28d2d: Delete: mit-pthreads/machdep/engine-i386-linux-2.0.h BitKeeper/deleted/.del-engine-i386-netbsd-0.9.c~984b54ffe45e55d3: Delete: mit-pthreads/machdep/engine-i386-netbsd-0.9.c BitKeeper/deleted/.del-engine-i386-netbsd-0.9.h~a9f4aeb4e163a5dc: Delete: mit-pthreads/machdep/engine-i386-netbsd-0.9.h BitKeeper/deleted/.del-engine-i386-netbsd-1.0.c~d64bdc3f3009e8d2: Delete: mit-pthreads/machdep/engine-i386-netbsd-1.0.c BitKeeper/deleted/.del-engine-i386-netbsd-1.0.h~c0bbc3682acb8cf9: Delete: mit-pthreads/machdep/engine-i386-netbsd-1.0.h BitKeeper/deleted/.del-engine-i386-netbsd-1.3.c~d436ee7868b9ac45: Delete: mit-pthreads/machdep/engine-i386-netbsd-1.3.c BitKeeper/deleted/.del-engine-i386-netbsd-1.3.h~2624c928f678d530: Delete: mit-pthreads/machdep/engine-i386-netbsd-1.3.h BitKeeper/deleted/.del-engine-i386-openbsd-2.0.c~863e72d3565dc90: Delete: mit-pthreads/machdep/engine-i386-openbsd-2.0.c BitKeeper/deleted/.del-engine-i386-openbsd-2.0.h~2c30bad4202a7a1b: Delete: mit-pthreads/machdep/engine-i386-openbsd-2.0.h BitKeeper/deleted/.del-engine-i386-sco-3.2v5.c~e3f53e64977b2392: Delete: mit-pthreads/machdep/engine-i386-sco-3.2v5.c BitKeeper/deleted/.del-engine-i386-sco-3.2v5.h~36d7f2fda048bb2f: Delete: mit-pthreads/machdep/engine-i386-sco-3.2v5.h BitKeeper/deleted/.del-engine-ip22-irix-5.2.c~5f55cf23ba3e6865: Delete: mit-pthreads/machdep/engine-ip22-irix-5.2.c BitKeeper/deleted/.del-engine-ip22-irix-5.2.h~b405b4d8dd0c7942: Delete: mit-pthreads/machdep/engine-ip22-irix-5.2.h BitKeeper/deleted/.del-engine-m68000-netbsd.c~19426d2266f34bd7: Delete: mit-pthreads/machdep/engine-m68000-netbsd.c BitKeeper/deleted/.del-engine-m68000-netbsd.h~aa596bf4e73eb4c6: Delete: mit-pthreads/machdep/engine-m68000-netbsd.h BitKeeper/deleted/.del-engine-powerpc-netbsd.c~fe674eea3ea127e6: Delete: mit-pthreads/machdep/engine-powerpc-netbsd.c BitKeeper/deleted/.del-engine-powerpc-netbsd.h~176c0d4c31112c15: Delete: mit-pthreads/machdep/engine-powerpc-netbsd.h BitKeeper/deleted/.del-engine-r2000-ultrix-4.2.c~504baa0c62d3409: Delete: mit-pthreads/machdep/engine-r2000-ultrix-4.2.c BitKeeper/deleted/.del-engine-r2000-ultrix-4.2.h~49b6c624fb8fab58: Delete: mit-pthreads/machdep/engine-r2000-ultrix-4.2.h BitKeeper/deleted/.del-engine-romp-bsd.c~a17f57147584496f: Delete: mit-pthreads/machdep/engine-romp-bsd.c BitKeeper/deleted/.del-engine-romp-bsd.h~746244e2d1708fd9: Delete: mit-pthreads/machdep/engine-romp-bsd.h BitKeeper/deleted/.del-engine-sparc-netbsd-1.3.c~e562c8ea469673bc: Delete: mit-pthreads/machdep/engine-sparc-netbsd-1.3.c BitKeeper/deleted/.del-engine-sparc-netbsd-1.3.h~93d25ae52817e7fb: Delete: mit-pthreads/machdep/engine-sparc-netbsd-1.3.h BitKeeper/deleted/.del-engine-sparc-sunos-4.1.3.c~e961c84dc5ccaf5c: Delete: mit-pthreads/machdep/engine-sparc-sunos-4.1.3.c BitKeeper/deleted/.del-engine-sparc-sunos-4.1.3.h~ae2d208a62106a5b: Delete: mit-pthreads/machdep/engine-sparc-sunos-4.1.3.h BitKeeper/deleted/.del-engine-sparc-sunos-5.3.c~8cfae62c744dcb91: Delete: mit-pthreads/machdep/engine-sparc-sunos-5.3.c BitKeeper/deleted/.del-engine-sparc-sunos-5.3.h~5bd0136c1a800b0e: Delete: mit-pthreads/machdep/engine-sparc-sunos-5.3.h BitKeeper/deleted/.del-posix-alpha-osf1.h~7f13470618e01604: Delete: mit-pthreads/machdep/posix-alpha-osf1.h BitKeeper/deleted/.del-posix-bsdi-1.1.h~3394ff495db6e0f5: Delete: mit-pthreads/machdep/posix-bsdi-1.1.h BitKeeper/deleted/.del-posix-bsdi-2.0.h~928bbbb5d70284eb: Delete: mit-pthreads/machdep/posix-bsdi-2.0.h BitKeeper/deleted/.del-posix-freebsd-1.1.h~35de18838eafff32: Delete: mit-pthreads/machdep/posix-freebsd-1.1.h BitKeeper/deleted/.del-posix-freebsd-2.0.h~fade0be685df8d4d: Delete: mit-pthreads/machdep/posix-freebsd-2.0.h BitKeeper/deleted/.del-posix-hpux-10.20.h~feabff6198e09ab: Delete: mit-pthreads/machdep/posix-hpux-10.20.h BitKeeper/deleted/.del-posix-hpux-9.03.h~c0da92b4cea5c01b: Delete: mit-pthreads/machdep/posix-hpux-9.03.h BitKeeper/deleted/.del-posix-i386-sco-3.2v5.h~19dcf4466648057d: Delete: mit-pthreads/machdep/posix-i386-sco-3.2v5.h BitKeeper/deleted/.del-posix-irix-5.2.h~663192173ee6c05: Delete: mit-pthreads/machdep/posix-irix-5.2.h BitKeeper/deleted/.del-posix-linux-1.0.h~2babadadda3bb7ab: Delete: mit-pthreads/machdep/posix-linux-1.0.h BitKeeper/deleted/.del-posix-linux-2.0.h~c994bcc7f9dd71ab: Delete: mit-pthreads/machdep/posix-linux-2.0.h BitKeeper/deleted/.del-posix-netbsd-0.9.h~8b876d0082e8a48a: Delete: mit-pthreads/machdep/posix-netbsd-0.9.h BitKeeper/deleted/.del-posix-netbsd-1.0.h~d0aedf926f993d7e: Delete: mit-pthreads/machdep/posix-netbsd-1.0.h BitKeeper/deleted/.del-posix-netbsd-1.1.h~21ed3d55129fc075: Delete: mit-pthreads/machdep/posix-netbsd-1.1.h BitKeeper/deleted/.del-posix-openbsd-2.0.h~c0710cea41dc44b2: Delete: mit-pthreads/machdep/posix-openbsd-2.0.h BitKeeper/deleted/.del-posix-romp-bsd.h~76c61edb143e4d11: Delete: mit-pthreads/machdep/posix-romp-bsd.h BitKeeper/deleted/.del-posix-sco-3.2v5.h~92a9a62e1b6533b8: Delete: mit-pthreads/machdep/posix-sco-3.2v5.h BitKeeper/deleted/.del-posix-sunos-4.1.3.h~4a877434cb08df85: Delete: mit-pthreads/machdep/posix-sunos-4.1.3.h BitKeeper/deleted/.del-posix-sunos-5.3.h~e0b4f8fdc4385ed2: Delete: mit-pthreads/machdep/posix-sunos-5.3.h BitKeeper/deleted/.del-posix-sunos-5.5.h~d57a228497612296: Delete: mit-pthreads/machdep/posix-sunos-5.5.h BitKeeper/deleted/.del-posix-ultrix-4.2.h~923f354a8fa75e14: Delete: mit-pthreads/machdep/posix-ultrix-4.2.h BitKeeper/deleted/.del-syscall-alpha-netbsd-1.1.S~14ec608a837b0fc: Delete: mit-pthreads/machdep/syscall-alpha-netbsd-1.1.S BitKeeper/deleted/.del-syscall-alpha-netbsd-1.3.S~d7bf76b7ab47865f: Delete: mit-pthreads/machdep/syscall-alpha-netbsd-1.3.S BitKeeper/deleted/.del-syscall-alpha-osf1.S~16685703701fbc17: Delete: mit-pthreads/machdep/syscall-alpha-osf1.S BitKeeper/deleted/.del-syscall-arm32-netbsd-1.3.S~aeb8ab0f67bb0c69: Delete: mit-pthreads/machdep/syscall-arm32-netbsd-1.3.S BitKeeper/deleted/.del-syscall-hppa-hpux-10.20.S~6775dfed472eb1eb: Delete: mit-pthreads/machdep/syscall-hppa-hpux-10.20.S BitKeeper/deleted/.del-syscall-hppa-hpux-9.03.S~5bb679d120026c41: Delete: mit-pthreads/machdep/syscall-hppa-hpux-9.03.S BitKeeper/deleted/.del-syscall-i386-bsdi-1.1.S~45c70ac53733437: Delete: mit-pthreads/machdep/syscall-i386-bsdi-1.1.S BitKeeper/deleted/.del-syscall-i386-bsdi-2.0.S~812eb2043be8ece4: Delete: mit-pthreads/machdep/syscall-i386-bsdi-2.0.S BitKeeper/deleted/.del-syscall-i386-freebsd-1.1.S~9ffefb321685b1d: Delete: mit-pthreads/machdep/syscall-i386-freebsd-1.1.S BitKeeper/deleted/.del-syscall-i386-freebsd-2.0.S~295def3898c2be08: Delete: mit-pthreads/machdep/syscall-i386-freebsd-2.0.S BitKeeper/deleted/.del-syscall-i386-linux-1.0.S~a8ad20f4623dce10: Delete: mit-pthreads/machdep/syscall-i386-linux-1.0.S BitKeeper/deleted/.del-syscall-i386-linux-2.0.S~8218148af1b1f7f7: Delete: mit-pthreads/machdep/syscall-i386-linux-2.0.S BitKeeper/deleted/.del-syscall-i386-netbsd-0.9.S~bd8d0775f344b6b4: Delete: mit-pthreads/machdep/syscall-i386-netbsd-0.9.S BitKeeper/deleted/.del-syscall-i386-netbsd-1.0.S~13c2124947084db8: Delete: mit-pthreads/machdep/syscall-i386-netbsd-1.0.S BitKeeper/deleted/.del-syscall-i386-netbsd-1.1.S~87626416c4f55e50: Delete: mit-pthreads/machdep/syscall-i386-netbsd-1.1.S BitKeeper/deleted/.del-syscall-i386-netbsd-1.3.S~c26ec7dc29500e8d: Delete: mit-pthreads/machdep/syscall-i386-netbsd-1.3.S BitKeeper/deleted/.del-syscall-i386-openbsd-2.0.S~c4888f2dd7ad20aa: Delete: mit-pthreads/machdep/syscall-i386-openbsd-2.0.S BitKeeper/deleted/.del-syscall-i386-sco-3.2v5.S~28c807b347601d6c: Delete: mit-pthreads/machdep/syscall-i386-sco-3.2v5.S BitKeeper/deleted/.del-syscall-ip22-irix-5.2.S~d95112e2be2a2271: Delete: mit-pthreads/machdep/syscall-ip22-irix-5.2.S BitKeeper/deleted/.del-syscall-m68000-netbsd.S~a98f9ee17a9ab3dc: Delete: mit-pthreads/machdep/syscall-m68000-netbsd.S BitKeeper/deleted/.del-syscall-powerpc-netbsd.S~c0dfb5a7e40f8ee4: Delete: mit-pthreads/machdep/syscall-powerpc-netbsd.S BitKeeper/deleted/.del-syscall-r2000-ultrix-4.2.S~5c82791ae1ae0056: Delete: mit-pthreads/machdep/syscall-r2000-ultrix-4.2.S BitKeeper/deleted/.del-syscall-romp-bsd.S~d483afbae640c555: Delete: mit-pthreads/machdep/syscall-romp-bsd.S BitKeeper/deleted/.del-syscall-sparc-netbsd-1.1.S~a2f284a2e6808103: Delete: mit-pthreads/machdep/syscall-sparc-netbsd-1.1.S BitKeeper/deleted/.del-syscall-sparc-netbsd-1.3.S~f557eb09e3b13294: Delete: mit-pthreads/machdep/syscall-sparc-netbsd-1.3.S BitKeeper/deleted/.del-syscall-sparc-sunos-4.1.3.S~d25b0c101b2f4870: Delete: mit-pthreads/machdep/syscall-sparc-sunos-4.1.3.S BitKeeper/deleted/.del-syscall-sparc-sunos-5.3.S~50f022e320e0fe15: Delete: mit-pthreads/machdep/syscall-sparc-sunos-5.3.S BitKeeper/deleted/.del-syscall-sparc-sunos4.S~48a568fe371a1b86: Delete: mit-pthreads/machdep/syscall-sparc-sunos4.S BitKeeper/deleted/.del-syscall-template-alpha-netbsd-1.1.S~2e4f934dcfcf5c30: Delete: mit-pthreads/machdep/syscall-template-alpha-netbsd-1.1.S BitKeeper/deleted/.del-syscall-template-alpha-netbsd-1.3.S~85722242d7be46d2: Delete: mit-pthreads/machdep/syscall-template-alpha-netbsd-1.3.S BitKeeper/deleted/.del-syscall-template-alpha-osf1.S~626b166b96f743d4: Delete: mit-pthreads/machdep/syscall-template-alpha-osf1.S BitKeeper/deleted/.del-syscall-template-arm32-netbsd-1.3.S~ce50f9a4d40a1019: Delete: mit-pthreads/machdep/syscall-template-arm32-netbsd-1.3.S BitKeeper/deleted/.del-syscall-template-hppa-hpux-10.20.S~1a759e5dd7381cf9: Delete: mit-pthreads/machdep/syscall-template-hppa-hpux-10.20.S BitKeeper/deleted/.del-syscall-template-hppa-hpux-9.03.S~1e24b2a0b64c4e79: Delete: mit-pthreads/machdep/syscall-template-hppa-hpux-9.03.S BitKeeper/deleted/.del-syscall-template-i386-bsdi-2.0.S~ffdd2687c6389a4: Delete: mit-pthreads/machdep/syscall-template-i386-bsdi-2.0.S BitKeeper/deleted/.del-syscall-template-i386-freebsd-2.0.S~1e0e0935bf5a63ad: Delete: mit-pthreads/machdep/syscall-template-i386-freebsd-2.0.S BitKeeper/deleted/.del-syscall-template-i386-netbsd-1.1.S~96ac4ff77603432: Delete: mit-pthreads/machdep/syscall-template-i386-netbsd-1.1.S BitKeeper/deleted/.del-syscall-template-i386-netbsd-1.3.S~ec95ec09484aa795: Delete: mit-pthreads/machdep/syscall-template-i386-netbsd-1.3.S BitKeeper/deleted/.del-syscall-template-i386-netbsd1.0.S~77dff1ea1c85ef14: Delete: mit-pthreads/machdep/syscall-template-i386-netbsd1.0.S BitKeeper/deleted/.del-syscall-template-i386-openbsd-2.0.S~cda4723148853810: Delete: mit-pthreads/machdep/syscall-template-i386-openbsd-2.0.S BitKeeper/deleted/.del-syscall-template-i386-sco-3.2v5.S~16c3a952712e09c7: Delete: mit-pthreads/machdep/syscall-template-i386-sco-3.2v5.S BitKeeper/deleted/.del-syscall-template-ip22-irix-5.2.S~45aef8d1e72b448a: Delete: mit-pthreads/machdep/syscall-template-ip22-irix-5.2.S BitKeeper/deleted/.del-__math.h~15b04b4fa2119451: Delete: mit-pthreads/machdep/alpha-osf1/__math.h BitKeeper/deleted/.del-__signal.h~f8b0d1f813880467: Delete: mit-pthreads/machdep/alpha-osf1/__signal.h BitKeeper/deleted/.del-__stdio.h~428731ba8d7715b5: Delete: mit-pthreads/machdep/alpha-osf1/__stdio.h BitKeeper/deleted/.del-__stdlib.h~3ca3c004f96c8339: Delete: mit-pthreads/machdep/alpha-osf1/__stdlib.h BitKeeper/deleted/.del-syscall-template-m68000-netbsd.S~f7249e58b4810f42: Delete: mit-pthreads/machdep/syscall-template-m68000-netbsd.S BitKeeper/deleted/.del-syscall-template-powerpc-netbsd.S~ffef50aac24750f: Delete: mit-pthreads/machdep/syscall-template-powerpc-netbsd.S BitKeeper/deleted/.del-syscall-template-r2000-ultrix-4.2.S~839a684b5abcf9b1: Delete: mit-pthreads/machdep/syscall-template-r2000-ultrix-4.2.S BitKeeper/deleted/.del-syscall-template-sparc-netbsd-1.1.S~39681d9e4d84ef44: Delete: mit-pthreads/machdep/syscall-template-sparc-netbsd-1.1.S BitKeeper/deleted/.del-syscall-template-sparc-netbsd-1.3.S~51708b7b4dbcf2ea: Delete: mit-pthreads/machdep/syscall-template-sparc-netbsd-1.3.S BitKeeper/deleted/.del-syscall-template-sparc-sunos-5.3.S~44ba83caa0e4b7c8: Delete: mit-pthreads/machdep/syscall-template-sparc-sunos-5.3.S BitKeeper/deleted/.del-syscall-template-sparc-sunos4.S~4ed7e9bc82afbfd9: Delete: mit-pthreads/machdep/syscall-template-sparc-sunos4.S BitKeeper/deleted/.del-unistd-i386-freebsd-1.1.h~347c3d4c28c3a05b: Delete: mit-pthreads/machdep/unistd-i386-freebsd-1.1.h BitKeeper/deleted/.del-unistd-i386-linux-1.0.h~1b5f2ac830798a93: Delete: mit-pthreads/machdep/unistd-i386-linux-1.0.h BitKeeper/deleted/.del-unistd-i386-linux-2.0.h~dc0bb0717bf84882: Delete: mit-pthreads/machdep/unistd-i386-linux-2.0.h BitKeeper/deleted/.del-unistd-sparc-sunos-4.1.3.h~4d905926cf8338cc: Delete: mit-pthreads/machdep/unistd-sparc-sunos-4.1.3.h BitKeeper/deleted/.del-__string.h~ec9484a687805eb1: Delete: mit-pthreads/machdep/alpha-osf1/__string.h BitKeeper/deleted/.del-__time.h~f502fef1c6db6dae: Delete: mit-pthreads/machdep/alpha-osf1/__time.h BitKeeper/deleted/.del-__unistd.h~ae4e6f255a8d79dd: Delete: mit-pthreads/machdep/alpha-osf1/__unistd.h BitKeeper/deleted/.del-cdefs.h~87c2e5b82f1fcc09: Delete: mit-pthreads/machdep/alpha-osf1/cdefs.h BitKeeper/deleted/.del-compat.h~52b01d0bf4e4e298: Delete: mit-pthreads/machdep/bsdi-1.1/compat.h BitKeeper/deleted/.del-compat.h~7fec282cd7f3bd61: Delete: mit-pthreads/machdep/alpha-osf1/compat.h BitKeeper/deleted/.del-dirent.h~a1fd0be117ea9ed2: Delete: mit-pthreads/machdep/bsdi-1.1/dirent.h BitKeeper/deleted/.del-dirent.h~e08226e22aaad039: Delete: mit-pthreads/machdep/alpha-osf1/dirent.h BitKeeper/deleted/.del-errno.h~979f508de2d9bb3b: Delete: mit-pthreads/machdep/bsdi-1.1/errno.h BitKeeper/deleted/.del-signal.h~43f59f54762d8210: Delete: mit-pthreads/machdep/alpha-osf1/signal.h BitKeeper/deleted/.del-socket.h~6e40df1a29574e4f: Delete: mit-pthreads/machdep/bsdi-1.1/socket.h BitKeeper/deleted/.del-socket.h~f8f9768648722dcc: Delete: mit-pthreads/machdep/alpha-osf1/socket.h BitKeeper/deleted/.del-timers.h~d13ee6ad9d841c5e: Delete: mit-pthreads/machdep/alpha-osf1/timers.h BitKeeper/deleted/.del-uio.h~9b68aaafc476b9a9: Delete: mit-pthreads/machdep/alpha-osf1/uio.h BitKeeper/deleted/.del-__math.h~cd5beee5de94a0e: Delete: mit-pthreads/machdep/bsdi-2.0/__math.h BitKeeper/deleted/.del-__path.h~83901ef036baf6b4: Delete: mit-pthreads/machdep/bsdi-2.0/__path.h BitKeeper/deleted/.del-__signal.h~f6f656d1f8a3fadd: Delete: mit-pthreads/machdep/bsdi-2.0/__signal.h BitKeeper/deleted/.del-__stdio.h~32de653064a5ad20: Delete: mit-pthreads/machdep/bsdi-2.0/__stdio.h BitKeeper/deleted/.del-__stdlib.h~121ced69525a8e08: Delete: mit-pthreads/machdep/bsdi-2.0/__stdlib.h BitKeeper/deleted/.del-__string.h~2f2a363641a26456: Delete: mit-pthreads/machdep/bsdi-2.0/__string.h BitKeeper/deleted/.del-__time.h~6b1f520c52ab2cc2: Delete: mit-pthreads/machdep/bsdi-2.0/__time.h BitKeeper/deleted/.del-__unistd.h~6f9496e281708ee8: Delete: mit-pthreads/machdep/bsdi-2.0/__unistd.h BitKeeper/deleted/.del-compat.h~1a34f632db157280: Delete: mit-pthreads/machdep/bsdi-2.0/compat.h BitKeeper/deleted/.del-compat.h~aefef59c573b7ad: Delete: mit-pthreads/machdep/freebsd-1.1/compat.h BitKeeper/deleted/.del-dirent.h~ba968b4f68fe77d5: Delete: mit-pthreads/machdep/bsdi-2.0/dirent.h BitKeeper/deleted/.del-dirent.h~f549c8ad718b5da5: Delete: mit-pthreads/machdep/freebsd-1.1/dirent.h BitKeeper/deleted/.del-errno.h~a2ef6571ce6c0864: Delete: mit-pthreads/machdep/bsdi-2.0/errno.h BitKeeper/deleted/.del-time.h~802a6c67fb61730d: Delete: mit-pthreads/machdep/bsdi-2.0/time.h BitKeeper/deleted/.del-timers.h~368f9b52edff0b80: Delete: mit-pthreads/machdep/bsdi-2.0/timers.h BitKeeper/deleted/.del-timers.h~e8e3b79d75d5bd99: Delete: mit-pthreads/machdep/bsdi-1.1/timers.h BitKeeper/deleted/.del-wait.h~71ae84d3cca317a2: Delete: mit-pthreads/machdep/bsdi-2.0/wait.h BitKeeper/deleted/.del-__math.h~554947fbbef058c0: Delete: mit-pthreads/machdep/hpux-10.20/__math.h BitKeeper/deleted/.del-__math.h~71ce3165f97da287: Delete: mit-pthreads/machdep/freebsd-2.0/__math.h BitKeeper/deleted/.del-__path.h~a43311d5ed3c9054: Delete: mit-pthreads/machdep/freebsd-2.0/__path.h BitKeeper/deleted/.del-__signal.h~1186dafb42a1e3d: Delete: mit-pthreads/machdep/freebsd-2.0/__signal.h BitKeeper/deleted/.del-__stdio.h~621a5e318a6df9a5: Delete: mit-pthreads/machdep/freebsd-2.0/__stdio.h BitKeeper/deleted/.del-__stdlib.h~34473aea608096f8: Delete: mit-pthreads/machdep/freebsd-2.0/__stdlib.h BitKeeper/deleted/.del-__string.h~e2f3a8d57a1c805: Delete: mit-pthreads/machdep/freebsd-2.0/__string.h BitKeeper/deleted/.del-__time.h~b62aaee925967261: Delete: mit-pthreads/machdep/freebsd-2.0/__time.h BitKeeper/deleted/.del-__unistd.h~3df3b536982c46f6: Delete: mit-pthreads/machdep/freebsd-2.0/__unistd.h BitKeeper/deleted/.del-compat.h~7e93a6511e0368bb: Delete: mit-pthreads/machdep/freebsd-2.0/compat.h BitKeeper/deleted/.del-dirent.h~15e4420affa07296: Delete: mit-pthreads/machdep/freebsd-2.0/dirent.h BitKeeper/deleted/.del-errno.h~b355076bdf73ba1f: Delete: mit-pthreads/machdep/freebsd-2.0/errno.h BitKeeper/deleted/.del-socket.h~e1eabb21fc3000c: Delete: mit-pthreads/machdep/freebsd-1.1/socket.h BitKeeper/deleted/.del-timers.h~50e98a30791a75a9: Delete: mit-pthreads/machdep/freebsd-2.0/timers.h BitKeeper/deleted/.del-timers.h~5b961287ab5e4632: Delete: mit-pthreads/machdep/freebsd-1.1/timers.h BitKeeper/deleted/.del-wait.h~7699c64c4b2033f4: Delete: mit-pthreads/machdep/freebsd-2.0/wait.h BitKeeper/deleted/.del-__math.h~a9b7c69effb4b6b0: Delete: mit-pthreads/machdep/hpux-9.03/__math.h BitKeeper/deleted/.del-__signal.h~674aea0d61cf1caf: Delete: mit-pthreads/machdep/hpux-10.20/__signal.h BitKeeper/deleted/.del-__stdio.h~467d728a76bee08f: Delete: mit-pthreads/machdep/hpux-10.20/__stdio.h BitKeeper/deleted/.del-__stdlib.h~f74ea69b72460491: Delete: mit-pthreads/machdep/hpux-10.20/__stdlib.h BitKeeper/deleted/.del-__string.h~e368cbe5d7fab81: Delete: mit-pthreads/machdep/hpux-10.20/__string.h BitKeeper/deleted/.del-__time.h~3f68155e1fc3bddb: Delete: mit-pthreads/machdep/hpux-10.20/__time.h BitKeeper/deleted/.del-__unistd.h~e3876ae2d25dab7b: Delete: mit-pthreads/machdep/hpux-10.20/__unistd.h BitKeeper/deleted/.del-cdefs.h~99f84569799b9837: Delete: mit-pthreads/machdep/hpux-10.20/cdefs.h BitKeeper/deleted/.del-compat.h~77ba12465c3fec4: Delete: mit-pthreads/machdep/hpux-10.20/compat.h BitKeeper/deleted/.del-dirent.h~b1d03fe4585c984b: Delete: mit-pthreads/machdep/hpux-10.20/dirent.h BitKeeper/deleted/.del-socket.h~274f4737e51951eb: Delete: mit-pthreads/machdep/hpux-10.20/socket.h BitKeeper/deleted/.del-stdtypes.h~49aec7f8141364e8: Delete: mit-pthreads/machdep/hpux-10.20/stdtypes.h BitKeeper/deleted/.del-time.h~6f8660389338d56f: Delete: mit-pthreads/machdep/hpux-10.20/time.h BitKeeper/deleted/.del-timers.h~e10408d7283caac1: Delete: mit-pthreads/machdep/hpux-10.20/timers.h BitKeeper/deleted/.del-uio.h~97aa8505feabf63f: Delete: mit-pthreads/machdep/hpux-10.20/uio.h BitKeeper/deleted/.del-wait.h~2717b3a725c0c78e: Delete: mit-pthreads/machdep/hpux-10.20/wait.h BitKeeper/deleted/.del-__signal.h~6079a9091088a7bf: Delete: mit-pthreads/machdep/hpux-9.03/__signal.h BitKeeper/deleted/.del-__stdio.h~a7265f1b1054d740: Delete: mit-pthreads/machdep/hpux-9.03/__stdio.h BitKeeper/deleted/.del-__stdlib.h~57ef945efa5bc75d: Delete: mit-pthreads/machdep/hpux-9.03/__stdlib.h BitKeeper/deleted/.del-__string.h~11b33535a4cf32b7: Delete: mit-pthreads/machdep/hpux-9.03/__string.h BitKeeper/deleted/.del-__time.h~594d32a8bf93554b: Delete: mit-pthreads/machdep/hpux-9.03/__time.h BitKeeper/deleted/.del-__unistd.h~d705d138894e1d1c: Delete: mit-pthreads/machdep/hpux-9.03/__unistd.h BitKeeper/deleted/.del-cdefs.h~491a067a681761ce: Delete: mit-pthreads/machdep/hpux-9.03/cdefs.h BitKeeper/deleted/.del-compat.h~f168a5565c3b43bb: Delete: mit-pthreads/machdep/hpux-9.03/compat.h BitKeeper/deleted/.del-dirent.h~710d5c444d542d9: Delete: mit-pthreads/machdep/hpux-9.03/dirent.h BitKeeper/deleted/.del-socket.h~f1a65b682ccf6bbc: Delete: mit-pthreads/machdep/hpux-9.03/socket.h BitKeeper/deleted/.del-stdtypes.h~41a60ff87e95605f: Delete: mit-pthreads/machdep/hpux-9.03/stdtypes.h BitKeeper/deleted/.del-time.h~34090d5b225a5c17: Delete: mit-pthreads/machdep/hpux-9.03/time.h BitKeeper/deleted/.del-timers.h~95da6603ee567405: Delete: mit-pthreads/machdep/hpux-9.03/timers.h BitKeeper/deleted/.del-uio.h~31bd44ffd071dd15: Delete: mit-pthreads/machdep/hpux-9.03/uio.h BitKeeper/deleted/.del-wait.h~88e8993e964e97b: Delete: mit-pthreads/machdep/hpux-9.03/wait.h BitKeeper/deleted/.del-__math.h~75bea3d988a6ab09: Delete: mit-pthreads/machdep/linux-1.0/__math.h BitKeeper/deleted/.del-__math.h~ba360a8521058b66: Delete: mit-pthreads/machdep/irix-5.2/__math.h BitKeeper/deleted/.del-__signal.h~a9681fc23aad1515: Delete: mit-pthreads/machdep/irix-5.2/__signal.h BitKeeper/deleted/.del-__stdio.h~f6dfefb5c7b220cd: Delete: mit-pthreads/machdep/irix-5.2/__stdio.h BitKeeper/deleted/.del-__stdlib.h~fb0aede280a805b3: Delete: mit-pthreads/machdep/irix-5.2/__stdlib.h BitKeeper/deleted/.del-__string.h~f10481f085fbf020: Delete: mit-pthreads/machdep/irix-5.2/__string.h BitKeeper/deleted/.del-__time.h~ace3b7dcccfaf29d: Delete: mit-pthreads/machdep/irix-5.2/__time.h BitKeeper/deleted/.del-__unistd.h~73c5a1a4f69f09e5: Delete: mit-pthreads/machdep/irix-5.2/__unistd.h BitKeeper/deleted/.del-compat.h~c57379a39304c01b: Delete: mit-pthreads/machdep/irix-5.2/compat.h BitKeeper/deleted/.del-dirent.h~1ac25ca0f2ea673a: Delete: mit-pthreads/machdep/irix-5.2/dirent.h BitKeeper/deleted/.del-socket.h~ca1b9093bcd1ac1e: Delete: mit-pthreads/machdep/irix-5.2/socket.h BitKeeper/deleted/.del-timers.h~5c832b91c8421e72: Delete: mit-pthreads/machdep/irix-5.2/timers.h BitKeeper/deleted/.del-wait.h~ff32e2f8c67245eb: Delete: mit-pthreads/machdep/irix-5.2/wait.h BitKeeper/deleted/.del-__math.h~2b87a46b2ac4469e: Delete: mit-pthreads/machdep/linux-2.0/__math.h BitKeeper/deleted/.del-__path.h~7d0f9b2debf92ce0: Delete: mit-pthreads/machdep/linux-1.0/__path.h BitKeeper/deleted/.del-__signal.h~3609d76ab71353cf: Delete: mit-pthreads/machdep/linux-1.0/__signal.h BitKeeper/deleted/.del-__stdio.h~f031274aba4c7ec6: Delete: mit-pthreads/machdep/linux-1.0/__stdio.h BitKeeper/deleted/.del-__stdlib.h~33ba2eaa1189ce34: Delete: mit-pthreads/machdep/linux-1.0/__stdlib.h BitKeeper/deleted/.del-__string.h~f498c0531c31c157: Delete: mit-pthreads/machdep/linux-1.0/__string.h BitKeeper/deleted/.del-__time.h~c15d569072cdec3e: Delete: mit-pthreads/machdep/linux-1.0/__time.h BitKeeper/deleted/.del-__unistd.h~38c981decd79b658: Delete: mit-pthreads/machdep/linux-1.0/__unistd.h BitKeeper/deleted/.del-cdefs.h~c54da7093a850ab: Delete: mit-pthreads/machdep/linux-1.0/cdefs.h BitKeeper/deleted/.del-compat.h~53add7404bc32c93: Delete: mit-pthreads/machdep/linux-1.0/compat.h BitKeeper/deleted/.del-dirent.h~85af6548e63fcada: Delete: mit-pthreads/machdep/linux-1.0/dirent.h BitKeeper/deleted/.del-errno.h~ecac4695ea97f1a1: Delete: mit-pthreads/machdep/linux-1.0/errno.h BitKeeper/deleted/.del-socket.h~d2cae391989eda40: Delete: mit-pthreads/machdep/linux-1.0/socket.h BitKeeper/deleted/.del-timers.h~b9842a896c577500: Delete: mit-pthreads/machdep/linux-1.0/timers.h BitKeeper/deleted/.del-uio.h~ee04ba559d3b4b91: Delete: mit-pthreads/machdep/linux-1.0/uio.h BitKeeper/deleted/.del-wait.h~d9108bf5cc1640d4: Delete: mit-pthreads/machdep/linux-1.0/wait.h BitKeeper/deleted/.del-__path.h~629032fdb33386fc: Delete: mit-pthreads/machdep/linux-2.0/__path.h BitKeeper/deleted/.del-__signal.h~5d9d2e161a5a57ad: Delete: mit-pthreads/machdep/linux-2.0/__signal.h BitKeeper/deleted/.del-__stdio.h~a60bbc64f53edd32: Delete: mit-pthreads/machdep/linux-2.0/__stdio.h BitKeeper/deleted/.del-__stdlib.h~952526244aa83fe: Delete: mit-pthreads/machdep/linux-2.0/__stdlib.h BitKeeper/deleted/.del-__string.h~9b6c7d1b4fd30306: Delete: mit-pthreads/machdep/linux-2.0/__string.h BitKeeper/deleted/.del-__time.h~dff461939b26c95a: Delete: mit-pthreads/machdep/linux-2.0/__time.h BitKeeper/deleted/.del-__unistd.h~d9343d6a349b5a16: Delete: mit-pthreads/machdep/linux-2.0/__unistd.h BitKeeper/deleted/.del-cdefs.h~94199ec3721dc381: Delete: mit-pthreads/machdep/linux-2.0/cdefs.h BitKeeper/deleted/.del-compat.h~5a421d11e9d12e65: Delete: mit-pthreads/machdep/linux-2.0/compat.h BitKeeper/deleted/.del-dirent.h~7eb24a6fb2bc26b: Delete: mit-pthreads/machdep/linux-2.0/dirent.h BitKeeper/deleted/.del-errno.h~907c0213b5c8c71d: Delete: mit-pthreads/machdep/linux-2.0/errno.h BitKeeper/deleted/.del-socket.h~65dffae712cc7a4d: Delete: mit-pthreads/machdep/linux-2.0/socket.h BitKeeper/deleted/.del-socketcall.h~34e021b91cc03bc2: Delete: mit-pthreads/machdep/linux-2.0/socketcall.h BitKeeper/deleted/.del-__math.h~99c4f20b9d416cb1: Delete: mit-pthreads/machdep/netbsd-1.0/__math.h BitKeeper/deleted/.del-__path.h~bf0a9e35f9dbefd4: Delete: mit-pthreads/machdep/netbsd-1.0/__path.h BitKeeper/deleted/.del-__signal.h~9646c7d6ea985cf3: Delete: mit-pthreads/machdep/netbsd-1.0/__signal.h BitKeeper/deleted/.del-__stdio.h~7ba6a90423a0d355: Delete: mit-pthreads/machdep/netbsd-1.0/__stdio.h BitKeeper/deleted/.del-__stdlib.h~ab59fbbdc01c463f: Delete: mit-pthreads/machdep/netbsd-1.0/__stdlib.h BitKeeper/deleted/.del-__string.h~d93469aa75855599: Delete: mit-pthreads/machdep/netbsd-1.0/__string.h BitKeeper/deleted/.del-__time.h~4a40cffe18fb2920: Delete: mit-pthreads/machdep/netbsd-1.0/__time.h BitKeeper/deleted/.del-__unistd.h~e20583fb72d22ec3: Delete: mit-pthreads/machdep/netbsd-1.0/__unistd.h BitKeeper/deleted/.del-dirent.h~2ffeb17927568fb5: Delete: mit-pthreads/machdep/netbsd-0.9/dirent.h BitKeeper/deleted/.del-local_lim.h~4cc6a9341897e06b: Delete: mit-pthreads/machdep/linux-2.0/extra/bits/local_lim.h BitKeeper/deleted/.del-pthreadtypes.h~31e0630ed4cd1cfb: Delete: mit-pthreads/machdep/linux-2.0/extra/bits/pthreadtypes.h BitKeeper/deleted/.del-socket.h~eb2bcdd2ad9b8f95: Delete: mit-pthreads/machdep/linux-2.0/extra/bits/socket.h BitKeeper/deleted/.del-timers.h~f305cc7a34f32bf4: Delete: mit-pthreads/machdep/linux-2.0/timers.h BitKeeper/deleted/.del-uio.h~99024eeb4fe67cca: Delete: mit-pthreads/machdep/linux-2.0/uio.h BitKeeper/deleted/.del-wait.h~fa49d51da2bd9893: Delete: mit-pthreads/machdep/linux-2.0/wait.h BitKeeper/deleted/.del-__math.h~3bafece8cbc49e05: Delete: mit-pthreads/machdep/netbsd-1.1/__math.h BitKeeper/deleted/.del-__path.h~ec6377dc7fca0a39: Delete: mit-pthreads/machdep/netbsd-1.1/__path.h BitKeeper/deleted/.del-__signal.h~6eda764fc8c19cc3: Delete: mit-pthreads/machdep/netbsd-1.1/__signal.h BitKeeper/deleted/.del-compat.h~77daa1d3919b311: Delete: mit-pthreads/machdep/netbsd-1.0/compat.h BitKeeper/deleted/.del-dirent.h~e6e3f10bc2379480: Delete: mit-pthreads/machdep/netbsd-1.0/dirent.h BitKeeper/deleted/.del-errno.h~2a5fe7e8cda1dedc: Delete: mit-pthreads/machdep/netbsd-1.0/errno.h BitKeeper/deleted/.del-time.h~91c5e80faa0f67d8: Delete: mit-pthreads/machdep/netbsd-1.0/time.h BitKeeper/deleted/.del-timers.h~4ad15510fb8387db: Delete: mit-pthreads/machdep/netbsd-1.0/timers.h BitKeeper/deleted/.del-wait.h~53a2320a855a861f: Delete: mit-pthreads/machdep/netbsd-1.0/wait.h BitKeeper/deleted/.del-__math.h~1b43362eb0dd8be5: Delete: mit-pthreads/machdep/openbsd-2.0/__math.h BitKeeper/deleted/.del-__stdio.h~6695982644674dfd: Delete: mit-pthreads/machdep/netbsd-1.1/__stdio.h BitKeeper/deleted/.del-__stdlib.h~9f863266f83434db: Delete: mit-pthreads/machdep/netbsd-1.1/__stdlib.h BitKeeper/deleted/.del-__string.h~e91c955832a257d2: Delete: mit-pthreads/machdep/netbsd-1.1/__string.h BitKeeper/deleted/.del-__time.h~499558aa4e217cbe: Delete: mit-pthreads/machdep/netbsd-1.1/__time.h BitKeeper/deleted/.del-__unistd.h~6033c071695c98d0: Delete: mit-pthreads/machdep/netbsd-1.1/__unistd.h BitKeeper/deleted/.del-compat.h~47c1ec24ae2dbd9d: Delete: mit-pthreads/machdep/netbsd-1.1/compat.h BitKeeper/deleted/.del-dirent.h~23f9d369622b912e: Delete: mit-pthreads/machdep/netbsd-1.1/dirent.h BitKeeper/deleted/.del-errno.h~6f8d8176248b4c35: Delete: mit-pthreads/machdep/netbsd-1.1/errno.h BitKeeper/deleted/.del-time.h~6e1b4fb56c3d7b4: Delete: mit-pthreads/machdep/netbsd-1.1/time.h BitKeeper/deleted/.del-timers.h~40736de7a8ae1edd: Delete: mit-pthreads/machdep/netbsd-1.1/timers.h BitKeeper/deleted/.del-wait.h~9dcfbf026610d8d6: Delete: mit-pthreads/machdep/netbsd-1.1/wait.h BitKeeper/deleted/.del-__path.h~c22f338b35979fac: Delete: mit-pthreads/machdep/openbsd-2.0/__path.h BitKeeper/deleted/.del-__signal.h~4c7665e21aa142f9: Delete: mit-pthreads/machdep/openbsd-2.0/__signal.h BitKeeper/deleted/.del-__stdio.h~5bfddb7ea03225ec: Delete: mit-pthreads/machdep/openbsd-2.0/__stdio.h BitKeeper/deleted/.del-__stdlib.h~9e4695c0e4d71221: Delete: mit-pthreads/machdep/openbsd-2.0/__stdlib.h BitKeeper/deleted/.del-__string.h~ddc42b12dbf9e334: Delete: mit-pthreads/machdep/openbsd-2.0/__string.h BitKeeper/deleted/.del-__time.h~f1b1ac884be0df3e: Delete: mit-pthreads/machdep/openbsd-2.0/__time.h BitKeeper/deleted/.del-__unistd.h~54955d02fd68996: Delete: mit-pthreads/machdep/openbsd-2.0/__unistd.h BitKeeper/deleted/.del-compat.h~97aec54b17348183: Delete: mit-pthreads/machdep/openbsd-2.0/compat.h BitKeeper/deleted/.del-dirent.h~50e0a997820878d4: Delete: mit-pthreads/machdep/openbsd-2.0/dirent.h BitKeeper/deleted/.del-__math.h~e76b6fe42d538bbe: Delete: mit-pthreads/machdep/sunos-4.1.3/__math.h BitKeeper/deleted/.del-__path.h~239e44b6ed86bdb9: Delete: mit-pthreads/machdep/sunos-4.1.3/__path.h BitKeeper/deleted/.del-__signal.h~3cdb6bbfd4168b8c: Delete: mit-pthreads/machdep/sunos-4.1.3/__signal.h BitKeeper/deleted/.del-__stdio.h~a30007fab0382559: Delete: mit-pthreads/machdep/sunos-4.1.3/__stdio.h BitKeeper/deleted/.del-__stdlib.h~7fa5548f63063828: Delete: mit-pthreads/machdep/sunos-4.1.3/__stdlib.h BitKeeper/deleted/.del-__string.h~54adc8e1da49d04: Delete: mit-pthreads/machdep/sunos-4.1.3/__string.h BitKeeper/deleted/.del-__time.h~34435dd346c925fe: Delete: mit-pthreads/machdep/sunos-4.1.3/__time.h BitKeeper/deleted/.del-__unistd.h~116b12158a09a638: Delete: mit-pthreads/machdep/sunos-4.1.3/__unistd.h BitKeeper/deleted/.del-cdefs.h~995c93921ca6b535: Delete: mit-pthreads/machdep/sunos-4.1.3/cdefs.h BitKeeper/deleted/.del-compat.h~fd85e7c3362fa32a: Delete: mit-pthreads/machdep/sunos-4.1.3/compat.h BitKeeper/deleted/.del-errno.h~fd5870317b2417f5: Delete: mit-pthreads/machdep/openbsd-2.0/errno.h BitKeeper/deleted/.del-timers.h~2cff01de5d9e7ee0: Delete: mit-pthreads/machdep/openbsd-2.0/timers.h BitKeeper/deleted/.del-wait.h~8bb78fa5f7aafa70: Delete: mit-pthreads/machdep/openbsd-2.0/wait.h BitKeeper/deleted/.del-__math.h~3f0448d4dd8cb1ae: Delete: mit-pthreads/machdep/sunos-5.3/__math.h BitKeeper/deleted/.del-__signal.h~5a9c7ca1a958d3f4: Delete: mit-pthreads/machdep/sunos-5.3/__signal.h BitKeeper/deleted/.del-__stdio.h~79819eb58b212c1f: Delete: mit-pthreads/machdep/sunos-5.3/__stdio.h BitKeeper/deleted/.del-__stdlib.h~5b88440bb049945e: Delete: mit-pthreads/machdep/sunos-5.3/__stdlib.h BitKeeper/deleted/.del-__string.h~e4f590323c1f392f: Delete: mit-pthreads/machdep/sunos-5.3/__string.h BitKeeper/deleted/.del-__time.h~9fce5db42d17163c: Delete: mit-pthreads/machdep/sunos-5.3/__time.h BitKeeper/deleted/.del-__unistd.h~415d11aa60580d03: Delete: mit-pthreads/machdep/sunos-5.3/__unistd.h BitKeeper/deleted/.del-dirent.h~181ddc4f75dbc605: Delete: mit-pthreads/machdep/sunos-4.1.3/dirent.h BitKeeper/deleted/.del-fcntlcom.h~2462e72d55357c60: Delete: mit-pthreads/machdep/sunos-4.1.3/fcntlcom.h BitKeeper/deleted/.del-signal.h~cce1c0f26d0e020: Delete: mit-pthreads/machdep/sunos-4.1.3/signal.h BitKeeper/deleted/.del-stat.h~4340eb84e587d6d7: Delete: mit-pthreads/machdep/sunos-4.1.3/stat.h BitKeeper/deleted/.del-time.h~de51b65a2d979319: Delete: mit-pthreads/machdep/sunos-4.1.3/time.h BitKeeper/deleted/.del-timers.h~1a370cb663f2d8b: Delete: mit-pthreads/machdep/sunos-4.1.3/timers.h BitKeeper/deleted/.del-wait.h~bedd5396ccde4742: Delete: mit-pthreads/machdep/sunos-4.1.3/wait.h BitKeeper/deleted/.del-__math.h~77f60db1341409bf: Delete: mit-pthreads/machdep/sunos-5.5/__math.h BitKeeper/deleted/.del-__signal.h~17aecd395e5209f1: Delete: mit-pthreads/machdep/sunos-5.5/__signal.h BitKeeper/deleted/.del-__stdio.h~bac5232a4ea48c3: Delete: mit-pthreads/machdep/sunos-5.5/__stdio.h BitKeeper/deleted/.del-__stdlib.h~5d57551798325fff: Delete: mit-pthreads/machdep/sunos-5.5/__stdlib.h BitKeeper/deleted/.del-__string.h~e32288c871e4cc6a: Delete: mit-pthreads/machdep/sunos-5.5/__string.h BitKeeper/deleted/.del-__time.h~187a6c043b362fa5: Delete: mit-pthreads/machdep/sunos-5.5/__time.h BitKeeper/deleted/.del-__unistd.h~12b47b808f4c361f: Delete: mit-pthreads/machdep/sunos-5.5/__unistd.h BitKeeper/deleted/.del-cdefs.h~2c31c29563ca73a6: Delete: mit-pthreads/machdep/sunos-5.3/cdefs.h BitKeeper/deleted/.del-compat.h~ca7c33ba305a5590: Delete: mit-pthreads/machdep/sunos-5.3/compat.h BitKeeper/deleted/.del-dirent.h~c6a98eda27948c77: Delete: mit-pthreads/machdep/sunos-5.3/dirent.h BitKeeper/deleted/.del-socket.h~ba15a0eed55946b4: Delete: mit-pthreads/machdep/sunos-5.3/socket.h BitKeeper/deleted/.del-timers.h~d560f79a346a62e8: Delete: mit-pthreads/machdep/sunos-5.3/timers.h BitKeeper/deleted/.del-uio.h~b29d2d9c9a84646: Delete: mit-pthreads/machdep/sunos-5.3/uio.h BitKeeper/deleted/.del-__math.h~f117004a270ecca9: Delete: mit-pthreads/machdep/ultrix-4.2/__math.h BitKeeper/deleted/.del-__signal.h~4bd8c2abbf10367c: Delete: mit-pthreads/machdep/ultrix-4.2/__signal.h BitKeeper/deleted/.del-__stdio.h~7b3d5a4bc8fd2c17: Delete: mit-pthreads/machdep/ultrix-4.2/__stdio.h BitKeeper/deleted/.del-__stdlib.h~b35521aecc9b43c: Delete: mit-pthreads/machdep/ultrix-4.2/__stdlib.h BitKeeper/deleted/.del-__string.h~64257fd9ef06be17: Delete: mit-pthreads/machdep/ultrix-4.2/__string.h BitKeeper/deleted/.del-__time.h~644b0d664b51f229: Delete: mit-pthreads/machdep/ultrix-4.2/__time.h BitKeeper/deleted/.del-__unistd.h~6abba82d63e0248: Delete: mit-pthreads/machdep/ultrix-4.2/__unistd.h BitKeeper/deleted/.del-cdefs.h~5e8e9a036573312a: Delete: mit-pthreads/machdep/ultrix-4.2/cdefs.h BitKeeper/deleted/.del-cdefs.h~b7073eab4edb1c0b: Delete: mit-pthreads/machdep/sunos-5.5/cdefs.h BitKeeper/deleted/.del-compat.h~bab1ce9e2c004133: Delete: mit-pthreads/machdep/ultrix-4.2/compat.h BitKeeper/deleted/.del-compat.h~fb94b2904902020: Delete: mit-pthreads/machdep/sunos-5.5/compat.h BitKeeper/deleted/.del-dirent.h~e14889d0f0d7071e: Delete: mit-pthreads/machdep/sunos-5.5/dirent.h BitKeeper/deleted/.del-socket.h~a7946d8bf1404556: Delete: mit-pthreads/machdep/sunos-5.5/socket.h BitKeeper/deleted/.del-timers.h~33e84eae3f84f1c3: Delete: mit-pthreads/machdep/sunos-5.5/timers.h BitKeeper/deleted/.del-uio.h~87b97478f98716a: Delete: mit-pthreads/machdep/sunos-5.5/uio.h BitKeeper/deleted/.del-GNUmakefile.inc~36dc90343e6e51c: Delete: mit-pthreads/net/GNUmakefile.inc BitKeeper/deleted/.del-Makefile.inc~2912b062f34b45a5: Delete: mit-pthreads/net/Makefile.inc BitKeeper/deleted/.del-dirent.h~da64f755e9200bc4: Delete: mit-pthreads/machdep/ultrix-4.2/dirent.h BitKeeper/deleted/.del-errno.h~e028820966c1250d: Delete: mit-pthreads/machdep/ultrix-4.2/errno.h BitKeeper/deleted/.del-gethostbyaddr.c~f2e7e85873c92640: Delete: mit-pthreads/net/gethostbyaddr.c BitKeeper/deleted/.del-gethostbyname.c~7ca5ff6aeb67df72: Delete: mit-pthreads/net/gethostbyname.c BitKeeper/deleted/.del-gethostent.c~aef0ee81d6d3d5dd: Delete: mit-pthreads/net/gethostent.c BitKeeper/deleted/.del-gethostname.c~889964947d6d6132: Delete: mit-pthreads/net/gethostname.c BitKeeper/deleted/.del-getnetbyaddr.c~e7aa4ddc61444ed7: Delete: mit-pthreads/net/getnetbyaddr.c BitKeeper/deleted/.del-getnetbyname.c~33c92e32e31bf6b2: Delete: mit-pthreads/net/getnetbyname.c BitKeeper/deleted/.del-time.h~590ce1c998c6a99f: Delete: mit-pthreads/machdep/ultrix-4.2/time.h BitKeeper/deleted/.del-timers.h~6775cb35bedc8d5a: Delete: mit-pthreads/machdep/ultrix-4.2/timers.h BitKeeper/deleted/.del-wait.h~14c892db1eeedc9f: Delete: mit-pthreads/machdep/ultrix-4.2/wait.h BitKeeper/deleted/.del-getnetent.c~eb91b4bb9229e69f: Delete: mit-pthreads/net/getnetent.c BitKeeper/deleted/.del-getproto.c~58a035d8e6dac166: Delete: mit-pthreads/net/getproto.c BitKeeper/deleted/.del-getprotoent.c~c272eb396deb6149: Delete: mit-pthreads/net/getprotoent.c BitKeeper/deleted/.del-getprotoname.c~38a163cb6ba9a02f: Delete: mit-pthreads/net/getprotoname.c BitKeeper/deleted/.del-getservbyname.c~b2d17820fa729890: Delete: mit-pthreads/net/getservbyname.c BitKeeper/deleted/.del-getservbyport.c~2ae8dd82c66dc979: Delete: mit-pthreads/net/getservbyport.c BitKeeper/deleted/.del-getservent.c~a3fd08e38a641439: Delete: mit-pthreads/net/getservent.c BitKeeper/deleted/.del-herror.c~104c97ff1e69850d: Delete: mit-pthreads/net/herror.c BitKeeper/deleted/.del-inet_addr.c~137d1f253167a82: Delete: mit-pthreads/net/inet_addr.c BitKeeper/deleted/.del-inet_lnaof.c~f99f0d39db895073: Delete: mit-pthreads/net/inet_lnaof.c BitKeeper/deleted/.del-inet_makeaddr.c~9a6862f4c3bb7355: Delete: mit-pthreads/net/inet_makeaddr.c BitKeeper/deleted/.del-inet_netof.c~41722dd1165dc88: Delete: mit-pthreads/net/inet_netof.c BitKeeper/deleted/.del-inet_network.c~a6ac81633e49e198: Delete: mit-pthreads/net/inet_network.c BitKeeper/deleted/.del-inet_ntoa.c~68e557133af8cea3: Delete: mit-pthreads/net/inet_ntoa.c BitKeeper/deleted/.del-net_internal.c~fc0d1440990c5c7d: Delete: mit-pthreads/net/net_internal.c BitKeeper/deleted/.del-Streepy.html~bd9e4e629cdc29b: Delete: mit-pthreads/patches/Streepy.html BitKeeper/deleted/.del-net_internal.h~9720bd6725294e70: Delete: mit-pthreads/net/net_internal.h BitKeeper/deleted/.del-proto_internal.c~9a2706dadde872ac: Delete: mit-pthreads/net/proto_internal.c BitKeeper/deleted/.del-proto_internal.h~88c0d1ad96369456: Delete: mit-pthreads/net/proto_internal.h BitKeeper/deleted/.del-res_comp.c~ba80c3482e74b732: Delete: mit-pthreads/net/res_comp.c BitKeeper/deleted/.del-res_debug.c~553d0ba772240d9d: Delete: mit-pthreads/net/res_debug.c BitKeeper/deleted/.del-res_init.c~bae972cd21804fc2: Delete: mit-pthreads/net/res_init.c BitKeeper/deleted/.del-res_internal.c~84ae9c436a686c45: Delete: mit-pthreads/net/res_internal.c BitKeeper/deleted/.del-res_internal.h~67e41ae81924291e: Delete: mit-pthreads/net/res_internal.h BitKeeper/deleted/.del-res_mkquery.c~2cbd2c72ac683b83: Delete: mit-pthreads/net/res_mkquery.c BitKeeper/deleted/.del-res_query.c~74419cd245fdb915: Delete: mit-pthreads/net/res_query.c BitKeeper/deleted/.del-res_querydomain.c~545411a9329ff12f: Delete: mit-pthreads/net/res_querydomain.c BitKeeper/deleted/.del-res_search.c~50ee3f62120a8b1c: Delete: mit-pthreads/net/res_search.c BitKeeper/deleted/.del-res_send.c~5dfaeb90c17a00e5: Delete: mit-pthreads/net/res_send.c BitKeeper/deleted/.del-serv_internal.c~9a74a600a861bf91: Delete: mit-pthreads/net/serv_internal.c BitKeeper/deleted/.del-serv_internal.h~4de54c25a6be0b51: Delete: mit-pthreads/net/serv_internal.h BitKeeper/deleted/.del-GNUmakefile.inc~8b30711f5b2759e7: Delete: mit-pthreads/pthreads/GNUmakefile.inc BitKeeper/deleted/.del-Makefile.inc~aa771a55359fcc4b: Delete: mit-pthreads/pthreads/Makefile.inc BitKeeper/deleted/.del-Streepy2.html~19da6997739ee2b6: Delete: mit-pthreads/patches/Streepy2.html BitKeeper/deleted/.del-_exit.c~66c37b7d58dcbfd2: Delete: mit-pthreads/pthreads/_exit.c BitKeeper/deleted/.del-bill_lear~f9abe03924eb22: Delete: mit-pthreads/patches/bill_lear BitKeeper/deleted/.del-chris_demetriou~6166ce6bef91e1c: Delete: mit-pthreads/patches/chris_demetriou BitKeeper/deleted/.del-cleanup.c~48a723b9c5c18407: Delete: mit-pthreads/pthreads/cleanup.c BitKeeper/deleted/.del-cond.c~a0494f8b361f8c54: Delete: mit-pthreads/pthreads/cond.c BitKeeper/deleted/.del-condattr.c~b61bdcd1e85bc2b7: Delete: mit-pthreads/pthreads/condattr.c BitKeeper/deleted/.del-dump_state.c~c4009192c784df9a: Delete: mit-pthreads/pthreads/dump_state.c BitKeeper/deleted/.del-errno.c~ea72bafdc380faf: Delete: mit-pthreads/pthreads/errno.c BitKeeper/deleted/.del-fd.c~af00ac53fcad3882: Delete: mit-pthreads/pthreads/fd.c BitKeeper/deleted/.del-mevans~ecccacc37e44a748: Delete: mit-pthreads/patches/mevans BitKeeper/deleted/.del-p153~7c46bb4ef6e8535a: Delete: mit-pthreads/patches/p153 BitKeeper/deleted/.del-p155~dac0404faf476417: Delete: mit-pthreads/patches/p155 BitKeeper/deleted/.del-fd_kern.c~8ea26d27450589f9: Delete: mit-pthreads/pthreads/fd_kern.c BitKeeper/deleted/.del-fd_pipe.c~480792c394c55b78: Delete: mit-pthreads/pthreads/fd_pipe.c BitKeeper/deleted/.del-fd_sysv.c~fb191b7b66ee5a9e: Delete: mit-pthreads/pthreads/fd_sysv.c BitKeeper/deleted/.del-file.c~3edaa1f84c4dd9eb: Delete: mit-pthreads/pthreads/file.c BitKeeper/deleted/.del-globals.c~28c6e3e3392a0b73: Delete: mit-pthreads/pthreads/globals.c BitKeeper/deleted/.del-info.c~e5cc658219b735c2: Delete: mit-pthreads/pthreads/info.c BitKeeper/deleted/.del-init.cc~e46fb50c843bf00d: Delete: mit-pthreads/pthreads/init.cc BitKeeper/deleted/.del-malloc.c~2a0cc342cc1cd825: Delete: mit-pthreads/pthreads/malloc.c BitKeeper/deleted/.del-mutex.c~8b993c981ddd51f5: Delete: mit-pthreads/pthreads/mutex.c BitKeeper/deleted/.del-mutexattr.c~1b614c39feb2eab9: Delete: mit-pthreads/pthreads/mutexattr.c BitKeeper/deleted/.del-panic.c~410a4c9aac44f5cc: Delete: mit-pthreads/pthreads/panic.c BitKeeper/deleted/.del-prio_queue.c~1dd651c0e60bfc81: Delete: mit-pthreads/pthreads/prio_queue.c BitKeeper/deleted/.del-process.c~cc427ed79c1d9392: Delete: mit-pthreads/pthreads/process.c BitKeeper/deleted/.del-pthread.c~9ea2ac94e66b2df: Delete: mit-pthreads/pthreads/pthread.c BitKeeper/deleted/.del-pthread_attr.c~de65a4522f206192: Delete: mit-pthreads/pthreads/pthread_attr.c BitKeeper/deleted/.del-pthread_cancel.c~f5f9b61475d69ccb: Delete: mit-pthreads/pthreads/pthread_cancel.c BitKeeper/deleted/.del-pthread_detach.c~c4c4f8de168c524: Delete: mit-pthreads/pthreads/pthread_detach.c BitKeeper/deleted/.del-pthread_init.c~14b18c0e951b016d: Delete: mit-pthreads/pthreads/pthread_init.c BitKeeper/deleted/.del-pthread_join.c~1f16b6bc00c7dab: Delete: mit-pthreads/pthreads/pthread_join.c BitKeeper/deleted/.del-pthread_kill.c~4e33bb5573830386: Delete: mit-pthreads/pthreads/pthread_kill.c BitKeeper/deleted/.del-pthread_once.c~af065d18e540ab4d: Delete: mit-pthreads/pthreads/pthread_once.c BitKeeper/deleted/.del-queue.c~6a702e857ef6de08: Delete: mit-pthreads/pthreads/queue.c BitKeeper/deleted/.del-readv.c~8297c25bd79b0e: Delete: mit-pthreads/pthreads/readv.c BitKeeper/deleted/.del-schedparam.c~5db6ea84ba625cc: Delete: mit-pthreads/pthreads/schedparam.c BitKeeper/deleted/.del-select.c~66067633be2dbad0: Delete: mit-pthreads/pthreads/select.c BitKeeper/deleted/.del-semaphore.c~65a35ea5117089ed: Delete: mit-pthreads/pthreads/semaphore.c BitKeeper/deleted/.del-sig.c~58350bee655c275d: Delete: mit-pthreads/pthreads/sig.c BitKeeper/deleted/.del-GNUmakefile.inc~d366b0d462fb1292: Delete: mit-pthreads/scripts/GNUmakefile.inc BitKeeper/deleted/.del-Makefile.inc~627ba9967a1a5c03: Delete: mit-pthreads/scripts/Makefile.inc BitKeeper/deleted/.del-signal.c~59bfe2d5baacc4cc: Delete: mit-pthreads/pthreads/signal.c BitKeeper/deleted/.del-sleep.c~eb1e412eaadda488: Delete: mit-pthreads/pthreads/sleep.c BitKeeper/deleted/.del-specific.c~9ed780681ac4688: Delete: mit-pthreads/pthreads/specific.c BitKeeper/deleted/.del-stat.c~e3a9e3c0350540a8: Delete: mit-pthreads/pthreads/stat.c BitKeeper/deleted/.del-wait.c~a1c0498f96183865: Delete: mit-pthreads/pthreads/wait.c BitKeeper/deleted/.del-wrapper.c~92f1cfcdfa2d1af9: Delete: mit-pthreads/pthreads/wrapper.c BitKeeper/deleted/.del-writev.c~e4fb01b897efa6b1: Delete: mit-pthreads/pthreads/writev.c BitKeeper/deleted/.del-GNUmakefile.inc~136e21ce89043c8e: Delete: mit-pthreads/stdio/GNUmakefile.inc BitKeeper/deleted/.del-Makefile.inc~6034a462e5364be7: Delete: mit-pthreads/stdio/Makefile.inc BitKeeper/deleted/.del-README~5830e60ac2727fec: Delete: mit-pthreads/stdio/README BitKeeper/deleted/.del-clrerr.c~ccf622475dc49fa1: Delete: mit-pthreads/stdio/clrerr.c BitKeeper/deleted/.del-fclose.c~b099fdc1352cde32: Delete: mit-pthreads/stdio/fclose.c BitKeeper/deleted/.del-fdopen.c~8235d8c7b6a4f7f3: Delete: mit-pthreads/stdio/fdopen.c BitKeeper/deleted/.del-feof.c~40610577678ca3f6: Delete: mit-pthreads/stdio/feof.c BitKeeper/deleted/.del-ferror.c~69f2023c9d4da22e: Delete: mit-pthreads/stdio/ferror.c BitKeeper/deleted/.del-fflush.c~f290f341c357e7bf: Delete: mit-pthreads/stdio/fflush.c BitKeeper/deleted/.del-fgetc.c~6343d0d9240763b4: Delete: mit-pthreads/stdio/fgetc.c BitKeeper/deleted/.del-fgetline.c~fee1fa145bdc425: Delete: mit-pthreads/stdio/fgetline.c BitKeeper/deleted/.del-fgetpos.c~2a269d1a51b87782: Delete: mit-pthreads/stdio/fgetpos.c BitKeeper/deleted/.del-fgets.c~2b1d6fabba71e8ae: Delete: mit-pthreads/stdio/fgets.c BitKeeper/deleted/.del-fileno.c~fef0caa3b46de500: Delete: mit-pthreads/stdio/fileno.c BitKeeper/deleted/.del-pgcc.sh~db7799f6b4eac17a: Delete: mit-pthreads/scripts/pgcc.sh BitKeeper/deleted/.del-findfp.c~ccb89f891cb7eff7: Delete: mit-pthreads/stdio/findfp.c BitKeeper/deleted/.del-flags.c~a4ae5e34efcf18f8: Delete: mit-pthreads/stdio/flags.c BitKeeper/deleted/.del-floatio.h~cc931f6e2e5521ef: Delete: mit-pthreads/stdio/floatio.h BitKeeper/deleted/.del-fopen.c~adf1f102f5f251ab: Delete: mit-pthreads/stdio/fopen.c BitKeeper/deleted/.del-fprintf.c~c90d3975fa1b0219: Delete: mit-pthreads/stdio/fprintf.c BitKeeper/deleted/.del-fpurge.c~deb487ae44c6e285: Delete: mit-pthreads/stdio/fpurge.c BitKeeper/deleted/.del-fputc.c~abc68bbf5598d6c3: Delete: mit-pthreads/stdio/fputc.c BitKeeper/deleted/.del-fputs.c~f0b64c64de8c8c50: Delete: mit-pthreads/stdio/fputs.c BitKeeper/deleted/.del-fread.c~c70749be57c8d599: Delete: mit-pthreads/stdio/fread.c BitKeeper/deleted/.del-freopen.c~cdc4ed301100221e: Delete: mit-pthreads/stdio/freopen.c BitKeeper/deleted/.del-fscanf.c~82cc575b59cdf65: Delete: mit-pthreads/stdio/fscanf.c BitKeeper/deleted/.del-fseek.c~6823b3dcf2fc485b: Delete: mit-pthreads/stdio/fseek.c BitKeeper/deleted/.del-fsetpos.c~629e9dbab8ac84c5: Delete: mit-pthreads/stdio/fsetpos.c BitKeeper/deleted/.del-ftell.c~c90d329656466c07: Delete: mit-pthreads/stdio/ftell.c BitKeeper/deleted/.del-funopen.c~bb353870560135a7: Delete: mit-pthreads/stdio/funopen.c BitKeeper/deleted/.del-fvwrite.c~12a015432374db2: Delete: mit-pthreads/stdio/fvwrite.c BitKeeper/deleted/.del-fvwrite.h~bca246349dcbe816: Delete: mit-pthreads/stdio/fvwrite.h BitKeeper/deleted/.del-fwalk.c~ccac72992675a03c: Delete: mit-pthreads/stdio/fwalk.c BitKeeper/deleted/.del-fwrite.c~660199da99a25330: Delete: mit-pthreads/stdio/fwrite.c BitKeeper/deleted/.del-getc.c~a58586307c4183a8: Delete: mit-pthreads/stdio/getc.c BitKeeper/deleted/.del-getc_unlocked.c~35038ca3c56349e3: Delete: mit-pthreads/stdio/getc_unlocked.c BitKeeper/deleted/.del-getchar.c~bf1d8ac92ebc4a2: Delete: mit-pthreads/stdio/getchar.c BitKeeper/deleted/.del-getchar_unlocked.c~91084839d7f984a0: Delete: mit-pthreads/stdio/getchar_unlocked.c BitKeeper/deleted/.del-gets.c~5dbf480747b8699a: Delete: mit-pthreads/stdio/gets.c BitKeeper/deleted/.del-getw.c~24be6386098d7e: Delete: mit-pthreads/stdio/getw.c BitKeeper/deleted/.del-glue.h~b8bcfd485b859d01: Delete: mit-pthreads/stdio/glue.h BitKeeper/deleted/.del-local.h~d94baeff18749e79: Delete: mit-pthreads/stdio/local.h BitKeeper/deleted/.del-makebuf.c~ee3c67d0f3c715ce: Delete: mit-pthreads/stdio/makebuf.c BitKeeper/deleted/.del-mktemp.c~ecdf575aab425f8: Delete: mit-pthreads/stdio/mktemp.c BitKeeper/deleted/.del-perror.c~747adefc6708f7a0: Delete: mit-pthreads/stdio/perror.c BitKeeper/deleted/.del-printf.c~de555cf1e097860b: Delete: mit-pthreads/stdio/printf.c BitKeeper/deleted/.del-putc.c~9e757e00d19f8e60: Delete: mit-pthreads/stdio/putc.c BitKeeper/deleted/.del-putc_unlocked.c~2751f8fdf265699f: Delete: mit-pthreads/stdio/putc_unlocked.c BitKeeper/deleted/.del-putchar.c~471db59dfdb9d678: Delete: mit-pthreads/stdio/putchar.c BitKeeper/deleted/.del-putchar_unlocked.c~50192936c11830c6: Delete: mit-pthreads/stdio/putchar_unlocked.c BitKeeper/deleted/.del-puts.c~396d3679d86d27ab: Delete: mit-pthreads/stdio/puts.c BitKeeper/deleted/.del-putw.c~b7d9fd0e54353742: Delete: mit-pthreads/stdio/putw.c BitKeeper/deleted/.del-refill.c~7b62f65ea23f9df1: Delete: mit-pthreads/stdio/refill.c BitKeeper/deleted/.del-remove.c~1a2f44b0fe87b218: Delete: mit-pthreads/stdio/remove.c BitKeeper/deleted/.del-rewind.c~4f290167e00cbc9a: Delete: mit-pthreads/stdio/rewind.c BitKeeper/deleted/.del-rget.c~b75492d21f7d2b12: Delete: mit-pthreads/stdio/rget.c BitKeeper/deleted/.del-scanf.c~c9ea13423b10a5df: Delete: mit-pthreads/stdio/scanf.c BitKeeper/deleted/.del-setbuf.c~8076edbc2da8c10c: Delete: mit-pthreads/stdio/setbuf.c BitKeeper/deleted/.del-setbuffer.c~3894035535226398: Delete: mit-pthreads/stdio/setbuffer.c BitKeeper/deleted/.del-setvbuf.c~a463bac5ab597cfa: Delete: mit-pthreads/stdio/setvbuf.c BitKeeper/deleted/.del-snprintf.c~10569147e4ae9e8: Delete: mit-pthreads/stdio/snprintf.c BitKeeper/deleted/.del-sprintf.c~dda594182e84595d: Delete: mit-pthreads/stdio/sprintf.c BitKeeper/deleted/.del-sscanf.c~f6895e416e88a48: Delete: mit-pthreads/stdio/sscanf.c BitKeeper/deleted/.del-stdio.c~d01166c38a0f41be: Delete: mit-pthreads/stdio/stdio.c BitKeeper/deleted/.del-strerror.c~e4085dd8b75b4fa: Delete: mit-pthreads/stdio/strerror.c BitKeeper/deleted/.del-tempnam.c~8aabafa981925edc: Delete: mit-pthreads/stdio/tempnam.c BitKeeper/deleted/.del-tmpfile.c~4c48791ffd941c01: Delete: mit-pthreads/stdio/tmpfile.c BitKeeper/deleted/.del-tmpnam.c~889743b09a08b997: Delete: mit-pthreads/stdio/tmpnam.c BitKeeper/deleted/.del-ungetc.c~14af7f053c0efdf6: Delete: mit-pthreads/stdio/ungetc.c BitKeeper/deleted/.del-vfprintf.c~e2867535b4f4c1ce: Delete: mit-pthreads/stdio/vfprintf.c BitKeeper/deleted/.del-vfscanf.c~8d5a13802dd681eb: Delete: mit-pthreads/stdio/vfscanf.c BitKeeper/deleted/.del-vprintf.c~f7a873dccfc9555f: Delete: mit-pthreads/stdio/vprintf.c BitKeeper/deleted/.del-vscanf.c~cf544d1f7972a26d: Delete: mit-pthreads/stdio/vscanf.c BitKeeper/deleted/.del-vsnprintf.c~e851f34f5f4d06a9: Delete: mit-pthreads/stdio/vsnprintf.c BitKeeper/deleted/.del-vsprintf.c~3aa0475e58804e21: Delete: mit-pthreads/stdio/vsprintf.c BitKeeper/deleted/.del-GNUmakefile.inc~9eaa47d020c6e07d: Delete: mit-pthreads/stdlib/GNUmakefile.inc BitKeeper/deleted/.del-Makefile.inc~f1113eda41f2e15e: Delete: mit-pthreads/stdlib/Makefile.inc BitKeeper/deleted/.del-abort.c~d99a651deb6f0c0: Delete: mit-pthreads/stdlib/abort.c BitKeeper/deleted/.del-atexit.h~57b0f0a65c77e48d: Delete: mit-pthreads/stdlib/atexit.h BitKeeper/deleted/.del-exit.c~a710a19164bacc9e: Delete: mit-pthreads/stdlib/exit.c BitKeeper/deleted/.del-getopt.c~7785cf46558d6b04: Delete: mit-pthreads/stdlib/getopt.c BitKeeper/deleted/.del-rand.c~41153a97fd8216bb: Delete: mit-pthreads/stdlib/rand.c BitKeeper/deleted/.del-random.c~4ad1f3e2cb8c6315: Delete: mit-pthreads/stdlib/random.c BitKeeper/deleted/.del-strtod.c~63b52a18deedbec5: Delete: mit-pthreads/stdlib/strtod.c BitKeeper/deleted/.del-strtol.c~d46792d7b00287b8: Delete: mit-pthreads/stdlib/strtol.c BitKeeper/deleted/.del-vsscanf.c~ff338bc0897b67: Delete: mit-pthreads/stdio/vsscanf.c BitKeeper/deleted/.del-wbuf.c~2948dcfe86871431: Delete: mit-pthreads/stdio/wbuf.c BitKeeper/deleted/.del-wsetup.c~3760c2821f3c9d02: Delete: mit-pthreads/stdio/wsetup.c BitKeeper/deleted/.del-xprintf.c~bf9c028f3f174f6f: Delete: mit-pthreads/stdio/xprintf.c BitKeeper/deleted/.del-.cvsignore~b9dac0e371bdcf0: Delete: mit-pthreads/tests/.cvsignore BitKeeper/deleted/.del-GNUmakefile.inc~64b79f91b4448737: Delete: mit-pthreads/string/GNUmakefile.inc BitKeeper/deleted/.del-Makefile.inc~e6ee36997014ed99: Delete: mit-pthreads/string/Makefile.inc BitKeeper/deleted/.del-Makefile.in~ebe80d886b32ef55: Delete: mit-pthreads/tests/Makefile.in BitKeeper/deleted/.del-README~22f884561b8f8523: Delete: mit-pthreads/tests/README BitKeeper/deleted/.del-bench_fcntl.c~3468276886fe2935: Delete: mit-pthreads/tests/bench_fcntl.c BitKeeper/deleted/.del-bench_pipe.c~bf808e5de63bffa: Delete: mit-pthreads/tests/bench_pipe.c BitKeeper/deleted/.del-bench_read.c~956db3e467f9d39c: Delete: mit-pthreads/tests/bench_read.c BitKeeper/deleted/.del-p_bench_getpid.c~955b2510134163c: Delete: mit-pthreads/tests/p_bench_getpid.c BitKeeper/deleted/.del-p_bench_mutex.c~7c70997da4d90d84: Delete: mit-pthreads/tests/p_bench_mutex.c BitKeeper/deleted/.del-p_bench_pthread_create.c~f842d5df155e021: Delete: mit-pthreads/tests/p_bench_pthread_create.c BitKeeper/deleted/.del-p_bench_read.c~db38beae7a1c0c9c: Delete: mit-pthreads/tests/p_bench_read.c BitKeeper/deleted/.del-strtok.c~7e4e97feb36fe62: Delete: mit-pthreads/string/strtok.c BitKeeper/deleted/.del-strtoul.c~8f56d9382fa59f6d: Delete: mit-pthreads/stdlib/strtoul.c BitKeeper/deleted/.del-system.c~11e8768464a871ff: Delete: mit-pthreads/stdlib/system.c BitKeeper/deleted/.del-p_bench_semaphore.c~e0af8e34c3604ba: Delete: mit-pthreads/tests/p_bench_semaphore.c BitKeeper/deleted/.del-p_bench_yield.c~827d7c018b3b14d: Delete: mit-pthreads/tests/p_bench_yield.c BitKeeper/deleted/.del-test_create.c~4a57b0fd1032892: Delete: mit-pthreads/tests/test_create.c BitKeeper/deleted/.del-test_cwd.c~22e4f2b76ca811b1: Delete: mit-pthreads/tests/test_cwd.c BitKeeper/deleted/.del-test_execve.c~bd0c103f87af886f: Delete: mit-pthreads/tests/test_execve.c BitKeeper/deleted/.del-test_fcntl.c~53b21f39142e5a4d: Delete: mit-pthreads/tests/test_fcntl.c BitKeeper/deleted/.del-test_fork.c~f298d324d823923a: Delete: mit-pthreads/tests/test_fork.c BitKeeper/deleted/.del-test_netdb.c~be5269b1ecac4ff3: Delete: mit-pthreads/tests/test_netdb.c BitKeeper/deleted/.del-test_pause.c~c911c50ffb11db72: Delete: mit-pthreads/tests/test_pause.c BitKeeper/deleted/.del-test_preemption.c~8029d61f7ec75374: Delete: mit-pthreads/tests/test_preemption.c BitKeeper/deleted/.del-test_preemption_float.c~7f804d5a47a30bd2: Delete: mit-pthreads/tests/test_preemption_float.c BitKeeper/deleted/.del-test_pthread_cond_timedwait.c~fd96cd053a1ee38f: Delete: mit-pthreads/tests/test_pthread_cond_timedwait.c BitKeeper/deleted/.del-test_pthread_join.c~9ee0a45e4852e2c6: Delete: mit-pthreads/tests/test_pthread_join.c BitKeeper/deleted/.del-test_pthread_mutex.c~7afe10ac3a0ed764: Delete: mit-pthreads/tests/test_pthread_mutex.c BitKeeper/deleted/.del-test_pw.c~e4d2a6fbfa419233: Delete: mit-pthreads/tests/test_pw.c BitKeeper/deleted/.del-test_readdir.c~68f325528a6ba31: Delete: mit-pthreads/tests/test_readdir.c BitKeeper/deleted/.del-test_select.c~f58a4df6eabd906b: Delete: mit-pthreads/tests/test_select.c BitKeeper/deleted/.del-test_setjmp.c~701e52e551c3be: Delete: mit-pthreads/tests/test_setjmp.c BitKeeper/deleted/.del-test_sleep.c~82fcf39f34babab0: Delete: mit-pthreads/tests/test_sleep.c BitKeeper/deleted/.del-test_sock_1.c~b68c017f6d6426b7: Delete: mit-pthreads/tests/test_sock_1.c BitKeeper/deleted/.del-test_sock_2.c~5ca3f8118006c2db: Delete: mit-pthreads/tests/test_sock_2.c BitKeeper/deleted/.del-test_sock_2a.c~142c4ae2155fe848: Delete: mit-pthreads/tests/test_sock_2a.c BitKeeper/deleted/.del-test_stdio_1.c~85b778b4cef060e3: Delete: mit-pthreads/tests/test_stdio_1.c BitKeeper/deleted/.del-test_switch.c~a820aca962968c06: Delete: mit-pthreads/tests/test_switch.c support-files/mysql.spec.sh: Made some modifications of the RPMs: - the normal 4.0 package must of course include InnoDB as well - added --with-ssl and --with-vio to the Max binary and build a dynamically linked binary because of this (the normal binary remains statically linked) - updated the Packager Tag as discussed with David - install all binaries as stripped except for mysqld and mysqld-max (needed for UDFs to work)
This commit is contained in:
@ -1,6 +0,0 @@
|
||||
Makefile
|
||||
config.cache
|
||||
config.h
|
||||
config.log
|
||||
config.status
|
||||
obj
|
@ -1,31 +0,0 @@
|
||||
Copyright (c) 1993, 1994, 1995, 1996 by Chris Provenzano and contributors,
|
||||
proven@mit.edu All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. All advertising materials mentioning features or use of this software
|
||||
must display the following acknowledgement:
|
||||
This product includes software developed by Chris Provenzano,
|
||||
the University of California, Berkeley, and contributors.
|
||||
4. Neither the name of Chris Provenzano, the University, nor the names of
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO, THE REGENTS OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
@ -1,241 +0,0 @@
|
||||
Changes done to this distrubtion (pthreads-1_60_beta6) by Monty
|
||||
(monty@mysql.com)
|
||||
|
||||
02.06.20
|
||||
- Added support for semaphores.
|
||||
|
||||
02.05.07
|
||||
- Hacked some files to get it to compile (not work) with glibc 2.2
|
||||
This is needed so that we can do 'make dist' in the MySQL distribution
|
||||
|
||||
02.04.26
|
||||
- removed the following files because of copyright problems
|
||||
|
||||
machdep/i386-sco-3.2v5/__signal.h
|
||||
machdep/i386-sco-3.2v5/__stdio.h
|
||||
machdep/i386-sco-3.2v5/__stdlib.h
|
||||
machdep/i386-sco-3.2v5/__string.h
|
||||
machdep/i386-sco-3.2v5/__time.h
|
||||
machdep/i386-sco-3.2v5/__unistd.h
|
||||
machdep/i386-sco-3.2v5/compat.h
|
||||
machdep/i386-sco-3.2v5/dirent.h
|
||||
machdep/i386-sco-3.2v5/posix/__signal.h
|
||||
machdep/i386-sco-3.2v5/socket.h
|
||||
machdep/i386-sco-3.2v5/syscall.h
|
||||
machdep/i386-sco-3.2v5/timers.h
|
||||
machdep/i386-sco-3.2v5/trash.can
|
||||
machdep/sco-3.2v5/__math.h
|
||||
machdep/sco-3.2v5/__signal.h
|
||||
machdep/sco-3.2v5/__stdio.h
|
||||
machdep/sco-3.2v5/__stdlib.h
|
||||
machdep/sco-3.2v5/__string.h
|
||||
machdep/sco-3.2v5/__time.h
|
||||
machdep/sco-3.2v5/__unistd.h
|
||||
machdep/sco-3.2v5/compat.h
|
||||
machdep/sco-3.2v5/dirent.h
|
||||
machdep/sco-3.2v5/posix/__signal.h
|
||||
machdep/sco-3.2v5/socket.h
|
||||
machdep/sco-3.2v5/syscall.h
|
||||
machdep/sco-3.2v5/timers.h
|
||||
machdep/sco-3.2v5/trash.can
|
||||
|
||||
93.04.01
|
||||
- socket() didn't return NOTOK (-1) on error.
|
||||
- bind() didn't set error code on failure
|
||||
|
||||
93.03.27
|
||||
- Added patch by D. Richard Hipp <drh@vnet.net> to make strtod and
|
||||
printf (of floats/doubles) thread safe. Patch provided by mevans@cti-ltd.com
|
||||
- Added patch I got from lucid@secret.org to fix lock in fork().
|
||||
|
||||
93.03.26
|
||||
- Fixed some include files for BSD 2.0.
|
||||
- Changed the prototype of ioctl() for BSD.
|
||||
- Fixed new bug in fd_kernel.c; _fd_kern_read returned sometimes wrong errno.
|
||||
|
||||
93.03.22
|
||||
- Change sys/cdefs.h to get it through Sun cc.
|
||||
- Added patches by Mark Evans
|
||||
1. Crashes and hangs.
|
||||
2. Missing functionality (namely flock())
|
||||
3. Use of POSIX reentrant safe routines.
|
||||
|
||||
93.03.21
|
||||
- Add patches by Larry V. Streepy to fix pthread_cancel.
|
||||
Fixed bug in Streepy's patch that checked return values of read,write..
|
||||
in fd.c (Already done in fd_sys.c)
|
||||
|
||||
1. Added a declaration of "signal" to include/signal.h
|
||||
2. Modified PANIC macro to operate like assert and call a new function
|
||||
panic_kernel. Added new file pthreads/panic.c.
|
||||
3. Added support for fstatfs syscall for linux (mod to
|
||||
syscall-i386-linux-1.0.S).
|
||||
4. Added missing function declarations to machdep/linux-1.0/socket.h:
|
||||
getsockopt
|
||||
setsockopt
|
||||
getsockname
|
||||
getpeername
|
||||
send
|
||||
recv
|
||||
sendto
|
||||
recvfrom
|
||||
sendmsg
|
||||
recvmsg
|
||||
shutdown
|
||||
5. Added ifdef to avoid type conflict in machdep/linux-1.0/timers.h
|
||||
6. Fix bug in getprotoent (bogus semi-colon after if stmt).
|
||||
7. Change function name in proto_internal.c from _proto_init to
|
||||
_proto_buf.
|
||||
8. Fix bug in res_internal.c where buffer pointer was improperly
|
||||
maintained.
|
||||
9. Fix return value handling for POSIX function implementations.
|
||||
10. Fix bug in select handling where a thread could be incorrectly
|
||||
resumed with no sockets ready. Also added proper handling of
|
||||
selecting for exceptions (this was not implemented at all).
|
||||
11. Added deadlock detection to pthread_join (it can now return an
|
||||
EDEADLK error).
|
||||
12. Added support for pthread_cancel, changes to lots of files for this.
|
||||
13. Add new function __pthread_is_valid that searches the pthread list
|
||||
for a specified pthread_t value.
|
||||
|
||||
93.03.22
|
||||
- Fixed some if the tests according to the below changes.
|
||||
|
||||
93.03.21 by "Mati Sauks" <mati@psti.com>
|
||||
- Fixed bug if priority queue was empty or (*current)->next is empty.
|
||||
|
||||
96.03.20 by Josip Gracin
|
||||
- Fixed gethostbyname to handle alias
|
||||
|
||||
97.02.07
|
||||
- Removed CVS directories.
|
||||
- Commented make install in GNUmakefile.in.
|
||||
|
||||
97.01.26 by David (david@detron.se)
|
||||
- Fixed a dist target in the GNUmakefile
|
||||
- Added #undef PTHREAD_STACK_MIN to avoid warning on solaris 2.5
|
||||
|
||||
97.01.21 by Monty (monty@tcx.se)
|
||||
|
||||
- Added file mysql-TODO and the patches directory.
|
||||
- Added patch p153 and p155 by Tim Hinderliter and Chris Colohan
|
||||
check the patches directory for more info.
|
||||
- Changed pthread_cond_timedwait to return ETIME instead of ETIMEDOUT
|
||||
(Required by Posix)
|
||||
- Changed the include file pthread.h to add prototypes for the following
|
||||
functions: pthread_sigmask, sigwait and sigsetwait
|
||||
- Added shutdown() and getpeername() prototypes to 'machdep/sunos-5.3/socket.h'
|
||||
- Changed __FD_NONBLOCK to (O_NONBLOCK | O_NDELAY) in
|
||||
./machdep/engine-sparc-sunos-5.3.h
|
||||
- Added rint() prototype to math.h
|
||||
- Added new slot sighandled to 'struct pthread' for easy check if somebody
|
||||
interrupts a system call.
|
||||
- pthread_kill can now interrupt the following system calls:
|
||||
select(), read(), write(), send(), sendto(), sendmsg(), recv_timedwait(),
|
||||
recvfrom_timedwait(), readev(), writeev() and some socket functions.
|
||||
- Fixed bug in pthread_kill() which count up 'sigcount' wrongly.
|
||||
Two pthread_kill() in a row bugged the thread.
|
||||
- Merged fd_kern_wait and fd_kern_poll to 1 function and removed a
|
||||
a bug when polling select.
|
||||
- Implemented getpeername().
|
||||
- Some small optimizations.
|
||||
- Some re-indentation to make the code readable by me (Sorry about that).
|
||||
|
||||
97.08.15 by Monty (monty@tcx.se)
|
||||
|
||||
- Added patch by "Chris G. Demetriou" <cgd@pa.dec.com> for NetBSD/alpha.
|
||||
|
||||
97.08.18 by Monty (monty@tcx.se)
|
||||
|
||||
- Added new machdep definitions for HPUX-10.20,
|
||||
by JOERG_HENNE@Non-HP-Germany-om88.om.hp.com
|
||||
|
||||
97.09.25 by Monty (monty@tcx.se)
|
||||
|
||||
- Added some definitions for i386-SCO from the site:
|
||||
http://www.sco.com/skunkware/osr5/libraries/
|
||||
|
||||
97.10.12 by Monty (monty@tcx.se)
|
||||
|
||||
- Changed prototype macro __P to __P_ to avoid warnings on Solaris.
|
||||
- Fixed interruption of select() with pthread_kill() when signal handler
|
||||
used read or write.
|
||||
|
||||
97.10.16 by Monty (monty@tcx.se)
|
||||
|
||||
- Fixed that blocked signals doesn't interrupt threads.
|
||||
|
||||
97.10.20 by Monty (monty@tcx.se)
|
||||
|
||||
- Fixed broken ftruncate system call for FreeBSD 2.0
|
||||
The old one destroyed the orignal file by truncation too much.
|
||||
- Fixed prototypes for des_setkey,encrypt and setkey (according to Solaris 2.5)
|
||||
|
||||
97.11.26 by Monty (monty@tcx.se)
|
||||
|
||||
- Small patch to avoid compile errors on alpha-OSF1 3.2
|
||||
|
||||
97.12.18 by Monty (monty@tcx.se)
|
||||
|
||||
- Added fix for Irix 5.3 in __unistd.h
|
||||
|
||||
98.01.13 by Monty (monty@tcx.se)
|
||||
- Added fd_check_entry to dup2 and table sizecheck to fd_check_entry()
|
||||
patch by Martin Fuchs <Martin@igdv.fh-darmstadt.de>
|
||||
|
||||
98.01.18 by Monty (monty@tcx.se)
|
||||
- Added prototype for gettimeofday() for Solars 2.3
|
||||
- Added some small fixes for configure and Solaris 2.6
|
||||
|
||||
98.01.23 by Monty (monty@tcx.se)
|
||||
- Ported to openbsd.
|
||||
- Renamed nanosleep() to pthread_nanosleep() to avoid name conflict on
|
||||
openbsd.
|
||||
- Fixed link problem with variable __sglue for Irix 5.3
|
||||
by Vladislav Malyshkin <malyshki@cs.wmich.edu>.
|
||||
|
||||
98.03.02 by Monty (monty@tcx.se)
|
||||
- Applied patches from Curt Sampson <cjs@portal.ca>; NetBSD 1.3/i386 port.
|
||||
|
||||
98.03.09 by Monty (monty@tcx.se)
|
||||
- Applied patches from Curt Sampson <cjs@portal.ca>; NetBSD 1.3/Alpha port.
|
||||
|
||||
98.05.12
|
||||
- Added unixware to config.guess
|
||||
|
||||
98.06.07
|
||||
- Added patch by Scott Dybiec <sdybiec@humanfactor.com>:
|
||||
Fixed select() returning incorrect number of active file descriptors.
|
||||
|
||||
99.06.07 by Monty (monty@mysql.com)
|
||||
- Added patches from the NETBSD site. Should fix the following platforms:
|
||||
alpha-netbsd-1.3, sparc-netbsd-1.3, i386-netbsd, arm32-netbsd
|
||||
|
||||
99.09.09 by Monty (monty@mysql.com)
|
||||
- Added patches from Christoph Badura <bad@oreilly.de> for NetBSD
|
||||
|
||||
99.09.13 by Monty (monty@mysql.com)
|
||||
- Added patches from Dirk Froemberg <dirk@FreeBSD.org> for FreeBSD
|
||||
|
||||
99.10.18 by Monty (monty@mysql.com)
|
||||
- Added patch for machdep_sys_lseek() for netbsd.
|
||||
|
||||
99.12.30 by Monty (monty@mysql.com)
|
||||
- Added patch by Christoph Badura <bad@oreilly.de> to update mit-pthreads
|
||||
to the same version as in the NetBSD pkgsrc.
|
||||
|
||||
00.02.24 by Monty (monty@mysql.com)
|
||||
- Added configure files to make mit-pthreads to compile and link during
|
||||
newer linux systems (needed because of the MySQL configure system).
|
||||
The resulting library has however not been verified under Linux.
|
||||
|
||||
00.03.30 by Monty (monty@mysql.com)
|
||||
- Added chroot() and gethostname().
|
||||
|
||||
00.10.18 by Monty (monty@mysql.com)
|
||||
- Added patch by Dave Huang <khym@bga.com> to fix problem with date/time
|
||||
on NETBSD/Alpha.
|
||||
|
||||
01.01.11 by Monty (monty@mysql.com)
|
||||
- Added patch by Allen Briggs <briggs@ninthwonder.com> for
|
||||
Apple PowerMac 8500 w/ G3 upgrade running NetBSD/macppc
|
122
mit-pthreads/FAQ
122
mit-pthreads/FAQ
@ -1,122 +0,0 @@
|
||||
|
||||
Answers to frequently asked questions
|
||||
for my implementation of POSIX threads
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
1. Pthreads
|
||||
|
||||
(1.0) What is Pthreads?
|
||||
(1.1) Where can I get info on Pthreads?
|
||||
|
||||
2. Getting, Building, Installing and Using proven's Pthreads
|
||||
|
||||
(2.0) Where can I get the latest version of proven's Pthreads?
|
||||
(2.1) What platforms does proven's Pthreads run on?
|
||||
(2.2) What do I need to build proven's Pthreads?
|
||||
(2.3) How do I install proven's Pthreads?
|
||||
|
||||
3. Known Problems
|
||||
|
||||
(3.0) Tests
|
||||
(3.1) Installation
|
||||
(3.2) Missing functionality
|
||||
(3.3) Signals
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
1. Pthreads
|
||||
|
||||
(1.0) What is Pthreads?
|
||||
|
||||
Pthreads stands for POSIX threads and is based on the POSIX 1003.1c 1995
|
||||
thread standard. This standard passed international Standards Organization
|
||||
(ISO) Committee Document (CD) balloting in February 1995 and got the
|
||||
IEEE Standards Board approval in June 1995.
|
||||
|
||||
|
||||
(1.1) Where can I get info on Pthreads?
|
||||
|
||||
You can call IEEE (908) 562-3800 which is the organization which POSIX
|
||||
belongs, and ask for POSIX 1003.1c (not 1003.4a) draft 10 (the standard
|
||||
won't be out until sometime in 1996). The draft costs $30.00 plus shipping
|
||||
which for me was $4.00. The IEEE doesn't make any of the standards available
|
||||
online.
|
||||
|
||||
I have made documentation for some of the functions available online.
|
||||
To reference these use http://www.mit.edu:8001/people/proven/pthreads.html
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
2. Getting, Building, Installing and Using proven's Pthreads
|
||||
|
||||
(2.0) Where can I get the latest version of proven's Pthreads?
|
||||
|
||||
The latest version is pthreads-1_60_beta6 was release on November 16, 1996
|
||||
and is available from sipb.mit.edu:/pub/pthreads.
|
||||
|
||||
|
||||
(2.1) What platforms does proven's Pthreads run on?
|
||||
|
||||
Lot's! It should run on the following platforms; the i386 processor
|
||||
running NetBSD-1.x, FreeBSD-2.x, BSDOS-2.0, Linux-1.2 and Linux-1.3;
|
||||
the r2000 (DECstation) running Ultrix-4.2; the Sparc running NetBSD-1.x,
|
||||
SunOS-4.1.3, Solaris-2.3, and Solaris-2.4; the alpha running OSF-2.3 and
|
||||
OSF-3.x; the SGI running IRIX-5.2; and the HPPA running HP/UX-9.x.
|
||||
|
||||
Because it runs on so many platforms I don't get to compile and test every
|
||||
platform for every release. If you have a problem send mail to
|
||||
pthreads-bugs@mit.edu with the processor, OS, and version number along with
|
||||
a description of the bug.
|
||||
|
||||
|
||||
(2.2) What do I need to build proven's Pthreads?
|
||||
|
||||
You will need gcc and gmake to build for all but NetBSD, FreeBSD and BSDOS.
|
||||
For those you may use either gmake or pmake (the native make).
|
||||
|
||||
|
||||
(2.3) How do I install proven's Pthreads?
|
||||
|
||||
Installing pthreads is real easy. At the top level of pthreads do
|
||||
|
||||
configure
|
||||
make
|
||||
make install
|
||||
|
||||
It will be installed into the directory /usr/local/pthreads. If you don't
|
||||
like the location add a --prefix=<dir> option to configure. That's it.
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
3. Known problems.
|
||||
|
||||
(3.0) Tests
|
||||
|
||||
Under SunOS-4.1.x there is a bug in the kernel that prevents test_sock_1
|
||||
from passing. This bug has to do with a process tring to connect to itself.
|
||||
In respose I wrote test_sock_2 to test the socket code for SunOS which
|
||||
does work. You should have no problems using the socket code in SunOS
|
||||
so long as you don't write a program that need to connect to itself.
|
||||
|
||||
|
||||
(3.1) Installation
|
||||
|
||||
The only know problem is on the SGI. You will need to use GNU tar instead
|
||||
of the native supplied one or edit the config.flags file and remove the -h
|
||||
option to tar. Aparently the -h option on IRIX 5.3 version of tar does the
|
||||
exact opposite of all the other versions of tar I've used and instead of
|
||||
following symbolic links and getting the file it archives the link.
|
||||
|
||||
|
||||
(3.2) Missing functionality
|
||||
|
||||
The current release is missing cancelation, priority mutexes and others.
|
||||
I'm continuing to develope pthreads and I plan to put cancelation and
|
||||
priority mutexes and as much other stuff as I can into the 1_70 release
|
||||
|
||||
|
||||
(3.3) Signals
|
||||
|
||||
Currently to intermix signals with pthreads you need to rename all calls
|
||||
to signal() and sigaction() to pthread_signal() and pthread_sigaction().
|
||||
I plan to write real wrapper routines for signal() and sigaction() for
|
||||
the 1_70 release.
|
||||
|
@ -1,129 +0,0 @@
|
||||
# === GNUmakefile =============================================================
|
||||
# Copyright (c) 1991, 1992, 1993 Chris Provenzano, proven@athena.mit.edu
|
||||
#
|
||||
# Description: This file is for creating libpthread.a
|
||||
#
|
||||
# 1.00 93/11/17 proven
|
||||
# -Put all the .o files into one file libpthread.a
|
||||
# -Initial cut for pthreads.
|
||||
#
|
||||
|
||||
INSTALL_PATH = $(exec_prefix)
|
||||
|
||||
BINDIR = $(INSTALL_PATH)/bin
|
||||
LIBDIR = $(INSTALL_PATH)/lib
|
||||
MANDIR = $(INSTALL_PATH)/man
|
||||
INCDIR = $(INSTALL_PATH)/include
|
||||
SUBINCDIR = $(INCDIR)/pthread
|
||||
|
||||
AR = ar
|
||||
AS = gas
|
||||
CFLAGS = -I. -Iinclude -I$(srcdir)/include -DPTHREAD_KERNEL \
|
||||
-O3 -DDBUG_OFF -Werror
|
||||
CXXFLAGS = -I. -Iinclude -I$(srcdir)/include -DPTHREAD_KERNEL \
|
||||
-g -O2
|
||||
LD = gld
|
||||
|
||||
CSRC =
|
||||
|
||||
PTHREAD_DIR = pthreads stdlib stdio gen
|
||||
DIRS = $(PTHREAD_DIR)
|
||||
|
||||
HEADERS =
|
||||
|
||||
LIBRARIES = libpthread.a
|
||||
|
||||
.CURDIR = .
|
||||
|
||||
# force correct default target
|
||||
all:
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Read in any special flags that config knows about
|
||||
include config.flags
|
||||
|
||||
# What the heck. Convert srcdir to absolute form so it looks prettier.
|
||||
srcdir := $(shell cd $(srcfoo) && pwd)
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Here starts the nitty grity part of the Makefile.
|
||||
|
||||
all-lib : libpthread.a
|
||||
|
||||
include ${srcdir}/pthreads/GNUmakefile.inc
|
||||
include ${srcdir}/stdlib/GNUmakefile.inc
|
||||
include ${srcdir}/stdio/GNUmakefile.inc
|
||||
include ${srcdir}/string/GNUmakefile.inc
|
||||
include ${srcdir}/gen/GNUmakefile.inc
|
||||
include ${srcdir}/net/GNUmakefile.inc
|
||||
include ${srcdir}/scripts/GNUmakefile.inc
|
||||
|
||||
REGULAR_OBJS= $(subst .cc,.o,$(SRCS))
|
||||
REGULAR_OBJS:= $(subst .c,.o,$(REGULAR_OBJS))
|
||||
REGULAR_OBJS:= $(subst .S,.o,$(REGULAR_OBJS))
|
||||
OBJS= $(REGULAR_OBJS) $(EXTRA_OBJS)
|
||||
REALOBJS = $(addprefix obj/, $(OBJS))
|
||||
|
||||
$(REALOBJS) : $(config) $(types) $(paths)
|
||||
|
||||
# Since we do not have a list of the relevant files we do a make clean
|
||||
# before copying everyting to the distribution directory.
|
||||
distdir:
|
||||
$(MAKE) clean
|
||||
cp -a . $(distdir)
|
||||
# Remove symlinks that the distribution should not have.
|
||||
rm -f $(distdir)/config.cache \
|
||||
$(distdir)/include/pthread/machdep.h \
|
||||
$(distdir)/include/pthread/posix.h \
|
||||
$(distdir)/include/sys \
|
||||
$(distdir)/machdep.c \
|
||||
$(distdir)/syscall.S \
|
||||
$(distdir)/syscall-template.S
|
||||
|
||||
clean:
|
||||
rm -f a.out core maketmp makeout $(LIBRARIES) $(BINARIES) libpthread.*
|
||||
rm -rf obj
|
||||
cd tests && $(MAKE) clean && cd ..
|
||||
|
||||
install-lib: $(LIBRARIES) install-dirs
|
||||
for x in $(LIBRARIES); \
|
||||
do install $$x $(DESTDIR)$(LIBDIR); \
|
||||
done
|
||||
|
||||
# Removed make install since mysql uses this in place.
|
||||
# install-lib install-include install-bin
|
||||
install:
|
||||
|
||||
libpthread.a: obj/libpthread.a
|
||||
rm -f libpthread.a
|
||||
ln -s obj/libpthread.a .
|
||||
|
||||
obj/libpthread.a: ${REALOBJS}
|
||||
rm -f libpthread.a obj/new.a obj/libpthread.a
|
||||
cd obj && \
|
||||
ar r new.a ${OBJS} && \
|
||||
$(RANLIB) new.a && \
|
||||
mv -f new.a libpthread.a && \
|
||||
cd ..
|
||||
|
||||
# For examining a combined symbol table, sizes, &c.
|
||||
libpthread.o: ${REALOBJS}
|
||||
cd obj && ld -r -o ../libpthread.o ${OBJS} && cd ..
|
||||
|
||||
obj/x:
|
||||
if [ -d obj ]; then true; else mkdir obj; fi
|
||||
cp /dev/null obj/x
|
||||
|
||||
GNUmakefile: config.status ${srcdir}/config/GNUmakefile.in
|
||||
$(SHELL) config.status
|
||||
|
||||
obj/%.o: %.c obj/x
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
obj/%.o: %.cc obj/x
|
||||
$(CXX) $(CXXFLAGS) $(CFLAGS) -c $< -o $@
|
||||
|
||||
obj/%.o: %.S obj/x
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
@ -1,59 +0,0 @@
|
||||
|
||||
Here are some notes on the internals of the implementation.
|
||||
|
||||
LIBC routines.
|
||||
|
||||
Unfortuanately many of the libc routine return a pointer to static data.
|
||||
There are two methods to deal with this. One write a new routine where the
|
||||
arguments are different, and have one argument be a pointer to some space
|
||||
to store the data, or two use thread specific data and warn the user that
|
||||
data isn't valid if the calling thread is terminated.
|
||||
|
||||
INTERNAL LOCKING
|
||||
To prevent deadlocks the following rules were used for locks.
|
||||
|
||||
1. Local locks for mutex queues and other like things are only locked
|
||||
by running threads, at NO time will a local lock be held by
|
||||
a thread in a non running state.
|
||||
2. Only threads that are in a run state can attempt to lock another thread,
|
||||
this way, we can assume that the lock will be released shortly, and don't
|
||||
have to unlock the local lock.
|
||||
3. The only time a thread will have a pthread->lock and is not in a run
|
||||
state is when it is in the reschedule routine.
|
||||
4. The reschedule routine assumes all local locks have been released,
|
||||
there is a lock on the currently running thread (pthread_run),
|
||||
and that this thread is being rescheduled to a non running state.
|
||||
It is safe to unlock the currently running threads lock after it
|
||||
has been rescheduled.
|
||||
5. The reschedule routine locks the kernel, sets the state of the currently
|
||||
running thread, unlocks the currently running thread, calls the
|
||||
context switch routines.
|
||||
6 the kernel lock is used only ...
|
||||
|
||||
|
||||
7. The order of locking is ...
|
||||
|
||||
1 local locks
|
||||
2 pthread->lock /* Assumes it will get it soon */
|
||||
3 pthread_run->lock /* Assumes it will get it soon, but must release 2 */
|
||||
4 kernel lock /* Currently assumes it will ALWAYS get it. */
|
||||
|
||||
8. The kernel lock will be changed to a spin lock for systems that
|
||||
already support kernel threads, this way we can mutiplex threads onto
|
||||
kernel threads.
|
||||
9. There are points where the kernel is locked and it needs to get
|
||||
either a local lock or a pthread lock, if at these points the code
|
||||
fails to get the lock the kernel gives up and sets a flag which will
|
||||
be checked at a later point.
|
||||
10. Interrupts are dissabled while the kernel is locked, the interrupt
|
||||
mask must be checked afterwards or cleared in some way, after interrputs
|
||||
have been reenabled, this allows back to back interrupts, but should always
|
||||
avoid missing one.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Copyright (c) 1994 Chris Provenzano. All rights reserved.
|
||||
This product includes software developed by the Univeristy of California,
|
||||
Berkeley and its contributors.
|
||||
|
||||
For further licencing and distribution restrictions see the file COPYRIGHT
|
||||
included in this directory.
|
@ -1,45 +0,0 @@
|
||||
This port to Osr5 was donated by
|
||||
ARTURO MONTES mitosys@colomsat.net.co
|
||||
Its a snapshot of the 1.60 Beta 5 version
|
||||
|
||||
It passes all the tests except test_fork (this seems to be a problem
|
||||
with the MIT source)
|
||||
and I suspect there may also to be problems with
|
||||
the floating point initialisation and perhaps the netdb access as well
|
||||
|
||||
|
||||
Regarding the networking API's mind the following (ARTURO):
|
||||
|
||||
- Always we are searching host address in /etc/hosts by default, if you
|
||||
want other behaviour let me to know.
|
||||
|
||||
- If you haven't an entry in /etc/hosts, please create it and after test
|
||||
with DNS service.
|
||||
|
||||
regarding floating point initialisation (ARTURO)
|
||||
|
||||
...mit-pthreads/pthreads/tests> ./test_preemption_float
|
||||
test_preemption_float INDETERMINATE
|
||||
|
||||
I inhibit the pthread float code, but they are a minor changes in machdep.c.
|
||||
|
||||
> What did you do/needs to be done here ??
|
||||
|
||||
Look into machdep.c machdep_save_float_state() and
|
||||
machdep_restore_float_state() routine. I think the initialization float
|
||||
code can have problems with pthread initialization code.
|
||||
|
||||
----------------
|
||||
|
||||
|
||||
If you wish to rebuild from source you'll need the gnus devsys
|
||||
(gmake and gcc) and don't use configure to reconfigure the makefiles, etc
|
||||
( I don't know why this is but it doesn't work)
|
||||
|
||||
If Arturo keeps me updated with buildable snapshots I'll endeavour to keep
|
||||
the skunkware Website updated with them.
|
||||
|
||||
|
||||
Best of luck
|
||||
|
||||
hops 01-Aug-97
|
@ -1,40 +0,0 @@
|
||||
This pthread package is/will be based on the POSIX1003.1c Draft 10 pthread
|
||||
standard, and Frank Muellers paper on signal handeling presented at the
|
||||
Winter 93 USENIX conference.
|
||||
|
||||
It is currently being designed and written by me, Chris Provenzano.
|
||||
All bug, comments, and questions can be sent me at proven@mit.edu,
|
||||
or pthreads@mit.edu.
|
||||
|
||||
PLEASE, don't send questions, bugs or patches to any of the *BSD*, Linux
|
||||
or GNU mailing lists.
|
||||
|
||||
Thanks goes to Ken Raeburn for his help on the Sparc port, the configurator,
|
||||
and his many suggestions, Greg Hudson for the thread safe net routines and
|
||||
all the testing he's done.
|
||||
|
||||
More thanks to Mark Eichin and all the others for the testing they have done.
|
||||
|
||||
PORTING
|
||||
One of the goals of this user space implementation of pthreads is that it
|
||||
be portable. I have minimized the ammount of assembler code necessary,
|
||||
but some is.
|
||||
|
||||
If you want to port it to another platform here are a few basic hints.
|
||||
|
||||
You will need to create a machdep.h, machdep.c and syscall.S for the
|
||||
new architecture. The first two are necessary to get the context switch
|
||||
section of the pthread package running, the third is for all the syscalls.
|
||||
|
||||
INCLUDE FILES AND PORTING
|
||||
In addition to the above three files you need to create a slew of .h files.
|
||||
Take a look at an existing port to determine what is in each, and then
|
||||
take a look at your system header files to determine what to put in them.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Copyright (c) 1993, 1994, 1995, 1996 Chris Provenzano. All rights reserved.
|
||||
This product includes software developed by the Univeristy of California,
|
||||
Berkeley and its contributors.
|
||||
|
||||
For further licencing and distribution restrictions see the file COPYRIGHT
|
||||
included in this directory.
|
@ -1,4 +0,0 @@
|
||||
This what should be done to get more functionally for mysqld.
|
||||
|
||||
- open should be interruptable.
|
||||
- fcntl lock should be interruptable.
|
@ -1,198 +0,0 @@
|
||||
For patches made to this release, check the file Changes-mysql
|
||||
|
||||
For the 96/11/11 release version 1_60_beta6
|
||||
|
||||
Ports
|
||||
Alpha running NetBSD-1.1 by Chris G Demetriou <cgd+@cs.cmu.edu>
|
||||
i386 running BSDi-2.1 by David J MacKenzie <djm@va.pubnix.com>
|
||||
|
||||
Bug Fixes
|
||||
Test for struct timespec under linux and DTRT.
|
||||
include/unistd.h : #define SEEK_SET, SEEK_CUR, and SEEK_END.
|
||||
Bug reported by Stephen Tether <tether@MITLNS.MIT.EDU>
|
||||
stdlib/system.c : Uses the POSIX signal systemcalls.
|
||||
Bug reported by Matthew Newhook <matthew@thor.udc.neweast.ca>.
|
||||
net/gethostbyname.c: #include <string.h> and fix dereference problem.
|
||||
Bug reported by Chris G Demetriou <cgd+@cs.cmu.edu>
|
||||
pthreads/fd.c: Fix bug in close() reported by
|
||||
Bug reported by "William S. Lear" <rael@dejanews.com>
|
||||
tests/p_bench_pthread_create.c : Only try and create 10000 threads.
|
||||
include/pthread/sleep.h : No need to prototype machdep_gettimeofday()
|
||||
since it is declared here.
|
||||
Bug reported by Stewart Gebbie <stewart@global.co.za>
|
||||
stdio/fwrite.c: Fixed bug where if total bytes written = 0 then a divid
|
||||
by 0 occurs. Thanks to CTLarsen@lbl.gov for finding is and to
|
||||
Jin Guojun <jin@george.lbl.gov> for submitting a patch for it.
|
||||
stdio/refill.c (__swalk_lflush()): Second pass of flush should call
|
||||
flockfile() not ftrylockfile(). Just like in __swalk_sflush()
|
||||
net/res_internal.c (_res_parse_answer()): It looks like if
|
||||
iquery is true and type == T_PTR then the result->h_name
|
||||
will be over written because the bp isn't incrementd
|
||||
appropriately. Thanks to David Halls <David.Halls@cl.cam.ac.uk>
|
||||
for finding it.
|
||||
net/serv_internal.c (_serv_buf()) : Allocate more than four bytes
|
||||
of buffer space. Reported by drh@@tobit.vnet.net.
|
||||
pthreads/fd_kern.c: Make sure exception fds are included in
|
||||
machdep_sys_select() for support of select(). Thanks to
|
||||
Larry V. Streepy, Jr. <streepy@healthcare.com> for the patches.
|
||||
pthreads/fd_kern.c: Fix more I/O routines to report NOTOK on error
|
||||
instead of the old -error number. Hopefully this is the last of
|
||||
them. Thanks to Larry V. Streepy, Jr. <streepy@healthcare.com> for
|
||||
the patches.
|
||||
machdep/engine-i386-linux-1.0.c: Remove unneeded machdep_sys_readv()
|
||||
and machdep_sys_writev() routines. Reported by
|
||||
pthreads/process.c : Fix execl() and execle() to work on sparc systems.
|
||||
pthreads/fd_sysv.c : Fix accept() to work under Solaris 2.4
|
||||
|
||||
|
||||
For the 96/03/09 release version 1_60_beta5
|
||||
|
||||
Ports
|
||||
Sparc running NetBSD-1.1
|
||||
|
||||
Additions
|
||||
New reentrant netdb similar to Solaris API (ghudson)
|
||||
|
||||
Bug Fixes
|
||||
Make default signal handlers work.
|
||||
Deadlock scheduling bug reported by Cathy Abbott <cabbot@cs.utk.edu>
|
||||
See pthreads-bugs transaction 31
|
||||
pthread/queue.c (pthread_queue_remove()): Don't set thread->queue and
|
||||
thread->next to NULL unless the thread is removed from the queue.
|
||||
pthreads/fd.c (setsockopt(), getsockopt(), getsockname(),
|
||||
getpeername()) : Call fd_lock() with appropriate paramaters.
|
||||
pthreads/fd_kern.c (sendmsg_timedwait()): Call fd_unlock() with
|
||||
FD_WRITE instead of FD_READ paramater.
|
||||
machdep/*/timers.h net/res_send.c, pthreads/cond.c, pthreads/select.c
|
||||
pthreads/sleep.c, tests/test_pthread_cond_timedwait.c:
|
||||
Change timespec to be POSIX compliant.
|
||||
include/unistd.h : Change u_int to unsigned [int] in prototypes.
|
||||
pthreads/fd.c : Use FD_SETSIZE instead of 1024 for a limit on fds.
|
||||
|
||||
|
||||
For the 95/09/xx release version 1_60_beta4
|
||||
|
||||
Ports
|
||||
SGI running IRIX-5.3
|
||||
|
||||
Additions
|
||||
Added pthread_sigprocmask().
|
||||
Added CV attributes
|
||||
|
||||
strtok() and strtok_r() (Greg Hudson)
|
||||
getsockname() (Sean Levy)
|
||||
|
||||
Bug Fixes
|
||||
stdio/fwalk.c, stdio/refill.c : Use flockfile() instead of
|
||||
ftrylockfile()/pthread_yield(), for traversing FILE list.
|
||||
pthreads/sig.c : Remove enum pthread_sig_flags and just use the vector.
|
||||
Added pthread_sigprocmask().
|
||||
pthreads/signal.c : Protect calls to pthread_sig_process().
|
||||
configure : Create the obj directory.
|
||||
tests/test_preemption_float.c : Rewritten to actually work.
|
||||
machdep/engine-i386-linux-1.0.c : Added __strtol_internal()
|
||||
tests/test_stdio_1.c : Don't use base_name or dir_name as variables.
|
||||
gen/getcwd.c : fstat => machdep_sys_fstat, since kernel fd's are
|
||||
used in the DIR data structure
|
||||
gen/isatty.c : Fixed call to fd_lock() to pass the right # args.
|
||||
pthreads/pthread_init.c : Fixed uninitialized members of
|
||||
pthread_initial.
|
||||
|
||||
|
||||
|
||||
For the 95/06/xx release version 1_60_beta3
|
||||
|
||||
Additions
|
||||
Add exec variants execl, execlp, execv, execvp (Ken Raeburn)
|
||||
pthreads/fd_sysv.c : Added routines setsockopt() and getsockname().
|
||||
Added include/endian.h : For machine dependent endian junk. (YUCK)
|
||||
Added socketpair()
|
||||
Added ttyname_r()
|
||||
|
||||
Bug Fixes
|
||||
config/Makefile.in : Need $$ to reference shell variables in make.
|
||||
config/configure, config/configure.in : Redo freebsd2.* machine.
|
||||
machdep/sunos-4.1.3/__stdlib.h : typedef pthread_size_t size_t
|
||||
pthreads/fd.c : Fix bug with fd_free(), dup(), dup2(), and close()
|
||||
where a fd gets lost after a dup() then close().
|
||||
pthreads/fd_kern.c : The fd_table[fd]->flags of the fd that accept()
|
||||
returns should be the same as those of the fd passed to accept().
|
||||
stdio/fclose.c : Don't call funlockfile(fp) after fp->_file has been
|
||||
closed.
|
||||
pthreads/select.c : Move pthread_sched_prevent() inside the statement.
|
||||
if (machdep_sys_select(...) == OK)
|
||||
pthreads/machdep/linux-1.0/cdefs.h : moved the include_next outside
|
||||
of the ifdef so that it would eventually find the system cdefs.h
|
||||
pthreads/signal.c : Check sig_to_process before and after fd_kern_wait()
|
||||
. It is possible for sig_handler_fake() to registered one.
|
||||
pthreads/signal.c : Unset pthread_run temporarily around the call to
|
||||
sig_handler(0). places where this causes core dumps should check
|
||||
pthread_run.
|
||||
include/stdlib.h : Fix prototype for bsearch().
|
||||
machdep/syscall-i386-freebsd-2.0.S syscall-template-i386-freebsd2.0.S:
|
||||
Fix macro expansion problems for FreeBSD-2.0
|
||||
machdep/engine-sparc-sunos-5.3.c : Fix machdep_sys_select() to return
|
||||
machdep_sys_poll() errors and not the number of entries found.
|
||||
gen/getcwd.c : Use strlen(dp->d_name) not dp->d_namlen because there
|
||||
may be extra data associated with dp->d_namelen.
|
||||
machdep/freebsd-2.0/__unistd.h: Change #define _POSIX_VDISABLE to 0xff
|
||||
include/pthread.h : Added prototypes pthread_kill(), pthread_signal()
|
||||
machdep/linux-1.0/__signal.h : Added #define __sigmask() and
|
||||
#define sigmask, and fixed other SIG macros to use __sigmask.
|
||||
machdep/linux-1.0/dirent.h : #include <sys/types.h>
|
||||
machdep/linux-1.0/wait.h : Fix #define WIFSTOPPED(x) to use __WSTATUS(x)
|
||||
machdep/syscall-i386-linux-1.0.S : Added elf support. (NOT TESTED)
|
||||
pthreads/stat.c : Added to separate linux stat calls.
|
||||
(SGI will need this too)
|
||||
pthreads/signal.c : Whereever #ifdef (SA_RESETHAND) is used then
|
||||
#ifdef (SA_RESTART) also
|
||||
gen/isatty.c : isatty_basic() is called with the KFD not UFD.
|
||||
machdep/sunos-4.1.3/__stdlib.h : #include <sys/stdtypes.h>
|
||||
config/sun4os4.mk : Added pipe to SYSCALL_EXCEPTIONS
|
||||
machdep/syscall-sparc-sunos-4.1.3.S : Add machdep_sys_pipe().
|
||||
include/stdio.h : Remove __getc() and __putc(), because they really
|
||||
shouldn't be inlined.
|
||||
machdep/sunos-4.1.3/stat.h : Added __BEGIN_DECLS and __END_DECLS.
|
||||
machdep/alpha-osf1/cdefs.h, machdep/hpux-9.03/cdefs.h
|
||||
machdep/linux-1.0/cdefs.h, machdep/sunos-4.1.3/cdefs.h
|
||||
machdep/sunos-5.3/cdefs.h, machdep/ultrix-4.2/cdefs.h :
|
||||
#define __INLINE static inline and don't #define
|
||||
__CAN_DO_EXTERN_INLINE if __cplusplus and __GCC__ is defined.
|
||||
pthreads/fd_sysv.c : Fix so that only systems without socket systemcalls
|
||||
compile this file.
|
||||
machdep/engine-i386-linux-1.0.c : Fix linux machdep_sys_getdirentries()
|
||||
pthreads/gen : Nuke the signal-blocking code in pclose(). It doesn't do
|
||||
any good in a threaded program; some other thread would just get
|
||||
the signal.
|
||||
|
||||
|
||||
For the 94/11/xx release version 1_60
|
||||
|
||||
Additions
|
||||
Added recvfrom_timedwait(), and similar calls
|
||||
Added thread safe time routines: ctime(), localtime(), ...
|
||||
Added thread safe rand routines: rand(), random(), ...
|
||||
Added priorities and releated routines: pthread_attr_getschedparam(),
|
||||
Added signals and releated routines:pthread_kill(), sigwait(), ...
|
||||
Added mutex attribues and releated routines: pthread_mutexattr_init(), .
|
||||
Added abort
|
||||
|
||||
Added counting (recursive) mutexes.
|
||||
Added debugging mutexes.
|
||||
Added some more tests
|
||||
|
||||
Redid entire thread kernel because of priorities, and signals.
|
||||
Test and set instructions no longer necessary for versions
|
||||
that don't support kernel threads.
|
||||
|
||||
More debugging by Greg Hudson along with the network lookup routines
|
||||
An Alpha port from Ken Raeburn and Sean Levy
|
||||
A solaris port from me.
|
||||
select() implementations from Sean Levy and Peter Hofmann
|
||||
configure from Ken Raeburn
|
||||
pthread_init() no longer necessary for systems with G++ from Ken Raeburn
|
||||
net code from Greg Hudson including: gethostbyname(), ...
|
||||
|
||||
Bug fixes:
|
||||
honor _POSIX_THREAD_DESTRUCTOR_ITERATIONS
|
||||
pthread_key_destroy() is really pthread_key_delete()
|
@ -1 +0,0 @@
|
||||
Makefile
|
@ -1,48 +0,0 @@
|
||||
# === GNUmakefile ============================================================
|
||||
# Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
|
||||
#
|
||||
# Description: This file is for creating the test programs for libpthread.a
|
||||
#
|
||||
# 1.00 93/08/03 proven
|
||||
# -Initial cut for pthreads.
|
||||
#
|
||||
|
||||
CC = ../pgcc -notinstalled
|
||||
srctop = @srctop@
|
||||
srcdir = @srctop@/lib
|
||||
VPATH = @srctop@/lib
|
||||
CDEBUGFLAGS = @CFLAGS@
|
||||
|
||||
CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(ADDL_CFLAGS) -DSRCDIR=\"$(srcdir)\"
|
||||
|
||||
#
|
||||
DIRS = finger
|
||||
|
||||
################################################################################
|
||||
#
|
||||
all:
|
||||
(for i in $(DIRS); do cd $$i; $(MAKE) all; cd ..; done)
|
||||
|
||||
clean:
|
||||
(for i in $(DIRS); do cd $$i; $(MAKE) clean; cd ..; done)
|
||||
rm -f *.o $(TESTS) $(BENCHMARKS) a.out core maketmp makeout
|
||||
|
||||
depend:
|
||||
(for i in $(DIRS); do cd $$i; $(MAKE) depend; cd ..; done)
|
||||
sed '/\#\#\# Dependencies/q' < Makefile > maketmp
|
||||
(for i in $(CSRC);do $(CPP) -M $$i;done) >> maketmp
|
||||
cp maketmp Makefile
|
||||
|
||||
install:
|
||||
(for i in $(DIRS); do cd $$i; $(MAKE) install; cd ..; done)
|
||||
|
||||
realclean: clean
|
||||
(for i in $(DIRS); do cd $$i; $(MAKE) realclean; cd ..; done)
|
||||
rm -f Makefile
|
||||
|
||||
Makefile: Makefile.in
|
||||
(cd .. ; sh config.status)
|
||||
|
||||
################################################################################
|
||||
### Do not remove the following line. It is for depend #########################
|
||||
### Dependencies:
|
@ -1 +0,0 @@
|
||||
Makefile
|
@ -1,60 +0,0 @@
|
||||
# === makefile ============================================================
|
||||
# Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
|
||||
#
|
||||
# Description: This file is for creating the test programs for libpthread.a
|
||||
#
|
||||
# 1.00 93/08/03 proven
|
||||
# -Initial cut for pthreads.
|
||||
#
|
||||
|
||||
srctop = @srctop@
|
||||
srcdir = @srctop@/bin/finger
|
||||
VPATH = @srctop@/bin/finger
|
||||
prefix= @prefix@
|
||||
exec_prefix= @exec_prefix@
|
||||
|
||||
INSTALL_PATH = @exec_prefix@
|
||||
BINDIR = $(INSTALL_PATH)/bin
|
||||
LIBDIR = $(INSTALL_PATH)/lib
|
||||
MANDIR = $(INSTALL_PATH)/man
|
||||
INCDIR = $(INSTALL_PATH)/include
|
||||
|
||||
CC = ../../pgcc -notinstalled
|
||||
CDEBUGFLAGS = @CFLAGS@
|
||||
INCLUDES = -I@srctop@/lib/libpthreadutil/ -L../../lib/libpthreadutil/
|
||||
CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(ADDL_CFLAGS) -DSRCDIR=\"$(srcdir)\"
|
||||
RANLIB = @RANLIB@
|
||||
|
||||
OBJS = finger.o net.o
|
||||
BINARY = finger
|
||||
|
||||
################################################################################
|
||||
#
|
||||
all : $(BINARY)
|
||||
|
||||
clean:
|
||||
rm -f *.o $(TESTS) $(BENCHMARKS) a.out core maketmp makeout
|
||||
|
||||
depend:
|
||||
sed '/\#\#\# Dependencies/q' < Makefile > maketmp
|
||||
(for i in $(CSRC);do $(CPP) -M $$i;done) >> maketmp
|
||||
cp maketmp Makefile
|
||||
|
||||
install: $(BINARY)
|
||||
install $(BINARY) $(BINDIR)
|
||||
|
||||
realclean: clean
|
||||
rm -f Makefile
|
||||
|
||||
Makefile: Makefile.in
|
||||
(cd ../.. ; sh config.status)
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
$(BINARY) : ${OBJS}
|
||||
$(CC) $(CFLAGS) -o $(BINARY) ${OBJS} -lpthreadutil
|
||||
|
||||
################################################################################
|
||||
### Do not remove the following line. It is for depend #########################
|
||||
### Dependencies:
|
@ -1,231 +0,0 @@
|
||||
/* ==== finger.c ============================================================
|
||||
* Copyright (c) 1993 by Chris Provenzano, proven@athena.mit.edu
|
||||
*
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* Tony Nardo of the Johns Hopkins University/Applied Physics Lab.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano,
|
||||
* the University of California, Berkeley and its contributors.
|
||||
* 4. Neither the name of Chris Provenzano, the University nor the names of
|
||||
* its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO, THE REGENTS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* 1.00 93/08/26 proven
|
||||
* -Pthread redesign of this file.
|
||||
*
|
||||
* 1.10 95/02/11 proven
|
||||
* -Now that gethostbyname works ....
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
char copyright[] =
|
||||
"@(#) Copyright (c) 1989 The Regents of the University of California.\n\
|
||||
@(#) Copyright (c) 1993, 1995 Chris Provenzano.\n\
|
||||
@(#) Copyright (c) 1995 Greg Stark.\n\
|
||||
All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <pthreadutil.h>
|
||||
#include <sys/param.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
void *netfinger();
|
||||
|
||||
void usage(int eval)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"usage: finger [-lps] [-c <net_count>] [-t|T <timeout>] [-f <filename>] [login ...]\n");
|
||||
exit(eval);
|
||||
}
|
||||
|
||||
/*
|
||||
* These globals are set initialy and then are only read.
|
||||
* They do not need mutexes.
|
||||
*/
|
||||
int thread_time = 0, program_timeout = 0, lflag = 0;
|
||||
pthread_tad_t parse_file_tad;
|
||||
pthread_tad_t netfinger_tad;
|
||||
|
||||
void * timeout_thread(void * arg)
|
||||
{
|
||||
sleep(program_timeout);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void * signal_thread(void * arg)
|
||||
{
|
||||
int sig;
|
||||
sigset_t program_signals;
|
||||
sigemptyset(&program_signals);
|
||||
sigaddset(&program_signals, SIGINT);
|
||||
sigwait(&program_signals, &sig);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
#ifndef MAXHOSTNAMELEN
|
||||
#define MAXHOSTNAMELEN 64
|
||||
#endif
|
||||
|
||||
void * parse_file(void * arg)
|
||||
{
|
||||
char hostname[MAXHOSTNAMELEN];
|
||||
char * filename = arg;
|
||||
pthread_atexit_t atexit_id;
|
||||
pthread_attr_t attr;
|
||||
pthread_t thread_id;
|
||||
char * thread_arg;
|
||||
FILE * fp;
|
||||
int len;
|
||||
|
||||
netsetupwait();
|
||||
|
||||
/* Parse the file and create a thread per connection */
|
||||
if ((fp = fopen(filename, "r")) == NULL) {
|
||||
fprintf(stderr, "Can't open file %s\n", filename);
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
pthread_atexit_add(&atexit_id, fclose_nrv, fp);
|
||||
|
||||
if (pthread_attr_init(&attr)) {
|
||||
fprintf(stderr, "Error: Can't initialize thread attributes\n");
|
||||
exit(2);
|
||||
}
|
||||
pthread_atexit_add(&atexit_id, pthread_attr_destroy_nrv, &attr);
|
||||
|
||||
while (fgets(hostname, MAXHOSTNAMELEN, fp)) {
|
||||
if ((thread_arg = (char *)malloc(len = strlen(hostname))) == NULL) {
|
||||
fprintf(stderr, "Error: out of memory\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
hostname[len - 1] = '\0';
|
||||
strcpy(thread_arg, hostname);
|
||||
pthread_attr_setcleanup(&attr, free, thread_arg);
|
||||
if (pthread_tad_create(&netfinger_tad, &thread_id, NULL,
|
||||
netfinger, thread_arg)) {
|
||||
fprintf(stderr, "Error: pthread_tad_create() netfinger_tad.\n");
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
pthread_atexit_t atexit_id;
|
||||
pthread_t thread_id;
|
||||
int max_count = 0;
|
||||
char ch;
|
||||
|
||||
/* getopt variables */
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
|
||||
/* Setup tad for parse_file() threads */
|
||||
if (pthread_tad_init(&parse_file_tad, max_count)) {
|
||||
fprintf(stderr,"Error: couldn't create parse_file() TAD.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
while ((ch = getopt(argc, argv, "c:f:t:T:ls")) != (char)EOF)
|
||||
switch(ch) {
|
||||
case 't': /* Time to let each thread run */
|
||||
if ((thread_time = atoi(optarg)) <= 0) {
|
||||
usage(1);
|
||||
}
|
||||
break;
|
||||
case 'T': /* Time to let entire program run */
|
||||
if ((program_timeout = atoi(optarg)) <= 0) {
|
||||
usage(1);
|
||||
}
|
||||
break;
|
||||
case 'f': /* Parse file for list of places to finger */
|
||||
if (pthread_tad_create(&parse_file_tad, &thread_id, NULL,
|
||||
parse_file, optarg)) {
|
||||
fprintf(stderr,"Error: pthread_tad_create() parse_file_tad.\n");
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
case 'c':
|
||||
max_count = atoi(optarg);
|
||||
break;
|
||||
case 'l': /* long format */
|
||||
lflag = 1;
|
||||
break;
|
||||
case 's': /* short format */
|
||||
lflag = 0;
|
||||
break;
|
||||
case '?':
|
||||
usage(0);
|
||||
default:
|
||||
usage(1);
|
||||
}
|
||||
|
||||
/* The rest of the argumants are hosts */
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
/* Setup timeout thread, if there is one */
|
||||
if (program_timeout) {
|
||||
if (pthread_create(&thread_id, NULL, timeout_thread, NULL)) {
|
||||
fprintf(stderr,"Error: couldn't create program_timeout() thread\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Setup cleanup thread for signals */
|
||||
if (pthread_create(&thread_id, NULL, signal_thread, NULL)) {
|
||||
fprintf(stderr,"Error: couldn't create signal_timeout() thread\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Setup tad for netfinger() threads */
|
||||
if (pthread_tad_init(&netfinger_tad, max_count)) {
|
||||
fprintf(stderr,"Error: couldn't create netfinger() TAD.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Setup the net and let everyone run */
|
||||
netsetup();
|
||||
|
||||
while (*argv) {
|
||||
if (pthread_tad_create(&netfinger_tad, &thread_id, NULL,
|
||||
netfinger, *argv)) {
|
||||
fprintf(stderr, "Error: pthread_tad_create() netfinger_tad.\n");
|
||||
exit(2);
|
||||
}
|
||||
argv++;
|
||||
}
|
||||
pthread_tad_wait(&parse_file_tad, 0);
|
||||
pthread_tad_wait(&netfinger_tad, 0);
|
||||
exit(0);
|
||||
}
|
||||
|
@ -1,189 +0,0 @@
|
||||
/* ==== net.c ============================================================
|
||||
* Copyright (c) 1993, 1995 by Chris Provenzano, proven@athena.mit.edu
|
||||
*
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* Tony Nardo of the Johns Hopkins University/Applied Physics Lab.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* 1.00 93/08/26 proven
|
||||
* -Pthread redesign of this file.
|
||||
*/
|
||||
|
||||
#include <pthreadutil.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/param.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <netdb.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifndef MAXHOSTNAMELEN
|
||||
#define MAXHOSTNAMELEN 64
|
||||
#endif
|
||||
/*
|
||||
* These globals are set initialy and then are only read.
|
||||
* They do not need mutexes.
|
||||
*/
|
||||
extern int lflag;
|
||||
char myhostname[MAXHOSTNAMELEN];
|
||||
|
||||
/*
|
||||
* These globals change and therefor do need mutexes
|
||||
*/
|
||||
pthread_mutex_t spmutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
pthread_cond_t spcond = PTHREAD_COND_INITIALIZER;
|
||||
struct servent *sp = NULL;
|
||||
|
||||
void netsetup(void)
|
||||
{
|
||||
pthread_mutex_lock(&spmutex);
|
||||
if (sp) {
|
||||
fprintf(stderr, "finger: service pointer already initialized.\n");
|
||||
exit(2);
|
||||
}
|
||||
if ((sp = (struct servent *)malloc(sizeof(struct servent) + 4096)) == NULL){
|
||||
fprintf(stderr, "finger: Couldn't allocate service pointer.\n");
|
||||
exit(2);
|
||||
}
|
||||
if (getservbyname_r("finger", "tcp", sp, (char *)sp + sizeof(struct servent), 4096) == NULL) {
|
||||
fprintf(stderr, "finger: tcp/finger: unknown service\n");
|
||||
exit(2);
|
||||
}
|
||||
if (gethostname(myhostname, MAXHOSTNAMELEN)) {
|
||||
fprintf(stderr, "finger: couldn't get my hostname.\n");
|
||||
exit(2);
|
||||
}
|
||||
pthread_cond_broadcast(&spcond);
|
||||
pthread_mutex_unlock(&spmutex);
|
||||
}
|
||||
|
||||
void netsetupwait(void)
|
||||
{
|
||||
pthread_mutex_lock(&spmutex);
|
||||
while(sp == NULL) {
|
||||
pthread_cond_wait(&spcond, &spmutex);
|
||||
}
|
||||
pthread_mutex_unlock(&spmutex);
|
||||
}
|
||||
|
||||
void *netfinger(char *name)
|
||||
{
|
||||
pthread_atexit_t atexit_id;
|
||||
register int c, lastc;
|
||||
struct in_addr defaddr;
|
||||
struct hostent *hp;
|
||||
struct sockaddr_in sin;
|
||||
int s, i, readbuflen;
|
||||
char readbuf[1024];
|
||||
char *host;
|
||||
|
||||
netsetupwait();
|
||||
pthread_atexit_add(&atexit_id, fflush_nrv, NULL);
|
||||
|
||||
if (!(host = strrchr(name, '@'))) {
|
||||
host = myhostname;
|
||||
} else {
|
||||
*host++ = '\0';
|
||||
}
|
||||
if (!(hp = gethostbyname(host))) {
|
||||
if ((defaddr.s_addr = inet_addr(host)) < 0) {
|
||||
fprintf(stderr, "[%s] gethostbyname: Unknown host\n", host);
|
||||
return;
|
||||
}
|
||||
}
|
||||
sin.sin_family = hp->h_addrtype;
|
||||
memcpy((char *)&sin.sin_addr, hp->h_addr, hp->h_length);
|
||||
sin.sin_port = sp->s_port;
|
||||
|
||||
if ((s = socket(sin.sin_family, SOCK_STREAM, 0)) < 0) {
|
||||
sprintf(readbuf, "[%s]: socket", hp->h_name);
|
||||
perror(readbuf);
|
||||
return;
|
||||
}
|
||||
|
||||
/* have network connection; identify the host connected with */
|
||||
if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
|
||||
sprintf(readbuf, "[%s]: connect", hp->h_name);
|
||||
perror(readbuf);
|
||||
close(s);
|
||||
return;
|
||||
}
|
||||
|
||||
/* -l flag for remote fingerd */
|
||||
if (lflag)
|
||||
write(s, "/W ", 3);
|
||||
/* send the name followed by <CR><LF> */
|
||||
write(s, name, strlen(name));
|
||||
write(s, "\r\n", 2);
|
||||
|
||||
/*
|
||||
* Read from the remote system; once we're connected, we assume some
|
||||
* data. If none arrives, we hang until the user interrupts, or
|
||||
* until the thread timeout expires.
|
||||
*
|
||||
* If we see a <CR> or a <CR> with the high bit set, treat it as
|
||||
* a newline; if followed by a newline character, only output one
|
||||
* newline.
|
||||
*
|
||||
* Otherwise, all high bits are stripped; if it isn't printable and
|
||||
* it isn't a space, we can simply set the 7th bit. Every ASCII
|
||||
* character with bit 7 set is printable.
|
||||
*/
|
||||
for (readbuflen = read(s, readbuf, 1024), flockfile(stdout), lastc = '\n',
|
||||
printf("[%s]\n", hp->h_name); readbuflen > 0;
|
||||
readbuflen = read(s, readbuf, 1024)) {
|
||||
for (i = 0; i < readbuflen; i++) {
|
||||
c = readbuf[i] & 0x7f;
|
||||
if (c == 0x0d) {
|
||||
c = '\n';
|
||||
lastc = '\r';
|
||||
} else {
|
||||
if (!isprint(c) && !isspace(c))
|
||||
c |= 0x40;
|
||||
if (lastc != '\r' || c != '\n')
|
||||
lastc = c;
|
||||
else {
|
||||
lastc = '\n';
|
||||
continue;
|
||||
}
|
||||
}
|
||||
putchar_unlocked(c);
|
||||
}
|
||||
}
|
||||
if (lastc != '\n')
|
||||
putchar_unlocked('\n');
|
||||
funlockfile(stdout);
|
||||
}
|
@ -1,339 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
@ -1,4 +0,0 @@
|
||||
The files config.guess and config.sub in this directory come from the GNU
|
||||
autoconf distribution, and are covered by the GNU Public License, which may
|
||||
be found in the file COPYING.GNU. They are the only files covered by the
|
||||
GPL.
|
@ -1,129 +0,0 @@
|
||||
# === GNUmakefile =============================================================
|
||||
# Copyright (c) 1991, 1992, 1993 Chris Provenzano, proven@athena.mit.edu
|
||||
#
|
||||
# Description: This file is for creating libpthread.a
|
||||
#
|
||||
# 1.00 93/11/17 proven
|
||||
# -Put all the .o files into one file libpthread.a
|
||||
# -Initial cut for pthreads.
|
||||
#
|
||||
|
||||
INSTALL_PATH = $(exec_prefix)
|
||||
|
||||
BINDIR = $(INSTALL_PATH)/bin
|
||||
LIBDIR = $(INSTALL_PATH)/lib
|
||||
MANDIR = $(INSTALL_PATH)/man
|
||||
INCDIR = $(INSTALL_PATH)/include
|
||||
SUBINCDIR = $(INCDIR)/pthread
|
||||
|
||||
AR = ar
|
||||
AS = gas
|
||||
CFLAGS = -I. -Iinclude -I$(srcdir)/include -DPTHREAD_KERNEL \
|
||||
@CFLAGS@
|
||||
CXXFLAGS = -I. -Iinclude -I$(srcdir)/include -DPTHREAD_KERNEL \
|
||||
@CXXFLAGS@
|
||||
LD = gld
|
||||
|
||||
CSRC =
|
||||
|
||||
PTHREAD_DIR = pthreads stdlib stdio gen
|
||||
DIRS = $(PTHREAD_DIR)
|
||||
|
||||
HEADERS =
|
||||
|
||||
LIBRARIES = libpthread.a
|
||||
|
||||
.CURDIR = .
|
||||
|
||||
# force correct default target
|
||||
all:
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Read in any special flags that config knows about
|
||||
include config.flags
|
||||
|
||||
# What the heck. Convert srcdir to absolute form so it looks prettier.
|
||||
srcdir := $(shell cd $(srcfoo) && pwd)
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Here starts the nitty grity part of the Makefile.
|
||||
|
||||
all-lib : libpthread.a
|
||||
|
||||
include ${srcdir}/pthreads/GNUmakefile.inc
|
||||
include ${srcdir}/stdlib/GNUmakefile.inc
|
||||
include ${srcdir}/stdio/GNUmakefile.inc
|
||||
include ${srcdir}/string/GNUmakefile.inc
|
||||
include ${srcdir}/gen/GNUmakefile.inc
|
||||
include ${srcdir}/net/GNUmakefile.inc
|
||||
include ${srcdir}/scripts/GNUmakefile.inc
|
||||
|
||||
REGULAR_OBJS= $(subst .cc,.o,$(SRCS))
|
||||
REGULAR_OBJS:= $(subst .c,.o,$(REGULAR_OBJS))
|
||||
REGULAR_OBJS:= $(subst .S,.o,$(REGULAR_OBJS))
|
||||
OBJS= $(REGULAR_OBJS) $(EXTRA_OBJS)
|
||||
REALOBJS = $(addprefix obj/, $(OBJS))
|
||||
|
||||
$(REALOBJS) : $(config) $(types) $(paths)
|
||||
|
||||
# Since we do not have a list of the relevant files we do a make clean
|
||||
# before copying everyting to the distribution directory.
|
||||
distdir:
|
||||
$(MAKE) clean
|
||||
cp -a . $(distdir)
|
||||
# Remove symlinks that the distribution should not have.
|
||||
rm -f $(distdir)/config.cache \
|
||||
$(distdir)/include/pthread/machdep.h \
|
||||
$(distdir)/include/pthread/posix.h \
|
||||
$(distdir)/include/sys \
|
||||
$(distdir)/machdep.c \
|
||||
$(distdir)/syscall.S \
|
||||
$(distdir)/syscall-template.S
|
||||
|
||||
clean:
|
||||
rm -f a.out core maketmp makeout $(LIBRARIES) $(BINARIES) libpthread.*
|
||||
rm -rf obj
|
||||
cd tests && $(MAKE) clean && cd ..
|
||||
|
||||
install-lib: $(LIBRARIES) install-dirs
|
||||
for x in $(LIBRARIES); \
|
||||
do install $$x $(DESTDIR)$(LIBDIR); \
|
||||
done
|
||||
|
||||
# Removed make install since mysql uses this in place.
|
||||
# install-lib install-include install-bin
|
||||
install:
|
||||
|
||||
libpthread.a: obj/libpthread.a
|
||||
rm -f libpthread.a
|
||||
ln -s obj/libpthread.a .
|
||||
|
||||
obj/libpthread.a: ${REALOBJS}
|
||||
rm -f libpthread.a obj/new.a obj/libpthread.a
|
||||
cd obj && \
|
||||
ar r new.a ${OBJS} && \
|
||||
$(RANLIB) new.a && \
|
||||
mv -f new.a libpthread.a && \
|
||||
cd ..
|
||||
|
||||
# For examining a combined symbol table, sizes, &c.
|
||||
libpthread.o: ${REALOBJS}
|
||||
cd obj && ld -r -o ../libpthread.o ${OBJS} && cd ..
|
||||
|
||||
obj/x:
|
||||
if [ -d obj ]; then true; else mkdir obj; fi
|
||||
cp /dev/null obj/x
|
||||
|
||||
GNUmakefile: config.status ${srcdir}/config/GNUmakefile.in
|
||||
$(SHELL) config.status
|
||||
|
||||
obj/%.o: %.c obj/x
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
obj/%.o: %.cc obj/x
|
||||
$(CXX) $(CXXFLAGS) $(CFLAGS) -c $< -o $@
|
||||
|
||||
obj/%.o: %.S obj/x
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
@ -1,56 +0,0 @@
|
||||
# @(#)Makefile 5.2 (Berkeley) 3/5/91
|
||||
#
|
||||
|
||||
LIB=pthread
|
||||
NOPIC=1
|
||||
NOPROFILE=1
|
||||
NOLINT=1
|
||||
MKPIC=no
|
||||
MKPROFILE=no
|
||||
MKLINT=no
|
||||
CPPFLAGS+= -I${.CURDIR} -I${.CURDIR}/include -I${srcdir}/include -DPTHREAD_KERNEL
|
||||
CDEBUGFLAGS= @CFLAGS@
|
||||
CFLAGS+= ${CDEBUGFLAGS}
|
||||
# CFLAGS+= ${CPPFLAGS} <- done by bsd.lib.mk
|
||||
CFLAGS+= ${CPPFLAGS}
|
||||
LIBDIR= $(exec_prefix)/lib
|
||||
BINDIR= $(exec_prefix)/bin
|
||||
INCDIR= $(exec_prefix)/include
|
||||
MANDIR= $(exec_prefix)/man
|
||||
|
||||
.OBJDIR != if test -d ${.CURDIR}/obj ; then true ; else mkdir ${.CURDIR}/obj || exit 1 ; fi ; echo ${.CURDIR}/obj
|
||||
|
||||
# Standard bsd install rules look for the "install" program, rather than
|
||||
# using some variable. So, hack things so that that install rule works.
|
||||
BINGRP != echo " " `groups` " " | sed 's/ [0-9][0-9]* / /g' | awk '{print $$1}'
|
||||
BINOWN != echo $${USER}
|
||||
LIBMODE = 644 # so ranlib can run!
|
||||
|
||||
.include "config.flags"
|
||||
|
||||
# %!$@ pmake seems to automagically cd into the obj directory, so relative
|
||||
# srcdir references are completely botched. Try to figure out an absolute
|
||||
# pathname for srcdir here, and live with it.
|
||||
srcdir = $(srctop)
|
||||
|
||||
beforeinstall: install-dirs
|
||||
|
||||
.include "${srcdir}/pthreads/Makefile.inc"
|
||||
.include "${srcdir}/stdlib/Makefile.inc"
|
||||
.include "${srcdir}/stdio/Makefile.inc"
|
||||
.include "${srcdir}/string/Makefile.inc"
|
||||
.include "${srcdir}/gen/Makefile.inc"
|
||||
.include "${srcdir}/net/Makefile.inc"
|
||||
.include "${srcdir}/scripts/Makefile.inc"
|
||||
|
||||
$(OBJS) : $(config) $(types) $(paths)
|
||||
|
||||
Makefile: ${srcdir}/config/Makefile.in
|
||||
cd ${.CURDIR} && sh config.status
|
||||
|
||||
all-lib : libpthread.a
|
||||
# Removed make install since mysql uses this in place.
|
||||
#install : install-bin install-include
|
||||
install:
|
||||
|
||||
.include <bsd.lib.mk>
|
@ -1,73 +0,0 @@
|
||||
/* Does the OS already support struct timespec */
|
||||
#undef _OS_HAS_TIMESPEC
|
||||
|
||||
/* For networking code: an integral type the size of an IP address (4
|
||||
octets). Determined by examining return values from certain
|
||||
functions. */
|
||||
#undef pthread_ipaddr_type
|
||||
|
||||
/* For networking code: an integral type the size of an IP port number
|
||||
(2 octets). Determined by examining return values from certain
|
||||
functions. */
|
||||
#undef pthread_ipport_type
|
||||
|
||||
/* type of clock_t, from system header files */
|
||||
#undef pthread_clock_t
|
||||
|
||||
/* Specially named so grep processing will find it and put it into the
|
||||
generated ac-types.h. */
|
||||
#undef pthread_have_va_list_h
|
||||
|
||||
/* type of size_t, from system header files */
|
||||
#undef pthread_size_t
|
||||
|
||||
/* type of ssize_t, from system header files */
|
||||
#undef pthread_ssize_t
|
||||
|
||||
/* type of time_t, from system header files */
|
||||
#undef pthread_time_t
|
||||
|
||||
/* type of fpos_t, from system header files */
|
||||
#undef pthread_fpos_t
|
||||
|
||||
/* type of off_t, from system header files */
|
||||
#undef pthread_off_t
|
||||
|
||||
/* type of va_list, from system header files */
|
||||
#undef pthread_va_list
|
||||
|
||||
/* type of sigset_t, from system header files */
|
||||
#undef pthread_sigset_t
|
||||
|
||||
/* I don't know why the native compiler definitions aren't sufficient
|
||||
for this. */
|
||||
#undef sunos4
|
||||
|
||||
/* define if the linker hauls in certain static data from libc even when
|
||||
you don't want it to. yes, this description is bogus, but chris added
|
||||
the need for this, without describing the problem. */
|
||||
#undef LD_LINKS_STATIC_DATA
|
||||
|
||||
/* define if the system reissues the SIGCHLD if the handler reinstalls
|
||||
* itself before calling wait()
|
||||
*/
|
||||
#undef BROKEN_SIGNALS
|
||||
|
||||
/* where are terminal devices to be found? */
|
||||
#undef _PATH_PTY
|
||||
|
||||
/* what directory holds the time zone info on this system? */
|
||||
#undef _PATH_TZDIR
|
||||
|
||||
/* what file indicates the local time zone? */
|
||||
#undef _PATH_TZFILE
|
||||
|
||||
/* Paths for various networking support files. */
|
||||
#undef _PATH_RESCONF
|
||||
#undef _PATH_HOSTS
|
||||
#undef _PATH_NETWORKS
|
||||
#undef _PATH_PROTOCOLS
|
||||
#undef _PATH_SERVICES
|
||||
|
||||
/* Path for Bourne shell. */
|
||||
#undef _PATH_BSHELL
|
94
mit-pthreads/config/aclocal.m4
vendored
94
mit-pthreads/config/aclocal.m4
vendored
@ -1,94 +0,0 @@
|
||||
dnl Autoconf extensions for pthreads package.
|
||||
dnl
|
||||
ifelse(regexp(AC_DEFINE(xxxxx),.*@@@.*),-1,,[define(IS_AUTOHEADER)])])dnl
|
||||
dnl
|
||||
dnl Now, the real stuff needed by the pthreads package.
|
||||
dnl
|
||||
AC_DEFUN([PTHREADS_CHECK_ONE_SYSCALL],
|
||||
[AC_MSG_CHECKING(for syscall $1)
|
||||
AC_CACHE_VAL(pthreads_cv_syscall_$1,
|
||||
AC_TRY_LINK([
|
||||
/* FIXME: This list should be generated from info in configure.in. */
|
||||
#ifdef HAVE_SYSCALL_H
|
||||
#include <syscall.h>
|
||||
#else
|
||||
#ifdef HAVE_SYS_SYSCALL_H
|
||||
#include <sys/syscall.h>
|
||||
#else
|
||||
where is your syscall header file??
|
||||
#endif
|
||||
#endif
|
||||
],[
|
||||
int x;
|
||||
x = SYS_$1 ;
|
||||
],
|
||||
eval pthreads_cv_syscall_$1=yes,
|
||||
eval pthreads_cv_syscall_$1=no))
|
||||
if eval test \$pthreads_cv_syscall_$1 = yes ; then
|
||||
pthreads_syscall_present=yes
|
||||
available_syscalls="$available_syscalls $1"
|
||||
dnl Can't just do the obvious substitution here or autoheader gets
|
||||
dnl sorta confused. (Sigh.) Getting the requoting of the brackets right
|
||||
dnl would be a pain too.
|
||||
macroname=HAVE_SYSCALL_`echo $1 | tr '[[[a-z]]]' '[[[A-Z]]]'`
|
||||
AC_DEFINE_UNQUOTED($macroname)
|
||||
else
|
||||
pthreads_syscall_present=no
|
||||
missing_syscalls="$missing_syscalls $1"
|
||||
fi
|
||||
AC_MSG_RESULT($pthreads_syscall_present)
|
||||
])dnl
|
||||
dnl
|
||||
AC_DEFUN(PTHREADS_CHECK_SYSCALLS,dnl
|
||||
ifdef([IS_AUTOHEADER],[#
|
||||
dnl Need to fake out autoheader, since there's no way to add a new class
|
||||
dnl of features to generate config.h.in entries for.
|
||||
@@@syscalls="$1"@@@
|
||||
@@@funcs="$funcs syscall_`echo $syscalls | sed 's/ / syscall_/g'`"@@@
|
||||
],
|
||||
[pthreads_syscall_list="$1"
|
||||
for pthreads_syscallname in $pthreads_syscall_list ; do
|
||||
PTHREADS_CHECK_ONE_SYSCALL([$]pthreads_syscallname)
|
||||
done
|
||||
]))dnl
|
||||
dnl
|
||||
dnl Requote each argument.
|
||||
define([requote], [ifelse($#, 0, , $#, 1, "$1",
|
||||
"$1" [requote(builtin(shift,$@))])])dnl
|
||||
dnl
|
||||
dnl Determine proper typedef value for a typedef name, and define a
|
||||
dnl C macro to expand to that type. (A shell variable with that value
|
||||
dnl is also created.) If none of the specified types to try match, the
|
||||
dnl macro is left undefined, and the shell variable empty. If the
|
||||
dnl typedef name cannot be found in the specified header files, this
|
||||
dnl test errors out; perhaps it should be changed to simply leave the
|
||||
dnl macro undefined...
|
||||
dnl
|
||||
dnl PTHREADS_FIND_TYPE(typedefname,varname,includes,possible values...)
|
||||
dnl
|
||||
AC_DEFUN(PTHREADS_FIND_TYPE,
|
||||
ifdef([IS_AUTOHEADER],[#
|
||||
@@@syms="$syms $2"@@@
|
||||
],[dnl
|
||||
AC_MSG_CHECKING(type of $1)
|
||||
AC_CACHE_VAL(pthreads_cv_type_$1,
|
||||
[AC_TRY_COMPILE([$3],[ extern $1 foo; ],
|
||||
[ for try_type in [requote(builtin(shift,builtin(shift,builtin(shift,$@))))] ; do
|
||||
AC_TRY_COMPILE([$3],[ extern $1 foo; extern $try_type foo; ],
|
||||
[ pthreads_cv_type_$1="$try_type" ; break ])
|
||||
done],
|
||||
AC_MSG_ERROR(Can't find system typedef for $1.))])
|
||||
if test -n "$pthreads_cv_type_$1" ; then
|
||||
AC_DEFINE_UNQUOTED($2,$pthreads_cv_type_$1)
|
||||
fi
|
||||
$2=$pthreads_cv_type_$1
|
||||
AC_MSG_RESULT($pthreads_cv_type_$1)]))dnl
|
||||
dnl
|
||||
dnl
|
||||
dnl Like above, but the list of types to try is pre-specified.
|
||||
dnl
|
||||
AC_DEFUN(PTHREADS_FIND_INTEGRAL_TYPE,[
|
||||
PTHREADS_FIND_TYPE([$1], [$2], [$3],
|
||||
int, unsigned int, long, unsigned long,
|
||||
short, unsigned short, char, unsigned char,
|
||||
long long, unsigned long long)])dnl
|
@ -1,80 +0,0 @@
|
||||
# Since the real configure script runs from the config subdirectory,
|
||||
# compensate here...
|
||||
srctop= @srctop@
|
||||
srcfoo= $(srctop)
|
||||
|
||||
prefix= @prefix@
|
||||
exec_prefix= @exec_prefix@
|
||||
|
||||
cpu = @target_cpu@
|
||||
os = @target_os@
|
||||
|
||||
MISSING_SYSCALLS = @missing_syscalls@
|
||||
AVAILABLE_SYSCALLS = @available_syscalls@
|
||||
SYSCALL_EXCEPTIONS = @SYSCALL_EXCEPTIONS@
|
||||
HAVE_SYSCALL_TEMPLATE = @HAVE_SYSCALL_TEMPLATE@
|
||||
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
CPP = @CPP@
|
||||
SHELL = /bin/sh
|
||||
RANLIB = @RANLIB@
|
||||
# Should use autoconf to find these. Currently our makefiles are inconsistent.
|
||||
#AR = ar
|
||||
#AS = gas
|
||||
#LD = gld
|
||||
|
||||
install-dirs:
|
||||
for d in $(INSTALL_PATH) $(BINDIR) $(LIBDIR) $(INCDIR) ; do \
|
||||
test -d $(DESTDIR)$$d || mkdir $(DESTDIR)$$d || exit 1 ; \
|
||||
done
|
||||
|
||||
config.status: @srcdir@/configure
|
||||
cd ${.CURDIR} && $(SHELL) config.status --recheck
|
||||
config.flags: config.status @srcdir@/config.flags.in
|
||||
cd ${.CURDIR} && $(SHELL) config.status
|
||||
|
||||
realclean: clean
|
||||
cd tests && $(MAKE) realclean && cd ..
|
||||
rm -f $(LINKS) config.status config.flags config.cache \
|
||||
Makefile GNUmakefile
|
||||
|
||||
types=$(.CURDIR)/include/pthread/ac-types.h
|
||||
$(types) : config.h
|
||||
echo '#ifndef pthread_size_t' > $(types).new
|
||||
egrep '^#define pthread_' $(.CURDIR)/config.h >> $(types).new
|
||||
echo '#endif' >> $(types).new
|
||||
mv -f $(types).new $(types)
|
||||
|
||||
config=$(.CURDIR)/include/pthread/config.h
|
||||
$(config) : config.h
|
||||
echo '#ifndef _SYS___CONFIG_H_' > $(config).new
|
||||
echo '#define _SYS___CONFIG_H_' >> $(config).new
|
||||
-egrep '^#define _OS_HAS' $(.CURDIR)/config.h >> $(config).new
|
||||
echo '#endif' >> $(config).new
|
||||
mv -f $(config).new $(config)
|
||||
|
||||
paths=$(.CURDIR)/include/pthread/paths.h
|
||||
$(paths) : config.h
|
||||
echo '#ifndef _SYS___PATHS_H_' > $(paths).new
|
||||
echo '#define _SYS___PATHS_H_' >> $(paths).new
|
||||
egrep '^#define _PATH' $(.CURDIR)/config.h >> $(paths).new
|
||||
echo '#endif' >> $(paths).new
|
||||
mv -f $(paths).new $(paths)
|
||||
|
||||
all-tests: all-lib
|
||||
cd ${.CURDIR}/tests && $(MAKE) all
|
||||
check: all-lib
|
||||
cd ${.CURDIR}/tests && $(MAKE) check
|
||||
all : all-lib all-bin
|
||||
|
||||
install-bin: all-bin install-dirs
|
||||
for x in $(SCRIPTS) ; do \
|
||||
install $$x $(DESTDIR)$(BINDIR); \
|
||||
done
|
||||
|
||||
install-include: install-dirs
|
||||
(cd ${srcdir}/include && tar chf - .)|(cd $(DESTDIR)$(INCDIR) && tar xf -)
|
||||
if [ -d config ]; then true; else \
|
||||
(cd ${.CURDIR}/include && tar chf - .)|(cd $(DESTDIR)$(INCDIR) && tar xf -); fi
|
||||
(cd $(DESTDIR)$(INCDIR) && find . \( -name CVS -o -name \*~ \) -print | xargs rm -rf)
|
505
mit-pthreads/config/config.guess
vendored
505
mit-pthreads/config/config.guess
vendored
@ -1,505 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Written by Per Bothner <bothner@cygnus.com>.
|
||||
# The master version of this file is at the FSF in /home/gd/gnu/lib.
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
# exits with 0. Otherwise, it exits with 1.
|
||||
#
|
||||
# The plan is that this can be called by configure scripts if you
|
||||
# don't specify an explicit system type (host/target name).
|
||||
#
|
||||
# Only a few systems have been added to this list; please add others
|
||||
# (but try to keep the structure clean).
|
||||
#
|
||||
|
||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||
# (ghazi@noc.rutgers.edu 8/24/94.)
|
||||
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
|
||||
PATH=$PATH:/.attbin ; export PATH
|
||||
fi
|
||||
|
||||
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
|
||||
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
||||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||
|
||||
trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
|
||||
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
alpha:OSF1:V*:*)
|
||||
# After 1.2, OSF1 uses "V1.3" for uname -r.
|
||||
echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'`
|
||||
exit 0 ;;
|
||||
alpha:OSF1:*:*)
|
||||
# 1.2 uses "1.2" for uname -r.
|
||||
echo alpha-dec-osf${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit 0;;
|
||||
Pyramid*:OSx*:*:*)
|
||||
if test "`(/bin/universe) 2>/dev/null`" = att ; then
|
||||
echo pyramid-pyramid-sysv3
|
||||
else
|
||||
echo pyramid-pyramid-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:5.*:*)
|
||||
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:6*:*)
|
||||
# According to config.sub, this is the proper way to canonicalize
|
||||
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
|
||||
# it's likely to be more like Solaris than SunOS4.
|
||||
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:*:*)
|
||||
# Japanese Language versions have a version number like `4.1.3-JL'.
|
||||
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
|
||||
exit 0 ;;
|
||||
sun3*:SunOS:*:*)
|
||||
echo m68k-sun-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
RISC*:ULTRIX:*:*)
|
||||
echo mips-dec-ultrix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
VAX*:ULTRIX*:*:*)
|
||||
echo vax-dec-ultrix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mips:*:5*:RISCos)
|
||||
echo mips-mips-riscos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
m88k:CX/UX:7*:*)
|
||||
echo m88k-harris-cxux7
|
||||
exit 0 ;;
|
||||
m88k:*:4*:R4*)
|
||||
echo m88k-motorola-sysv4
|
||||
exit 0 ;;
|
||||
m88k:*:3*:R3*)
|
||||
echo m88k-motorola-sysv3
|
||||
exit 0 ;;
|
||||
AViiON:dgux:*:*)
|
||||
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
|
||||
-o ${TARGET_BINARY_INTERFACE}x = x ] ; then
|
||||
echo m88k-dg-dgux${UNAME_RELEASE}
|
||||
else
|
||||
echo m88k-dg-dguxbcs${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
|
||||
echo m88k-dolphin-sysv3
|
||||
exit 0 ;;
|
||||
M88*:*:R3*:*)
|
||||
# Delta 88k system running SVR3
|
||||
echo m88k-motorola-sysv3
|
||||
exit 0 ;;
|
||||
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
|
||||
echo m88k-tektronix-sysv3
|
||||
exit 0 ;;
|
||||
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
|
||||
echo m68k-tektronix-bsd
|
||||
exit 0 ;;
|
||||
*:IRIX:*:*)
|
||||
echo mips-sgi-irix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i[34]86:AIX:*:*)
|
||||
echo i386-ibm-aix
|
||||
exit 0 ;;
|
||||
*:AIX:2:3)
|
||||
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
#include <sys/systemcfg.h>
|
||||
|
||||
main()
|
||||
{
|
||||
if (!__power_pc())
|
||||
exit(1);
|
||||
puts("powerpc-ibm-aix3.2.5");
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
echo rs6000-ibm-aix3.2.5
|
||||
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
echo rs6000-ibm-aix3.2.4
|
||||
else
|
||||
echo rs6000-ibm-aix3.2
|
||||
fi
|
||||
exit 0 ;;
|
||||
*:AIX:*:4)
|
||||
if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
else
|
||||
IBM_ARCH=powerpc
|
||||
fi
|
||||
if grep bos410 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
IBM_REV=4.1
|
||||
elif grep bos411 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
IBM_REV=4.1.1
|
||||
else
|
||||
IBM_REV=4.${UNAME_RELEASE}
|
||||
fi
|
||||
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
|
||||
exit 0 ;;
|
||||
*:AIX:*:*)
|
||||
echo rs6000-ibm-aix
|
||||
exit 0 ;;
|
||||
*:BOSX:*:*)
|
||||
echo rs6000-bull-bosx
|
||||
exit 0 ;;
|
||||
DPX/2?00:B.O.S.:*:*)
|
||||
echo m68k-bull-sysv3
|
||||
exit 0 ;;
|
||||
9000/[34]??:4.3bsd:1.*:*)
|
||||
echo m68k-hp-bsd
|
||||
exit 0 ;;
|
||||
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
|
||||
echo m68k-hp-bsd4.4
|
||||
exit 0 ;;
|
||||
9000/[3478]??:HP-UX:*:*)
|
||||
case "${UNAME_MACHINE}" in
|
||||
9000/31? ) HP_ARCH=m68000 ;;
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
9000/7?? | 9000/8?7 ) HP_ARCH=hppa1.1 ;;
|
||||
9000/8?? ) HP_ARCH=hppa1.0 ;;
|
||||
esac
|
||||
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
3050*:HI-UX:*:*)
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
#include <unistd.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
long cpu = sysconf (_SC_CPU_VERSION);
|
||||
/* The order matters, because CPU_IS_HP_MC68K erroneously returns
|
||||
true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
|
||||
results, however. */
|
||||
if (CPU_IS_PA_RISC (cpu))
|
||||
{
|
||||
switch (cpu)
|
||||
{
|
||||
case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
|
||||
case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
|
||||
case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
|
||||
default: puts ("hppa-hitachi-hiuxwe2"); break;
|
||||
}
|
||||
}
|
||||
else if (CPU_IS_HP_MC68K (cpu))
|
||||
puts ("m68k-hitachi-hiuxwe2");
|
||||
else puts ("unknown-hitachi-hiuxwe2");
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
echo unknown-hitachi-hiuxwe2
|
||||
exit 0 ;;
|
||||
9000/7??:4.3bsd:*:* | 9000/8?7:4.3bsd:*:* )
|
||||
echo hppa1.1-hp-bsd
|
||||
exit 0 ;;
|
||||
9000/8??:4.3bsd:*:*)
|
||||
echo hppa1.0-hp-bsd
|
||||
exit 0 ;;
|
||||
hp7??:OSF1:*:* | hp8?7:OSF1:*:* )
|
||||
echo hppa1.1-hp-osf
|
||||
exit 0 ;;
|
||||
hp8??:OSF1:*:*)
|
||||
echo hppa1.0-hp-osf
|
||||
exit 0 ;;
|
||||
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
||||
echo c1-convex-bsd
|
||||
exit 0 ;;
|
||||
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
|
||||
if getsysinfo -f scalar_acc
|
||||
then echo c32-convex-bsd
|
||||
else echo c2-convex-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
|
||||
echo c34-convex-bsd
|
||||
exit 0 ;;
|
||||
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
|
||||
echo c38-convex-bsd
|
||||
exit 0 ;;
|
||||
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
|
||||
echo c4-convex-bsd
|
||||
exit 0 ;;
|
||||
CRAY*X-MP:UNICOS:*:*)
|
||||
echo xmp-cray-unicos
|
||||
exit 0 ;;
|
||||
CRAY*Y-MP:UNICOS:*:*)
|
||||
echo ymp-cray-unicos
|
||||
exit 0 ;;
|
||||
CRAY-2:UNICOS:*:*)
|
||||
echo cray2-cray-unicos
|
||||
exit 0 ;;
|
||||
amiga:NetBSD:*:*)
|
||||
echo m68k-amiga-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari:NetBSD:*:*)
|
||||
echo m68k-atari-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hp3[0-9][05]:NetBSD:*:*)
|
||||
echo m68k-hp-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:NetBSD:*:*)
|
||||
echo m68k-apple-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme68:NetBSD:*:*)
|
||||
echo m68k-motorola-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
next68k:NetBSD:*:*)
|
||||
echo m68k-next-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
news68k:NetBSD:*:*)
|
||||
echo m68k-sony-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3:NetBSD:*:*)
|
||||
echo m68k-sun-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
x68k:NetBSD:*:*)
|
||||
echo m68k-sharp-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i[34]86:BSD/386:*:* | *:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:FreeBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit 0 ;;
|
||||
*:NetBSD:*:*)
|
||||
UNAME_PROCESSOR=`uname -p 2>/dev/null` || UNAME_PROCESSOR=$UNAME_MACHINE
|
||||
echo ${UNAME_PROCESSOR}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
*:OpenBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit 0 ;;
|
||||
*:GNU:*:*)
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
exit 0 ;;
|
||||
*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux
|
||||
exit 0 ;;
|
||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
|
||||
# are messed up and put the nodename in both sysname and nodename.
|
||||
i[34]86:DYNIX/ptx:4*:*)
|
||||
echo i386-sequent-sysv4
|
||||
exit 0 ;;
|
||||
i[34]86:*:4.*:* | i[34]86:SYSTEM_V:4.*:*)
|
||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
i[34]86:*:3.2:*)
|
||||
if /bin/uname -X 2>/dev/null >/dev/null ; then
|
||||
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
|
||||
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
|
||||
echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL
|
||||
elif test -f /usr/options/cb.name; then
|
||||
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
|
||||
echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-sysv32
|
||||
fi
|
||||
exit 0 ;;
|
||||
i?86:*:5:7)
|
||||
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
|
||||
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
|
||||
&& UNAME_MACHINE=i586
|
||||
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Intel:Mach:3*:*)
|
||||
echo i386-unknown-mach3
|
||||
exit 0 ;;
|
||||
i860:*:4.*:*) # i860-SVR4
|
||||
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
|
||||
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
|
||||
else # Add other i860-SVR4 vendors below as they are discovered.
|
||||
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
|
||||
fi
|
||||
exit 0 ;;
|
||||
mini*:CTIX:SYS*5:*)
|
||||
# "miniframe"
|
||||
echo m68010-convergent-sysv
|
||||
exit 0 ;;
|
||||
M680[234]0:*:R3V[567]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0)
|
||||
uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& echo i486-ncr-sysv4.3 && exit 0 ;;
|
||||
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
|
||||
uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& echo i486-ncr-sysv4 && exit 0 ;;
|
||||
m680[234]0:LynxOS:2.2*:*)
|
||||
echo m68k-lynx-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mc68030:UNIX_System_V:4.*:*)
|
||||
echo m68k-atari-sysv4
|
||||
exit 0 ;;
|
||||
i[34]86:LynxOS:2.2*:*)
|
||||
echo i386-lynx-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
TSUNAMI:LynxOS:2.2*:*)
|
||||
echo sparc-lynx-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
rs6000:LynxOS:2.2*:*)
|
||||
echo rs6000-lynx-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
RM*:SINIX-*:*:*)
|
||||
echo mips-sni-sysv4
|
||||
exit 0 ;;
|
||||
*:SINIX-*:*:*)
|
||||
if uname -p 2>/dev/null >/dev/null ; then
|
||||
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
||||
echo ${UNAME_MACHINE}-sni-sysv4
|
||||
else
|
||||
echo ns32k-sni-sysv
|
||||
fi
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
|
||||
|
||||
cat >dummy.c <<EOF
|
||||
main ()
|
||||
{
|
||||
#if defined (sony)
|
||||
#if defined (MIPSEB)
|
||||
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
|
||||
I don't know.... */
|
||||
printf ("mips-sony-bsd\n"); exit (0);
|
||||
#else
|
||||
printf ("m68k-sony-newsos\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__arm) && defined (__acorn) && defined (__unix)
|
||||
printf ("arm-acorn-riscix"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (hp300) && !defined (hpux)
|
||||
printf ("m68k-hp-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (NeXT)
|
||||
#if !defined (__ARCHITECTURE__)
|
||||
#define __ARCHITECTURE__ "m68k"
|
||||
#endif
|
||||
int version;
|
||||
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
|
||||
printf ("%s-next-nextstep%s\n", __ARCHITECTURE__, version==2 ? "2" : "3");
|
||||
exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (MULTIMAX) || defined (n16)
|
||||
#if defined (UMAXV)
|
||||
printf ("ns32k-encore-sysv\n"); exit (0);
|
||||
#else
|
||||
#if defined (CMU)
|
||||
printf ("ns32k-encore-mach\n"); exit (0);
|
||||
#else
|
||||
printf ("ns32k-encore-bsd\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__386BSD__)
|
||||
printf ("i386-unknown-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (sequent)
|
||||
#if defined (i386)
|
||||
printf ("i386-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#if defined (ns32000)
|
||||
printf ("ns32k-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (_SEQUENT_)
|
||||
printf ("i386-sequent-ptx\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (vax)
|
||||
#if !defined (ultrix)
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
#else
|
||||
printf ("vax-dec-ultrix\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (alliant) && defined (i860)
|
||||
printf ("i860-alliant-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
exit (1);
|
||||
}
|
||||
EOF
|
||||
|
||||
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
|
||||
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
|
||||
|
||||
# Convex versions that predate uname can use getsysinfo(1)
|
||||
|
||||
if [ -x /usr/convex/getsysinfo ]
|
||||
then
|
||||
case `getsysinfo -f cpu_type` in
|
||||
c1*)
|
||||
echo c1-convex-bsd
|
||||
exit 0 ;;
|
||||
c2*)
|
||||
if getsysinfo -f scalar_acc
|
||||
then echo c32-convex-bsd
|
||||
else echo c2-convex-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
c34*)
|
||||
echo c34-convex-bsd
|
||||
exit 0 ;;
|
||||
c38*)
|
||||
echo c38-convex-bsd
|
||||
exit 0 ;;
|
||||
c4*)
|
||||
echo c4-convex-bsd
|
||||
exit 0 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
#echo '(Unable to guess system type)' 1>&2
|
||||
|
||||
exit 1
|
@ -1,324 +0,0 @@
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||
#undef off_t
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
#undef size_t
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Does the OS already support struct timespec */
|
||||
#undef _OS_HAS_TIMESPEC
|
||||
|
||||
/* Does the OS need socklen_t for the socket syscalls? */
|
||||
#undef _OS_HAS_SOCKLEN_T
|
||||
|
||||
/* For networking code: an integral type the size of an IP address (4
|
||||
octets). Determined by examining return values from certain
|
||||
functions. */
|
||||
#undef pthread_ipaddr_type
|
||||
|
||||
/* For networking code: an integral type the size of an IP port number
|
||||
(2 octets). Determined by examining return values from certain
|
||||
functions. */
|
||||
#undef pthread_ipport_type
|
||||
|
||||
/* type of clock_t, from system header files */
|
||||
#undef pthread_clock_t
|
||||
|
||||
/* Specially named so grep processing will find it and put it into the
|
||||
generated ac-types.h. */
|
||||
#undef pthread_have_va_list_h
|
||||
|
||||
/* type of size_t, from system header files */
|
||||
#undef pthread_size_t
|
||||
|
||||
/* type of ssize_t, from system header files */
|
||||
#undef pthread_ssize_t
|
||||
|
||||
/* type of time_t, from system header files */
|
||||
#undef pthread_time_t
|
||||
|
||||
/* type of fpos_t, from system header files */
|
||||
#undef pthread_fpos_t
|
||||
|
||||
/* type of off_t, from system header files */
|
||||
#undef pthread_off_t
|
||||
|
||||
/* type of va_list, from system header files */
|
||||
#undef pthread_va_list
|
||||
|
||||
/* I don't know why the native compiler definitions aren't sufficient
|
||||
for this. */
|
||||
#undef sunos4
|
||||
|
||||
/* define if the linker hauls in certain static data from libc even when
|
||||
you don't want it to. yes, this description is bogus, but chris added
|
||||
the need for this, without describing the problem. */
|
||||
#undef LD_LINKS_STATIC_DATA
|
||||
|
||||
/* define if the system reissues the SIGCHLD if the handler reinstalls
|
||||
* itself before calling wait()
|
||||
*/
|
||||
#undef BROKEN_SIGNALS
|
||||
|
||||
/* where are terminal devices to be found? */
|
||||
#undef _PATH_PTY
|
||||
|
||||
/* what directory holds the time zone info on this system? */
|
||||
#undef _PATH_TZDIR
|
||||
|
||||
/* what file indicates the local time zone? */
|
||||
#undef _PATH_TZFILE
|
||||
|
||||
/* Paths for various networking support files. */
|
||||
#undef _PATH_RESCONF
|
||||
#undef _PATH_HOSTS
|
||||
#undef _PATH_NETWORKS
|
||||
#undef _PATH_PROTOCOLS
|
||||
#undef _PATH_SERVICES
|
||||
|
||||
/* Path for Bourne shell. */
|
||||
#undef _PATH_BSHELL
|
||||
|
||||
/* Define if you have the syscall_accept function. */
|
||||
#undef HAVE_SYSCALL_ACCEPT
|
||||
|
||||
/* Define if you have the syscall_bind function. */
|
||||
#undef HAVE_SYSCALL_BIND
|
||||
|
||||
/* Define if you have the syscall_chdir function. */
|
||||
#undef HAVE_SYSCALL_CHDIR
|
||||
|
||||
/* Define if you have the syscall_chmod function. */
|
||||
#undef HAVE_SYSCALL_CHMOD
|
||||
|
||||
/* Define if you have the syscall_chown function. */
|
||||
#undef HAVE_SYSCALL_CHOWN
|
||||
|
||||
/* Define if you have the syscall_chroot function. */
|
||||
#undef HAVE_SYSCALL_CHROOT
|
||||
|
||||
/* Define if you have the syscall_close function. */
|
||||
#undef HAVE_SYSCALL_CLOSE
|
||||
|
||||
/* Define if you have the syscall_connect function. */
|
||||
#undef HAVE_SYSCALL_CONNECT
|
||||
|
||||
/* Define if you have the syscall_creat function. */
|
||||
#undef HAVE_SYSCALL_CREAT
|
||||
|
||||
/* Define if you have the syscall_dup function. */
|
||||
#undef HAVE_SYSCALL_DUP
|
||||
|
||||
/* Define if you have the syscall_dup2 function. */
|
||||
#undef HAVE_SYSCALL_DUP2
|
||||
|
||||
/* Define if you have the syscall_execve function. */
|
||||
#undef HAVE_SYSCALL_EXECVE
|
||||
|
||||
/* Define if you have the syscall_exit function. */
|
||||
#undef HAVE_SYSCALL_EXIT
|
||||
|
||||
/* Define if you have the syscall_fchmod function. */
|
||||
#undef HAVE_SYSCALL_FCHMOD
|
||||
|
||||
/* Define if you have the syscall_fchown function. */
|
||||
#undef HAVE_SYSCALL_FCHOWN
|
||||
|
||||
/* Define if you have the syscall_fcntl function. */
|
||||
#undef HAVE_SYSCALL_FCNTL
|
||||
|
||||
/* Define if you have the syscall_flock function. */
|
||||
#undef HAVE_SYSCALL_FLOCK
|
||||
|
||||
/* Define if you have the syscall_fork function. */
|
||||
#undef HAVE_SYSCALL_FORK
|
||||
|
||||
/* Define if you have the syscall_fstat function. */
|
||||
#undef HAVE_SYSCALL_FSTAT
|
||||
|
||||
/* Define if you have the syscall_fstatfs function. */
|
||||
#undef HAVE_SYSCALL_FSTATFS
|
||||
|
||||
/* Define if you have the syscall_ftruncate function. */
|
||||
#undef HAVE_SYSCALL_FTRUNCATE
|
||||
|
||||
/* Define if you have the syscall_getdents function. */
|
||||
#undef HAVE_SYSCALL_GETDENTS
|
||||
|
||||
/* Define if you have the syscall_getdirentries function. */
|
||||
#undef HAVE_SYSCALL_GETDIRENTRIES
|
||||
|
||||
/* Define if you have the syscall_getdtablesize function. */
|
||||
#undef HAVE_SYSCALL_GETDTABLESIZE
|
||||
|
||||
/* Define if you have the syscall_getmsg function. */
|
||||
#undef HAVE_SYSCALL_GETMSG
|
||||
|
||||
/* Define if you have the syscall_getpeername function. */
|
||||
#undef HAVE_SYSCALL_GETPEERNAME
|
||||
|
||||
/* Define if you have the syscall_getpgrp function. */
|
||||
#undef HAVE_SYSCALL_GETPGRP
|
||||
|
||||
/* Define if you have the syscall_getsockname function. */
|
||||
#undef HAVE_SYSCALL_GETSOCKNAME
|
||||
|
||||
/* Define if you have the syscall_getsockopt function. */
|
||||
#undef HAVE_SYSCALL_GETSOCKOPT
|
||||
|
||||
/* Define if you have the syscall_ioctl function. */
|
||||
#undef HAVE_SYSCALL_IOCTL
|
||||
|
||||
/* Define if you have the syscall_ksigaction function. */
|
||||
#undef HAVE_SYSCALL_KSIGACTION
|
||||
|
||||
/* Define if you have the syscall_link function. */
|
||||
#undef HAVE_SYSCALL_LINK
|
||||
|
||||
/* Define if you have the syscall_listen function. */
|
||||
#undef HAVE_SYSCALL_LISTEN
|
||||
|
||||
/* Define if you have the syscall_lseek function. */
|
||||
#undef HAVE_SYSCALL_LSEEK
|
||||
|
||||
/* Define if you have the syscall_lstat function. */
|
||||
#undef HAVE_SYSCALL_LSTAT
|
||||
|
||||
/* Define if you have the syscall_open function. */
|
||||
#undef HAVE_SYSCALL_OPEN
|
||||
|
||||
/* Define if you have the syscall_pgrpsys function. */
|
||||
#undef HAVE_SYSCALL_PGRPSYS
|
||||
|
||||
/* Define if you have the syscall_pipe function. */
|
||||
#undef HAVE_SYSCALL_PIPE
|
||||
|
||||
/* Define if you have the syscall_poll function. */
|
||||
#undef HAVE_SYSCALL_POLL
|
||||
|
||||
/* Define if you have the syscall_putmsg function. */
|
||||
#undef HAVE_SYSCALL_PUTMSG
|
||||
|
||||
/* Define if you have the syscall_read function. */
|
||||
#undef HAVE_SYSCALL_READ
|
||||
|
||||
/* Define if you have the syscall_readdir function. */
|
||||
#undef HAVE_SYSCALL_READDIR
|
||||
|
||||
/* Define if you have the syscall_readv function. */
|
||||
#undef HAVE_SYSCALL_READV
|
||||
|
||||
/* Define if you have the syscall_recv function. */
|
||||
#undef HAVE_SYSCALL_RECV
|
||||
|
||||
/* Define if you have the syscall_recvfrom function. */
|
||||
#undef HAVE_SYSCALL_RECVFROM
|
||||
|
||||
/* Define if you have the syscall_recvmsg function. */
|
||||
#undef HAVE_SYSCALL_RECVMSG
|
||||
|
||||
/* Define if you have the syscall_rename function. */
|
||||
#undef HAVE_SYSCALL_RENAME
|
||||
|
||||
/* Define if you have the syscall_select function. */
|
||||
#undef HAVE_SYSCALL_SELECT
|
||||
|
||||
/* Define if you have the syscall_send function. */
|
||||
#undef HAVE_SYSCALL_SEND
|
||||
|
||||
/* Define if you have the syscall_sendmsg function. */
|
||||
#undef HAVE_SYSCALL_SENDMSG
|
||||
|
||||
/* Define if you have the syscall_sendto function. */
|
||||
#undef HAVE_SYSCALL_SENDTO
|
||||
|
||||
/* Define if you have the syscall_setsockopt function. */
|
||||
#undef HAVE_SYSCALL_SETSOCKOPT
|
||||
|
||||
/* Define if you have the syscall_shutdown function. */
|
||||
#undef HAVE_SYSCALL_SHUTDOWN
|
||||
|
||||
/* Define if you have the syscall_sigaction function. */
|
||||
#undef HAVE_SYSCALL_SIGACTION
|
||||
|
||||
/* Define if you have the syscall_sigpause function. */
|
||||
#undef HAVE_SYSCALL_SIGPAUSE
|
||||
|
||||
/* Define if you have the syscall_sigprocmask function. */
|
||||
#undef HAVE_SYSCALL_SIGPROCMASK
|
||||
|
||||
/* Define if you have the syscall_sigsuspend function. */
|
||||
#undef HAVE_SYSCALL_SIGSUSPEND
|
||||
|
||||
/* Define if you have the syscall_socket function. */
|
||||
#undef HAVE_SYSCALL_SOCKET
|
||||
|
||||
/* Define if you have the syscall_socketcall function. */
|
||||
#undef HAVE_SYSCALL_SOCKETCALL
|
||||
|
||||
/* Define if you have the syscall_socketpair function. */
|
||||
#undef HAVE_SYSCALL_SOCKETPAIR
|
||||
|
||||
/* Define if you have the syscall_stat function. */
|
||||
#undef HAVE_SYSCALL_STAT
|
||||
|
||||
/* Define if you have the syscall_uname function. */
|
||||
#undef HAVE_SYSCALL_UNAME
|
||||
|
||||
/* Define if you have the syscall_unlink function. */
|
||||
#undef HAVE_SYSCALL_UNLINK
|
||||
|
||||
/* Define if you have the syscall_wait3 function. */
|
||||
#undef HAVE_SYSCALL_WAIT3
|
||||
|
||||
/* Define if you have the syscall_wait4 function. */
|
||||
#undef HAVE_SYSCALL_WAIT4
|
||||
|
||||
/* Define if you have the syscall_waitpid function. */
|
||||
#undef HAVE_SYSCALL_WAITPID
|
||||
|
||||
/* Define if you have the syscall_waitsys function. */
|
||||
#undef HAVE_SYSCALL_WAITSYS
|
||||
|
||||
/* Define if you have the syscall_write function. */
|
||||
#undef HAVE_SYSCALL_WRITE
|
||||
|
||||
/* Define if you have the syscall_writev function. */
|
||||
#undef HAVE_SYSCALL_WRITEV
|
||||
|
||||
/* Define if you have the vfork function. */
|
||||
#undef HAVE_VFORK
|
||||
|
||||
/* Define if you have the <alloc.h> header file. */
|
||||
#undef HAVE_ALLOC_H
|
||||
|
||||
/* Define if you have the <sys/filio.h> header file. */
|
||||
#undef HAVE_SYS_FILIO_H
|
||||
|
||||
/* Define if you have the <sys/syscall.h> header file. */
|
||||
#undef HAVE_SYS_SYSCALL_H
|
||||
|
||||
/* Define if you have the <sys/termio.h> header file. */
|
||||
#undef HAVE_SYS_TERMIO_H
|
||||
|
||||
/* Define if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define if you have the <syscall.h> header file. */
|
||||
#undef HAVE_SYSCALL_H
|
||||
|
||||
/* Define if you have the <termio.h> header file. */
|
||||
#undef HAVE_TERMIO_H
|
||||
|
||||
/* Define if you have the <termios.h> header file. */
|
||||
#undef HAVE_TERMIOS_H
|
794
mit-pthreads/config/config.sub
vendored
794
mit-pthreads/config/config.sub
vendored
@ -1,794 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Configuration validation subroutine script, version 1.1.
|
||||
# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
# can handle that machine. It does not imply ALL GNU software can.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
# Supply the specified configuration type as an argument.
|
||||
# If it is invalid, we print an error message on stderr and exit with code 1.
|
||||
# Otherwise, we print the canonical config type on stdout and succeed.
|
||||
|
||||
# This file is supposed to be the same for all GNU packages
|
||||
# and recognize all the CPU types, system types and aliases
|
||||
# that are meaningful with *any* GNU software.
|
||||
# Each package is responsible for reporting which valid configurations
|
||||
# it does not support. The user should be able to distinguish
|
||||
# a failure to support a valid configuration from a meaningless
|
||||
# configuration.
|
||||
|
||||
# The goal of this file is to map all the various variations of a given
|
||||
# machine specification into a single specification in the form:
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# It is wrong to echo any other type of specification.
|
||||
|
||||
# First pass through any local machine types.
|
||||
case $1 in
|
||||
*local*)
|
||||
echo $1
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Separate what the user gave into CPU-COMPANY and OS (if any).
|
||||
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
|
||||
if [ $basic_machine != $1 ]
|
||||
then os=`echo $1 | sed 's/.*-/-/'`
|
||||
else os=; fi
|
||||
|
||||
### Let's recognize common machines as not being operating systems so
|
||||
### that things like config.sub decstation-3100 work. We also
|
||||
### recognize some manufacturers as not being operating systems, so we
|
||||
### can provide default operating systems below.
|
||||
case $os in
|
||||
-sun*os*)
|
||||
# Prevent following clause from handling this invalid input.
|
||||
;;
|
||||
-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
|
||||
-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
|
||||
-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
|
||||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp )
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
-hiux*)
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
-sco4)
|
||||
os=-sco3.2v4
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
|
||||
;;
|
||||
-sco3.2.[4-9]*)
|
||||
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
|
||||
;;
|
||||
-sco3.2v[4-9]*)
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
|
||||
;;
|
||||
-sco*)
|
||||
os=-sco3.2v2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
|
||||
;;
|
||||
-isc)
|
||||
os=-isc2.2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
|
||||
;;
|
||||
-clix*)
|
||||
basic_machine=clipper-intergraph
|
||||
;;
|
||||
-isc*)
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
|
||||
;;
|
||||
-lynx)
|
||||
os=-lynxos
|
||||
;;
|
||||
-ptx*)
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
|
||||
;;
|
||||
-windowsnt*)
|
||||
os=`echo $os | sed -e 's/windowsnt/winnt/'`
|
||||
;;
|
||||
esac
|
||||
|
||||
# Decode aliases for certain CPU-COMPANY combinations.
|
||||
case $basic_machine in
|
||||
# Recognize the basic CPU types without company name.
|
||||
# Some are omitted here because they have special meanings below.
|
||||
tahoe | i[3456]86 | i860 | m68k | m68000 | m88k | ns32k | arm | arm32 | pyramid \
|
||||
| tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \
|
||||
| alpha | we32k | ns16k | clipper | sparclite | i370 | sh \
|
||||
| powerpc | sparc64 | 1750a | dsp16xx | mips64 | mipsel \
|
||||
| pdp11 | mips64el | mips64orion | mips64orionel )
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
# Object if more than one company name word.
|
||||
*-*-*)
|
||||
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
||||
exit 1
|
||||
;;
|
||||
# Recognize the basic CPU types with company name.
|
||||
vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \
|
||||
| sparc-* | ns32k-* | fx80-* | arm-* | arm32-* | c[123]* \
|
||||
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
|
||||
| none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
|
||||
| hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
|
||||
| pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
|
||||
| pdp11-* | sh-* | powerpc-* | sparc64-* | mips64-* | mipsel-* \
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* )
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
|
||||
basic_machine=m68000-att
|
||||
;;
|
||||
3b*)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
alliant | fx80)
|
||||
basic_machine=fx80-alliant
|
||||
;;
|
||||
altos | altos3068)
|
||||
basic_machine=m68k-altos
|
||||
;;
|
||||
am29k)
|
||||
basic_machine=a29k-none
|
||||
os=-bsd
|
||||
;;
|
||||
amdahl)
|
||||
basic_machine=580-amdahl
|
||||
os=-sysv
|
||||
;;
|
||||
amiga | amiga-*)
|
||||
basic_machine=m68k-cbm
|
||||
;;
|
||||
amigados)
|
||||
basic_machine=m68k-cbm
|
||||
os=-amigados
|
||||
;;
|
||||
amigaunix | amix)
|
||||
basic_machine=m68k-cbm
|
||||
os=-sysv4
|
||||
;;
|
||||
apollo68)
|
||||
basic_machine=m68k-apollo
|
||||
os=-sysv
|
||||
;;
|
||||
balance)
|
||||
basic_machine=ns32k-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
convex-c1)
|
||||
basic_machine=c1-convex
|
||||
os=-bsd
|
||||
;;
|
||||
convex-c2)
|
||||
basic_machine=c2-convex
|
||||
os=-bsd
|
||||
;;
|
||||
convex-c32)
|
||||
basic_machine=c32-convex
|
||||
os=-bsd
|
||||
;;
|
||||
convex-c34)
|
||||
basic_machine=c34-convex
|
||||
os=-bsd
|
||||
;;
|
||||
convex-c38)
|
||||
basic_machine=c38-convex
|
||||
os=-bsd
|
||||
;;
|
||||
cray | ymp)
|
||||
basic_machine=ymp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
cray2)
|
||||
basic_machine=cray2-cray
|
||||
os=-unicos
|
||||
;;
|
||||
crds | unos)
|
||||
basic_machine=m68k-crds
|
||||
;;
|
||||
da30 | da30-*)
|
||||
basic_machine=m68k-da30
|
||||
;;
|
||||
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
|
||||
basic_machine=mips-dec
|
||||
;;
|
||||
delta | 3300 | motorola-3300 | motorola-delta \
|
||||
| 3300-motorola | delta-motorola)
|
||||
basic_machine=m68k-motorola
|
||||
;;
|
||||
delta88)
|
||||
basic_machine=m88k-motorola
|
||||
os=-sysv3
|
||||
;;
|
||||
dpx20 | dpx20-*)
|
||||
basic_machine=rs6000-bull
|
||||
os=-bosx
|
||||
;;
|
||||
dpx2* | dpx2*-bull)
|
||||
basic_machine=m68k-bull
|
||||
os=-sysv3
|
||||
;;
|
||||
ebmon29k)
|
||||
basic_machine=a29k-amd
|
||||
os=-ebmon
|
||||
;;
|
||||
elxsi)
|
||||
basic_machine=elxsi-elxsi
|
||||
os=-bsd
|
||||
;;
|
||||
encore | umax | mmax)
|
||||
basic_machine=ns32k-encore
|
||||
;;
|
||||
fx2800)
|
||||
basic_machine=i860-alliant
|
||||
;;
|
||||
genix)
|
||||
basic_machine=ns32k-ns
|
||||
;;
|
||||
gmicro)
|
||||
basic_machine=tron-gmicro
|
||||
os=-sysv
|
||||
;;
|
||||
h3050r* | hiux*)
|
||||
basic_machine=hppa1.1-hitachi
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
h8300hms)
|
||||
basic_machine=h8300-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
harris)
|
||||
basic_machine=m88k-harris
|
||||
os=-sysv3
|
||||
;;
|
||||
hp300-*)
|
||||
basic_machine=m68k-hp
|
||||
;;
|
||||
hp300bsd)
|
||||
basic_machine=m68k-hp
|
||||
os=-bsd
|
||||
;;
|
||||
hp300hpux)
|
||||
basic_machine=m68k-hp
|
||||
os=-hpux
|
||||
;;
|
||||
hp9k2[0-9][0-9] | hp9k31[0-9])
|
||||
basic_machine=m68000-hp
|
||||
;;
|
||||
hp9k3[2-9][0-9])
|
||||
basic_machine=m68k-hp
|
||||
;;
|
||||
hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
|
||||
basic_machine=hppa1.1-hp
|
||||
;;
|
||||
hp9k8[0-9][0-9] | hp8[0-9][0-9])
|
||||
basic_machine=hppa1.0-hp
|
||||
;;
|
||||
i370-ibm* | ibm*)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
;;
|
||||
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
|
||||
i[3456]86v32)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
|
||||
os=-sysv32
|
||||
;;
|
||||
i[3456]86v4*)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
|
||||
os=-sysv4
|
||||
;;
|
||||
i[3456]86v)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
|
||||
os=-sysv
|
||||
;;
|
||||
i[3456]86sol2)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
|
||||
os=-solaris2
|
||||
;;
|
||||
iris | iris4d)
|
||||
basic_machine=mips-sgi
|
||||
case $os in
|
||||
-irix*)
|
||||
;;
|
||||
*)
|
||||
os=-irix4
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
isi68 | isi)
|
||||
basic_machine=m68k-isi
|
||||
os=-sysv
|
||||
;;
|
||||
m88k-omron*)
|
||||
basic_machine=m88k-omron
|
||||
;;
|
||||
magnum | m3230)
|
||||
basic_machine=mips-mips
|
||||
os=-sysv
|
||||
;;
|
||||
merlin)
|
||||
basic_machine=ns32k-utek
|
||||
os=-sysv
|
||||
;;
|
||||
miniframe)
|
||||
basic_machine=m68000-convergent
|
||||
;;
|
||||
mips3*-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||
;;
|
||||
mips3*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
||||
;;
|
||||
ncr3000)
|
||||
basic_machine=i486-ncr
|
||||
os=-sysv4
|
||||
;;
|
||||
news | news700 | news800 | news900)
|
||||
basic_machine=m68k-sony
|
||||
os=-newsos
|
||||
;;
|
||||
news1000)
|
||||
basic_machine=m68030-sony
|
||||
os=-newsos
|
||||
;;
|
||||
news-3600 | risc-news)
|
||||
basic_machine=mips-sony
|
||||
os=-newsos
|
||||
;;
|
||||
next | m*-next )
|
||||
basic_machine=m68k-next
|
||||
case $os in
|
||||
-nextstep* )
|
||||
;;
|
||||
-ns2*)
|
||||
os=-nextstep2
|
||||
;;
|
||||
*)
|
||||
os=-nextstep3
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
nh3000)
|
||||
basic_machine=m68k-harris
|
||||
os=-cxux
|
||||
;;
|
||||
nh[45]000)
|
||||
basic_machine=m88k-harris
|
||||
os=-cxux
|
||||
;;
|
||||
nindy960)
|
||||
basic_machine=i960-intel
|
||||
os=-nindy
|
||||
;;
|
||||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
pa-hitachi)
|
||||
basic_machine=hppa1.1-hitachi
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
paragon)
|
||||
basic_machine=i860-intel
|
||||
os=-osf
|
||||
;;
|
||||
pbd)
|
||||
basic_machine=sparc-tti
|
||||
;;
|
||||
pbb)
|
||||
basic_machine=m68k-tti
|
||||
;;
|
||||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pentium-*)
|
||||
# We will change tis to say i586 once there has been
|
||||
# time for various packages to start to recognize that.
|
||||
basic_machine=i486-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pn)
|
||||
basic_machine=pn-gould
|
||||
;;
|
||||
ps2)
|
||||
basic_machine=i386-ibm
|
||||
;;
|
||||
rtpc | rtpc-*)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
sequent)
|
||||
basic_machine=i386-sequent
|
||||
;;
|
||||
sh)
|
||||
basic_machine=sh-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
sps7)
|
||||
basic_machine=m68k-bull
|
||||
os=-sysv2
|
||||
;;
|
||||
spur)
|
||||
basic_machine=spur-unknown
|
||||
;;
|
||||
sun2)
|
||||
basic_machine=m68000-sun
|
||||
;;
|
||||
sun2os3)
|
||||
basic_machine=m68000-sun
|
||||
os=-sunos3
|
||||
;;
|
||||
sun2os4)
|
||||
basic_machine=m68000-sun
|
||||
os=-sunos4
|
||||
;;
|
||||
sun3os3)
|
||||
basic_machine=m68k-sun
|
||||
os=-sunos3
|
||||
;;
|
||||
sun3os4)
|
||||
basic_machine=m68k-sun
|
||||
os=-sunos4
|
||||
;;
|
||||
sun4os3)
|
||||
basic_machine=sparc-sun
|
||||
os=-sunos3
|
||||
;;
|
||||
sun4os4)
|
||||
basic_machine=sparc-sun
|
||||
os=-sunos4
|
||||
;;
|
||||
sun3 | sun3-*)
|
||||
basic_machine=m68k-sun
|
||||
;;
|
||||
sun4)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
sun386 | sun386i | roadrunner)
|
||||
basic_machine=i386-sun
|
||||
;;
|
||||
symmetry)
|
||||
basic_machine=i386-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
tower | tower-32)
|
||||
basic_machine=m68k-ncr
|
||||
;;
|
||||
ultra3)
|
||||
basic_machine=a29k-nyu
|
||||
os=-sym1
|
||||
;;
|
||||
vaxv)
|
||||
basic_machine=vax-dec
|
||||
os=-sysv
|
||||
;;
|
||||
vms)
|
||||
basic_machine=vax-dec
|
||||
os=-vms
|
||||
;;
|
||||
vxworks960)
|
||||
basic_machine=i960-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
vxworks68)
|
||||
basic_machine=m68k-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
xmp)
|
||||
basic_machine=xmp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
none)
|
||||
basic_machine=none-none
|
||||
os=-none
|
||||
;;
|
||||
|
||||
# Here we handle the default manufacturer of certain CPU types. It is in
|
||||
# some cases the only manufacturer, in others, it is the most popular.
|
||||
mips)
|
||||
basic_machine=mips-mips
|
||||
;;
|
||||
romp)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
rs6000)
|
||||
basic_machine=rs6000-ibm
|
||||
;;
|
||||
vax)
|
||||
basic_machine=vax-dec
|
||||
;;
|
||||
pdp11)
|
||||
basic_machine=pdp11-dec
|
||||
;;
|
||||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sparc)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
basic_machine=cydra-cydrome
|
||||
;;
|
||||
orion)
|
||||
basic_machine=orion-highlevel
|
||||
;;
|
||||
orion105)
|
||||
basic_machine=clipper-highlevel
|
||||
;;
|
||||
*)
|
||||
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Here we canonicalize certain aliases for manufacturers.
|
||||
case $basic_machine in
|
||||
*-digital*)
|
||||
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
|
||||
;;
|
||||
*-commodore*)
|
||||
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Decode manufacturer-specific aliases for certain operating systems.
|
||||
|
||||
if [ x"$os" != x"" ]
|
||||
then
|
||||
case $os in
|
||||
# -solaris* is a basic system type, with this one exception.
|
||||
-solaris1 | -solaris1.*)
|
||||
os=`echo $os | sed -e 's|solaris1|sunos4|'`
|
||||
;;
|
||||
-solaris)
|
||||
os=-solaris2
|
||||
;;
|
||||
-gnu/linux*)
|
||||
os=`echo $os | sed -e 's|gnu/linux|linux|'`
|
||||
;;
|
||||
# First accept the basic system types.
|
||||
# The portable systems comes first.
|
||||
# Each alternative must end in a *, to match a version number.
|
||||
# -sysv* is not here because it comes later, after sysvr4.
|
||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
| -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[3456]* \
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
|
||||
| -amigados* | -msdos* | -newsos* | -unicos* | -aos* \
|
||||
| -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
|
||||
| -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -netbsd* | -freebsd* | -openbsd* \
|
||||
|-riscix* \
|
||||
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
|
||||
| -ptx* | -coff* | -winnt*)
|
||||
;;
|
||||
-sunos5*)
|
||||
os=`echo $os | sed -e 's|sunos5|solaris2|'`
|
||||
;;
|
||||
-sunos6*)
|
||||
os=`echo $os | sed -e 's|sunos6|solaris3|'`
|
||||
;;
|
||||
-osfrose*)
|
||||
os=-osfrose
|
||||
;;
|
||||
-osf*)
|
||||
os=-osf
|
||||
;;
|
||||
-utek*)
|
||||
os=-bsd
|
||||
;;
|
||||
-dynix*)
|
||||
os=-bsd
|
||||
;;
|
||||
-acis*)
|
||||
os=-aos
|
||||
;;
|
||||
-ctix* | -uts*)
|
||||
os=-sysv
|
||||
;;
|
||||
-triton*)
|
||||
os=-sysv3
|
||||
;;
|
||||
-oss*)
|
||||
os=-sysv3
|
||||
;;
|
||||
-svr4)
|
||||
os=-sysv4
|
||||
;;
|
||||
-svr3)
|
||||
os=-sysv3
|
||||
;;
|
||||
-sysvr4)
|
||||
os=-sysv4
|
||||
;;
|
||||
# This must come after -sysvr4.
|
||||
-sysv*)
|
||||
;;
|
||||
-xenix)
|
||||
os=-xenix
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
*)
|
||||
# Get rid of the `-' at the beginning of $os.
|
||||
os=`echo $os | sed 's/[^-]*-//'`
|
||||
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
else
|
||||
|
||||
# Here we handle the default operating systems that come with various machines.
|
||||
# The value should be what the vendor currently ships out the door with their
|
||||
# machine or put another way, the most popular os provided with the machine.
|
||||
|
||||
# Note that if you're going to try to match "-MANUFACTURER" here (say,
|
||||
# "-sun"), then you have to tell the case statement up towards the top
|
||||
# that MANUFACTURER isn't an operating system. Otherwise, code above
|
||||
# will signal an error saying that MANUFACTURER isn't an operating
|
||||
# system, and we'll never get to this point.
|
||||
|
||||
case $basic_machine in
|
||||
*-acorn)
|
||||
os=-riscix1.2
|
||||
;;
|
||||
pdp11-*)
|
||||
os=-none
|
||||
;;
|
||||
*-dec | vax-*)
|
||||
os=-ultrix4.2
|
||||
;;
|
||||
i386-sun)
|
||||
os=-sunos4.0.2
|
||||
;;
|
||||
m68000-sun)
|
||||
os=-sunos3
|
||||
# This also exists in the configure program, but was not the
|
||||
# default.
|
||||
# os=-sunos4
|
||||
;;
|
||||
*-tti) # must be before sparc entry or we get the wrong os.
|
||||
os=-sysv3
|
||||
;;
|
||||
sparc-* | *-sun)
|
||||
os=-sunos4.1.1
|
||||
;;
|
||||
*-ibm)
|
||||
os=-aix
|
||||
;;
|
||||
*-hp)
|
||||
os=-hpux
|
||||
;;
|
||||
*-hitachi)
|
||||
os=-hiux
|
||||
;;
|
||||
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
|
||||
os=-sysv
|
||||
;;
|
||||
*-cbm)
|
||||
os=-amigados
|
||||
;;
|
||||
*-dg)
|
||||
os=-dgux
|
||||
;;
|
||||
*-dolphin)
|
||||
os=-sysv3
|
||||
;;
|
||||
m68k-ccur)
|
||||
os=-rtu
|
||||
;;
|
||||
m88k-omron*)
|
||||
os=-luna
|
||||
;;
|
||||
*-sequent)
|
||||
os=-ptx
|
||||
;;
|
||||
*-crds)
|
||||
os=-unos
|
||||
;;
|
||||
*-ns)
|
||||
os=-genix
|
||||
;;
|
||||
i370-*)
|
||||
os=-mvs
|
||||
;;
|
||||
*-next)
|
||||
os=-nextstep3
|
||||
;;
|
||||
*-gould)
|
||||
os=-sysv
|
||||
;;
|
||||
*-highlevel)
|
||||
os=-bsd
|
||||
;;
|
||||
*-encore)
|
||||
os=-bsd
|
||||
;;
|
||||
*-sgi)
|
||||
os=-irix
|
||||
;;
|
||||
*-masscomp)
|
||||
os=-rtu
|
||||
;;
|
||||
*)
|
||||
os=-none
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Here we handle the case where we know the os, and the CPU type, but not the
|
||||
# manufacturer. We pick the logical manufacturer.
|
||||
vendor=unknown
|
||||
case $basic_machine in
|
||||
*-unknown)
|
||||
case $os in
|
||||
-riscix*)
|
||||
vendor=acorn
|
||||
;;
|
||||
-sunos*)
|
||||
vendor=sun
|
||||
;;
|
||||
-lynxos*)
|
||||
vendor=lynx
|
||||
;;
|
||||
-aix*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-hpux*)
|
||||
vendor=hp
|
||||
;;
|
||||
-hiux*)
|
||||
vendor=hitachi
|
||||
;;
|
||||
-unos*)
|
||||
vendor=crds
|
||||
;;
|
||||
-dgux*)
|
||||
vendor=dg
|
||||
;;
|
||||
-luna*)
|
||||
vendor=omron
|
||||
;;
|
||||
-genix*)
|
||||
vendor=ns
|
||||
;;
|
||||
-mvs*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-ptx*)
|
||||
vendor=sequent
|
||||
;;
|
||||
esac
|
||||
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
|
||||
;;
|
||||
esac
|
||||
|
||||
echo $basic_machine$os
|
3336
mit-pthreads/config/configure
vendored
3336
mit-pthreads/config/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -1,745 +0,0 @@
|
||||
dnl Some reminders:
|
||||
dnl "dnl" is a "delete to newline" command for m4 - the remainder of the
|
||||
dnl line it's on, including the newline, will be discarded
|
||||
dnl "#" comments will usually be copied through
|
||||
dnl "[]" are quoting characters; use changequote around code that really
|
||||
dnl needs to use them, but try not to invoke autoconf macros
|
||||
dnl within such code
|
||||
dnl
|
||||
dnl When you change this file, re-run "autoreconf" -- that'll automatically
|
||||
dnl re-run both autoconf and autoheader.
|
||||
dnl
|
||||
dnl
|
||||
dnl To do:
|
||||
dnl CLOCKS_PER_SEC (default 100, Ultrix differs)
|
||||
dnl CLK_TCK (default 100, Ultrix differs)
|
||||
dnl clockid_t (not on all systems)
|
||||
dnl timer_t (not on all systems)
|
||||
dnl
|
||||
dnl
|
||||
dnl Now, the real stuff.
|
||||
dnl
|
||||
dnl This must be first.
|
||||
AC_INIT(config.flags.in)
|
||||
dnl
|
||||
dnl This file does require autoconf 2.0 or better...
|
||||
dnl
|
||||
AC_PREREQ(2.0)dnl
|
||||
dnl
|
||||
dnl Hook for the "--enable-dce-compat" option, when Chris actually
|
||||
dnl implements it.
|
||||
dnl
|
||||
AC_ARG_ENABLE(dce-compat,
|
||||
--enable-dce-compat DCE compatibility,
|
||||
[dnl "true" action
|
||||
AC_MSG_ERROR([Actually, DCE compatibility doesn't work yet...])
|
||||
],
|
||||
[dnl "false" action
|
||||
true
|
||||
])
|
||||
|
||||
dnl What C compiler?
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
dnl Apparently autoconf doesn't test to see if the C compiler it locates
|
||||
dnl actually works... oops!
|
||||
AC_MSG_CHECKING(compiler availability and simple error detection)
|
||||
AC_TRY_COMPILE(,[ exit(0); ],[
|
||||
dnl true
|
||||
AC_TRY_COMPILE(,[ syntax errors galore! ],
|
||||
dnl true
|
||||
AC_MSG_ERROR(Can't detect syntax errors! Is CC set right?),
|
||||
dnl false
|
||||
true)],
|
||||
dnl false
|
||||
AC_MSG_ERROR(Can't compile test program! Is CC set right?))
|
||||
|
||||
AC_TRY_COMPILE(,[
|
||||
typedef int Integer;
|
||||
extern int i;
|
||||
extern Integer i;
|
||||
], , AC_MSG_ERROR(Can't redeclare variables with this compiler??))
|
||||
AC_TRY_COMPILE(,[
|
||||
typedef long Long;
|
||||
extern int i;
|
||||
extern Long i;
|
||||
], AC_MSG_ERROR(Compiler doesn't detect conflicting declarations.))
|
||||
AC_MSG_RESULT(ok)
|
||||
|
||||
if test $ac_cv_prog_gcc = yes ; then
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
fi
|
||||
|
||||
AC_PROG_CPP
|
||||
|
||||
AC_PROG_RANLIB
|
||||
|
||||
dnl Default value of prefix should be /usr/local/pthreads, not /usr/local.
|
||||
AC_PREFIX_DEFAULT(/usr/local/pthreads)
|
||||
|
||||
dnl Determine $host, by guessing if necessary.
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
syscall=NONE
|
||||
sysincludes=NONE
|
||||
extraincludes=NONE
|
||||
|
||||
# Treat all x86 machines the same.
|
||||
# (Yet below, we pretend we can distinguish between the MIPS r2000 and r4000?)
|
||||
# (What about 680x0 machines?)
|
||||
changequote(,)dnl
|
||||
case $host in
|
||||
i[456]86-*)
|
||||
host=`echo $host | sed 's/^i[456]86/i386/'`
|
||||
host_cpu=i386
|
||||
;;
|
||||
esac
|
||||
changequote([,])dnl
|
||||
|
||||
# Here, you should set the following variables:
|
||||
# name
|
||||
# The "name" of this configuration. Used for "engine-*.c" file name,
|
||||
# default for syscall file names. Chris seems to have a thing for
|
||||
# putting "-" between OS and version number, but the configure script
|
||||
# will already have $host_cpu and $host_os available for you to use
|
||||
# in constructing a name.
|
||||
# sysincludes
|
||||
# Name of machdep directory with "sys" include file
|
||||
# replacements, if any. This directory is optional;
|
||||
# if you don't provide it, don't set this variable.
|
||||
# except
|
||||
# Names of any syscalls that shouldn't be generated
|
||||
# from the template, if any.
|
||||
# syscall
|
||||
# Base name of the syscall template files, if not the
|
||||
# same as <name>. If they're the same, omit this.
|
||||
#
|
||||
# Also, you may define random symbols and update CFLAGS if
|
||||
# necessary. However, for ease of porting to new machines,
|
||||
# it's best if you can create portable autoconf tests for
|
||||
# whatever you're trying to do, rather than hard-coding it
|
||||
# here based on the OS name. So please, try to keep this
|
||||
# section as minimal as possible.
|
||||
|
||||
except=""
|
||||
name=$host_cpu-$host_os
|
||||
|
||||
case $host in
|
||||
changequote(,)dnl
|
||||
alpha-*-netbsd1.3[H-Z]|alpha-*-netbsd1.[45]*)
|
||||
name=alpha-netbsd-1.3
|
||||
sysincludes=netbsd-1.1
|
||||
except="fork lseek pipe fstat"
|
||||
available_syscalls="sigsuspend sigprocmask"
|
||||
;;
|
||||
changequote([,])dnl
|
||||
alpha-*-netbsd1.3*)
|
||||
name=alpha-netbsd-1.3
|
||||
sysincludes=netbsd-1.1
|
||||
except="fork lseek pipe sigsuspend sigprocmask fstat"
|
||||
;;
|
||||
alpha-*-netbsd1.1* | alpha-*-netbsd1.2*)
|
||||
name=alpha-netbsd-1.1
|
||||
sysincludes=netbsd-1.1
|
||||
except="fork lseek pipe sigsuspend sigprocmask"
|
||||
;;
|
||||
alpha-*-osf*)
|
||||
name=alpha-osf1
|
||||
sysincludes=alpha-osf1
|
||||
except="fork sigsuspend"
|
||||
if test $ac_cv_prog_gcc = no ; then
|
||||
CFLAGS="$CFLAGS -std"
|
||||
fi
|
||||
;;
|
||||
changequote(,)dnl
|
||||
arm32-*-netbsd1.3[H-Z]|arm32-*-netbsd1.[45]*)
|
||||
name=arm32-netbsd-1.3
|
||||
sysincludes=netbsd-1.1
|
||||
except="fork pipe lseek ftruncate fstat"
|
||||
available_syscalls="sigsuspend sigprocmask"
|
||||
;;
|
||||
changequote([,])dnl
|
||||
arm32-*-netbsd1.3*)
|
||||
name=arm32-netbsd-1.3
|
||||
sysincludes=netbsd-1.1
|
||||
except="fork pipe lseek ftruncate sigsuspend sigprocmask fstat"
|
||||
;;
|
||||
hppa1.0-*-hpux10.20 | hppa1.1-*-hpux10.20)
|
||||
name=hppa-hpux-10.20
|
||||
sysincludes=hpux-10.20
|
||||
except="fork"
|
||||
;;
|
||||
hppa1.1-*-hpux*9.*)
|
||||
name=hppa-hpux-9.03
|
||||
sysincludes=hpux-9.03
|
||||
# hpux-9.03.mk seems to be missing; what should this be?
|
||||
except="fork"
|
||||
;;
|
||||
powerpc-*-netbsd1.*)
|
||||
name=powerpc-netbsd
|
||||
sysincludes=netbsd-1.1
|
||||
except="fork lseek ftruncate pipe fstat"
|
||||
available_syscalls="sigprocmask sigaction sigsuspend"
|
||||
;;
|
||||
sparc-*-sunos4.1.3* | sparc-*-sunos4.1.4*)
|
||||
name=sparc-sunos-4.1.3
|
||||
sysincludes=sunos-4.1.3
|
||||
syscall=sparc-sunos4
|
||||
except="fork pipe getpgrp getdirentries"
|
||||
AC_DEFINE(sunos4) # is this really needed??
|
||||
;;
|
||||
sparc-*-solaris2.3* | sparc-*-solaris2.4*)
|
||||
name=sparc-sunos-5.3
|
||||
sysincludes=sunos-5.3
|
||||
except="fork sigaction"
|
||||
# Should really come up with a test for this...
|
||||
AC_DEFINE(LD_LINKS_STATIC_DATA)
|
||||
AC_DEFINE(BROKEN_SIGNALS)
|
||||
;;
|
||||
sparc-*-solaris2*)
|
||||
name=sparc-sunos-5.3
|
||||
sysincludes=sunos-5.5
|
||||
except="fork sigaction"
|
||||
# Should really come up with a test for this...
|
||||
AC_DEFINE(LD_LINKS_STATIC_DATA)
|
||||
AC_DEFINE(BROKEN_SIGNALS)
|
||||
;;
|
||||
changequote(,)dnl
|
||||
sparc-*-netbsd1.3[H-Z]|sparc-*-netbsd1.[45]*)
|
||||
name=sparc-netbsd-1.3
|
||||
sysincludes=netbsd-1.1
|
||||
except="pipe fork lseek ftruncate fstat"
|
||||
available_syscalls="sigprocmask sigsuspend"
|
||||
;;
|
||||
changequote([,])dnl
|
||||
sparc-*-netbsd1.3*)
|
||||
name=sparc-netbsd-1.3
|
||||
sysincludes=netbsd-1.1
|
||||
except="pipe fork lseek ftruncate sigprocmask sigsuspend fstat"
|
||||
;;
|
||||
sparc-*-netbsd1.0A | sparc-*-netbsd1.1* | sparc-*-netbsd1.2*)
|
||||
name=sparc-sunos-4.1.3
|
||||
sysincludes=netbsd-1.0
|
||||
syscall=sparc-netbsd-1.1
|
||||
except="pipe fork sigprocmask sigsuspend"
|
||||
;;
|
||||
i386-*-openbsd2.*)
|
||||
name=i386-openbsd-2.0
|
||||
sysincludes=openbsd-2.0
|
||||
except="fork lseek ftruncate sigsuspend sigprocmask"
|
||||
;;
|
||||
i386-*-linux*)
|
||||
#name=i386-linux-1.0
|
||||
#sysincludes=linux-1.0
|
||||
name=i386-linux-2.0
|
||||
sysincludes=linux-2.0
|
||||
extraincludes="bits"
|
||||
;;
|
||||
i386-*-bsdi1.1)
|
||||
name=i386-bsdi-1.1
|
||||
sysincludes=bsdi-1.1
|
||||
;;
|
||||
i386-*-bsdi2.0* | i386-*-bsdi2.1*)
|
||||
name=i386-bsdi-2.0
|
||||
sysincludes=bsdi-2.0
|
||||
syscall=i386-bsdi-2.0
|
||||
except="fork lseek ftruncate sigsuspend"
|
||||
;;
|
||||
changequote(,)dnl
|
||||
i386-*-netbsd1.3[H-Z]|i386-*-netbsd1.[45]*)
|
||||
name=i386-netbsd-1.3
|
||||
sysincludes=netbsd-1.1
|
||||
except="fork lseek ftruncate pipe fstat"
|
||||
available_syscalls="sigsuspend sigprocmask"
|
||||
;;
|
||||
changequote([,])dnl
|
||||
i386-*-netbsd1.3*)
|
||||
name=i386-netbsd-1.3
|
||||
sysincludes=netbsd-1.1
|
||||
except="fork lseek ftruncate pipe sigsuspend sigprocmask fstat"
|
||||
;;
|
||||
i386-*-netbsd1.1* | i386-*-netbsd1.2*)
|
||||
name=i386-netbsd-1.0
|
||||
sysincludes=netbsd-1.1
|
||||
syscall=i386-netbsd-1.1
|
||||
except="fork lseek ftruncate pipe sigsuspend sigprocmask"
|
||||
;;
|
||||
i386-*-netbsd1.0*)
|
||||
name=i386-netbsd-1.0
|
||||
sysincludes=netbsd-1.0
|
||||
except="fork lseek ftruncate sigsuspend"
|
||||
;;
|
||||
i386-*-netbsd0.9*)
|
||||
name=i386-netbsd-0.9
|
||||
sysincludes=netbsd-0.9
|
||||
;;
|
||||
m68*-*-netbsd*)
|
||||
name=m68000-netbsd
|
||||
sysincludes=netbsd-1.1
|
||||
except="lseek ftruncate pipe fstat"
|
||||
available_syscalls="sigsuspend sigprocmask"
|
||||
;;
|
||||
i386-*-freebsd*)
|
||||
name=i386-freebsd-2.0
|
||||
sysincludes=freebsd-2.0
|
||||
except="fork lseek ftruncate sigsuspend sigprocmask"
|
||||
;;
|
||||
romp-*-bsd*)
|
||||
name=romp-bsd
|
||||
;;
|
||||
mips-dec-ultrix*)
|
||||
name=r2000-ultrix-4.2
|
||||
sysincludes=ultrix-4.2
|
||||
except="fork pipe"
|
||||
;;
|
||||
mips-sgi-irix*)
|
||||
name=ip22-irix-5.2
|
||||
sysincludes=irix-5.2
|
||||
except="fstat stat"
|
||||
AC_DEFINE(BROKEN_SIGNALS)
|
||||
;;
|
||||
i386-*-sco3.2v5*)
|
||||
name=i386-sco3.2.5
|
||||
sysincludes=i386-sco3.2.5
|
||||
syscall=i386-sco3.2.5
|
||||
except="select socketcall accept bind connect getpeername getsockname getsockopt setsockopt listen recv recvfrom recvmsg send sendmsg sendto shutdown socket socketpair fork fcntl dup2 fstat fchmod fchown ftruncate pipe getdirentries sigaction sigpause wait3 waitpid getdtablesize"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(System type $host not recognized or not supported.
|
||||
See $srcdir/configure.in for supported systems.)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
SYSCALL_EXCEPTIONS=$except
|
||||
AC_SUBST(SYSCALL_EXCEPTIONS)
|
||||
|
||||
AC_CHECK_HEADERS(sys/termio.h termios.h termio.h alloc.h)
|
||||
|
||||
dnl Don't use AC_CHECK_HEADERS for this one, we want to define a special
|
||||
dnl symbol name starting with pthread_ if it's found.
|
||||
AC_CHECK_HEADER(va_list.h, AC_DEFINE(pthread_have_va_list_h))
|
||||
|
||||
dnl Generate a list of system calls that we could generate. We later use
|
||||
dnl a syscall template .S file to produce a .o file for each syscall. This
|
||||
dnl is a bit better for porting and development purposes than having every
|
||||
dnl syscall listed for every target system; this way we only need the
|
||||
dnl template, and special hanlding for only those syscalls that can't be
|
||||
dnl handled by the templates.
|
||||
AC_CHECK_HEADERS(syscall.h sys/syscall.h sys/filio.h)
|
||||
|
||||
PTHREADS_CHECK_SYSCALLS(open write read creat close fcntl lseek dup2 dup pipe
|
||||
fchmod fchown execve fstat lstat link unlink chdir chown chmod stat
|
||||
rename select getdtablesize ioctl ftruncate flock fstatfs chroot uname
|
||||
dnl - signals
|
||||
sigsuspend sigaction sigpause sigprocmask ksigaction
|
||||
dnl - directory reading
|
||||
getdents readdir getdirentries
|
||||
dnl - variants of `wait' syscalls
|
||||
wait4 wait3 waitpid waitsys
|
||||
dnl - BSD socket calls
|
||||
socket bind connect accept listen getsockopt setsockopt socketpair
|
||||
dnl - SYSV stream calls
|
||||
poll putmsg getmsg
|
||||
dnl - Linux version uses one syscall
|
||||
socketcall
|
||||
|
||||
dnl - Process info
|
||||
pgrpsys
|
||||
|
||||
exit
|
||||
readv writev send sendto sendmsg recv recvfrom recvmsg
|
||||
getpeername getsockname
|
||||
shutdown
|
||||
getpgrp fork)
|
||||
|
||||
AC_SUBST(available_syscalls)
|
||||
AC_SUBST(missing_syscalls)
|
||||
|
||||
dnl Disabled for now -- generates warnings from autoconf.
|
||||
dnl ## Check some type sizes.
|
||||
dnl AC_CHECK_SIZEOF(int)
|
||||
dnl AC_CHECK_SIZEOF(long)
|
||||
dnl AC_CHECK_SIZEOF(char *)
|
||||
|
||||
## Determine some typedef values from the system header files.
|
||||
dnl
|
||||
dnl Autoconf provides these automatically. They provide reasonable
|
||||
dnl fallbacks if the standard header files don't define the typedef names.
|
||||
dnl
|
||||
dnl AC_TYPE_MODE_T
|
||||
AC_TYPE_OFF_T
|
||||
dnl AC_TYPE_PID_T
|
||||
AC_TYPE_SIZE_T
|
||||
dnl AC_TYPE_UID_T
|
||||
AC_TYPE_SIGNAL
|
||||
dnl
|
||||
dnl Default these types if their definitions can't be found.
|
||||
dnl
|
||||
AC_CHECK_TYPE(ssize_t,int)
|
||||
AC_CHECK_TYPE(time_t,long)
|
||||
dnl
|
||||
AC_CHECK_HEADERS(sys/time.h)
|
||||
AC_HEADER_TIME
|
||||
|
||||
dnl
|
||||
dnl Check for the existence of these types
|
||||
dnl
|
||||
dnl struct timespec
|
||||
dnl
|
||||
AC_MSG_CHECKING(for struct timespec in sys/time.h)
|
||||
AC_CACHE_VAL(pthreads_cv_timespec_in_time,
|
||||
AC_TRY_COMPILE([#include <sys/time.h>], [struct timespec foo;],
|
||||
pthreads_cv_timespec_in_time=yes, pthreads_cv_timespec_in_time=no))
|
||||
AC_MSG_RESULT($pthreads_cv_timespec_in_time)
|
||||
if test $pthreads_cv_timespec_in_time = yes ; then
|
||||
AC_DEFINE(_OS_HAS_TIMESPEC)
|
||||
fi
|
||||
|
||||
dnl socklen_t
|
||||
AC_CACHE_VAL(pthreads_cv_socklen_t,
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <sys/socket.h>], [socklen_t foo;],
|
||||
pthreads_cv_socklen_t=yes, pthreads_cv_socklen_t=no))
|
||||
AC_MSG_RESULT($pthreads_cv_socklen_t)
|
||||
if test $pthreads_cv_socklen_t = yes ; then
|
||||
AC_DEFINE(_OS_HAS_SOCKLEN_T)
|
||||
fi
|
||||
|
||||
|
||||
dnl
|
||||
dnl Usage: PTHREADS_FIND_TYPE(system-typedef-name, new-macro-name,
|
||||
dnl list-of-includes-in-square-brackets,
|
||||
dnl comma-separated-list-of-types-to-try)
|
||||
dnl
|
||||
dnl PTHREADS_FIND_INTEGRAL_TYPE automatically provides a set of integral
|
||||
dnl types, and does not permit specification of additional types.
|
||||
dnl
|
||||
dnl The specified types must all be able to work as prefixes -- i.e., no
|
||||
dnl direct specification of array or function types. If you need such
|
||||
dnl types, add typedefs for them to include/pthread/xtypes.h, and include
|
||||
dnl that in the set of header files. For simple struct types, you can
|
||||
dnl try including the definition directly here, but it had better not
|
||||
dnl contain any commas or square brackets.
|
||||
dnl
|
||||
dnl If necessary, you can include other preprocessing commands and such
|
||||
dnl in the `includes' portion.
|
||||
dnl
|
||||
dnl Note: For now, each of these needs a corresponding entry
|
||||
dnl in acconfig.h.
|
||||
dnl
|
||||
dnl size_t
|
||||
dnl
|
||||
PTHREADS_FIND_INTEGRAL_TYPE(size_t, pthread_size_t, [
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
])
|
||||
dnl
|
||||
dnl ssize_t
|
||||
dnl
|
||||
PTHREADS_FIND_INTEGRAL_TYPE(ssize_t, pthread_ssize_t, [
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
])
|
||||
dnl
|
||||
dnl clock_t ---FIXME I don't know if this is the right set of header files. KR
|
||||
dnl
|
||||
PTHREADS_FIND_INTEGRAL_TYPE(clock_t, pthread_clock_t, [
|
||||
#include <stddef.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <time.h>
|
||||
# include <sys/time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
])
|
||||
dnl
|
||||
dnl time_t
|
||||
dnl
|
||||
PTHREADS_FIND_INTEGRAL_TYPE(time_t, pthread_time_t, [
|
||||
#include <stddef.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <time.h>
|
||||
# include <sys/time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
])
|
||||
dnl
|
||||
dnl fpos_t
|
||||
dnl
|
||||
dnl If fpos_t isn't defined in stdio.h, define it to be off_t. It
|
||||
dnl looks like AC_CHECK_TYPE won't work for this, because it doesn't
|
||||
dnl include stdio.h.
|
||||
dnl
|
||||
AC_MSG_CHECKING(for fpos_t in stdio.h)
|
||||
AC_CACHE_VAL(pthreads_cv_fpos_t_in_stdio,
|
||||
AC_TRY_COMPILE([#include <stdio.h>], [fpos_t position;],
|
||||
pthreads_cv_fpos_t_in_stdio=yes, pthreads_cv_fpos_t_in_stdio=no))
|
||||
AC_MSG_RESULT($pthreads_cv_fpos_t_in_stdio)
|
||||
if test $pthreads_cv_fpos_t_in_stdio = yes ; then
|
||||
PTHREADS_FIND_INTEGRAL_TYPE(fpos_t, pthread_fpos_t, [
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
])
|
||||
else
|
||||
AC_DEFINE(fpos_t,off_t)
|
||||
AC_DEFINE(pthread_fpos_t,pthread_off_t)
|
||||
fi
|
||||
dnl
|
||||
dnl off_t
|
||||
dnl
|
||||
PTHREADS_FIND_INTEGRAL_TYPE(off_t, pthread_off_t, [
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
])
|
||||
dnl
|
||||
dnl va_list -- This one could be tricky. Fortunately, on some systems,
|
||||
dnl we can just include the gcc stdarg.h header file if we can't determine
|
||||
dnl the type here. Won't work for non-gcc configurations though.
|
||||
dnl
|
||||
PTHREADS_FIND_TYPE(va_list, pthread_va_list, [#include <stdarg.h>],
|
||||
char *, char **, void *, void **, int *, long *)
|
||||
dnl
|
||||
dnl
|
||||
|
||||
arpa_headers="#include <sys/types.h>
|
||||
#include <arpa/nameser.h>"
|
||||
|
||||
dnl
|
||||
dnl Type for network (IP) addresses, 32 bits.
|
||||
dnl For now, I'm assuming that the return type from _getlong is it.
|
||||
dnl
|
||||
AC_MSG_CHECKING(IP address type)
|
||||
AC_CACHE_VAL(pthread_cv_type_ipaddr,
|
||||
AC_TRY_COMPILE($arpa_headers,[ &_getlong; ],[
|
||||
for type in "unsigned long" "unsigned int" ; do
|
||||
AC_TRY_COMPILE($arpa_headers, extern $type _getlong ();,[
|
||||
pthread_cv_type_ipaddr="$type"
|
||||
break
|
||||
])
|
||||
done
|
||||
],[ AC_MSG_WARN(Can't compile _getlong reference.) ])
|
||||
if test "$pthread_cv_type_ipaddr" = "" ; then
|
||||
AC_MSG_WARN(Can't determine _getlong return type.)
|
||||
AC_MSG_WARN(Defaulting to unsigned long.)
|
||||
pthread_cv_type_ipaddr="unsigned long"
|
||||
fi
|
||||
)
|
||||
AC_MSG_RESULT($pthread_cv_type_ipaddr)
|
||||
AC_DEFINE_UNQUOTED(pthread_ipaddr_type,$pthread_cv_type_ipaddr)
|
||||
|
||||
dnl
|
||||
dnl Type for network (IP) ports, 16 bits.
|
||||
dnl For now, I'm assuming that the return type from _getshort is it.
|
||||
dnl
|
||||
AC_MSG_CHECKING(IP port type)
|
||||
AC_CACHE_VAL(pthread_cv_type_ipport,
|
||||
AC_TRY_COMPILE($arpa_headers,[ &_getshort; ],[
|
||||
for type in "unsigned short" "unsigned int" ; do
|
||||
AC_TRY_COMPILE($arpa_headers, extern $type _getshort ();,[
|
||||
pthread_cv_type_ipport="$type"
|
||||
break
|
||||
])
|
||||
done
|
||||
],[ AC_MSG_WARN(Can't compile _getshort reference.) ])
|
||||
if test "$pthread_cv_type_ipport" = "" ; then
|
||||
AC_MSG_WARN(Can't determine _getshort return type.)
|
||||
AC_MSG_WARN(Defaulting to unsigned short.)
|
||||
pthread_cv_type_ipport="unsigned short"
|
||||
fi
|
||||
)
|
||||
AC_MSG_RESULT($pthread_cv_type_ipport)
|
||||
AC_DEFINE_UNQUOTED(pthread_ipport_type,$pthread_cv_type_ipport)
|
||||
|
||||
dnl
|
||||
dnl Guess where terminal devices are stored. This is for use in the
|
||||
dnl ttyname() implementation provided here.
|
||||
dnl
|
||||
AC_MSG_CHECKING(pathname for terminal devices directory)
|
||||
AC_CACHE_VAL(pthread_cv_pty_path,
|
||||
if test -d /devices/pseudo ; then
|
||||
pty_path=/devices/pseudo/
|
||||
else
|
||||
pty_path=/dev/
|
||||
fi
|
||||
pthread_cv_pty_path=$pty_path
|
||||
)
|
||||
AC_DEFINE_UNQUOTED(_PATH_PTY,"$pthread_cv_pty_path")
|
||||
AC_MSG_RESULT($pthread_cv_pty_path)
|
||||
|
||||
dnl
|
||||
dnl Look for timezone info, for use in ctime.
|
||||
dnl
|
||||
AC_MSG_CHECKING(directory name for time zone info)
|
||||
tzdir=NONE
|
||||
for f in /usr/lib/zoneinfo /usr/share/zoneinfo /usr/share/lib/zoneinfo /etc/zoneinfo /usr/local/lib/zoneinfo
|
||||
do
|
||||
if test -d $f ; then
|
||||
tzdir=$f
|
||||
break
|
||||
fi
|
||||
done
|
||||
case $tzdir in
|
||||
NONE)
|
||||
AC_MSG_WARN(Can't find zoneinfo directory.)
|
||||
AC_MSG_WARN(Defaulting zoneinfo directory to NULL.)
|
||||
tzdir=NULL
|
||||
;;
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED(_PATH_TZDIR,"$tzdir")
|
||||
AC_MSG_RESULT($tzdir)
|
||||
|
||||
AC_MSG_CHECKING(filename for local time zone)
|
||||
tzfile=NONE
|
||||
for f in $tzdir/localtime /etc/localtime
|
||||
do
|
||||
if test -f $f ; then
|
||||
tzfile=$f
|
||||
break
|
||||
fi
|
||||
done
|
||||
case $tzfile in
|
||||
NONE) # Should this default to tzdir/localtime?
|
||||
AC_MSG_WARN(Can't find local time zone file.)
|
||||
if test tzdir = NULL ; then
|
||||
AC_MSG_WARN(Defaulting local time zone file to NULL)
|
||||
tzfile=NULL
|
||||
else
|
||||
AC_MSG_WARN(Defaulting local time zone file to $tzdir/localtime.)
|
||||
tzfile=$tzdir/localtime
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED(_PATH_TZFILE,"$tzfile")
|
||||
AC_MSG_RESULT($tzfile)
|
||||
|
||||
dnl
|
||||
dnl Network stuff. At the moment, I don't think there are any other
|
||||
dnl values we should expect. If we find a system that does store these
|
||||
dnl files elsewhere -- or doesn't have them all -- then run some tests.
|
||||
dnl
|
||||
AC_DEFINE(_PATH_RESCONF, "/etc/resolv.conf")
|
||||
AC_DEFINE(_PATH_HOSTS, "/etc/hosts")
|
||||
AC_DEFINE(_PATH_NETWORKS, "/etc/networks")
|
||||
AC_DEFINE(_PATH_PROTOCOLS, "/etc/protocols")
|
||||
AC_DEFINE(_PATH_SERVICES, "/etc/services")
|
||||
|
||||
dnl
|
||||
dnl Other stuff
|
||||
dnl
|
||||
AC_DEFINE(_PATH_BSHELL, "/bin/sh")
|
||||
|
||||
dnl If the system provides vfork, autoconf scripts will detect it.
|
||||
dnl So we should hide it.
|
||||
AC_CHECK_FUNCS(vfork)
|
||||
|
||||
srctop=`cd ${srcdir}/..;pwd`
|
||||
AC_SUBST(srctop)
|
||||
|
||||
# Now we deal with symlinks &c.
|
||||
|
||||
test -d include || mkdir include || \
|
||||
AC_MSG_ERROR(Can't create include directory.)
|
||||
|
||||
test -d include/pthread || mkdir include/pthread || \
|
||||
AC_MSG_ERROR(Can't create include/pthread directory.)
|
||||
|
||||
test -d lib || mkdir lib || \
|
||||
AC_MSG_ERROR(Can't create lib directory.)
|
||||
|
||||
test -d lib/libpthreadutil || mkdir lib/libpthreadutil || \
|
||||
AC_MSG_ERROR(Can't create lib/libpthreadutil directory.)
|
||||
|
||||
test -d bin || mkdir bin || \
|
||||
AC_MSG_ERROR(Can't create bin directory.)
|
||||
|
||||
test -d bin/finger || mkdir bin/finger || \
|
||||
AC_MSG_ERROR(Can't create bin directory.)
|
||||
|
||||
test -d tests || mkdir tests || \
|
||||
AC_MSG_ERROR(Can't create tests directory.)
|
||||
|
||||
if test x$syscall = xNONE ; then
|
||||
syscall=$name
|
||||
fi
|
||||
|
||||
links="include/pthread/machdep.h include/pthread/posix.h \
|
||||
machdep.c syscall.S"
|
||||
targets="../machdep/engine-$name.h ../machdep/posix-$sysincludes.h \
|
||||
../machdep/engine-$name.c ../machdep/syscall-$syscall.S"
|
||||
|
||||
# Both these targets are optional. (Autoconf-generated configure scripts
|
||||
# will require the existence of link targets, so check before adding them
|
||||
# to the list.)
|
||||
if test x$sysincludes != xNONE ; then
|
||||
links="$links include/sys"
|
||||
targets="$targets ../machdep/$sysincludes"
|
||||
fi
|
||||
|
||||
if test x$extraincludes != xNONE ; then
|
||||
for tmp in $extraincludes
|
||||
do
|
||||
links="$links include/$tmp"
|
||||
targets="$targets ../machdep/$sysincludes/extra/$tmp"
|
||||
done
|
||||
fi
|
||||
|
||||
syscall_file=../machdep/syscall-template-$syscall.S
|
||||
if test -r $srcdir/$syscall_file ; then
|
||||
links="$links syscall-template.S"
|
||||
targets="$targets $syscall_file"
|
||||
HAVE_SYSCALL_TEMPLATE=yes
|
||||
else
|
||||
# This really isn't a fatal problem. In fact, it's expected, initially,
|
||||
# for some targets. This is just to persuade people to fix the targets
|
||||
# they deal with to provide some sort of template.
|
||||
#
|
||||
# Eventually this file probably will be required...
|
||||
AC_MSG_WARN(No syscall template file syscall-template-$syscall.S found.)
|
||||
HAVE_SYSCALL_TEMPLATE=no
|
||||
fi
|
||||
AC_SUBST(HAVE_SYSCALL_TEMPLATE)
|
||||
|
||||
dnl Now tell it to make the links.
|
||||
dnl (The links are actually made by config.status.)
|
||||
AC_LINK_FILES($targets, $links)
|
||||
|
||||
if test x$makefile_frag != x ; then
|
||||
makefile_frag=${srcdir}/$makefile_frag
|
||||
else
|
||||
makefile_frag=/dev/null
|
||||
fi
|
||||
dnl Drop in file indicated by $makefile_frag on *the line after* the
|
||||
dnl magic @makefile_frag@ sequence.
|
||||
AC_SUBST_FILE(makefile_frag)
|
||||
|
||||
|
||||
dnl Generate output files...
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl This must be last.
|
||||
AC_OUTPUT(config.flags GNUmakefile Makefile \
|
||||
lib/Makefile:../lib/Makefile.in \
|
||||
lib/libpthreadutil/Makefile:../lib/libpthreadutil/Makefile.in \
|
||||
bin/Makefile:../bin/Makefile.in \
|
||||
bin/finger/Makefile:../bin/finger/Makefile.in \
|
||||
tests/Makefile:../tests/Makefile.in)
|
File diff suppressed because it is too large
Load Diff
@ -1,238 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
#
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
tranformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
18
mit-pthreads/configure
vendored
18
mit-pthreads/configure
vendored
@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This silliness is because Chris wants the autoconf-related files
|
||||
# and makefiles not to appear in the top-level directory. Fine by
|
||||
# me, I don't much care. This script just needs to invoke the real
|
||||
# configure script...
|
||||
|
||||
config=`echo $0 | sed -e 's,configure$,config/configure,'`
|
||||
|
||||
if test ! -d obj ; then
|
||||
mkdir obj
|
||||
fi
|
||||
|
||||
if test -n "$1" ; then
|
||||
sh $config "$@"
|
||||
else
|
||||
sh $config
|
||||
fi
|
@ -1,9 +0,0 @@
|
||||
# from: @(#)Makefile.inc 5.21 (Berkeley) 5/24/91
|
||||
# $Id$
|
||||
|
||||
# gen sources
|
||||
VPATH:= ${VPATH}:${srcdir}/gen
|
||||
|
||||
SRCS:= ttyname.c directory.c popen.c time.c ctime.c difftime.c syslog.c \
|
||||
eprintf.c getpwent.c getpwnamuid.c pwd_internal.c \
|
||||
getcwd.c getwd.c isatty.c $(SRCS)
|
@ -1,24 +0,0 @@
|
||||
# from: @(#)Makefile.inc 5.21 (Berkeley) 5/24/91
|
||||
# $Id$
|
||||
|
||||
# gen sources
|
||||
.PATH: ${srcdir}/gen
|
||||
|
||||
SRCS+= ttyname.c isatty.c directory.c popen.c time.c ctime.c difftime.c \
|
||||
syslog.c eprintf.c getpwent.c getpwnamuid.c pwd_internal.c
|
||||
|
||||
#SRCS+= alarm.c assert.c clock.c crypt.c ctermid.c ctype_.c \
|
||||
# disklabel.c err.c errlst.c exec.c fnmatch.c frexp.c \
|
||||
# fstab.c fts.c getcap.c getcwd.c getgrent.c getlogin.c getmntinfo.c \
|
||||
# getpass.c getpwent.c getsubopt.c getttyent.c getusershell.c glob.c \
|
||||
# infinity.c initgroups.c isatty.c isctype.c isinf.c mktemp.c nice.c \
|
||||
# nlist.c pause.c psignal.c raise.c \
|
||||
# scandir.c setjmperr.c \
|
||||
# setmode.c setrgid.c setruid.c siginterrupt.c \
|
||||
# siglist.c signal.c sigsetops.c syslog.c \
|
||||
# termios.c time.c times.c timezone.c ttyslot.c \
|
||||
# ualarm.c unvis.c utime.c valloc.c vis.c
|
||||
#
|
||||
# gen/regexp sources
|
||||
#SRCS+= regerror.c regexp.c regsub.c
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)difftime.c 5.2 (Berkeley) 6/1/90";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <pthread.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
double
|
||||
difftime(time1, time0)
|
||||
time_t time1, time0;
|
||||
{
|
||||
return(time1 - time0);
|
||||
}
|
@ -1,322 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1983 Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)closedir.c 5.9 (Berkeley) 2/23/91";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/*
|
||||
* One of these structures is malloced to describe the current directory
|
||||
* position each time telldir is called. It records the current magic
|
||||
* cookie returned by getdirentries and the offset within the buffer
|
||||
* associated with that return value.
|
||||
*/
|
||||
struct ddloc {
|
||||
struct ddloc *loc_next;/* next structure in list */
|
||||
long loc_index; /* key associated with structure */
|
||||
long loc_seek; /* magic cookie returned by getdirentries */
|
||||
long loc_loc; /* offset of entry in buffer */
|
||||
};
|
||||
|
||||
static long dd_loccnt = 0; /* Index of entry for sequential telldir's */
|
||||
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <dirent.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/*
|
||||
* close a directory.
|
||||
*/
|
||||
int closedir(DIR * dirp)
|
||||
{
|
||||
void *ptr, *nextptr;
|
||||
int fd;
|
||||
|
||||
pthread_mutex_lock (dirp->dd_lock);
|
||||
fd = dirp->dd_fd;
|
||||
dirp->dd_fd = -1;
|
||||
dirp->dd_loc = 0;
|
||||
for (ptr = (void *)dirp->dd_ddloc; ptr; ptr = nextptr) {
|
||||
nextptr = (void *)(((struct ddloc *)ptr)->loc_next);
|
||||
free(ptr);
|
||||
}
|
||||
for (ptr = (void *)dirp->dd_dp; ptr; ptr = nextptr) {
|
||||
nextptr = (void *)(((struct __dirent *)ptr)->next);
|
||||
free(ptr);
|
||||
}
|
||||
free((void *)dirp->dd_buf);
|
||||
free (dirp->dd_lock);
|
||||
free((void *)dirp);
|
||||
return(machdep_sys_close(fd));
|
||||
}
|
||||
|
||||
/*
|
||||
* open a directory.
|
||||
*/
|
||||
DIR * opendir(const char * name)
|
||||
{
|
||||
DIR *dirp;
|
||||
int fd;
|
||||
|
||||
if ((fd = machdep_sys_open(name, 0)) < 0)
|
||||
return NULL;
|
||||
if (machdep_sys_fcntl(fd, F_SETFD, 1) < 0 ||
|
||||
(dirp = (DIR *)malloc(sizeof(DIR))) == NULL) {
|
||||
machdep_sys_close (fd);
|
||||
return NULL;
|
||||
}
|
||||
dirp->dd_lock = (pthread_mutex_t*) malloc (sizeof (pthread_mutex_t));
|
||||
pthread_mutex_init (dirp->dd_lock, 0);
|
||||
/*
|
||||
* If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE
|
||||
* buffer that it cluster boundary aligned.
|
||||
* Hopefully this can be a big win someday by allowing page trades
|
||||
* to user space to be done by getdirentries()
|
||||
*/
|
||||
#ifndef CLSIZE
|
||||
#define CLSIZE 1
|
||||
#endif
|
||||
if ((CLSIZE % DIRBLKSIZ) == 0) {
|
||||
dirp->dd_buf = malloc(CLSIZE);
|
||||
dirp->dd_len = CLSIZE;
|
||||
} else {
|
||||
dirp->dd_buf = malloc(DIRBLKSIZ);
|
||||
dirp->dd_len = DIRBLKSIZ;
|
||||
}
|
||||
if (dirp->dd_buf == NULL) {
|
||||
machdep_sys_close (fd);
|
||||
free((void *)dirp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dirp->dd_ddloc = NULL;
|
||||
dirp->dd_dp = NULL;
|
||||
dirp->dd_seek = 0;
|
||||
dirp->dd_loc = 0;
|
||||
dirp->dd_fd = fd;
|
||||
return(dirp);
|
||||
}
|
||||
|
||||
/*
|
||||
* The real work in gettint the next entry in a directory.
|
||||
* Return
|
||||
* NULL on End of directory
|
||||
* &ERR on Error
|
||||
* dp on valid directory;
|
||||
*/
|
||||
static struct dirent ERR;
|
||||
static struct dirent * readdir_basic(DIR * dirp)
|
||||
{
|
||||
register struct dirent *dp;
|
||||
|
||||
for (;;) {
|
||||
if (dirp->dd_loc == 0) {
|
||||
dirp->dd_size = machdep_sys_getdirentries(dirp->dd_fd,
|
||||
dirp->dd_buf, dirp->dd_len, &dirp->dd_seek);
|
||||
if (dirp->dd_size < 0)
|
||||
return(&ERR);
|
||||
if (dirp->dd_size == 0)
|
||||
return(NULL);
|
||||
}
|
||||
if (dirp->dd_loc >= dirp->dd_size) {
|
||||
dirp->dd_loc = 0;
|
||||
continue;
|
||||
}
|
||||
dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc);
|
||||
if ((long)dp & 03) /* bogus pointer check */
|
||||
return(&ERR);
|
||||
if (dp->d_reclen <= 0 ||
|
||||
dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc)
|
||||
return(&ERR);
|
||||
dirp->dd_loc += dp->d_reclen;
|
||||
if (dp->d_ino == 0)
|
||||
continue;
|
||||
return(dp);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* POSIX.1 version of getting the next entry in a directory.
|
||||
*/
|
||||
struct dirent * readdir(DIR * dirp)
|
||||
{
|
||||
register struct dirent * rp;
|
||||
struct __dirent * my__dp;
|
||||
pthread_t self;
|
||||
|
||||
pthread_mutex_lock (dirp->dd_lock);
|
||||
|
||||
self = pthread_self();
|
||||
/* Allocate space and return */
|
||||
for (my__dp = dirp->dd_dp; my__dp; my__dp = my__dp->next) {
|
||||
if (pthread_equal(my__dp->owner, self)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (my__dp == NULL) {
|
||||
if (my__dp = (struct __dirent *)(malloc(sizeof(struct __dirent)))) {
|
||||
my__dp->next = dirp->dd_dp;
|
||||
dirp->dd_dp = my__dp;
|
||||
my__dp->owner = self;
|
||||
} else {
|
||||
pthread_mutex_unlock (dirp->dd_lock);
|
||||
return(NULL);
|
||||
}
|
||||
}
|
||||
if (rp = readdir_basic(dirp)) {
|
||||
if (rp != &ERR) {
|
||||
memcpy(& (my__dp->data), rp, sizeof(struct dirent));
|
||||
rp = & (my__dp->data);
|
||||
} else {
|
||||
rp = NULL;
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock (dirp->dd_lock);
|
||||
return(rp);
|
||||
}
|
||||
|
||||
/*
|
||||
* POSIX.4a version of getting the next entry in a directory.
|
||||
*/
|
||||
int readdir_r(DIR * dirp, struct dirent * entry, struct dirent ** result)
|
||||
{
|
||||
register struct dirent * rp;
|
||||
int ret;
|
||||
|
||||
pthread_mutex_lock (dirp->dd_lock);
|
||||
rp = readdir_basic(dirp);
|
||||
if (rp != &ERR) {
|
||||
if (rp) {
|
||||
memcpy(entry, rp, sizeof(struct dirent));
|
||||
*result = entry;
|
||||
ret = 0;
|
||||
} else {
|
||||
*result = NULL;
|
||||
ret = 0;
|
||||
}
|
||||
} else {
|
||||
/* Should get it from errno */
|
||||
ret = EBADF;
|
||||
}
|
||||
pthread_mutex_unlock (dirp->dd_lock);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
void rewinddir(DIR * dirp)
|
||||
{
|
||||
pthread_mutex_lock (dirp->dd_lock);
|
||||
(void)machdep_sys_lseek(dirp->dd_fd, 0, 0);
|
||||
dirp->dd_seek = 0;
|
||||
dirp->dd_loc = 0;
|
||||
pthread_mutex_unlock (dirp->dd_lock);
|
||||
}
|
||||
|
||||
/*
|
||||
* Seek to an entry in a directory.
|
||||
* _seekdir is in telldir.c so that it can share opaque data structures.
|
||||
*
|
||||
* Use the POSIX reentrant safe readdir_r to simplify varifying POSIX
|
||||
* thread-safe compliance.
|
||||
*/
|
||||
void seekdir(DIR * dirp, long loc)
|
||||
{
|
||||
register struct ddloc ** prevlp;
|
||||
register struct ddloc * lp;
|
||||
struct dirent * dp;
|
||||
struct dirent de;
|
||||
|
||||
pthread_mutex_lock (dirp->dd_lock);
|
||||
prevlp = (struct ddloc **)&(dirp->dd_ddloc);
|
||||
lp = *prevlp;
|
||||
while (lp != NULL) {
|
||||
if (lp->loc_index == loc)
|
||||
break;
|
||||
prevlp = &lp->loc_next;
|
||||
lp = lp->loc_next;
|
||||
}
|
||||
if (lp) {
|
||||
if (lp->loc_seek != dirp->dd_seek) {
|
||||
if (machdep_sys_lseek(dirp->dd_fd, lp->loc_seek, 0) < 0) {
|
||||
*prevlp = lp->loc_next;
|
||||
pthread_mutex_unlock (dirp->dd_lock);
|
||||
return;
|
||||
}
|
||||
dirp->dd_seek = lp->loc_seek;
|
||||
dirp->dd_loc = 0;
|
||||
while (dirp->dd_loc < lp->loc_loc) {
|
||||
if (readdir_r(dirp, &de, &dp)) {
|
||||
*prevlp = lp->loc_next;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock (dirp->dd_lock);
|
||||
}
|
||||
|
||||
/*
|
||||
* return a pointer into a directory
|
||||
*/
|
||||
long telldir(DIR *dirp)
|
||||
{
|
||||
struct ddloc *lp, **fakeout;
|
||||
int ret;
|
||||
|
||||
pthread_mutex_lock (dirp->dd_lock);
|
||||
if (lp = (struct ddloc *)malloc(sizeof(struct ddloc))) {
|
||||
lp->loc_index = dd_loccnt++;
|
||||
lp->loc_seek = dirp->dd_seek;
|
||||
lp->loc_loc = dirp->dd_loc;
|
||||
lp->loc_next = dirp->dd_ddloc;
|
||||
|
||||
/* Compiler won't let us change anything pointed to by db directly */
|
||||
/* So we fake to the left and do it anyway */
|
||||
/* Wonder if the compile optomizes it to the correct solution */
|
||||
fakeout = (struct ddloc **)&(dirp->dd_ddloc);
|
||||
*fakeout = lp;
|
||||
|
||||
ret = lp->loc_index;
|
||||
} else {
|
||||
ret = -1;
|
||||
}
|
||||
pthread_mutex_unlock (dirp->dd_lock);
|
||||
return(ret);
|
||||
}
|
||||
|
@ -1,18 +0,0 @@
|
||||
/* This function is a replacement for the version in libgcc.a. This
|
||||
is needed because typically libgcc.a won't have been compiled
|
||||
against the threads library, so its references to "stderr" will
|
||||
come out wrong. */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void __eprintf (const char *fmt, const char *expr, int line, const char *file)
|
||||
{
|
||||
/* Considering the very special circumstances where this function
|
||||
would be called, perhaps we might want to disable the thread
|
||||
scheduler and break any existing locks on stderr? Well, maybe if
|
||||
we could be sure that stderr was in a useable state... */
|
||||
fprintf (stderr, fmt, expr, line, file);
|
||||
fflush (stderr);
|
||||
|
||||
abort ();
|
||||
}
|
@ -1,248 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1989, 1991 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
/*static char *sccsid = "from: @(#)getcwd.c 5.11 (Berkeley) 2/24/91";*/
|
||||
static char *rcsid = "$Id$";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <pthread.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <dirent.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define ISDOT(dp) \
|
||||
(dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \
|
||||
dp->d_name[1] == '.' && dp->d_name[2] == '\0'))
|
||||
|
||||
|
||||
/* Only use reentrant safe routines to simplify varifying POSIX thread-safe
|
||||
* compliance. (mevans).
|
||||
*/
|
||||
|
||||
char *
|
||||
getcwd(pt, size)
|
||||
char *pt;
|
||||
size_t size;
|
||||
{
|
||||
register DIR *dir;
|
||||
register dev_t dev;
|
||||
register ino_t ino;
|
||||
register int first;
|
||||
register char *bpt, *bup;
|
||||
struct stat s;
|
||||
struct dirent *dp;
|
||||
struct dirent de;
|
||||
dev_t root_dev;
|
||||
ino_t root_ino;
|
||||
size_t ptsize, upsize;
|
||||
int save_errno;
|
||||
char *ept, *eup, *up;
|
||||
int namelen;
|
||||
|
||||
/*
|
||||
* If no buffer specified by the user, allocate one as necessary.
|
||||
* If a buffer is specified, the size has to be non-zero. The path
|
||||
* is built from the end of the buffer backwards.
|
||||
*/
|
||||
if (pt) {
|
||||
ptsize = 0;
|
||||
if (!size) {
|
||||
errno = EINVAL;
|
||||
return((char *)NULL);
|
||||
}
|
||||
ept = pt + size;
|
||||
} else {
|
||||
if (!(pt = (char *)malloc(ptsize = 1024 - 4)))
|
||||
return((char *)NULL);
|
||||
ept = pt + ptsize;
|
||||
}
|
||||
bpt = ept - 1;
|
||||
*bpt = '\0';
|
||||
|
||||
/*
|
||||
* Allocate bytes (1024 - malloc space) for the string of "../"'s.
|
||||
* Should always be enough (it's 340 levels). If it's not, allocate
|
||||
* as necessary. Special * case the first stat, it's ".", not "..".
|
||||
*/
|
||||
if (!(up = (char *)malloc(upsize = 1024 - 4)))
|
||||
goto err;
|
||||
eup = up + MAXPATHLEN;
|
||||
bup = up;
|
||||
up[0] = '.';
|
||||
up[1] = '\0';
|
||||
|
||||
/* Save root values, so know when to stop. */
|
||||
if (stat("/", &s))
|
||||
goto err;
|
||||
root_dev = s.st_dev;
|
||||
root_ino = s.st_ino;
|
||||
|
||||
SET_ERRNO(0);
|
||||
|
||||
for (first = 1;; first = 0) {
|
||||
/* Stat the current level. */
|
||||
if (lstat(up, &s))
|
||||
goto err;
|
||||
|
||||
/* Save current node values. */
|
||||
ino = s.st_ino;
|
||||
dev = s.st_dev;
|
||||
|
||||
/* Check for reaching root. */
|
||||
if (root_dev == dev && root_ino == ino) {
|
||||
*--bpt = '/';
|
||||
/*
|
||||
* It's unclear that it's a requirement to copy the
|
||||
* path to the beginning of the buffer, but it's always
|
||||
* been that way and stuff would probably break.
|
||||
*/
|
||||
/* XXX was bcopy */
|
||||
(void)memcpy(pt, bpt, ept - bpt);
|
||||
free(up);
|
||||
return(pt);
|
||||
}
|
||||
|
||||
/*
|
||||
* Build pointer to the parent directory, allocating memory
|
||||
* as necessary. Max length is 3 for "../", the largest
|
||||
* possible component name, plus a trailing NULL.
|
||||
*/
|
||||
if (bup + 3 + MAXNAMLEN + 1 >= eup) {
|
||||
if (!(up = (char *)realloc(up, upsize *= 2)))
|
||||
goto err;
|
||||
eup = up + upsize;
|
||||
}
|
||||
*bup++ = '.';
|
||||
*bup++ = '.';
|
||||
*bup = '\0';
|
||||
|
||||
/* Open and stat parent directory. */
|
||||
/* XXX opendir() returns kernel fd's instead of
|
||||
pthread fd's for some odd reason, so we must
|
||||
break the abstraction boundry here as well or
|
||||
fix everything in opendir et al. SNL */
|
||||
if (!(dir = opendir(up)) ||
|
||||
machdep_sys_fstat(dirfd(dir), &s))
|
||||
goto err;
|
||||
|
||||
/* Add trailing slash for next directory. */
|
||||
*bup++ = '/';
|
||||
|
||||
/*
|
||||
* If it's a mount point, have to stat each element because
|
||||
* the inode number in the directory is for the entry in the
|
||||
* parent directory, not the inode number of the mounted file.
|
||||
*/
|
||||
save_errno = 0;
|
||||
if (s.st_dev == dev) {
|
||||
for (;;) {
|
||||
if (readdir_r(dir, &de, &dp))
|
||||
goto notfound;
|
||||
if (dp->d_fileno == ino)
|
||||
break;
|
||||
}
|
||||
} else
|
||||
for (;;) {
|
||||
if (readdir_r(dir, &de, &dp))
|
||||
goto notfound;
|
||||
if (ISDOT(dp))
|
||||
continue;
|
||||
memcpy(bup, dp->d_name, strlen(dp->d_name) + 1);
|
||||
|
||||
/* Save the first error for later. */
|
||||
if (lstat(up, &s)) {
|
||||
if (!save_errno)
|
||||
save_errno = errno;
|
||||
SET_ERRNO(0);
|
||||
continue;
|
||||
}
|
||||
if (s.st_dev == dev && s.st_ino == ino)
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for length of the current name, preceding slash,
|
||||
* leading slash.
|
||||
*/
|
||||
namelen = strlen(dp->d_name);
|
||||
if (bpt - pt <= namelen + (first ? 1 : 2)) {
|
||||
size_t len, off;
|
||||
|
||||
if (!ptsize) {
|
||||
SET_ERRNO(ERANGE);
|
||||
goto err;
|
||||
}
|
||||
off = bpt - pt;
|
||||
len = ept - bpt;
|
||||
if (!(pt = (char *)realloc(pt, ptsize *= 2)))
|
||||
goto err;
|
||||
bpt = pt + off;
|
||||
ept = pt + ptsize;
|
||||
/* XXX was bcopy */
|
||||
(void)memcpy(ept - len, bpt, len);
|
||||
bpt = ept - len;
|
||||
}
|
||||
if (!first)
|
||||
*--bpt = '/';
|
||||
bpt -= namelen;
|
||||
memcpy(bpt, dp->d_name, namelen);
|
||||
(void)closedir(dir);
|
||||
|
||||
/* Truncate any file name. */
|
||||
*bup = '\0';
|
||||
}
|
||||
|
||||
notfound:
|
||||
/*
|
||||
* If readdir set errno, use it, not any saved error; otherwise,
|
||||
* didn't find the current directory in its parent directory, set
|
||||
* errno to ENOENT.
|
||||
*/
|
||||
if (!errno) {
|
||||
if (!save_errno)
|
||||
save_errno = ENOENT;
|
||||
SET_ERRNO(save_errno);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
err:
|
||||
if (ptsize)
|
||||
free(pt);
|
||||
free(up);
|
||||
return((char *)NULL);
|
||||
}
|
@ -1,109 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1984 Regents of the University of California.
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)getpwent.c 5.2 (Berkeley) 3/9/86";
|
||||
#endif
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#include <pwd.h>
|
||||
#include "pwd_internal.h"
|
||||
|
||||
void
|
||||
setpwent()
|
||||
{
|
||||
pwf_context_t *_data;
|
||||
|
||||
_data = _pw_get_data();
|
||||
|
||||
if (_data) {
|
||||
if (_data->pwf == NULL)
|
||||
_data->pwf = fopen(_data->pw_file, "r");
|
||||
else
|
||||
rewind(_data->pwf);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
endpwent()
|
||||
{
|
||||
pwf_context_t *_data;
|
||||
|
||||
_data = _pw_get_data();
|
||||
|
||||
if (_data) {
|
||||
if (_data->pwf != NULL) {
|
||||
fclose(_data->pwf);
|
||||
_data->pwf = NULL;
|
||||
}
|
||||
#ifdef DBM_PWD_SUPPORT
|
||||
if (_data->pw_db != (DBM *)0) {
|
||||
dbm_close(_data->pw_db);
|
||||
_data->pw_db = (DBM *)0;
|
||||
_data->pw_stayopen = 0;
|
||||
}
|
||||
#endif /* DBM_PWD_SUPPORT */
|
||||
}
|
||||
}
|
||||
|
||||
static char *
|
||||
pwskip(p)
|
||||
char *p;
|
||||
{
|
||||
while (*p && *p != ':' && *p != '\n')
|
||||
++p;
|
||||
if (*p)
|
||||
*p++ = 0;
|
||||
return(p);
|
||||
}
|
||||
|
||||
struct passwd *
|
||||
getpwent()
|
||||
{
|
||||
pwf_context_t *_data;
|
||||
char *p;
|
||||
|
||||
_data = _pw_get_data();
|
||||
if (!_data)
|
||||
return 0;
|
||||
|
||||
if (_data->pwf == NULL) {
|
||||
if ((_data->pwf = fopen(_data->pw_file, "r" )) == NULL)
|
||||
return(0);
|
||||
}
|
||||
p = fgets(_data->line, BUFSIZ, _data->pwf);
|
||||
if (p == NULL)
|
||||
return(0);
|
||||
_data->passwd.pw_name = p;
|
||||
p = pwskip(p);
|
||||
_data->passwd.pw_passwd = p;
|
||||
p = pwskip(p);
|
||||
_data->passwd.pw_uid = atoi(p);
|
||||
p = pwskip(p);
|
||||
_data->passwd.pw_gid = atoi(p);
|
||||
p = pwskip(p);
|
||||
_data->passwd.pw_gecos = p;
|
||||
p = pwskip(p);
|
||||
_data->passwd.pw_dir = p;
|
||||
p = pwskip(p);
|
||||
_data->passwd.pw_shell = p;
|
||||
while (*p && *p != '\n')
|
||||
p++;
|
||||
*p = '\0';
|
||||
return(&_data->passwd);
|
||||
}
|
||||
|
||||
void
|
||||
setpwfile(file)
|
||||
char *file;
|
||||
{
|
||||
pwf_context_t *_data;
|
||||
|
||||
_data = _pw_get_data();
|
||||
if (_data)
|
||||
_data->pw_file = file;
|
||||
}
|
@ -1,138 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1983 Regents of the University of California.
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)getpwnamuid.c 5.3 (Berkeley) 12/21/87";
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <pwd.h>
|
||||
#include <sys/file.h>
|
||||
#include "pwd_internal.h"
|
||||
|
||||
/*
|
||||
* The following are shared with getpwent.c
|
||||
*/
|
||||
|
||||
#ifdef DBM_PWD_SUPPORT
|
||||
static struct passwd *
|
||||
fetchpw(key)
|
||||
datum key;
|
||||
{
|
||||
char *cp, *tp;
|
||||
pwf_context_t *_data;
|
||||
|
||||
_data = _pw_get_data();
|
||||
if (!_data)
|
||||
return 0;
|
||||
if (key.dptr == 0)
|
||||
return ((struct passwd *)NULL);
|
||||
key = dbm_fetch(_data->pw_db, key);
|
||||
if (key.dptr == 0)
|
||||
return ((struct passwd *)NULL);
|
||||
cp = key.dptr;
|
||||
tp = _data->line;
|
||||
|
||||
#define EXPAND(e) _data->passwd.e = tp; while (*tp++ = *cp++);
|
||||
EXPAND(pw_name);
|
||||
EXPAND(pw_passwd);
|
||||
memcpy((char *)&_data->passwd.pw_uid, cp, sizeof (int));
|
||||
cp += sizeof (int);
|
||||
memcpy((char *)&_data->passwd.pw_gid, cp, sizeof (int));
|
||||
cp += sizeof (int);
|
||||
EXPAND(pw_gecos);
|
||||
EXPAND(pw_dir);
|
||||
EXPAND(pw_shell);
|
||||
return (&_data->passwd);
|
||||
}
|
||||
#endif /* DBM_PWD_SUPPORT */
|
||||
|
||||
struct passwd *
|
||||
getpwnam(nam)
|
||||
const char *nam;
|
||||
{
|
||||
#ifdef DBM_PWD_SUPPORT
|
||||
datum key;
|
||||
#endif
|
||||
struct passwd *pw, *getpwent();
|
||||
pwf_context_t *_data;
|
||||
|
||||
_data = _pw_get_data();
|
||||
if (!_data)
|
||||
return 0;
|
||||
|
||||
#ifdef DBM_PWD_SUPPORT
|
||||
if (_data->pw_db == (DBM *)0 &&
|
||||
(_data->pw_db = dbm_open(_data->pw_file, O_RDONLY)) == (DBM *)0) {
|
||||
oldcode:
|
||||
#endif
|
||||
setpwent();
|
||||
while ((pw = getpwent()) && strcmp(nam, pw->pw_name))
|
||||
;
|
||||
if (!_data->pw_stayopen)
|
||||
endpwent();
|
||||
return (pw);
|
||||
#ifdef DBM_PWD_SUPPORT
|
||||
}
|
||||
if (flock(dbm_dirfno(_data->pw_db), LOCK_SH) < 0) {
|
||||
dbm_close(_data->pw_db);
|
||||
_data->pw_db = (DBM *)0;
|
||||
goto oldcode;
|
||||
}
|
||||
key.dptr = nam;
|
||||
key.dsize = strlen(nam);
|
||||
pw = fetchpw(key);
|
||||
(void) flock(dbm_dirfno(_data->pw_db), LOCK_UN);
|
||||
if (!_data->pw_stayopen) {
|
||||
dbm_close(_data->pw_db);
|
||||
_data->pw_db = (DBM *)0;
|
||||
}
|
||||
return (pw);
|
||||
#endif
|
||||
}
|
||||
|
||||
struct passwd *
|
||||
getpwuid(uid)
|
||||
uid_t uid;
|
||||
{
|
||||
#ifdef DBM_PWD_SUPPORT
|
||||
datum key;
|
||||
#endif
|
||||
struct passwd *pw, *getpwent();
|
||||
pwf_context_t *_data;
|
||||
|
||||
_data = _pw_get_data();
|
||||
if (!_data)
|
||||
return 0;
|
||||
#ifdef DBM_PWD_SUPPORT
|
||||
if (_data->pw_db == (DBM *)0 &&
|
||||
(_data->pw_db = dbm_open(_data->pw_file, O_RDONLY)) == (DBM *)0) {
|
||||
oldcode:
|
||||
#endif
|
||||
setpwent();
|
||||
while ((pw = getpwent()) && pw->pw_uid != uid)
|
||||
;
|
||||
if (!_data->pw_stayopen)
|
||||
endpwent();
|
||||
return (pw);
|
||||
#ifdef DBM_PWD_SUPPORT
|
||||
}
|
||||
if (flock(dbm_dirfno(_data->pw_db), LOCK_SH) < 0) {
|
||||
dbm_close(_data->pw_db);
|
||||
_data->pw_db = (DBM *)0;
|
||||
goto oldcode;
|
||||
}
|
||||
key.dptr = (char *) &uid;
|
||||
key.dsize = sizeof uid;
|
||||
pw = fetchpw(key);
|
||||
(void) flock(dbm_dirfno(_data->pw_db), LOCK_UN);
|
||||
if (!_data->pw_stayopen) {
|
||||
dbm_close(_data->pw_db);
|
||||
_data->pw_db = (DBM *)0;
|
||||
}
|
||||
return (pw);
|
||||
#endif
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
/*static char *sccsid = "from: @(#)getwd.c 5.1 (Berkeley) 2/20/91";*/
|
||||
static char *rcsid = "$Id$";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <pthread.h>
|
||||
#include <sys/param.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
char *
|
||||
getwd(buf)
|
||||
char *buf;
|
||||
{
|
||||
char *p;
|
||||
char *strerror();
|
||||
|
||||
if (p = getcwd(buf, MAXPATHLEN))
|
||||
return(p);
|
||||
(void)strcpy(buf, strerror(errno));
|
||||
return((char *)NULL);
|
||||
}
|
@ -1,95 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1988 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
/*static char *sccsid = "from: @(#)isatty.c 5.6 (Berkeley) 2/23/91";*/
|
||||
static char *rcsid = "$Id$";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <pthread.h>
|
||||
#ifdef sunos4
|
||||
#include <sys/termio.h>
|
||||
#else
|
||||
#include <termios.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
|
||||
/*
|
||||
* If TIOCGETA is not defined try TCGETATTR
|
||||
* If TCGETATTR is not defined try TCGETA
|
||||
* If that doesn't work try getting it from termio.h
|
||||
*/
|
||||
#ifndef TIOCGETA
|
||||
#ifdef TCGETATTR
|
||||
#define TIOCGETA TCGETATTR
|
||||
#else
|
||||
#ifndef TCGETA
|
||||
#include <termio.h>
|
||||
#endif
|
||||
#ifndef TIOCGETA
|
||||
#define TIOCGETA TCGETA
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* fd is the real fd to pass to the kernel */
|
||||
int isatty_basic(int fd)
|
||||
{
|
||||
#ifdef sunos4
|
||||
struct termio t;
|
||||
#else /* !sunos4 */
|
||||
struct termios t;
|
||||
#endif /* sunos4 */
|
||||
return (machdep_sys_ioctl(fd,
|
||||
#ifdef sunos4
|
||||
TCGETA,
|
||||
#else /* !sunos4 */
|
||||
TIOCGETA,
|
||||
#endif /* sunos4 */
|
||||
&t) ? 0 : 1);
|
||||
}
|
||||
|
||||
int isatty(int fd)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if ((ret = fd_lock(fd, FD_READ, NULL)) == OK) {
|
||||
ret = isatty_basic(fd_table[fd]->fd.i);
|
||||
fd_unlock(fd, FD_READ);
|
||||
} else {
|
||||
/* Return 0 or 1 */
|
||||
ret = 0;
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
@ -1,117 +0,0 @@
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
static pid_t *pids = NULL;
|
||||
static int pids_size = 0;
|
||||
static int pids_top = 0;
|
||||
static pthread_mutex_t pids_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
FILE *popen(const char *cmd, const char *mode)
|
||||
{
|
||||
int fds[2], parent_fd, child_fd, child_target, new_size, i;
|
||||
pid_t pid, *new_pids;
|
||||
|
||||
/* Verify the mode. */
|
||||
if ((*mode != 'r' && *mode != 'w') || mode[1] != 0)
|
||||
return NULL;
|
||||
|
||||
/* Generate fds, and choose the parent and child fds. */
|
||||
if (pipe(fds) < 0)
|
||||
return NULL;
|
||||
parent_fd = (*mode == 'r') ? fds[0] : fds[1];
|
||||
child_fd = (*mode == 'r') ? fds[1] : fds[0];
|
||||
|
||||
/* Ensure that there is space in the pid table. */
|
||||
pthread_mutex_lock(&pids_lock);
|
||||
if (pids_size <= parent_fd) {
|
||||
new_size = parent_fd + 1;
|
||||
if ((new_pids = malloc(new_size * sizeof(pid_t))) == NULL) {
|
||||
pthread_mutex_unlock(&pids_lock);
|
||||
close(parent_fd);
|
||||
close(child_fd);
|
||||
return NULL;
|
||||
}
|
||||
if (pids) {
|
||||
memcpy(new_pids, pids, pids_size * sizeof(pid_t));
|
||||
free(pids);
|
||||
}
|
||||
while (pids_size < new_size)
|
||||
new_pids[pids_size++] = -1;
|
||||
pids = new_pids;
|
||||
}
|
||||
pthread_mutex_unlock(&pids_lock);
|
||||
|
||||
/* Fork off a child process. */
|
||||
switch (pid = fork()) {
|
||||
case -1: /* Failed to fork. */
|
||||
close(parent_fd);
|
||||
close(child_fd);
|
||||
return NULL;
|
||||
break;
|
||||
case 0: /* Child */
|
||||
/*
|
||||
* Set the child fd to stdout or stdin as appropriate,
|
||||
* and close the parent fd.
|
||||
*/
|
||||
child_target = (*mode == 'r') ? STDOUT_FILENO : STDIN_FILENO;
|
||||
if (child_fd != child_target) {
|
||||
dup2(child_fd, child_target);
|
||||
close(child_fd);
|
||||
}
|
||||
close(parent_fd);
|
||||
|
||||
/* Close all parent fds from previous popens(). */
|
||||
for (i = 0; i < pids_top; i++) {
|
||||
if (pids[i] != -1)
|
||||
close(i);
|
||||
}
|
||||
|
||||
execl("/bin/sh", "sh", "-c", cmd, NULL);
|
||||
exit(1);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Record the parent fd in the pids table. */
|
||||
pthread_mutex_lock(&pids_lock);
|
||||
pids[parent_fd] = pid;
|
||||
if (pids_top < parent_fd + 1)
|
||||
pids_top = parent_fd + 1;
|
||||
pthread_mutex_unlock(&pids_lock);
|
||||
|
||||
/* Close the child fd and return a stdio buffer for the parent fd. */
|
||||
close(child_fd);
|
||||
return fdopen(parent_fd, mode);
|
||||
}
|
||||
|
||||
int pclose(fp)
|
||||
FILE *fp;
|
||||
{
|
||||
pid_t pid, result;
|
||||
int fd, pstat;
|
||||
|
||||
fd = fileno(fp);
|
||||
pthread_mutex_lock(&pids_lock);
|
||||
/* Make sure this is a popened file. */
|
||||
if ((pids_top <= fd) || ((pid = pids[fd]) == -1)) {
|
||||
pthread_mutex_unlock(&pids_lock);
|
||||
return -1;
|
||||
}
|
||||
pids[fd] = -1;
|
||||
while (pids_top > 0 && pids[pids_top - 1] == -1)
|
||||
pids_top--;
|
||||
pthread_mutex_unlock(&pids_lock);
|
||||
|
||||
fclose(fp);
|
||||
|
||||
/* Wait for the subprocess to quit. */
|
||||
return (((result = waitpid(pid, &pstat, 0)) == -1) ? -1 : pstat);
|
||||
}
|
||||
|
@ -1,97 +0,0 @@
|
||||
/* ==== pwd_internal.c ============================================================
|
||||
* Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* Description : Thread-safe password hacking functions.
|
||||
*
|
||||
* 1.00 95/02/08 snl
|
||||
* -Started coding this file.
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <pwd.h>
|
||||
#include <unistd.h>
|
||||
#include "pwd_internal.h"
|
||||
|
||||
static pthread_once_t __pw_init = PTHREAD_ONCE_INIT;
|
||||
static pthread_key_t __pw_key;
|
||||
|
||||
void
|
||||
_pw_null_cleanup(void *junkola)
|
||||
{
|
||||
pwf_context_t *x = (pwf_context_t *)junkola;
|
||||
|
||||
if (x) {
|
||||
if (x->pwf) {
|
||||
fclose(x->pwf);
|
||||
x->pwf = 0;
|
||||
}
|
||||
#ifdef DBM_PWD_SUPPORT
|
||||
if (x->pw_db) {
|
||||
dbm_close(x->pw_db);
|
||||
x->pw_db = 0;
|
||||
}
|
||||
#endif /* DBM_PWD_SUPPORT */
|
||||
free((void *)x);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_pw_create_key()
|
||||
{
|
||||
if (pthread_key_create(&__pw_key, _pw_null_cleanup)) {
|
||||
PANIC();
|
||||
}
|
||||
}
|
||||
|
||||
pwf_context_t *
|
||||
_pw_get_data()
|
||||
{
|
||||
pwf_context_t *_data;
|
||||
|
||||
pthread_once(&__pw_init, _pw_create_key);
|
||||
_data = (pwf_context_t *)pthread_getspecific(__pw_key);
|
||||
if (!_data) {
|
||||
_data = (pwf_context_t *)malloc(sizeof(pwf_context_t));
|
||||
if (_data) {
|
||||
_data->pwf = 0;
|
||||
_data->line[0] = '\0';
|
||||
_data->pw_stayopen = 0;
|
||||
_data->pw_file = "/etc/passwd";
|
||||
#ifdef DBM_PWD_SUPPORT
|
||||
_data->pw_db = 0;
|
||||
#endif /* DBM_PWD_SUPPORT */
|
||||
pthread_setspecific(__pw_key, (void *)_data);
|
||||
}
|
||||
}
|
||||
return _data;
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
#ifndef _PWD_INTERNAL_H_
|
||||
#define _PWD_INTERNAL_H_
|
||||
|
||||
#if 0 /* Turn this off for now until we suck in ndbm or use gdbm -- SNL */
|
||||
#ifndef DBM_PWD_SUPPORT
|
||||
#if !defined(__alpha) && !defined(linux) && !defined(hpux)
|
||||
#define DBM_PWD_SUPPORT 1
|
||||
#endif /* !alpha && !linux && !hpux */
|
||||
#endif /* !DBM_PWD_SUPPORT */
|
||||
#endif
|
||||
|
||||
#ifdef DBM_PWD_SUPPORT
|
||||
#include <ndbm.h>
|
||||
#endif /* DBM_PWD_SUPPORT */
|
||||
|
||||
typedef struct pwf_context {
|
||||
FILE *pwf;
|
||||
char line[BUFSIZ+1];
|
||||
struct passwd passwd;
|
||||
int pw_stayopen;
|
||||
char *pw_file;
|
||||
#ifdef DBM_PWD_SUPPORT
|
||||
DBM *pw_db;
|
||||
#endif /* DBM_PWD_SUPPORT */
|
||||
} pwf_context_t;
|
||||
|
||||
pwf_context_t *_pw_get_data __P_((void));
|
||||
|
||||
#endif /* _PWD_INTERNAL_H_ */
|
@ -1,216 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1983, 1988 Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted
|
||||
* provided that this notice is preserved and that due credit is given
|
||||
* to the University of California at Berkeley. The name of the University
|
||||
* may not be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission. This software
|
||||
* is provided ``as is'' without express or implied warranty.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)syslog.c 5.14 (Berkeley) 5/20/88";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
||||
/*
|
||||
* SYSLOG -- print message on log file
|
||||
*
|
||||
* This routine looks a lot like printf, except that it
|
||||
* outputs to the log file instead of the standard output.
|
||||
* Also:
|
||||
* adds a timestamp,
|
||||
* prints the module name in front of the message,
|
||||
* has some other formatting types (or will sometime),
|
||||
* adds a newline on the end of the message.
|
||||
*
|
||||
* The output of this routine is intended to be read by /etc/syslogd.
|
||||
*
|
||||
* Author: Eric Allman
|
||||
* Modified to use UNIX domain IPC by Ralph Campbell
|
||||
* Modified for pthreads and made more POSIX-compliant by Greg Hudson
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <syslog.h>
|
||||
|
||||
int socket();
|
||||
char *strerror(int); /* For systems that don't prototype it */
|
||||
|
||||
#define MAXLINE 1024 /* max message size */
|
||||
|
||||
#define PRIFAC(p) (((p) & LOG_FACMASK) >> 3)
|
||||
/* XXX should be in <syslog.h> */
|
||||
#define IMPORTANT LOG_ERR
|
||||
|
||||
static void basic_init(void);
|
||||
|
||||
static char _log_name[] = "/dev/log";
|
||||
static char ctty[] = "/dev/console";
|
||||
|
||||
static int LogFile = -1; /* fd for log */
|
||||
static int LogStat = 0; /* status bits, set by openlog() */
|
||||
static char *LogTag = "syslog"; /* string to tag the entry with */
|
||||
static int LogMask = 0xff; /* mask of priorities to be logged */
|
||||
static int LogFacility = LOG_USER; /* default facility code */
|
||||
|
||||
static pthread_mutex_t basic_init_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
static struct sockaddr SyslogAddr; /* AF_UNIX address of local logger */
|
||||
|
||||
static void basic_init()
|
||||
{
|
||||
pthread_mutex_lock(&basic_init_lock);
|
||||
if (LogFile < 0)
|
||||
openlog(LogTag, LogStat | LOG_NDELAY, 0);
|
||||
pthread_mutex_unlock(&basic_init_lock);
|
||||
}
|
||||
|
||||
void syslog(int pri, char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
vsyslog(pri, fmt, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
void vsyslog(int pri, char *fmt, va_list args)
|
||||
{
|
||||
char buf[MAXLINE + 1], outline[MAXLINE + 1];
|
||||
register char *b, *f, *o;
|
||||
register int c;
|
||||
time_t now;
|
||||
int olderrno = errno, fd;
|
||||
|
||||
/* Do a basic initialization if user didn't call openlog(). */
|
||||
if (LogFile < 0)
|
||||
basic_init();
|
||||
|
||||
/* see if we should just throw out this message */
|
||||
if ((unsigned) PRIFAC(pri) >= LOG_NFACILITIES ||
|
||||
(LOG_MASK(pri & LOG_PRIMASK) & LogMask) == 0 ||
|
||||
(pri &~ (LOG_PRIMASK|LOG_FACMASK)) != 0)
|
||||
return;
|
||||
|
||||
/* set default facility if none specified */
|
||||
if ((pri & LOG_FACMASK) == 0)
|
||||
pri |= LogFacility;
|
||||
|
||||
/* build the message */
|
||||
o = outline;
|
||||
(void)sprintf(o, "<%d>", pri);
|
||||
o += strlen(o);
|
||||
time(&now);
|
||||
(void)sprintf(o, "%.15s ", ctime(&now) + 4);
|
||||
o += strlen(o);
|
||||
if (LogTag) {
|
||||
strcpy(o, LogTag);
|
||||
o += strlen(o);
|
||||
}
|
||||
if (LogStat & LOG_PID) {
|
||||
(void)sprintf(o, "[%d]", getpid());
|
||||
o += strlen(o);
|
||||
}
|
||||
if (LogTag) {
|
||||
strcpy(o, ": ");
|
||||
o += 2;
|
||||
}
|
||||
|
||||
b = buf;
|
||||
f = fmt;
|
||||
while ((c = *f++) != '\0' && c != '\n' && b < &buf[MAXLINE]) {
|
||||
char *strerror();
|
||||
|
||||
if (c != '%') {
|
||||
*b++ = c;
|
||||
continue;
|
||||
}
|
||||
if ((c = *f++) != 'm') {
|
||||
*b++ = '%';
|
||||
*b++ = c;
|
||||
continue;
|
||||
}
|
||||
strcpy(b, strerror(olderrno));
|
||||
b += strlen(b);
|
||||
}
|
||||
*b++ = '\n';
|
||||
*b = '\0';
|
||||
vsprintf(o, buf, args);
|
||||
c = strlen(outline);
|
||||
if (c > MAXLINE)
|
||||
c = MAXLINE;
|
||||
|
||||
/* output the message to the local logger */
|
||||
if (sendto(LogFile, outline, c, 0, &SyslogAddr, sizeof SyslogAddr) >= 0)
|
||||
return;
|
||||
if (!(LogStat & LOG_CONS))
|
||||
return;
|
||||
|
||||
/* output the message to the console */
|
||||
fd = open(ctty, O_WRONLY);
|
||||
alarm(0);
|
||||
strcat(o, "\r");
|
||||
o = strchr(outline, '>') + 1;
|
||||
write(fd, o, c + 1 - (o - outline));
|
||||
close(fd);
|
||||
}
|
||||
|
||||
/*
|
||||
* OPENLOG -- open system log
|
||||
*/
|
||||
|
||||
void openlog(char *ident, int logstat, int logfac)
|
||||
{
|
||||
int flags;
|
||||
|
||||
if (ident != NULL)
|
||||
LogTag = ident;
|
||||
LogStat = logstat;
|
||||
if (logfac != 0 && (logfac &~ LOG_FACMASK) == 0)
|
||||
LogFacility = logfac;
|
||||
if (LogFile >= 0)
|
||||
return;
|
||||
SyslogAddr.sa_family = AF_UNIX;
|
||||
strncpy(SyslogAddr.sa_data, _log_name, sizeof SyslogAddr.sa_data);
|
||||
if (LogStat & LOG_NDELAY) {
|
||||
LogFile = socket(AF_UNIX, SOCK_DGRAM, 0);
|
||||
flags = fcntl(LogFile, F_GETFD);
|
||||
fcntl(LogFile, F_SETFD, flags & O_NONBLOCK);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* CLOSELOG -- close the system log
|
||||
*/
|
||||
|
||||
void closelog()
|
||||
{
|
||||
(void) close(LogFile);
|
||||
LogFile = -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* SETLOGMASK -- set the log mask level
|
||||
*/
|
||||
int setlogmask(int pmask)
|
||||
{
|
||||
int omask;
|
||||
|
||||
omask = LogMask;
|
||||
if (pmask != 0)
|
||||
LogMask = pmask;
|
||||
return (omask);
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1983 Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)time.c 5.6 (Berkeley) 6/1/90";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <pthread.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
time_t time(time_t * t)
|
||||
{
|
||||
struct timeval tt;
|
||||
|
||||
if (gettimeofday(&tt, (struct timezone *)0) < 0)
|
||||
return(-1);
|
||||
if (t)
|
||||
*t = tt.tv_sec;
|
||||
return(tt.tv_sec);
|
||||
}
|
@ -1,147 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1988 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)ttyname.c 5.10 (Berkeley) 5/6/91";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "config.h"
|
||||
#include <pthread.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
static pthread_mutex_t ttyname_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
static pthread_key_t ttyname_key;
|
||||
static int ttyname_init = 0;
|
||||
extern void free();
|
||||
|
||||
char * __ttyname_r_basic(int fd, char * buf, size_t len)
|
||||
{
|
||||
register struct dirent *dirp;
|
||||
register DIR *dp;
|
||||
struct stat dsb;
|
||||
struct stat sb;
|
||||
char * rval;
|
||||
int minlen;
|
||||
|
||||
rval = NULL;
|
||||
|
||||
/* Must be a terminal. */
|
||||
if (! isatty_basic(fd))
|
||||
return(rval);
|
||||
/* Must be a character device. */
|
||||
if (machdep_sys_fstat(fd, &sb) || !S_ISCHR(sb.st_mode))
|
||||
return(rval);
|
||||
/* Must have enough room */
|
||||
if (len <= sizeof(_PATH_PTY))
|
||||
return(rval);
|
||||
|
||||
if ((dp = opendir(_PATH_PTY)) != NULL) {
|
||||
memcpy(buf, _PATH_PTY, sizeof(_PATH_PTY));
|
||||
for (rval = NULL; dirp = readdir(dp);) {
|
||||
if (dirp->d_fileno != sb.st_ino)
|
||||
continue;
|
||||
minlen = (len - (sizeof(_PATH_PTY) - 1)) < (dirp->d_namlen + 1) ?
|
||||
(len - (sizeof(_PATH_PTY) - 1)) : (dirp->d_namlen + 1);
|
||||
memcpy (buf + sizeof(_PATH_PTY) - 1, dirp->d_name, minlen);
|
||||
if (stat(buf, &dsb) || sb.st_dev != dsb.st_dev ||
|
||||
sb.st_ino != dsb.st_ino)
|
||||
continue;
|
||||
rval = buf;
|
||||
break;
|
||||
}
|
||||
(void)closedir(dp);
|
||||
}
|
||||
return(rval);
|
||||
}
|
||||
|
||||
char * __ttyname_basic(int fd)
|
||||
{
|
||||
char *buf;
|
||||
|
||||
pthread_mutex_lock (&ttyname_lock);
|
||||
if (ttyname_init == 0) {
|
||||
if (pthread_key_create(&ttyname_key, free)) {
|
||||
pthread_mutex_unlock (&ttyname_lock);
|
||||
return(NULL);
|
||||
}
|
||||
ttyname_init = 1;
|
||||
}
|
||||
pthread_mutex_unlock (&ttyname_lock);
|
||||
|
||||
/* Must have thread specific data field to put data */
|
||||
if ((buf = pthread_getspecific(ttyname_key)) == NULL) {
|
||||
if (buf = malloc(sizeof(_PATH_PTY) + MAXNAMLEN)) {
|
||||
if (pthread_setspecific(ttyname_key, buf) != OK) {
|
||||
free(buf);
|
||||
return(NULL);
|
||||
}
|
||||
} else {
|
||||
return(NULL);
|
||||
}
|
||||
}
|
||||
return(__ttyname_r_basic(fd, buf, sizeof(_PATH_PTY) + MAXNAMLEN));
|
||||
}
|
||||
|
||||
char * ttyname_r(int fd, char * buf, size_t len)
|
||||
{
|
||||
char * ret;
|
||||
|
||||
if (fd_lock(fd, FD_READ) == OK) {
|
||||
ret = __ttyname_r_basic(fd_table[fd]->fd.i, buf, len);
|
||||
fd_unlock(fd, FD_READ);
|
||||
} else {
|
||||
ret = NULL;
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
char * ttyname(int fd)
|
||||
{
|
||||
char * ret;
|
||||
|
||||
if (fd_lock(fd, FD_READ) == OK) {
|
||||
ret = __ttyname_basic(fd_table[fd]->fd.i);
|
||||
fd_unlock(fd, FD_READ);
|
||||
} else {
|
||||
ret = NULL;
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
@ -1,30 +0,0 @@
|
||||
# from: @(#)Makefile 5.45.1.1 (Berkeley) 5/6/91
|
||||
|
||||
# Doing a make install builds /usr/include/pthread
|
||||
#
|
||||
# The ``rm -rf''s used below are safe because rm doesn't follow symbolic
|
||||
# links.
|
||||
|
||||
|
||||
FILES= cond.h copyright.h fd.h fd_pipe.h kernel.h mutex.h posix.h \
|
||||
pthread.h pthread_attr.h queue.h util.h semaphore.h
|
||||
|
||||
# Machine dependent header file
|
||||
MFILE= ${.CURDIR}/arch/${MACHINE}/machdep.h
|
||||
|
||||
realinstall:
|
||||
if [ ! -d ${DESTDIR}/usr/include/pthread ]; then \
|
||||
mkdir ${DESTDIR}/usr/include/pthread; \
|
||||
fi
|
||||
@echo installing ${FILES}
|
||||
@-for i in ${FILES}; do \
|
||||
cmp -s $$i ${DESTDIR}/usr/include/pthread/$$i || \
|
||||
install -c -m 644 $$i ${DESTDIR}/usr/include/$$i; \
|
||||
done
|
||||
cmp -s ${MFILE} ${DESTDIR}/usr/include/pthread/machdep.h || \
|
||||
install -c -m 644 ${MFILE} ${DESTDIR}/usr/include/pthread/machdep.h
|
||||
rm -rf ${DESTDIR}/usr/include/pthread.h
|
||||
ln -s /usr/include/pthread/pthread.h ${DESTDIR}/usr/include/pthread.h
|
||||
@chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include/pthread
|
||||
@chmod -R a-w ${DESTDIR}/usr/include/pthread
|
||||
|
@ -1,61 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)inet.h 5.7 (Berkeley) 4/3/91
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _INET_H_
|
||||
#define _INET_H_
|
||||
|
||||
/* External definitions for functions in inet(3) */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
#include <pthread/types.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
pthread_ipaddr_type inet_addr __P_((const char *));
|
||||
int inet_aton __P_((const char *, struct in_addr *));
|
||||
pthread_ipaddr_type inet_lnaof __P_((struct in_addr));
|
||||
struct in_addr inet_makeaddr __P_((pthread_ipaddr_type,
|
||||
pthread_ipaddr_type));
|
||||
pthread_ipaddr_type inet_netof __P_((struct in_addr));
|
||||
pthread_ipaddr_type inet_network __P_((const char *));
|
||||
char * inet_ntoa __P_((struct in_addr));
|
||||
char * inet_ntoa_r __P_((struct in_addr in, char *buf,
|
||||
int bufsize));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_INET_H_ */
|
@ -1,279 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1983, 1989, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nameser.h 8.2 (Berkeley) 2/16/94
|
||||
* -
|
||||
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies, and that
|
||||
* the name of Digital Equipment Corporation not be used in advertising or
|
||||
* publicity pertaining to distribution of the document or software without
|
||||
* specific, written prior permission.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
|
||||
* CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
* SOFTWARE.
|
||||
* -
|
||||
* --Copyright--
|
||||
*/
|
||||
|
||||
#ifndef _NAMESER_H_
|
||||
#define _NAMESER_H_
|
||||
|
||||
#include <endian.h>
|
||||
#include <sys/types.h>
|
||||
#include <pthread/types.h>
|
||||
|
||||
/*
|
||||
* Define constants based on rfc883
|
||||
*/
|
||||
#define PACKETSZ 512 /* maximum packet size */
|
||||
#define MAXDNAME 256 /* maximum domain name */
|
||||
#define MAXCDNAME 255 /* maximum compressed domain name */
|
||||
#define MAXLABEL 63 /* maximum length of domain label */
|
||||
/* Number of bytes of fixed size data in query structure */
|
||||
#define QFIXEDSZ 4
|
||||
/* number of bytes of fixed size data in resource record */
|
||||
#define RRFIXEDSZ 10
|
||||
|
||||
/*
|
||||
* Internet nameserver port number
|
||||
*/
|
||||
#define NAMESERVER_PORT 53
|
||||
|
||||
/*
|
||||
* Currently defined opcodes
|
||||
*/
|
||||
#define QUERY 0x0 /* standard query */
|
||||
#define IQUERY 0x1 /* inverse query */
|
||||
#define STATUS 0x2 /* nameserver status query */
|
||||
/*#define xxx 0x3*/ /* 0x3 reserved */
|
||||
/* non standard - supports ALLOW_UPDATES stuff from Mike Schwartz */
|
||||
#define UPDATEA 0x9 /* add resource record */
|
||||
#define UPDATED 0xa /* delete a specific resource record */
|
||||
#define UPDATEDA 0xb /* delete all named resource record */
|
||||
#define UPDATEM 0xc /* modify a specific resource record */
|
||||
#define UPDATEMA 0xd /* modify all named resource record */
|
||||
|
||||
#define ZONEINIT 0xe /* initial zone transfer */
|
||||
#define ZONEREF 0xf /* incremental zone referesh */
|
||||
|
||||
/*
|
||||
* Currently defined response codes
|
||||
*/
|
||||
#define NOERROR 0 /* no error */
|
||||
#define FORMERR 1 /* format error */
|
||||
#define SERVFAIL 2 /* server failure */
|
||||
#define NXDOMAIN 3 /* non existent domain */
|
||||
#define NOTIMP 4 /* not implemented */
|
||||
#define REFUSED 5 /* query refused */
|
||||
/* non standard */
|
||||
#define NOCHANGE 0xf /* update failed to change db */
|
||||
|
||||
/*
|
||||
* Type values for resources and queries
|
||||
*/
|
||||
#define T_A 1 /* host address */
|
||||
#define T_NS 2 /* authoritative server */
|
||||
#define T_MD 3 /* mail destination */
|
||||
#define T_MF 4 /* mail forwarder */
|
||||
#define T_CNAME 5 /* connonical name */
|
||||
#define T_SOA 6 /* start of authority zone */
|
||||
#define T_MB 7 /* mailbox domain name */
|
||||
#define T_MG 8 /* mail group member */
|
||||
#define T_MR 9 /* mail rename name */
|
||||
#define T_NULL 10 /* null resource record */
|
||||
#define T_WKS 11 /* well known service */
|
||||
#define T_PTR 12 /* domain name pointer */
|
||||
#define T_HINFO 13 /* host information */
|
||||
#define T_MINFO 14 /* mailbox information */
|
||||
#define T_MX 15 /* mail routing information */
|
||||
#define T_TXT 16 /* text strings */
|
||||
#define T_RP 17 /* responsible person */
|
||||
#define T_AFSDB 18 /* AFS cell database */
|
||||
#define T_NSAP 22 /* NSAP address */
|
||||
#define T_NSAP_PTR 23 /* reverse lookup for NSAP */
|
||||
/* non standard */
|
||||
#define T_UINFO 100 /* user (finger) information */
|
||||
#define T_UID 101 /* user ID */
|
||||
#define T_GID 102 /* group ID */
|
||||
#define T_UNSPEC 103 /* Unspecified format (binary data) */
|
||||
/* Query type values which do not appear in resource records */
|
||||
#define T_AXFR 252 /* transfer zone of authority */
|
||||
#define T_MAILB 253 /* transfer mailbox records */
|
||||
#define T_MAILA 254 /* transfer mail agent records */
|
||||
#define T_ANY 255 /* wildcard match */
|
||||
|
||||
/*
|
||||
* Values for class field
|
||||
*/
|
||||
|
||||
#define C_IN 1 /* the arpa internet */
|
||||
#define C_CHAOS 3 /* for chaos net (MIT) */
|
||||
#define C_HS 4 /* for Hesiod name server (MIT) (XXX) */
|
||||
/* Query class values which do not appear in resource records */
|
||||
#define C_ANY 255 /* wildcard match */
|
||||
|
||||
/*
|
||||
* Status return codes for T_UNSPEC conversion routines
|
||||
*/
|
||||
#define CONV_SUCCESS 0
|
||||
#define CONV_OVERFLOW -1
|
||||
#define CONV_BADFMT -2
|
||||
#define CONV_BADCKSUM -3
|
||||
#define CONV_BADBUFLEN -4
|
||||
|
||||
#if !defined(BYTE_ORDER) || (BYTE_ORDER != BIG_ENDIAN \
|
||||
&& BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != PDP_ENDIAN)
|
||||
/* you must determine what the correct bit order is for
|
||||
* your compiler - the next line is an intentional error
|
||||
* which will force your compiles to bomb until you fix
|
||||
* the above macros.
|
||||
*/
|
||||
#error "Undefined or invalid BYTE_ORDER";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Structure for query header. The order of the fields is machine- and
|
||||
* compiler-dependent, depending on the byte/bit order and the layout
|
||||
* of bit fields. We use bit fields only in int variables, as this
|
||||
* is all ANSI requires. This requires a somewhat confusing rearrangement.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
pthread_ipport_type id; /* query identification number */
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
/* fields in third byte */
|
||||
u_int qr:1; /* response flag */
|
||||
u_int opcode:4; /* purpose of message */
|
||||
u_int aa:1; /* authoritive answer */
|
||||
u_int tc:1; /* truncated message */
|
||||
u_int rd:1; /* recursion desired */
|
||||
/* fields in fourth byte */
|
||||
u_int ra:1; /* recursion available */
|
||||
u_int pr:1; /* primary server required (non standard) */
|
||||
u_int unused:2; /* unused bits */
|
||||
u_int rcode:4; /* response code */
|
||||
#endif
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN
|
||||
/* fields in third byte */
|
||||
u_int rd:1; /* recursion desired */
|
||||
u_int tc:1; /* truncated message */
|
||||
u_int aa:1; /* authoritive answer */
|
||||
u_int opcode:4; /* purpose of message */
|
||||
u_int qr:1; /* response flag */
|
||||
/* fields in fourth byte */
|
||||
u_int rcode:4; /* response code */
|
||||
u_int unused:2; /* unused bits */
|
||||
u_int pr:1; /* primary server required (non standard) */
|
||||
u_int ra:1; /* recursion available */
|
||||
#endif
|
||||
/* remaining bytes */
|
||||
pthread_ipport_type qdcount; /* number of question entries */
|
||||
pthread_ipport_type ancount; /* number of answer entries */
|
||||
pthread_ipport_type nscount; /* number of authority entries */
|
||||
pthread_ipport_type arcount; /* number of resource entries */
|
||||
} HEADER;
|
||||
|
||||
/*
|
||||
* Defines for handling compressed domain names
|
||||
*/
|
||||
#define INDIR_MASK 0xc0
|
||||
|
||||
/*
|
||||
* Structure for passing resource records around.
|
||||
*/
|
||||
struct rrec {
|
||||
pthread_ipport_type r_zone; /* zone number */
|
||||
pthread_ipport_type r_class; /* class number */
|
||||
pthread_ipport_type r_type; /* type number */
|
||||
pthread_ipaddr_type r_ttl; /* time to live */
|
||||
int r_size; /* size of data area */
|
||||
char * r_data; /* pointer to data */
|
||||
};
|
||||
|
||||
extern pthread_ipport_type _getshort();
|
||||
extern pthread_ipaddr_type _getlong();
|
||||
|
||||
/*
|
||||
* Inline versions of get/put short/long. Pointer is advanced.
|
||||
* We also assume that a "pthread_ipport_type" holds 2 "chars"
|
||||
* and that a "pthread_ipaddr_type" holds 4 "chars".
|
||||
*
|
||||
* These macros demonstrate the property of C whereby it can be
|
||||
* portable or it can be elegant but never both.
|
||||
*/
|
||||
#define GETSHORT(s, cp) { \
|
||||
register u_char *t_cp = (u_char *)(cp); \
|
||||
(s) = ((pthread_ipport_type)t_cp[0] << 8) | (pthread_ipport_type)t_cp[1]; \
|
||||
(cp) += 2; \
|
||||
}
|
||||
|
||||
#define GETLONG(l, cp) { \
|
||||
register u_char *t_cp = (u_char *)(cp); \
|
||||
(l) = (((pthread_ipaddr_type)t_cp[0]) << 24) \
|
||||
| (((pthread_ipaddr_type)t_cp[1]) << 16) \
|
||||
| (((pthread_ipaddr_type)t_cp[2]) << 8) \
|
||||
| (((pthread_ipaddr_type)t_cp[3])); \
|
||||
(cp) += 4; \
|
||||
}
|
||||
|
||||
#define PUTSHORT(s, cp) { \
|
||||
register pthread_ipport_type t_s = (pthread_ipport_type)(s); \
|
||||
register u_char *t_cp = (u_char *)(cp); \
|
||||
*t_cp++ = t_s >> 8; \
|
||||
*t_cp = t_s; \
|
||||
(cp) += 2; \
|
||||
}
|
||||
|
||||
/*
|
||||
* Warning: PUTLONG --no-longer-- destroys its first argument. if you
|
||||
* were depending on this "feature", you will lose.
|
||||
*/
|
||||
#define PUTLONG(l, cp) { \
|
||||
register pthread_ipaddr_type t_l = (pthread_ipaddr_type)(l); \
|
||||
register u_char *t_cp = (u_char *)(cp); \
|
||||
*t_cp++ = t_l >> 24; \
|
||||
*t_cp++ = t_l >> 16; \
|
||||
*t_cp++ = t_l >> 8; \
|
||||
*t_cp = t_l; \
|
||||
(cp) += 4; \
|
||||
}
|
||||
|
||||
#endif /* !_NAMESER_H_ */
|
@ -1,97 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)dirent.h 5.18 (Berkeley) 2/23/91
|
||||
*/
|
||||
|
||||
#ifndef _DIRENT_H_
|
||||
#define _DIRENT_H_
|
||||
|
||||
#include <sys/dirent.h>
|
||||
#include <pthread.h>
|
||||
|
||||
struct __dirent {
|
||||
struct __dirent * next;
|
||||
struct dirent data;
|
||||
pthread_t owner;
|
||||
};
|
||||
|
||||
/* definitions for library routines operating on directories. */
|
||||
#define DIRBLKSIZ 1024
|
||||
|
||||
/* structure describing an open directory. */
|
||||
typedef struct _dirdesc {
|
||||
struct __dirent * dd_dp; /* Linked list of struct __dirent pointer */
|
||||
int dd_fd; /* file descriptor associated with directory */
|
||||
long dd_loc; /* offset in current buffer */
|
||||
long dd_size; /* amount of data returned by getdirentries */
|
||||
char * dd_buf; /* data buffer */
|
||||
int dd_len; /* size of data buffer */
|
||||
long dd_seek; /* magic cookie returned by getdirentries */
|
||||
void * dd_ddloc; /* Linked list of ddloc structs for telldir/seekdir */
|
||||
pthread_mutex_t *dd_lock; /* Lock for open directory structure */
|
||||
} DIR;
|
||||
|
||||
#define dirfd(dirp) ((dirp)->dd_fd)
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
#ifndef KERNEL
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
DIR * opendir __P_((const char *));
|
||||
struct dirent * readdir __P_((DIR *));
|
||||
int readdir_r __P_((DIR *, struct dirent *, struct dirent **));
|
||||
void rewinddir __P_((DIR *));
|
||||
int closedir __P_((DIR *));
|
||||
#ifndef _POSIX_SOURCE
|
||||
long telldir __P_((DIR *));
|
||||
void seekdir __P_((DIR *, long));
|
||||
|
||||
/*
|
||||
int scandir __P_((const char *, struct dirent ***,
|
||||
int (*)(struct dirent *),
|
||||
int (*)(const void *, const void *)));
|
||||
int alphasort __P_((const void *, const void *));
|
||||
int getdirentries __P_((int, char *, int, long *));
|
||||
*/
|
||||
#endif /* not POSIX */
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !KERNEL */
|
||||
|
||||
#endif /* !_DIRENT_H_ */
|
@ -1,95 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1983, 1989, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nameser.h 8.2 (Berkeley) 2/16/94
|
||||
* -
|
||||
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies, and that
|
||||
* the name of Digital Equipment Corporation not be used in advertising or
|
||||
* publicity pertaining to distribution of the document or software without
|
||||
* specific, written prior permission.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
|
||||
* CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
* SOFTWARE.
|
||||
* -
|
||||
* --Copyright--
|
||||
*/
|
||||
|
||||
#ifndef _ENDIAN_H_
|
||||
#define _ENDIAN_H_
|
||||
|
||||
#ifndef BYTE_ORDER
|
||||
#define LITTLE_ENDIAN 1234 /* least-significant byte first (vax, pc) */
|
||||
#define __LITTLE_ENDIAN 1234
|
||||
#define BIG_ENDIAN 4321 /* most-significant byte first (IBM, net) */
|
||||
#define __BIG_ENDIAN 4321
|
||||
#define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long (pdp)*/
|
||||
#define __PDP_ENDIAN 3412
|
||||
|
||||
#if defined(vax) || defined(ns32000) || defined(sun386) || defined(i386) || \
|
||||
defined(MIPSEL) || defined(_MIPSEL) || defined(BIT_ZERO_ON_RIGHT) || \
|
||||
defined(__alpha__) || defined(__alpha)
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#define __BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
#if defined(sel) || defined(pyr) || defined(mc68000) || defined(sparc) || \
|
||||
defined(is68k) || defined(tahoe) || defined(ibm032) || defined(ibm370) || \
|
||||
defined(MIPSEB) || defined(_MIPSEB) || defined(_IBMR2) || \
|
||||
defined(apollo) || defined(hp9000) || defined(hp9000s300) || \
|
||||
defined(hp9000s800) || \
|
||||
defined (BIT_ZERO_ON_LEFT)
|
||||
#define BYTE_ORDER BIG_ENDIAN
|
||||
#define __BYTE_ORDER BIG_ENDIAN
|
||||
#endif
|
||||
#endif /* BYTE_ORDER */
|
||||
|
||||
#if !defined(BYTE_ORDER) || (BYTE_ORDER != BIG_ENDIAN \
|
||||
&& BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != PDP_ENDIAN)
|
||||
/* you must determine what the correct bit order is for
|
||||
* your compiler - the next line is an intentional error
|
||||
* which will force your compiles to bomb until you fix
|
||||
* the above macros.
|
||||
*/
|
||||
#error "Undefined or invalid BYTE_ORDER";
|
||||
#endif
|
||||
|
||||
#endif /* !_ENDIAN_H */
|
@ -1,52 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989 Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)errno.h 7.13 (Berkeley) 2/19/91
|
||||
* errno.h,v 1.3 1993/05/20 16:22:09 cgd Exp
|
||||
*/
|
||||
|
||||
#ifndef _ERRNO_H_
|
||||
#define _ERRNO_H_
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/errno.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
extern int * __error();
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#define errno (* __error())
|
||||
#define pthread_errno(x) pthread_run->error_p = x
|
||||
|
||||
#endif /* _ERRNO_H_ */
|
@ -1,85 +0,0 @@
|
||||
#ifndef _MATH_H_
|
||||
#define _MATH_H_
|
||||
|
||||
/* Needed for HUGE_VAL */
|
||||
#include <sys/__math.h>
|
||||
|
||||
/* XOPEN/SVID */
|
||||
|
||||
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
|
||||
#define M_E 2.7182818284590452354 /* e */
|
||||
#define M_LOG2E 1.4426950408889634074 /* log 2e */
|
||||
#define M_LOG10E 0.43429448190325182765 /* log 10e */
|
||||
#define M_LN2 0.69314718055994530942 /* log e2 */
|
||||
#define M_LN10 2.30258509299404568402 /* log e10 */
|
||||
#define M_PI 3.14159265358979323846 /* pi */
|
||||
#define M_PI_2 1.57079632679489661923 /* pi/2 */
|
||||
#define M_PI_4 0.78539816339744830962 /* pi/4 */
|
||||
#define M_1_PI 0.31830988618379067154 /* 1/pi */
|
||||
#define M_2_PI 0.63661977236758134308 /* 2/pi */
|
||||
#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
|
||||
#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
|
||||
#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
|
||||
|
||||
#define MAXFLOAT ((float)3.40282346638528860e+38)
|
||||
|
||||
#if !defined(_XOPEN_SOURCE)
|
||||
|
||||
struct exception {
|
||||
int type;
|
||||
char *name;
|
||||
double arg1;
|
||||
double arg2;
|
||||
double retval;
|
||||
};
|
||||
|
||||
#define HUGE MAXFLOAT
|
||||
|
||||
#define DOMAIN 1
|
||||
#define SING 2
|
||||
#define OVERFLOW 3
|
||||
#define UNDERFLOW 4
|
||||
#define TLOSS 5
|
||||
#define PLOSS 6
|
||||
|
||||
#endif /* !_XOPEN_SOURCE */
|
||||
#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
/* ANSI/POSIX */
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
double hypot __P_((double, double));
|
||||
double acos __P_((double));
|
||||
double asin __P_((double));
|
||||
double atan __P_((double));
|
||||
double atan2 __P_((double, double));
|
||||
double cos __P_((double));
|
||||
double sin __P_((double));
|
||||
double tan __P_((double));
|
||||
|
||||
double cosh __P_((double));
|
||||
double sinh __P_((double));
|
||||
double tanh __P_((double));
|
||||
|
||||
double exp __P_((double));
|
||||
double frexp __P_((double, int *));
|
||||
double ldexp __P_((double, int));
|
||||
double log __P_((double));
|
||||
double log10 __P_((double));
|
||||
double modf __P_((double, double *));
|
||||
|
||||
double pow __P_((double, double));
|
||||
double sqrt __P_((double));
|
||||
|
||||
double ceil __P_((double));
|
||||
double fabs __P_((double));
|
||||
double floor __P_((double));
|
||||
double fmod __P_((double, double));
|
||||
double rint __P_((double)); /* XOPEN; Added by Monty */
|
||||
int finite __P_((double dsrc)); /* math.h; added by Monty */
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _MATH_H_ */
|
@ -1,146 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 1980, 1983, 1988 Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)netdb.h 5.15 (Berkeley) 4/3/91
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _NETDB_H_
|
||||
#define _NETDB_H_
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
#define _PATH_HEQUIV "/etc/hosts.equiv"
|
||||
#define _PATH_HOSTS "/etc/hosts"
|
||||
#define _PATH_NETWORKS "/etc/networks"
|
||||
#define _PATH_PROTOCOLS "/etc/protocols"
|
||||
#define _PATH_SERVICES "/etc/services"
|
||||
#define __NETDB_MAXALIASES 35
|
||||
#define __NETDB_MAXADDRS 35
|
||||
|
||||
/*
|
||||
* Structures returned by network data base library. All addresses are
|
||||
* supplied in host order, and returned in network order (suitable for
|
||||
* use in system calls).
|
||||
*/
|
||||
struct hostent {
|
||||
char *h_name; /* official name of host */
|
||||
char **h_aliases; /* alias list */
|
||||
int h_addrtype; /* host address type */
|
||||
int h_length; /* length of address */
|
||||
char **h_addr_list; /* list of addresses from name server */
|
||||
#define h_addr h_addr_list[0] /* address, for backward compatiblity */
|
||||
};
|
||||
|
||||
/*
|
||||
* Assumption here is that a network number
|
||||
* fits in 32 bits -- probably a poor one.
|
||||
*/
|
||||
struct netent {
|
||||
char *n_name; /* official name of net */
|
||||
char **n_aliases; /* alias list */
|
||||
int n_addrtype; /* net address type */
|
||||
unsigned long n_net; /* network # */
|
||||
};
|
||||
|
||||
struct servent {
|
||||
char *s_name; /* official service name */
|
||||
char **s_aliases; /* alias list */
|
||||
int s_port; /* port # */
|
||||
char *s_proto; /* protocol to use */
|
||||
};
|
||||
|
||||
struct protoent {
|
||||
char *p_name; /* official protocol name */
|
||||
char **p_aliases; /* alias list */
|
||||
int p_proto; /* protocol # */
|
||||
};
|
||||
|
||||
/*
|
||||
* Error return codes from gethostbyname() and gethostbyaddr()
|
||||
* (left in extern int h_errno).
|
||||
*/
|
||||
|
||||
#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */
|
||||
#define TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */
|
||||
#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
|
||||
#define NO_DATA 4 /* Valid name, no data record of requested type */
|
||||
#define NO_ADDRESS NO_DATA /* no address, look for MX record */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
void endhostent __P_((void));
|
||||
void endnetent __P_((void));
|
||||
void endprotoent __P_((void));
|
||||
void endservent __P_((void));
|
||||
struct hostent *gethostbyaddr __P_((const char *, int, int));
|
||||
struct hostent *gethostbyname __P_((const char *));
|
||||
struct hostent *gethostent __P_((void));
|
||||
struct netent *getnetbyaddr __P_((long, int)); /* u_long? */
|
||||
struct netent *getnetbyname __P_((const char *));
|
||||
struct netent *getnetent __P_((void));
|
||||
struct protoent *getprotobyname __P_((const char *));
|
||||
struct protoent *getprotobynumber __P_((int));
|
||||
struct protoent *getprotoent __P_((void));
|
||||
struct servent *getservbyname __P_((const char *, const char *));
|
||||
struct servent *getservbyport __P_((int, const char *));
|
||||
struct servent *getservent __P_((void));
|
||||
void herror __P_((const char *));
|
||||
char *hstrerror __P_((int));
|
||||
void sethostent __P_((int));
|
||||
void setnetent __P_((int));
|
||||
void setprotoent __P_((int));
|
||||
void setservent __P_((int));
|
||||
struct hostent *gethostbyaddr_r __P_((const char *, int, int,
|
||||
struct hostent *, char *, int, int *));
|
||||
struct hostent *gethostbyname_r __P_((const char *, struct hostent *, char *,
|
||||
int, int *));
|
||||
struct hostent *gethostent_r __P_((struct hostent *, char *, int, int *));
|
||||
struct netent *getnetbyaddr_r __P_((long, int, struct netent *, char *, int));
|
||||
struct netent *getnetbyname_r __P_((const char *, struct netent *, char *,
|
||||
int));
|
||||
struct netent *getnetent_r __P_((struct netent *, char *, int));
|
||||
struct protoent *getprotobyname_r __P_((const char *, struct protoent *, char *,
|
||||
int));
|
||||
struct protoent *getprotobynumber_r __P_((int, struct protoent *, char *, int));
|
||||
struct protoent *getprotoent_r __P_((struct protoent *, char *, int));
|
||||
struct servent *getservbyname_r __P_((const char *, const char *,
|
||||
struct servent *, char *, int));
|
||||
struct servent *getservbyport_r __P_((int, const char *, struct servent *,
|
||||
char *, int));
|
||||
struct servent *getservent_r __P_((struct servent *, char *, int));
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_NETDB_H_ */
|
@ -1,371 +0,0 @@
|
||||
/* ==== pthread.h ============================================================
|
||||
* Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Description : Basic pthread header.
|
||||
*
|
||||
* 1.00 93/07/20 proven
|
||||
* -Started coding this file.
|
||||
*
|
||||
* 93/9/28 streepy - Added support for pthread cancel
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _PTHREAD_H_
|
||||
#define _PTHREAD_H_
|
||||
|
||||
#include <pthread/types.h>
|
||||
|
||||
#include <pthread/version.h>
|
||||
#include <pthread/machdep.h>
|
||||
#include <pthread/cleanup.h>
|
||||
#include <pthread/kernel.h>
|
||||
#include <pthread/prio_queue.h>
|
||||
#include <pthread/queue.h>
|
||||
#include <pthread/sleep.h>
|
||||
#include <pthread/mutex.h>
|
||||
#include <pthread/cond.h>
|
||||
#include <pthread/fd.h>
|
||||
#include <pthread/debug_out.h>
|
||||
|
||||
/* Requires mutex.h */
|
||||
#include <pthread/specific.h>
|
||||
|
||||
#include <pthread/util.h>
|
||||
|
||||
/* More includes */
|
||||
#include <pthread/pthread_once.h>
|
||||
|
||||
/* More includes, that need size_t */
|
||||
#include <pthread/pthread_attr.h>
|
||||
|
||||
#include <signal.h> /* for sigset_t */ /* Moved by monty */
|
||||
|
||||
/* Constants for use with pthread_setcancelstate and pthread_setcanceltype */
|
||||
#define PTHREAD_CANCEL_DISABLE 0
|
||||
#define PTHREAD_CANCEL_ENABLE 1
|
||||
#define PTHREAD_CANCEL_DEFERRED 0
|
||||
#define PTHREAD_CANCEL_ASYNCHRONOUS 1
|
||||
|
||||
#define PTHREAD_CANCELLED (void *)1 /* Exit status of a cancelled thread */
|
||||
|
||||
|
||||
#ifdef PTHREAD_KERNEL
|
||||
|
||||
enum pthread_state {
|
||||
#define __pthread_defstate(S,NAME) S,
|
||||
#include "pthread/state.def"
|
||||
#undef __pthread_defstate
|
||||
|
||||
/* enum lists aren't supposed to end with a comma, sigh */
|
||||
PS_STATE_MAX
|
||||
};
|
||||
|
||||
/* Put PANIC inside an expression that evaluates to non-void type, to
|
||||
make it easier to combine it in expressions. */
|
||||
#define DO_PANIC() (PANIC (), 0)
|
||||
#define PANICIF(x) ((x) ? DO_PANIC () : 0)
|
||||
|
||||
/* In the thread flag field, we use a series of bit flags. Flags can
|
||||
* organized into "groups" of mutually exclusive flags. Other flags
|
||||
* are unrelated and can be set and cleared with a single bit operation.
|
||||
*/
|
||||
|
||||
#define PF_WAIT_EVENT 0x01
|
||||
#define PF_DONE_EVENT 0x02
|
||||
#define PF_EVENT_GROUP 0x03 /* All event bits */
|
||||
|
||||
#define PF_CANCEL_STATE 0x04 /* cancellability state */
|
||||
#define PF_CANCEL_TYPE 0x08 /* cancellability type */
|
||||
#define PF_THREAD_CANCELLED 0x10 /* thread has been cancelled */
|
||||
#define PF_RUNNING_TO_CANCEL 0x20 /* Thread is running so it can cancel*/
|
||||
#define PF_AT_CANCEL_POINT 0x40 /* Thread is at a cancel point */
|
||||
|
||||
/* Flag operations */
|
||||
|
||||
#define SET_PF_FLAG(x,f) ( (x)->flags |= (f) )
|
||||
#define TEST_PF_FLAG(x,f) ( (x)->flags & (f) )
|
||||
#define CLEAR_PF_FLAG(x,f) ( (x)->flags &= ~(f) )
|
||||
#define CLEAR_PF_GROUP(x,g) ( (x)->flags &= ~(g) )
|
||||
#define SET_PF_FLAG_IN_GROUP(x,g,f) ( CLEAR_PF_GROUP(x,g),SET_PF_FLAG(x,f))
|
||||
#define TEST_PF_GROUP(x,g) ( (x)->flags & (g) )
|
||||
|
||||
#define SET_PF_DONE_EVENT(x) \
|
||||
( !TEST_PF_FLAG(x,PF_DONE_EVENT) \
|
||||
? ( TEST_PF_FLAG(x,PF_WAIT_EVENT) \
|
||||
? (SET_PF_FLAG_IN_GROUP(x,PF_EVENT_GROUP,PF_DONE_EVENT), OK) \
|
||||
: DO_PANIC ()) \
|
||||
: NOTOK )
|
||||
|
||||
#define SET_PF_WAIT_EVENT(x) \
|
||||
( PANICIF (TEST_PF_GROUP(x,PF_EVENT_GROUP) ), \
|
||||
SET_PF_FLAG_IN_GROUP(x,PF_EVENT_GROUP,PF_WAIT_EVENT), 0)
|
||||
|
||||
#define CLEAR_PF_DONE_EVENT(x) \
|
||||
( PANICIF (!TEST_PF_FLAG(x,PF_DONE_EVENT)), \
|
||||
CLEAR_PF_GROUP(x,PF_EVENT_GROUP) )
|
||||
|
||||
#define SET_PF_CANCELLED(x) ( SET_PF_FLAG(x,PF_THREAD_CANCELLED) )
|
||||
#define TEST_PF_CANCELLED(x) ( TEST_PF_FLAG(x,PF_THREAD_CANCELLED) )
|
||||
|
||||
#define SET_PF_RUNNING_TO_CANCEL(x) ( SET_PF_FLAG(x,PF_RUNNING_TO_CANCEL) )
|
||||
#define CLEAR_PF_RUNNING_TO_CANCEL(x)( CLEAR_PF_FLAG(x,PF_RUNNING_TO_CANCEL) )
|
||||
#define TEST_PF_RUNNING_TO_CANCEL(x)( TEST_PF_FLAG(x,PF_RUNNING_TO_CANCEL) )
|
||||
|
||||
#define SET_PF_AT_CANCEL_POINT(x) ( SET_PF_FLAG(x,PF_AT_CANCEL_POINT) )
|
||||
#define CLEAR_PF_AT_CANCEL_POINT(x) ( CLEAR_PF_FLAG(x,PF_AT_CANCEL_POINT) )
|
||||
#define TEST_PF_AT_CANCEL_POINT(x) ( TEST_PF_FLAG(x,PF_AT_CANCEL_POINT) )
|
||||
|
||||
#define SET_PF_CANCEL_STATE(x,f) \
|
||||
( (f) ? SET_PF_FLAG(x,PF_CANCEL_STATE) : CLEAR_PF_FLAG(x,PF_CANCEL_STATE) )
|
||||
#define TEST_PF_CANCEL_STATE(x) \
|
||||
( (TEST_PF_FLAG(x,PF_CANCEL_STATE)) ? PTHREAD_CANCEL_ENABLE \
|
||||
: PTHREAD_CANCEL_DISABLE )
|
||||
|
||||
#define SET_PF_CANCEL_TYPE(x,f) \
|
||||
( (f) ? SET_PF_FLAG(x,PF_CANCEL_TYPE) : CLEAR_PF_FLAG(x,PF_CANCEL_TYPE) )
|
||||
#define TEST_PF_CANCEL_TYPE(x) \
|
||||
( (TEST_PF_FLAG(x,PF_CANCEL_TYPE)) ? PTHREAD_CANCEL_ASYNCHRONOUS \
|
||||
: PTHREAD_CANCEL_DEFERRED )
|
||||
|
||||
/* See if a thread is in a state that it can be cancelled */
|
||||
#define TEST_PTHREAD_IS_CANCELLABLE(x) \
|
||||
( (TEST_PF_CANCEL_STATE(x) == PTHREAD_CANCEL_ENABLE && TEST_PF_CANCELLED(x)) \
|
||||
? ((TEST_PF_CANCEL_TYPE(x) == PTHREAD_CANCEL_ASYNCHRONOUS) \
|
||||
? 1 \
|
||||
: TEST_PF_AT_CANCEL_POINT(x)) \
|
||||
: 0 )
|
||||
|
||||
|
||||
struct pthread_select_data {
|
||||
int nfds;
|
||||
fd_set readfds;
|
||||
fd_set writefds;
|
||||
fd_set exceptfds;
|
||||
};
|
||||
|
||||
union pthread_wait_data {
|
||||
pthread_mutex_t * mutex;
|
||||
pthread_cond_t * cond;
|
||||
const sigset_t * sigwait; /* Waiting on a signal in sigwait */
|
||||
struct {
|
||||
short fd; /* Used when thread waiting on fd */
|
||||
short branch; /* line number, for debugging */
|
||||
} fd;
|
||||
struct pthread_select_data * select_data;
|
||||
};
|
||||
|
||||
#define PTT_USER_THREAD 0x0001
|
||||
|
||||
struct pthread {
|
||||
int thread_type;
|
||||
struct machdep_pthread machdep_data;
|
||||
pthread_attr_t attr;
|
||||
|
||||
/* Signal interface */
|
||||
sigset_t sigmask;
|
||||
sigset_t sigpending;
|
||||
int sigcount; /* Number of signals pending */
|
||||
int sighandled; /* Set when signal has been handled */
|
||||
/* Timeout time */
|
||||
struct timespec wakeup_time;
|
||||
|
||||
/* Join queue for waiting threads */
|
||||
struct pthread_queue join_queue;
|
||||
|
||||
/*
|
||||
* Thread implementations are just multiple queue type implemenations,
|
||||
* Below are the various link lists currently necessary
|
||||
* It is possible for a thread to be on multiple, or even all the
|
||||
* queues at once, much care must be taken during queue manipulation.
|
||||
*
|
||||
* The pthread structure must be locked before you can even look at
|
||||
* the link lists.
|
||||
*/
|
||||
|
||||
/*
|
||||
* ALL threads, in any state.
|
||||
* Must lock kernel lock before manipulating.
|
||||
*/
|
||||
struct pthread * pll;
|
||||
|
||||
/*
|
||||
* Standard link list for running threads, mutexes, etc ...
|
||||
* It can't be on both a running link list and a wait queue.
|
||||
* Must lock kernel lock before manipulating.
|
||||
*/
|
||||
struct pthread * next;
|
||||
union pthread_wait_data data;
|
||||
|
||||
/*
|
||||
* Actual queue state and priority of thread.
|
||||
* (Note: "priority" is a reserved word in Concurrent C, please
|
||||
* don't use it. --KR)
|
||||
*/
|
||||
struct pthread_queue * queue;
|
||||
enum pthread_state state;
|
||||
enum pthread_state old_state; /* Used when cancelled */
|
||||
char flags;
|
||||
char pthread_priority;
|
||||
|
||||
/*
|
||||
* Sleep queue, this is different from the standard link list
|
||||
* because it is possible to be on both (pthread_cond_timedwait();
|
||||
* Must lock sleep mutex before manipulating
|
||||
*/
|
||||
struct pthread *sll; /* For sleeping threads */
|
||||
|
||||
/*
|
||||
* Data that doesn't need to be locked
|
||||
* Mostly because only the thread owning the data can manipulate it
|
||||
*/
|
||||
void * ret;
|
||||
int error;
|
||||
int * error_p;
|
||||
const void ** specific_data;
|
||||
int specific_data_count;
|
||||
|
||||
/* Cleanup handlers Link List */
|
||||
struct pthread_cleanup *cleanup;
|
||||
};
|
||||
|
||||
#else /* not PTHREAD_KERNEL */
|
||||
|
||||
struct pthread;
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct pthread *pthread_t;
|
||||
|
||||
/*
|
||||
* Globals
|
||||
*/
|
||||
#ifdef PTHREAD_KERNEL
|
||||
|
||||
extern struct pthread * pthread_run;
|
||||
extern struct pthread * pthread_initial;
|
||||
extern struct pthread * pthread_link_list;
|
||||
extern struct pthread_queue pthread_dead_queue;
|
||||
extern struct pthread_queue pthread_alloc_queue;
|
||||
|
||||
extern pthread_attr_t pthread_attr_default;
|
||||
extern volatile int fork_lock;
|
||||
extern pthread_size_t pthread_pagesize;
|
||||
|
||||
extern sigset_t * uthread_sigmask;
|
||||
|
||||
/* Kernel global functions */
|
||||
extern void pthread_sched_prevent(void);
|
||||
extern void pthread_sched_resume(void);
|
||||
extern int __pthread_is_valid( pthread_t );
|
||||
extern void pthread_cancel_internal( int freelocks );
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* New functions
|
||||
*/
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#if defined(DCE_COMPAT)
|
||||
|
||||
typedef void * (*pthread_startroutine_t)(void *);
|
||||
typedef void * pthread_addr_t;
|
||||
|
||||
int pthread_create __P_((pthread_t *, pthread_attr_t,
|
||||
pthread_startroutine_t,
|
||||
pthread_addr_t));
|
||||
void pthread_exit __P_((pthread_addr_t));
|
||||
int pthread_join __P_((pthread_t, pthread_addr_t *));
|
||||
|
||||
#else
|
||||
|
||||
void pthread_init __P_((void));
|
||||
int pthread_create __P_((pthread_t *,
|
||||
const pthread_attr_t *,
|
||||
void * (*start_routine)(void *),
|
||||
void *));
|
||||
void pthread_exit __P_((void *));
|
||||
pthread_t pthread_self __P_((void));
|
||||
int pthread_equal __P_((pthread_t, pthread_t));
|
||||
int pthread_join __P_((pthread_t, void **));
|
||||
int pthread_detach __P_((pthread_t));
|
||||
void pthread_yield __P_((void));
|
||||
int pthread_setschedparam __P_((pthread_t pthread, int policy,
|
||||
struct sched_param * param));
|
||||
int pthread_getschedparam __P_((pthread_t pthread, int * policy,
|
||||
struct sched_param * param));
|
||||
int pthread_kill __P_((struct pthread *, int));
|
||||
void (*pthread_signal __P_((int, void (*)(int))))();
|
||||
int pthread_cancel __P_(( pthread_t pthread ));
|
||||
int pthread_setcancelstate __P_(( int state, int *oldstate ));
|
||||
int pthread_setcanceltype __P_(( int type, int *oldtype ));
|
||||
void pthread_testcancel __P_(( void ));
|
||||
|
||||
int pthread_sigmask __P_((int how, const sigset_t *set,
|
||||
sigset_t * oset)); /* added by Monty */
|
||||
int sigwait __P_((const sigset_t * set, int * sig));
|
||||
int sigsetwait __P_((const sigset_t * set, int * sig));
|
||||
#endif
|
||||
|
||||
#if defined(PTHREAD_KERNEL)
|
||||
|
||||
/* Not valid, but I can't spell so this will be caught at compile time */
|
||||
#define pthread_yeild(notvalid)
|
||||
|
||||
#endif
|
||||
|
||||
__END_DECLS
|
||||
|
||||
/*
|
||||
* Static constructors
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
|
||||
extern struct pthread * pthread_initial;
|
||||
|
||||
class __pthread_init_t {
|
||||
/* struct __pthread_init_t { */
|
||||
public:
|
||||
__pthread_init_t() {
|
||||
if (pthread_initial == NULL) {
|
||||
pthread_init();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
static __pthread_init_t __pthread_init_this_file;
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif
|
@ -1,12 +0,0 @@
|
||||
#ifndef pthread_size_t
|
||||
#define pthread_ipaddr_type unsigned long
|
||||
#define pthread_ipport_type unsigned short
|
||||
#define pthread_clock_t long
|
||||
#define pthread_size_t unsigned int
|
||||
#define pthread_ssize_t int
|
||||
#define pthread_time_t long
|
||||
#define pthread_off_t long
|
||||
#ifdef NOT_USED /* Removed by monty becasue of conflicts on Linux */
|
||||
#define pthread_va_list char *
|
||||
#endif
|
||||
#endif
|
@ -1,59 +0,0 @@
|
||||
/* ==== cleanup.h ============================================================
|
||||
* Copyright (c) 1994 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Description : cleanup header.
|
||||
*
|
||||
* 1.20 94/02/13 proven
|
||||
* -Started coding this file.
|
||||
*/
|
||||
|
||||
/*
|
||||
* New cleanup structures
|
||||
*/
|
||||
struct pthread_cleanup {
|
||||
struct pthread_cleanup *next;
|
||||
void (*routine)();
|
||||
void *routine_arg;
|
||||
};
|
||||
|
||||
/*
|
||||
* New functions
|
||||
*/
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
int pthread_cleanup_push __P_((void (*routine)(void *), void *routine_arg));
|
||||
void pthread_cleanup_pop __P_((int execute));
|
||||
|
||||
__END_DECLS
|
||||
|
@ -1,102 +0,0 @@
|
||||
/* ==== cond.h ============================================================
|
||||
* Copyright (c) 1993 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Description : Condition variable header.
|
||||
*
|
||||
* 1.00 93/10/30 proven
|
||||
* -Started coding this file.
|
||||
*/
|
||||
|
||||
#include <timers.h>
|
||||
|
||||
/*
|
||||
* New cond structures
|
||||
*/
|
||||
enum pthread_condtype {
|
||||
COND_TYPE_FAST,
|
||||
COND_TYPE_STATIC_FAST,
|
||||
COND_TYPE_COUNTING_FAST, /* Used with MUTEX_TYPE_COUNTING_FAST */
|
||||
COND_TYPE_METERED,
|
||||
COND_TYPE_DEBUG, /* Debug conds will have lots of options */
|
||||
COND_TYPE_MAX
|
||||
};
|
||||
|
||||
#define PTHREAD_CONDTYPE_FAST 1
|
||||
#define PTHREAD_CONDTYPE_DEBUG 4
|
||||
#define PTHREAD_CONDTYPE_RECURSIVE 2
|
||||
|
||||
typedef struct pthread_cond {
|
||||
enum pthread_condtype c_type;
|
||||
struct pthread_queue c_queue;
|
||||
semaphore c_lock;
|
||||
void * c_data;
|
||||
long c_flags;
|
||||
} pthread_cond_t;
|
||||
|
||||
typedef struct pthread_condattr {
|
||||
enum pthread_condtype c_type;
|
||||
long c_flags;
|
||||
} pthread_condattr_t;
|
||||
|
||||
/*
|
||||
* Flags for conds.
|
||||
*/
|
||||
#define COND_FLAGS_PRIVATE 0x01
|
||||
#define COND_FLAGS_INITED 0x02
|
||||
#define COND_FLAGS_BUSY 0x04
|
||||
|
||||
/*
|
||||
* Static cond initialization values.
|
||||
*/
|
||||
#define PTHREAD_COND_INITIALIZER \
|
||||
{ COND_TYPE_STATIC_FAST, PTHREAD_QUEUE_INITIALIZER, \
|
||||
SEMAPHORE_CLEAR, NULL, COND_FLAGS_INITED }
|
||||
|
||||
/*
|
||||
* New functions
|
||||
*/
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
struct timespec;
|
||||
|
||||
int pthread_cond_init __P_((pthread_cond_t *, const pthread_condattr_t *));
|
||||
int pthread_cond_timedwait __P_((pthread_cond_t *, pthread_mutex_t *,
|
||||
const struct timespec * abstime));
|
||||
int pthread_cond_wait __P_((pthread_cond_t *, pthread_mutex_t *));
|
||||
int pthread_cond_signal __P_((pthread_cond_t *));
|
||||
int pthread_cond_broadcast __P_((pthread_cond_t *));
|
||||
int pthread_cond_destroy __P_((pthread_cond_t *));
|
||||
|
||||
__END_DECLS
|
||||
|
@ -1,5 +0,0 @@
|
||||
#ifndef _SYS___CONFIG_H_
|
||||
#define _SYS___CONFIG_H_
|
||||
#define _OS_HAS_TIMESPEC 1
|
||||
#define _OS_HAS_SOCKLEN_T 1
|
||||
#endif
|
@ -1,44 +0,0 @@
|
||||
/* debug_out.h - macros to use for debugging prints in places where calls
|
||||
to printf() and gang are ill-advised. */
|
||||
|
||||
#ifdef PTHREAD_DEBUGGING
|
||||
#define PTHREAD_DEBUG_WriteStr(S) (void)machdep_sys_write(2,S,strlen(S))
|
||||
#define PTHREAD_DEBUG_WriteInt32Hex(X) \
|
||||
{ char _xbuf[8]; int _temp = (int)(X), _temp2; \
|
||||
_temp2 = ((_temp>>28)&0xf); \
|
||||
_xbuf[0] = (_temp2<10)? (_temp2+'0'): ((_temp2-10)+'a'); \
|
||||
_temp2 = ((_temp>>24)&0xf); \
|
||||
_xbuf[1] = (_temp2<10)? (_temp2+'0'): ((_temp2-10)+'a'); \
|
||||
_temp2 = ((_temp>>20)&0xf); \
|
||||
_xbuf[2] = (_temp2<10)? (_temp2+'0'): ((_temp2-10)+'a'); \
|
||||
_temp2 = ((_temp>>16)&0xf); \
|
||||
_xbuf[3] = (_temp2<10)? (_temp2+'0'): ((_temp2-10)+'a'); \
|
||||
_temp2 = ((_temp>>12)&0xf); \
|
||||
_xbuf[4] = (_temp2<10)? (_temp2+'0'): ((_temp2-10)+'a'); \
|
||||
_temp2 = ((_temp>>8)&0xf); \
|
||||
_xbuf[5] = (_temp2<10)? (_temp2+'0'): ((_temp2-10)+'a'); \
|
||||
_temp2 = ((_temp>>4)&0xf); \
|
||||
_xbuf[6] = (_temp2<10)? (_temp2+'0'): ((_temp2-10)+'a'); \
|
||||
_temp2 = (_temp&0xf); \
|
||||
_xbuf[7] = (_temp2<10)? (_temp2+'0'): ((_temp2-10)+'a'); \
|
||||
(void)machdep_sys_write(2,_xbuf,8); \
|
||||
}
|
||||
#ifdef __alpha
|
||||
#define PTHREAD_DEBUG_WriteInt64Hex(X) \
|
||||
{ long _tempX = (long)(X),_tempY; \
|
||||
_tempY=((_tempX>>32)&0xffffffff); \
|
||||
PTHREAD_DEBUG_WriteInt32Hex(_tempY); \
|
||||
_tempY=(_tempX&0xffffffff); \
|
||||
PTHREAD_DEBUG_WriteInt32Hex(_tempY); \
|
||||
}
|
||||
#define PTHREAD_DEBUG_WritePointer(X) PTHREAD_DEBUG_WriteInt64Hex(X)
|
||||
#else
|
||||
#define PTHREAD_DEBUG_WriteInt64Hex(X) PTHREAD_DEBUG_WriteInt32Hex(X)
|
||||
#define PTHREAD_DEBUG_WritePointer(X) PTHREAD_DEBUG_WriteInt32Hex(X)
|
||||
#endif /* __alpha */
|
||||
#else /* ! PTHREAD_DEBUGGING */
|
||||
#define PTHREAD_DEBUG_WriteStr(S)
|
||||
#define PTHREAD_DEBUG_WriteInt32Hex(X)
|
||||
#define PTHREAD_DEBUG_WriteInt64HeX(X)
|
||||
#define PTHREAD_DEBUG_WritePointer(X)
|
||||
#endif /* PTHREAD_DEBUGGING */
|
@ -1,122 +0,0 @@
|
||||
/* ==== fd.h ============================================================
|
||||
* Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Description : Basic fd header.
|
||||
*
|
||||
* 1.00 93/08/14 proven
|
||||
* -Started coding this file.
|
||||
*
|
||||
* 1.01 93/11/13 proven
|
||||
* -The functions readv() and writev() added
|
||||
*/
|
||||
|
||||
/*
|
||||
* New pthread types.
|
||||
*/
|
||||
enum fd_type {
|
||||
FD_NT, /* Not tested */
|
||||
FD_NIU, /* Known to be not in use */
|
||||
FD_HALF_DUPLEX, /* Files, and seeking devices */
|
||||
FD_FULL_DUPLEX, /* pipes, sockets, drivers, ... */
|
||||
FD_TEST_HALF_DUPLEX, /* Redo machdep_sys_fcntl */
|
||||
FD_TEST_FULL_DUPLEX /* Redo machdep_sys_fcntl */
|
||||
};
|
||||
|
||||
|
||||
#define FD_READ 0x1
|
||||
#define FD_WRITE 0x2
|
||||
#define FD_RDWR (FD_READ | FD_WRITE)
|
||||
|
||||
union fd_data {
|
||||
void *ptr;
|
||||
int i;
|
||||
};
|
||||
|
||||
struct timespec;
|
||||
struct iovec;
|
||||
struct fd_ops {
|
||||
pthread_ssize_t (*write) __P_((union fd_data, int, const void *,
|
||||
size_t, struct timespec *));
|
||||
pthread_ssize_t (*read) __P_((union fd_data, int, void *, size_t,
|
||||
struct timespec *));
|
||||
int (*close)();
|
||||
int (*fcntl)();
|
||||
int (*writev) __P_((union fd_data, int,
|
||||
const struct iovec *,
|
||||
int, struct timespec *));
|
||||
int (*readv) __P_((union fd_data, int,
|
||||
const struct iovec *,
|
||||
int, struct timespec *));
|
||||
off_t (*seek)();
|
||||
int use_kfds;
|
||||
};
|
||||
|
||||
struct fd_table_entry {
|
||||
struct pthread_queue r_queue;
|
||||
struct pthread_queue w_queue;
|
||||
struct pthread *r_owner;
|
||||
struct pthread *w_owner;
|
||||
pthread_mutex_t mutex;
|
||||
struct fd_table_entry *next;
|
||||
struct fd_ops *ops;
|
||||
enum fd_type type;
|
||||
int r_lockcount; /* Count for FILE read locks */
|
||||
int w_lockcount; /* Count for FILE write locks */
|
||||
int count;
|
||||
|
||||
/* data that needs to be passed to the type dependent fd */
|
||||
int flags;
|
||||
union fd_data fd;
|
||||
};
|
||||
|
||||
/*
|
||||
* Globals
|
||||
*/
|
||||
#if defined(PTHREAD_KERNEL)
|
||||
|
||||
extern struct fd_table_entry **fd_table;
|
||||
extern int dtablesize;
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* New functions
|
||||
*/
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#if defined(PTHREAD_KERNEL)
|
||||
|
||||
#endif
|
||||
|
||||
__END_DECLS
|
@ -1,54 +0,0 @@
|
||||
/* ==== fd_pipe.h ============================================================
|
||||
* Copyright (c) 1993 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Description : The new fast ITC pipe header.
|
||||
*
|
||||
* 1.00 93/08/14 proven
|
||||
* -Started coding this file.
|
||||
*/
|
||||
|
||||
struct __pipe {
|
||||
semaphore lock;
|
||||
char * buf;
|
||||
int size;
|
||||
int flags;
|
||||
int count;
|
||||
int offset;
|
||||
struct pthread * wait;
|
||||
char * wait_buf;
|
||||
size_t wait_size;
|
||||
};
|
||||
|
||||
#define RD_CLOSED 0x01
|
||||
#define WR_CLOSED 0x02
|
||||
|
@ -1,71 +0,0 @@
|
||||
/* ==== kernel.h ============================================================
|
||||
* Copyright (c) 1993 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Description : mutex header.
|
||||
*
|
||||
* 1.00 93/07/22 proven
|
||||
* -Started coding this file.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Defines only for the pthread user kernel.
|
||||
*/
|
||||
#if defined(PTHREAD_KERNEL)
|
||||
|
||||
#ifdef __GNUC__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#ifdef __ASSERT_FUNCTION
|
||||
#define PANIC() panic_kernel( __FILE__, __LINE__, __ASSERT_FUNCTION )
|
||||
#else
|
||||
#define PANIC() panic_kernel( __FILE__, __LINE__, (const char *)0 )
|
||||
#endif
|
||||
|
||||
|
||||
/* Time each rr thread gets */
|
||||
#define PTHREAD_RR_TIMEOUT 100000000
|
||||
|
||||
/* Set the errno value */
|
||||
#define SET_ERRNO(x) \
|
||||
{ \
|
||||
if (!pthread_run->error_p) { \
|
||||
pthread_run->error_p = &pthread_run->error; \
|
||||
} \
|
||||
(*(pthread_run->error_p)) = x; \
|
||||
}
|
||||
|
||||
/* Globals only the internals should see */
|
||||
extern struct pthread_prio_queue * pthread_current_prio_queue;
|
||||
extern volatile int pthread_kernel_lock;
|
||||
|
||||
#endif
|
@ -1,67 +0,0 @@
|
||||
/* ==== kthread.h ============================================================
|
||||
* Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Description : Basic pthread header.
|
||||
*
|
||||
* 1.00 93/07/20 proven
|
||||
* -Started coding this file.
|
||||
*
|
||||
* 1.32 94/05/25 proven
|
||||
* -Started adding kernel thread support
|
||||
*/
|
||||
|
||||
#ifndef _KTHREAD_H_
|
||||
#define _KTHREAD_H_
|
||||
|
||||
enum kthread_state {
|
||||
KS_RUNNING,
|
||||
KS_DEAD,
|
||||
};
|
||||
|
||||
struct kthread {
|
||||
enum kthread_state state;
|
||||
|
||||
struct pthread_queue pthread_current_queue;
|
||||
struct pthread * pthread_link_list;
|
||||
struct pthread * pthread_run;
|
||||
|
||||
semaphore lock;
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
* Globals
|
||||
*/
|
||||
extern struct kthread * kthread_link_list;
|
||||
|
||||
#endif
|
@ -1,102 +0,0 @@
|
||||
/* ==== mutex.h ============================================================
|
||||
* Copyright (c) 1993 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Description : mutex header.
|
||||
*
|
||||
* 1.00 93/07/20 proven
|
||||
* -Started coding this file.
|
||||
*/
|
||||
|
||||
/*
|
||||
* New mutex structures
|
||||
*/
|
||||
enum pthread_mutextype {
|
||||
MUTEX_TYPE_STATIC_FAST = 0,
|
||||
MUTEX_TYPE_FAST = 1,
|
||||
MUTEX_TYPE_COUNTING_FAST = 2, /* Recursive */
|
||||
MUTEX_TYPE_METERED = 3,
|
||||
MUTEX_TYPE_DEBUG = 4, /* This will have lots of options */
|
||||
MUTEX_TYPE_MAX
|
||||
};
|
||||
|
||||
#define PTHREAD_MUTEXTYPE_FAST 1
|
||||
#define PTHREAD_MUTEXTYPE_DEBUG 4
|
||||
#define PTHREAD_MUTEXTYPE_RECURSIVE 2
|
||||
|
||||
union pthread_mutex_data {
|
||||
void * m_ptr;
|
||||
int m_count;
|
||||
};
|
||||
|
||||
typedef struct pthread_mutex {
|
||||
enum pthread_mutextype m_type;
|
||||
struct pthread_queue m_queue;
|
||||
struct pthread * m_owner;
|
||||
semaphore m_lock;
|
||||
union pthread_mutex_data m_data;
|
||||
long m_flags;
|
||||
} pthread_mutex_t;
|
||||
|
||||
typedef struct pthread_mutexattr {
|
||||
enum pthread_mutextype m_type;
|
||||
long m_flags;
|
||||
} pthread_mutexattr_t;
|
||||
|
||||
/*
|
||||
* Flags for mutexes.
|
||||
*/
|
||||
#define MUTEX_FLAGS_PRIVATE 0x01
|
||||
#define MUTEX_FLAGS_INITED 0x02
|
||||
#define MUTEX_FLAGS_BUSY 0x04
|
||||
|
||||
/*
|
||||
* Static mutex initialization values.
|
||||
*/
|
||||
#define PTHREAD_MUTEX_INITIALIZER \
|
||||
{ MUTEX_TYPE_STATIC_FAST, PTHREAD_QUEUE_INITIALIZER, \
|
||||
NULL, SEMAPHORE_CLEAR, { NULL }, MUTEX_FLAGS_INITED }
|
||||
|
||||
/*
|
||||
* New functions
|
||||
*/
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
int pthread_mutex_init __P_((pthread_mutex_t *, const pthread_mutexattr_t *));
|
||||
int pthread_mutex_lock __P_((pthread_mutex_t *));
|
||||
int pthread_mutex_unlock __P_((pthread_mutex_t *));
|
||||
int pthread_mutex_trylock __P_((pthread_mutex_t *));
|
||||
int pthread_mutex_destroy __P_((pthread_mutex_t *));
|
||||
|
||||
__END_DECLS
|
||||
|
@ -1,12 +0,0 @@
|
||||
#ifndef _SYS___PATHS_H_
|
||||
#define _SYS___PATHS_H_
|
||||
#define _PATH_PTY "/dev/"
|
||||
#define _PATH_TZDIR "/usr/lib/zoneinfo"
|
||||
#define _PATH_TZFILE "/usr/lib/zoneinfo/localtime"
|
||||
#define _PATH_RESCONF "/etc/resolv.conf"
|
||||
#define _PATH_HOSTS "/etc/hosts"
|
||||
#define _PATH_NETWORKS "/etc/networks"
|
||||
#define _PATH_PROTOCOLS "/etc/protocols"
|
||||
#define _PATH_SERVICES "/etc/services"
|
||||
#define _PATH_BSHELL "/bin/sh"
|
||||
#endif
|
@ -1,78 +0,0 @@
|
||||
/* ==== priority.h ==========================================================
|
||||
* Copyright (c) 1994 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Description : Priority functions.
|
||||
*
|
||||
* 1.00 94/09/19 proven
|
||||
* -Started coding this file.
|
||||
*/
|
||||
|
||||
#ifndef _PTHREAD_PRIO_QUEUE_H_
|
||||
#define _PTHREAD_PRIO_QUEUE_H_
|
||||
|
||||
/*
|
||||
* Static queue initialization values.
|
||||
*/
|
||||
#define PTHREAD_DEFAULT_PRIORITY 64
|
||||
#define PTHREAD_MAX_PRIORITY 126
|
||||
#define PTHREAD_MIN_PRIORITY 0
|
||||
|
||||
/*
|
||||
* New prio_queue structures
|
||||
*/
|
||||
struct pthread_prio_level {
|
||||
struct pthread * first;
|
||||
struct pthread * last;
|
||||
};
|
||||
|
||||
struct pthread_prio_queue {
|
||||
void * data;
|
||||
struct pthread * next;
|
||||
struct pthread_prio_level level[PTHREAD_MAX_PRIORITY + 1];
|
||||
};
|
||||
|
||||
/*
|
||||
* New functions
|
||||
*/
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
void pthread_prio_queue_init __P_((struct pthread_prio_queue *));
|
||||
void pthread_prio_queue_enq __P_((struct pthread_prio_queue *,
|
||||
struct pthread *));
|
||||
struct pthread *pthread_prio_queue_deq
|
||||
__P_((struct pthread_prio_queue *));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
@ -1,122 +0,0 @@
|
||||
/* ==== pthread_attr.h ========================================================
|
||||
* Copyright (c) 1993 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Description : Basic pthread attributes header.
|
||||
*
|
||||
* 1.00 93/11/03 proven
|
||||
* -Started coding this file.
|
||||
*/
|
||||
|
||||
#define _POSIX_THREAD_ATTR_STACKSIZE
|
||||
|
||||
#define PTHREAD_STACK_DEFAULT 65536
|
||||
|
||||
/* flags */
|
||||
#define PTHREAD_DETACHED 0x1
|
||||
#define PTHREAD_SCOPE_SYSTEM 0x2
|
||||
#define PTHREAD_INHERIT_SCHED 0x4
|
||||
#define PTHREAD_NOFLOAT 0x8
|
||||
|
||||
#define PTHREAD_CREATE_DETACHED PTHREAD_DETACHED
|
||||
#define PTHREAD_CREATE_JOINABLE 0
|
||||
#define PTHREAD_SCOPE_PROCESS 0
|
||||
#define PTHREAD_EXPLICIT_SCHED 0
|
||||
|
||||
/*
|
||||
* New pthread attribute types.
|
||||
*/
|
||||
enum schedparam_policy {
|
||||
SCHED_RR,
|
||||
SCHED_IO,
|
||||
SCHED_FIFO,
|
||||
SCHED_OTHER
|
||||
};
|
||||
|
||||
struct pthread_attr {
|
||||
enum schedparam_policy schedparam_policy;
|
||||
int sched_priority;
|
||||
|
||||
int flags;
|
||||
void * arg_attr;
|
||||
void (*cleanup_attr)();
|
||||
void * stackaddr_attr;
|
||||
size_t stacksize_attr;
|
||||
};
|
||||
|
||||
struct sched_param {
|
||||
int sched_priority;
|
||||
void * no_data;
|
||||
};
|
||||
|
||||
/*
|
||||
* New functions
|
||||
*/
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#if defined(DCE_COMPAT)
|
||||
|
||||
typedef struct pthread_attr * pthread_attr_t;
|
||||
|
||||
int pthread_attr_create __P_((pthread_attr_t *));
|
||||
int pthread_attr_delete __P_((pthread_attr_t *));
|
||||
|
||||
#else
|
||||
|
||||
typedef struct pthread_attr pthread_attr_t;
|
||||
|
||||
int pthread_attr_init __P_((pthread_attr_t *));
|
||||
int pthread_attr_destroy __P_((pthread_attr_t *));
|
||||
int pthread_attr_setstacksize __P_((pthread_attr_t *, size_t));
|
||||
int pthread_attr_getstacksize __P_((pthread_attr_t *, size_t *));
|
||||
int pthread_attr_setstackaddr __P_((pthread_attr_t *, void *));
|
||||
int pthread_attr_getstackaddr __P_((pthread_attr_t *, void **));
|
||||
int pthread_attr_setdetachstate __P_((pthread_attr_t *, int ));
|
||||
int pthread_attr_getdetachstate __P_((pthread_attr_t *, int *));
|
||||
int pthread_attr_setscope __P_((pthread_attr_t *, int ));
|
||||
int pthread_attr_getscope __P_((pthread_attr_t *, int *));
|
||||
int pthread_attr_setinheritsched __P_((pthread_attr_t *, int ));
|
||||
int pthread_attr_getinheritsched __P_((pthread_attr_t *, int *));
|
||||
int pthread_attr_setschedpolicy __P_((pthread_attr_t *, int ));
|
||||
int pthread_attr_getschedpolicy __P_((pthread_attr_t *, int *));
|
||||
int pthread_attr_setschedparam __P_((pthread_attr_t *, struct sched_param *));
|
||||
int pthread_attr_getschedparam __P_((pthread_attr_t *, struct sched_param *));
|
||||
|
||||
int pthread_attr_setfloatstate __P_((pthread_attr_t *, int ));
|
||||
int pthread_attr_getfloatstate __P_((pthread_attr_t *, int *));
|
||||
int pthread_attr_setcleanup __P_((pthread_attr_t *, void (*routine)(void *),
|
||||
void *));
|
||||
|
||||
#endif
|
||||
|
||||
__END_DECLS
|
@ -1,58 +0,0 @@
|
||||
/* ==== pthread_once.h ========================================================
|
||||
* Copyright (c) 1993 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Description : mutex header.
|
||||
*
|
||||
* 1.00 93/12/12 proven
|
||||
* -Started coding this file.
|
||||
*/
|
||||
|
||||
/* New pthread_once structures */
|
||||
typedef struct pthread_once {
|
||||
int state;
|
||||
pthread_mutex_t mutex;
|
||||
} pthread_once_t;
|
||||
|
||||
/* Static pthread_once_t initialization value. */
|
||||
#define PTHREAD_NEEDS_INIT 0
|
||||
#define PTHREAD_DONE_INIT 1
|
||||
#define PTHREAD_ONCE_INIT { PTHREAD_NEEDS_INIT, PTHREAD_MUTEX_INITIALIZER }
|
||||
|
||||
/* New functions */
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
int pthread_once __P_((pthread_once_t *, void (*init_routine)(void)));
|
||||
|
||||
__END_DECLS
|
||||
|
@ -1,67 +0,0 @@
|
||||
/* ==== queue.h ============================================================
|
||||
* Copyright (c) 1993 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Description : mutex header.
|
||||
*
|
||||
* 1.00 93/07/20 proven
|
||||
* -Started coding this file.
|
||||
*/
|
||||
|
||||
/*
|
||||
* New queue structures
|
||||
*/
|
||||
struct pthread_queue {
|
||||
struct pthread *q_next;
|
||||
struct pthread *q_last;
|
||||
void *q_data;
|
||||
};
|
||||
|
||||
/*
|
||||
* Static queue initialization values.
|
||||
*/
|
||||
#define PTHREAD_QUEUE_INITIALIZER { NULL, NULL, NULL }
|
||||
|
||||
/*
|
||||
* New functions
|
||||
* Should make pthread_queue_get a macro
|
||||
*/
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
void pthread_queue_init __P_((struct pthread_queue *));
|
||||
void pthread_queue_enq __P_((struct pthread_queue *, struct pthread *));
|
||||
int pthread_queue_remove __P_((struct pthread_queue *, struct pthread *));
|
||||
struct pthread *pthread_queue_get __P_((struct pthread_queue *));
|
||||
struct pthread *pthread_queue_deq __P_((struct pthread_queue *));
|
||||
|
||||
__END_DECLS
|
@ -1,63 +0,0 @@
|
||||
/* ==== sleep.h ============================================================
|
||||
* Copyright (c) 1994 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Description : sleep header.
|
||||
*
|
||||
* 1.00 94/06/04 proven
|
||||
* -Started coding this file.
|
||||
*/
|
||||
|
||||
#if defined(PTHREAD_KERNEL)
|
||||
|
||||
#include <timers.h>
|
||||
|
||||
/*
|
||||
* New functions
|
||||
*/
|
||||
static inline int machdep_gettimeofday(struct timespec * current_time)
|
||||
{
|
||||
struct timeval current_real_time;
|
||||
int ret;
|
||||
|
||||
ret = gettimeofday(¤t_real_time, NULL);
|
||||
TIMEVAL_TO_TIMESPEC((¤t_real_time), current_time);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
void sleep_schedule __P_((struct timespec *, struct timespec *));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
@ -1,66 +0,0 @@
|
||||
/* ==== specific.h ========================================================
|
||||
* Copyright (c) 1994 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Description : Thread specific data management header.
|
||||
*
|
||||
* 1.20 94/03/30 proven
|
||||
* -Started coding this file.
|
||||
*/
|
||||
|
||||
#define PTHREAD_DATAKEYS_MAX 256
|
||||
#define _POSIX_THREAD_DESTRUTOR_ITERATIONS 4
|
||||
|
||||
/*
|
||||
* New thread specific key type.
|
||||
*/
|
||||
struct pthread_key {
|
||||
pthread_mutex_t mutex;
|
||||
long count;
|
||||
void (*destructor)();
|
||||
};
|
||||
|
||||
typedef int pthread_key_t;
|
||||
|
||||
/*
|
||||
* New functions
|
||||
*/
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
int pthread_key_create __P_((pthread_key_t *, void (*routine)(void *)));
|
||||
int pthread_setspecific __P_((pthread_key_t, const void *));
|
||||
void *pthread_getspecific __P_((pthread_key_t));
|
||||
int pthread_key_delete __P_((pthread_key_t));
|
||||
|
||||
__END_DECLS
|
||||
|
@ -1,64 +0,0 @@
|
||||
/* This file defines the states that a given thread can be in.
|
||||
|
||||
The funky macro use here is so that this one header file can also
|
||||
define the corresponding state names, so that the two lists can't
|
||||
get inconsistent within a given source tree. */
|
||||
|
||||
/* The thread is runnable. */
|
||||
__pthread_defstate (PS_RUNNING, "running")
|
||||
|
||||
/*
|
||||
* The rest of the states are where the thread is waiting on some event.
|
||||
* Someday maybe the "data" field will point to the object being waited for.
|
||||
*/
|
||||
|
||||
/* Waiting for a mutex (pthread_mutex_lock()). */
|
||||
__pthread_defstate (PS_MUTEX_WAIT, "mutex")
|
||||
|
||||
/* Waiting on a condition variable
|
||||
(pthread_cond_wait(), or pthread_cond_timedwait()). */
|
||||
__pthread_defstate (PS_COND_WAIT, "cond")
|
||||
|
||||
/*
|
||||
* File descriptor stuff.
|
||||
*
|
||||
* File descriptors have a special lock. If it is a FULL_DUPLEX fd such as
|
||||
* a socket or fifo then it has two mutexes, one for reads and one for writes.
|
||||
* Some routines will even try to get both. It will always try to get the
|
||||
* read lock first before tring to get the write. All other fds only have
|
||||
* one mutex which all calls will get. It is displayed as if it is a read lock.
|
||||
*/
|
||||
/* Waiting on a fd read lock (fd_lock()) */
|
||||
__pthread_defstate (PS_FDLR_WAIT, "fdlr")
|
||||
|
||||
/* Waiting on a fd write lock (fd_lock()) */
|
||||
__pthread_defstate (PS_FDLW_WAIT, "fdlw")
|
||||
|
||||
/* Waiting for the kernel fd to have data to read,
|
||||
(read(), readv(), recv(), recvfrom(), and recvmsg()). */
|
||||
__pthread_defstate (PS_FDR_WAIT, "fdr") /* Waiting on a kernel read */
|
||||
|
||||
/* Waiting for the kernel fd to allow a write
|
||||
(write(), writev(), send(), sendto(), sendmsg()) */
|
||||
__pthread_defstate (PS_FDW_WAIT, "fdw")
|
||||
|
||||
/* Waiting for several fds in a select() */
|
||||
__pthread_defstate (PS_SELECT_WAIT, "select")
|
||||
|
||||
/* Waiting on a sleep (sleep(), usleep() or nanosleep()). */
|
||||
__pthread_defstate (PS_SLEEP_WAIT, "sleep")
|
||||
|
||||
/* Waiting for a child to die (wait(), waitpid(), wait3(), or wait4()). */
|
||||
__pthread_defstate (PS_WAIT_WAIT, "wait")
|
||||
|
||||
/* Waiting on some set of signals (sigwait()) */
|
||||
__pthread_defstate (PS_SIGWAIT, "sig")
|
||||
|
||||
/* Waiting for a thread to die (pthread_join()) */
|
||||
__pthread_defstate (PS_JOIN, "join")
|
||||
|
||||
/* Waiting for some thread to join with me or detach me */
|
||||
__pthread_defstate (PS_DEAD, "dead")
|
||||
|
||||
/* Waiting for some thread to create me */
|
||||
__pthread_defstate (PS_UNALLOCED, "unallocated")
|
@ -1,46 +0,0 @@
|
||||
#ifndef pthread_types_h
|
||||
#define pthread_types_h
|
||||
|
||||
#include <pthread/xtypes.h>
|
||||
#include <pthread/ac-types.h>
|
||||
|
||||
#if !defined (pthread_va_list) && defined (__NetBSD__)
|
||||
#include <stdarg.h>
|
||||
#define pthread_va_list _BSD_VA_LIST_
|
||||
#endif
|
||||
|
||||
#if !defined (pthread_va_list) && defined (__GNUC__)
|
||||
#define __need_va_list
|
||||
#include <stdarg.h>
|
||||
#define pthread_va_list __gnuc_va_list
|
||||
#endif /* pthread_va_list, __GNUC__ */
|
||||
|
||||
/* OSF/1 does it this way. */
|
||||
#if !defined (pthread_va_list) && defined (pthread_have_va_list_h)
|
||||
#ifndef _VA_LIST
|
||||
#define _HIDDEN_VA_LIST
|
||||
#include <va_list.h>
|
||||
#define pthread_va_list __va_list
|
||||
#else
|
||||
/* va_list has already been defined */
|
||||
#define pthread_va_list va_list
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* If all else fails... */
|
||||
#ifndef pthread_va_list
|
||||
#include <stdarg.h>
|
||||
#define pthread_va_list va_list
|
||||
#endif
|
||||
|
||||
#if defined(__STDC__) || defined(__GNUC__)
|
||||
#ifndef __P_
|
||||
#define __P_(protos) protos
|
||||
#endif
|
||||
#else
|
||||
#ifndef __P_
|
||||
#define __P_(protos)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* pthread_types_h */
|
@ -1,159 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 1991 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)unistd.h 5.13 (Berkeley) 6/17/91
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
void _exit __P_((int));
|
||||
int access __P_((const char *, int));
|
||||
int chdir __P_((const char *));
|
||||
int chown __P_((const char *, uid_t, gid_t));
|
||||
int close __P_((int));
|
||||
int dup __P_((int));
|
||||
int dup2 __P_((int, int));
|
||||
int execve __P_((const char *, char * const *, char * const *));
|
||||
pid_t fork __P_((void));
|
||||
int isatty __P_((int));
|
||||
int link __P_((const char *, const char *));
|
||||
off_t lseek __P_((int, off_t, int));
|
||||
int pipe __P_((int *));
|
||||
ssize_t read __P_((int, void *, size_t));
|
||||
u_int sleep __P_((u_int));
|
||||
char *ttyname __P_((int));
|
||||
int unlink __P_((const char *));
|
||||
ssize_t write __P_((int, const void *, size_t));
|
||||
|
||||
/* Not implemented for threads yet */
|
||||
u_int alarm __P_((u_int));
|
||||
char *cuserid __P_((char *));
|
||||
int execl __P_((const char *, const char *, ...));
|
||||
int execle __P_((const char *, const char *, ...));
|
||||
int execlp __P_((const char *, const char *, ...));
|
||||
int execv __P_((const char *, char * const *));
|
||||
int execvp __P_((const char *, char * const *));
|
||||
long fpathconf __P_((int, int)); /* not yet */
|
||||
char *getcwd __P_((char *, size_t));
|
||||
gid_t getegid __P_((void));
|
||||
uid_t geteuid __P_((void));
|
||||
gid_t getgid __P_((void));
|
||||
int getgroups __P_((int, int *)); /* XXX (gid_t *) */
|
||||
char *getlogin __P_((void));
|
||||
pid_t getpgrp __P_((void));
|
||||
pid_t getpid __P_((void));
|
||||
pid_t getppid __P_((void));
|
||||
uid_t getuid __P_((void));
|
||||
long pathconf __P_((const char *, int)); /* not yet */
|
||||
int pause __P_((void));
|
||||
int rmdir __P_((const char *));
|
||||
int setgid __P_((gid_t));
|
||||
int setpgid __P_((pid_t, pid_t));
|
||||
pid_t setsid __P_((void));
|
||||
int setuid __P_((uid_t));
|
||||
long sysconf __P_((int)); /* not yet */
|
||||
pid_t tcgetpgrp __P_((int));
|
||||
int tcsetpgrp __P_((int, pid_t));
|
||||
|
||||
#ifndef _POSIX_SOURCE
|
||||
|
||||
int acct __P_((const char *));
|
||||
int async_daemon __P_((void));
|
||||
char *brk __P_((const char *));
|
||||
int chflags __P_((const char *, long));
|
||||
int chroot __P_((const char *));
|
||||
char *crypt __P_((const char *, const char *));
|
||||
int des_cipher __P_((const char *, char *, long, int));
|
||||
int des_setkey __P_((const char *key));
|
||||
int encrypt __P_((char *, int));
|
||||
void endusershell __P_((void));
|
||||
int exect __P_((const char *, char * const *, char * const *));
|
||||
int fchdir __P_((int));
|
||||
int fchflags __P_((int, long));
|
||||
int fchown __P_((int, uid_t, gid_t));
|
||||
int fsync __P_((int));
|
||||
int ftruncate __P_((int, off_t));
|
||||
int getdtablesize __P_((void));
|
||||
long gethostid __P_((void));
|
||||
int gethostname __P_((char *, int));
|
||||
mode_t getmode __P_((const void *, mode_t));
|
||||
int getpagesize __P_((void));
|
||||
char *getpass __P_((const char *));
|
||||
char *getusershell __P_((void));
|
||||
char *getwd __P_((char *)); /* obsoleted by getcwd() */
|
||||
int initgroups __P_((const char *, int));
|
||||
int mknod __P_((const char *, mode_t, dev_t));
|
||||
int mkstemp __P_((char *));
|
||||
char *mktemp __P_((char *));
|
||||
int nfssvc __P_((int));
|
||||
int nice __P_((int));
|
||||
void psignal __P_((u_int, const char *));
|
||||
extern char *sys_siglist[];
|
||||
int profil __P_((char *, int, int, int));
|
||||
int rcmd __P_((char **, int, const char *,
|
||||
const char *, const char *, int *));
|
||||
char *re_comp __P_((const char *));
|
||||
int re_exec __P_((const char *));
|
||||
int readlink __P_((const char *, char *, int));
|
||||
int reboot __P_((int));
|
||||
int revoke __P_((const char *));
|
||||
int rresvport __P_((int *));
|
||||
int ruserok __P_((const char *, int, const char *, const char *));
|
||||
char *sbrk __P_((int));
|
||||
int setegid __P_((gid_t));
|
||||
int seteuid __P_((uid_t));
|
||||
int setgroups __P_((int, const int *));
|
||||
void sethostid __P_((long));
|
||||
int sethostname __P_((const char *, int));
|
||||
int setkey __P_((const char *));
|
||||
int setlogin __P_((const char *));
|
||||
void *setmode __P_((const char *));
|
||||
int setpgrp __P_((pid_t pid, pid_t pgrp)); /* obsoleted by setpgid() */
|
||||
int setregid __P_((int, int));
|
||||
int setreuid __P_((int, int));
|
||||
int setrgid __P_((gid_t));
|
||||
int setruid __P_((uid_t));
|
||||
void setusershell __P_((void));
|
||||
int swapon __P_((const char *));
|
||||
int symlink __P_((const char *, const char *));
|
||||
void sync __P_((void));
|
||||
int syscall __P_((int, ...));
|
||||
int truncate __P_((const char *, off_t));
|
||||
int ttyslot __P_((void));
|
||||
u_int ualarm __P_((u_int, u_int));
|
||||
void usleep __P_((u_int));
|
||||
int vfork __P_((void));
|
||||
|
||||
#endif /* !_POSIX_SOURCE */
|
||||
__END_DECLS
|
||||
|
@ -1,89 +0,0 @@
|
||||
/* ==== util.h ============================================================
|
||||
* Copyright (c) 1991, 1992, 1993 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Description : Header file for generic utility functions.
|
||||
*
|
||||
* 91/08/31 proven - Added exchange.
|
||||
* Exchange any two objects of any size in any table.
|
||||
*
|
||||
* 91/10/06 proven - Cleaned out all the old junk.
|
||||
*
|
||||
* 91/03/06 proven - Added getint.
|
||||
*/
|
||||
|
||||
#ifndef _PTHREAD_UTIL_H
|
||||
#define _PTHREAD_UTIL_H
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
/* Stuff only pthread internals really uses */
|
||||
#if defined(PTHREAD_KERNEL)
|
||||
|
||||
#undef FALSE
|
||||
#undef TRUE
|
||||
|
||||
typedef enum Boolean {
|
||||
FALSE,
|
||||
TRUE
|
||||
} Boolean;
|
||||
|
||||
#define OK 0
|
||||
#define NUL '\0'
|
||||
#define NOTOK -1
|
||||
|
||||
#if ! defined(min)
|
||||
#define min(a,b) (((a)<(b))?(a):(b))
|
||||
#define max(a,b) (((a)>(b))?(a):(b))
|
||||
#endif
|
||||
|
||||
/* Alingn the size to the next multiple of 4 bytes */
|
||||
#define ALIGN4(size) ((size + 3) & ~3)
|
||||
#define ALIGN8(size) ((size + 7) & ~7)
|
||||
|
||||
#ifdef DEBUG
|
||||
#define DEBUG0(s) printf(s)
|
||||
#define DEBUG1(s,a) printf(s,a)
|
||||
#define DEBUG2(s,a,b) printf(s,a,b)
|
||||
#define DEBUG3(s,a,b,c) printf(s,a,b,c)
|
||||
#else
|
||||
#define DEBUG0(s)
|
||||
#define DEBUG1(s)
|
||||
#define DEBUG2(s)
|
||||
#define DEBUG3(s)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,43 +0,0 @@
|
||||
/* ==== version.h ============================================================
|
||||
* Copyright (c) 1994 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Description : Header file for programs that what to KNOW the version.
|
||||
*
|
||||
* 94/08/24 proven - Added this file for pthreads.
|
||||
*/
|
||||
|
||||
#ifndef _PTHREAD_VERSION_H
|
||||
#define _PTHREAD_VERSION_H 1
|
||||
#define _PTHREAD_VERSION_M 60
|
||||
#define _PTHREAD_VERSION_P 0
|
||||
#endif
|
@ -1,13 +0,0 @@
|
||||
/* If you need any special typedefs for function pointers &c to try
|
||||
testing for in configure.in, define them here. */
|
||||
|
||||
/* According to ANSI, two struct types in the same module are not
|
||||
compatible types. So there's no way to define a type for
|
||||
pthread_sigset_t that's compatible with sigset_t when they're
|
||||
structure types, if we assume we can't pull in a __sigset_t or
|
||||
something by itself from system header files.
|
||||
|
||||
Since that was my main reason for creating this file, there isn't
|
||||
anything here now. If after working on this code a bit longer we
|
||||
don't find anything else to put here, this file should just go
|
||||
away. */
|
@ -1,93 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
* (c) UNIX System Laboratories, Inc.
|
||||
* All or some portions of this file are derived from material licensed
|
||||
* to the University of California by American Telephone and Telegraph
|
||||
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
* the permission of UNIX System Laboratories, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pwd.h 8.2 (Berkeley) 1/21/94
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _PWD_H_
|
||||
#define _PWD_H_
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef _POSIX_SOURCE
|
||||
#define _PATH_PASSWD "/etc/passwd"
|
||||
#define _PATH_MASTERPASSWD "/etc/master.passwd"
|
||||
|
||||
#define _PATH_MP_DB "/etc/pwd.db"
|
||||
#define _PATH_SMP_DB "/etc/spwd.db"
|
||||
|
||||
#define _PATH_PWD_MKDB "/usr/sbin/pwd_mkdb"
|
||||
|
||||
#define _PW_KEYBYNAME '1' /* stored by name */
|
||||
#define _PW_KEYBYNUM '2' /* stored by entry in the "file" */
|
||||
#define _PW_KEYBYUID '3' /* stored by uid */
|
||||
|
||||
#define _PASSWORD_EFMT1 '_' /* extended encryption format */
|
||||
|
||||
#define _PASSWORD_LEN 128 /* max length, not counting NULL */
|
||||
#endif
|
||||
|
||||
struct passwd {
|
||||
char *pw_name; /* user name */
|
||||
char *pw_passwd; /* encrypted password */
|
||||
int pw_uid; /* user uid */
|
||||
int pw_gid; /* user gid */
|
||||
time_t pw_change; /* password change time */
|
||||
char *pw_class; /* user access class */
|
||||
char *pw_gecos; /* Honeywell login info */
|
||||
char *pw_dir; /* home directory */
|
||||
char *pw_shell; /* default shell */
|
||||
time_t pw_expire; /* account expiration */
|
||||
};
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
struct passwd *getpwuid __P_((uid_t));
|
||||
struct passwd *getpwnam __P_((const char *));
|
||||
#ifndef _POSIX_SOURCE
|
||||
struct passwd *getpwent __P_((void));
|
||||
#ifndef _XOPEN_SOURCE
|
||||
int setpassent __P_((int));
|
||||
#endif
|
||||
void setpwent __P_((void));
|
||||
void endpwent __P_((void));
|
||||
#endif
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_PWD_H_ */
|
@ -1,179 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1983, 1987, 1989 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)resolv.h 5.15 (Berkeley) 4/3/91
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _RESOLV_H_
|
||||
#define _RESOLV_H_
|
||||
|
||||
#include <netinet/in.h>
|
||||
/*
|
||||
* This is specificly for Solaris which defines NOERROR in the streams
|
||||
* header files and defines it differently than in arpa/nameser.h
|
||||
*/
|
||||
#ifdef NOERROR
|
||||
#undef NOERROR
|
||||
#endif
|
||||
#include <arpa/nameser.h>
|
||||
|
||||
/*
|
||||
* revision information. this is the release date in YYYYMMDD format.
|
||||
* it can change every day so the right thing to do with it is use it
|
||||
* in preprocessor commands such as "#if (__RES > 19931104)". do not
|
||||
* compare for equality; rather, use it to determine whether your resolver
|
||||
* is new enough to contain a certain feature.
|
||||
*/
|
||||
|
||||
#define __RES 19940703
|
||||
|
||||
/*
|
||||
* Resolver configuration file.
|
||||
* Normally not present, but may contain the address of the
|
||||
* inital name server(s) to query and the domain search list.
|
||||
*/
|
||||
|
||||
#ifndef _PATH_RESCONF
|
||||
#define _PATH_RESCONF "/etc/resolv.conf"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Global defines and variables for resolver stub.
|
||||
*/
|
||||
#define MAXNS 3 /* max # name servers we'll track */
|
||||
#define MAXDFLSRCH 3 /* # default domain levels to try */
|
||||
#define MAXDNSRCH 6 /* max # domains in search path */
|
||||
#define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */
|
||||
#define MAXDNSLUS 4 /* max # of host lookup types */
|
||||
|
||||
#define RES_TIMEOUT 5 /* min. seconds between retries */
|
||||
#define MAXRESOLVSORT 10 /* number of net to sort on */
|
||||
#define RES_MAXNDOTS 15 /* should reflect bit field size */
|
||||
|
||||
struct __res_state {
|
||||
int retrans; /* retransmition time interval */
|
||||
int retry; /* number of times to retransmit */
|
||||
long options; /* option flags - see below. */
|
||||
int nscount; /* number of name servers */
|
||||
struct sockaddr_in nsaddr_list[MAXNS]; /* address of name server */
|
||||
#define nsaddr nsaddr_list[0] /* for backward compatibility */
|
||||
u_short id; /* current packet id */
|
||||
char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
|
||||
char defdname[MAXDNAME]; /* default domain */
|
||||
long pfcode; /* RES_PRF_ flags - see below. */
|
||||
u_char ndots:4; /* threshold for initial abs. query */
|
||||
u_char nsort:4; /* number of elements in sort_list[] */
|
||||
char unused[3];
|
||||
struct {
|
||||
struct in_addr addr;
|
||||
u_long mask;
|
||||
} sort_list[MAXRESOLVSORT];
|
||||
char lookups[MAXDNSLUS];
|
||||
};
|
||||
|
||||
/*
|
||||
* Resolver options
|
||||
*/
|
||||
#define RES_INIT 0x0001 /* address initialized */
|
||||
#define RES_DEBUG 0x0002 /* print debug messages */
|
||||
#define RES_AAONLY 0x0004 /* authoritative answers only */
|
||||
#define RES_USEVC 0x0008 /* use virtual circuit */
|
||||
#define RES_PRIMARY 0x0010 /* query primary server only */
|
||||
#define RES_IGNTC 0x0020 /* ignore trucation errors */
|
||||
#define RES_RECURSE 0x0040 /* recursion desired */
|
||||
#define RES_DEFNAMES 0x0080 /* use default domain name */
|
||||
#define RES_STAYOPEN 0x0100 /* Keep TCP socket open */
|
||||
#define RES_DNSRCH 0x0200 /* search up local domain tree */
|
||||
|
||||
#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
|
||||
|
||||
/*
|
||||
* Resolver "pfcode" values. Used by dig.
|
||||
*/
|
||||
#define RES_PRF_STATS 0x0001
|
||||
/* 0x0002 */
|
||||
#define RES_PRF_CLASS 0x0004
|
||||
#define RES_PRF_CMD 0x0008
|
||||
#define RES_PRF_QUES 0x0010
|
||||
#define RES_PRF_ANS 0x0020
|
||||
#define RES_PRF_AUTH 0x0040
|
||||
#define RES_PRF_ADD 0x0080
|
||||
#define RES_PRF_HEAD1 0x0100
|
||||
#define RES_PRF_HEAD2 0x0200
|
||||
#define RES_PRF_TTLID 0x0400
|
||||
#define RES_PRF_HEADX 0x0800
|
||||
#define RES_PRF_QUERY 0x1000
|
||||
#define RES_PRF_REPLY 0x2000
|
||||
#define RES_PRF_INIT 0x4000
|
||||
/* 0x8000 */
|
||||
|
||||
#define _res (*_res_status())
|
||||
#define h_errno (_res_get_error())
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* Private routines shared between libc/net, named, nslookup and others. */
|
||||
#define dn_skipname __dn_skipname
|
||||
#define fp_query __fp_query
|
||||
#define hostalias __hostalias
|
||||
#define putlong __putlong
|
||||
#define putshort __putshort
|
||||
#define p_class __p_class
|
||||
#define p_time __p_time
|
||||
#define p_type __p_type
|
||||
__BEGIN_DECLS
|
||||
struct __res_state *_res_status __P_((void));
|
||||
int _res_get_error __P_((void));
|
||||
|
||||
int __dn_skipname __P_((const u_char *, const u_char *));
|
||||
void __fp_query __P_((char *, FILE *));
|
||||
char *__hostalias __P_((const char *));
|
||||
void __putlong __P_((pthread_ipaddr_type, unsigned char *));
|
||||
void __putshort __P_((pthread_ipport_type, unsigned char *));
|
||||
char *__p_class __P_((int));
|
||||
char *__p_time __P_((unsigned long));
|
||||
char *__p_type __P_((int));
|
||||
|
||||
int dn_comp __P_((const unsigned char *, unsigned char *, int,
|
||||
unsigned char **, unsigned char **));
|
||||
int dn_expand __P_((const unsigned char *, const unsigned char *,
|
||||
const unsigned char *, unsigned char *, int));
|
||||
int res_init __P_((void));
|
||||
int res_mkquery __P_((int, const char *, int, int, const char *, int,
|
||||
const char *, char *, int));
|
||||
int res_send __P_((const char *, int, char *, int));
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_RESOLV_H_ */
|
||||
|
@ -1,57 +0,0 @@
|
||||
/* ==== pthread.h ============================================================
|
||||
* Copyright (c) 1995 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Description : Basic pthread header.
|
||||
*
|
||||
* 1.00 93/08/29 proven
|
||||
* -Started coding this file.
|
||||
*/
|
||||
|
||||
#ifndef _SCHED_H_
|
||||
#define _SCHED_H_
|
||||
|
||||
#include <pthread/prio_queue.h>
|
||||
|
||||
/*
|
||||
* New functions
|
||||
*/
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
int sched_yield __P_((void));
|
||||
int sched_get_priority_max __P_((int));
|
||||
int sched_get_priority_min __P_((int));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
@ -1,20 +0,0 @@
|
||||
/*
|
||||
This is written by Sergei Golubchik for MySQL AB and is in public domain.
|
||||
|
||||
Simple implementation of semaphores, needed to compile MySQL with
|
||||
MIT-pthreads.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
pthread_mutex_t mutex;
|
||||
pthread_cond_t cond;
|
||||
uint count;
|
||||
} sem_t;
|
||||
|
||||
int sem_init(sem_t * sem, int pshared, uint value);
|
||||
int sem_destroy(sem_t * sem);
|
||||
int sem_wait(sem_t * sem);
|
||||
int sem_trywait(sem_t * sem);
|
||||
int sem_post (sem_t * sem);
|
||||
int sem_post_multiple(sem_t * sem, uint count);
|
||||
int sem_getvalue (sem_t * sem, uint *sval);
|
@ -1,81 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)signal.h 8.3 (Berkeley) 3/30/94
|
||||
*/
|
||||
|
||||
#ifndef _SIGNAL_H
|
||||
#define _SIGNAL_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/__signal.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
int raise __P_((int));
|
||||
/* RETSIGTYPE signal __P_((int __sig, RETSIGTYPE)); */
|
||||
|
||||
#ifndef _ANSI_SOURCE
|
||||
|
||||
int sigfillset __P_((sigset_t *));
|
||||
int sigemptyset __P_((sigset_t *));
|
||||
int sigaddset __P_((sigset_t *, int));
|
||||
int sigdelset __P_((sigset_t *, int));
|
||||
int sigismember __P_((const sigset_t *, int));
|
||||
int sigsuspend __P_((const sigset_t *));
|
||||
int sigprocmask __P_((int, const sigset_t *, sigset_t *));
|
||||
|
||||
/* Still need work */
|
||||
int kill __P_((pid_t, int));
|
||||
int sigaction __P_((int, const struct sigaction *, struct sigaction *));
|
||||
int sigpending __P_((sigset_t *));
|
||||
|
||||
#ifndef _POSIX_SOURCE
|
||||
|
||||
int killpg __P_((pid_t, int));
|
||||
int siginterrupt __P_((int, int));
|
||||
void psignal __P_((unsigned int, const char *));
|
||||
|
||||
/* int sigpause __P_((int)); */
|
||||
/* int sigsetmask __P_((int)); */
|
||||
/* int sigblock __P_((int)); */
|
||||
/* int sigreturn __P_((struct sigcontext *)); */
|
||||
/* int sigvec __P_((int, struct sigvec *, struct sigvec *)); */
|
||||
/* int sigstack __P_((const struct sigstack *, struct sigstack *)); */
|
||||
|
||||
#endif /* !_POSIX_SOURCE */
|
||||
#endif /* !_ANSI_SOURCE */
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_USER_SIGNAL_H */
|
@ -1,371 +0,0 @@
|
||||
/* ==== stdio.h ============================================================
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* Copyright (c) 1993 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* Chris Torek.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)stdio.h 5.17 (Berkeley) 6/3/91
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _STDIO_H_
|
||||
#define _STDIO_H_
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <pthread/types.h>
|
||||
#include <pthread/posix.h>
|
||||
#include <sys/__stdio.h>
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
#define _FSTDIO /* Define for new stdio with functions. */
|
||||
|
||||
/*
|
||||
* NB: to fit things in six character monocase externals, the stdio
|
||||
* code uses the prefix `__s' for stdio objects, typically followed
|
||||
* by a three-character attempt at a mnemonic.
|
||||
*/
|
||||
|
||||
/* stdio buffers */
|
||||
struct __sbuf {
|
||||
unsigned char *_base;
|
||||
int _size;
|
||||
};
|
||||
|
||||
/*
|
||||
* stdio state variables.
|
||||
*
|
||||
* The following always hold:
|
||||
*
|
||||
* if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR),
|
||||
* _lbfsize is -_bf._size, else _lbfsize is 0
|
||||
* if _flags&__SRD, _w is 0
|
||||
* if _flags&__SWR, _r is 0
|
||||
*
|
||||
* This ensures that the getc and putc macros (or inline functions) never
|
||||
* try to write or read from a file that is in `read' or `write' mode.
|
||||
* (Moreover, they can, and do, automatically switch from read mode to
|
||||
* write mode, and back, on "r+" and "w+" files.)
|
||||
*
|
||||
* _lbfsize is used only to make the inline line-buffered output stream
|
||||
* code as compact as possible.
|
||||
*
|
||||
* _ub, _up, and _ur are used when ungetc() pushes back more characters
|
||||
* than fit in the current _bf, or when ungetc() pushes back a character
|
||||
* that does not match the previous one in _bf. When this happens,
|
||||
* _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
|
||||
* _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
|
||||
*/
|
||||
typedef struct __sFILE {
|
||||
unsigned char *_p; /* current position in (some) buffer */
|
||||
int _r; /* read space left for getc() */
|
||||
int _w; /* write space left for putc() */
|
||||
short _flags; /* flags, below; this FILE is free if 0 */
|
||||
short _file; /* fileno, if Unix descriptor, else -1 */
|
||||
struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */
|
||||
int _lbfsize; /* 0 or -_bf._size, for inline putc */
|
||||
|
||||
/* separate buffer for long sequences of ungetc() */
|
||||
struct __sbuf _ub; /* ungetc buffer */
|
||||
unsigned char *_up; /* saved _p when _p is doing ungetc data */
|
||||
int _ur; /* saved _r when _r is counting ungetc data */
|
||||
|
||||
/* tricks to meet minimum requirements even when malloc() fails */
|
||||
unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */
|
||||
unsigned char _nbuf[1]; /* guarantee a getc() buffer */
|
||||
|
||||
/* separate buffer for fgetline() when line crosses buffer boundary */
|
||||
struct __sbuf _lb; /* buffer for fgetline() */
|
||||
|
||||
/* Unix stdio files get aligned to block boundaries on fseek() */
|
||||
int _blksize; /* stat.st_blksize (may be != _bf._size) */
|
||||
int _offset; /* current lseek offset */
|
||||
} FILE;
|
||||
|
||||
__BEGIN_DECLS
|
||||
extern FILE __sF[];
|
||||
__END_DECLS
|
||||
|
||||
#define __SLBF 0x0001 /* line buffered */
|
||||
#define __SNBF 0x0002 /* unbuffered */
|
||||
#define __SRD 0x0004 /* OK to read */
|
||||
#define __SWR 0x0008 /* OK to write */
|
||||
/* RD and WR are never simultaneously asserted */
|
||||
#define __SRW 0x0010 /* open for reading & writing */
|
||||
#define __SEOF 0x0020 /* found EOF */
|
||||
#define __SERR 0x0040 /* found error */
|
||||
#define __SMBF 0x0080 /* _buf is from malloc */
|
||||
#define __SAPP 0x0100 /* fdopen()ed in append mode */
|
||||
#define __SSTR 0x0200 /* this is an sprintf/snprintf string */
|
||||
#define __SOPT 0x0400 /* do fseek() optimisation */
|
||||
#define __SNPT 0x0800 /* do not do fseek() optimisation */
|
||||
#define __SOFF 0x1000 /* set iff _offset is in fact correct */
|
||||
#define __SMOD 0x2000 /* true => fgetline modified _p text */
|
||||
|
||||
/*
|
||||
* The following three definitions are for ANSI C, which took them
|
||||
* from System V, which brilliantly took internal interface macros and
|
||||
* made them official arguments to setvbuf(), without renaming them.
|
||||
* Hence, these ugly _IOxxx names are *supposed* to appear in user code.
|
||||
*
|
||||
* Although numbered as their counterparts above, the implementation
|
||||
* does not rely on this.
|
||||
*/
|
||||
#define _IOFBF 0 /* setvbuf should set fully buffered */
|
||||
#define _IOLBF 1 /* setvbuf should set line buffered */
|
||||
#define _IONBF 2 /* setvbuf should set unbuffered */
|
||||
|
||||
#define BUFSIZ 1024 /* size of buffer used by setbuf */
|
||||
#define EOF (-1)
|
||||
|
||||
/*
|
||||
* FOPEN_MAX is a minimum maximum, and should be the number of descriptors
|
||||
* that the kernel can provide without allocation of a resource that can
|
||||
* fail without the process sleeping. Do not use this for anything.
|
||||
*/
|
||||
#define FOPEN_MAX 20 /* must be <= OPEN_MAX <sys/syslimits.h> */
|
||||
#define FILENAME_MAX 1024 /* must be <= PATH_MAX <sys/syslimits.h> */
|
||||
|
||||
/* System V/ANSI C; this is the wrong way to do this, do *not* use these. */
|
||||
#ifndef _ANSI_SOURCE
|
||||
#define P_tmpdir "/var/tmp/"
|
||||
#endif
|
||||
#define L_tmpnam 1024 /* XXX must be == PATH_MAX */
|
||||
#ifndef TMP_MAX
|
||||
#define TMP_MAX 308915776
|
||||
#endif
|
||||
|
||||
#ifndef SEEK_SET
|
||||
#define SEEK_SET 0 /* set file offset to offset */
|
||||
#endif
|
||||
#ifndef SEEK_CUR
|
||||
#define SEEK_CUR 1 /* set file offset to current plus offset */
|
||||
#endif
|
||||
#ifndef SEEK_END
|
||||
#define SEEK_END 2 /* set file offset to EOF plus offset */
|
||||
#endif
|
||||
|
||||
#define stdin (&__sF[0])
|
||||
#define stdout (&__sF[1])
|
||||
#define stderr (&__sF[2])
|
||||
|
||||
/*
|
||||
* Functions defined in ANSI C standard.
|
||||
*/
|
||||
__BEGIN_DECLS
|
||||
void clearerr __P_((FILE *));
|
||||
int fclose __P_((FILE *));
|
||||
int feof __P_((FILE *));
|
||||
int ferror __P_((FILE *));
|
||||
int fflush __P_((FILE *));
|
||||
int fgetc __P_((FILE *));
|
||||
int fgetpos __P_((FILE *, fpos_t *));
|
||||
char * fgets __P_((char *, size_t, FILE *));
|
||||
FILE * fopen __P_((const char *, const char *));
|
||||
int fprintf __P_((FILE *, const char *, ...));
|
||||
int fputc __P_((int, FILE *));
|
||||
int fputs __P_((const char *, FILE *));
|
||||
size_t fread __P_((void *, size_t, size_t, FILE *));
|
||||
FILE * freopen __P_((const char *, const char *, FILE *));
|
||||
int fscanf __P_((FILE *, const char *, ...));
|
||||
int fseek __P_((FILE *, long, int));
|
||||
int fsetpos __P_((FILE *, const fpos_t *));
|
||||
long ftell __P_((const FILE *));
|
||||
size_t fwrite __P_((const void *, size_t, size_t, FILE *));
|
||||
int getc __P_((FILE *));
|
||||
int getchar __P_((void));
|
||||
char * gets __P_((char *));
|
||||
|
||||
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
|
||||
extern int sys_nerr; /* perror(3) external variables */
|
||||
/* Under NetBSD and BSD 4.4, at least, this is expected to be a const
|
||||
array of pointers to const. If you take `const' back out of this
|
||||
declaration, please make it conditional on __NetBSD__ and bsd4_4. */
|
||||
#ifdef HAVE_SYS_ERRLIST_WITHOUT_CONST
|
||||
extern char *sys_errlist[];
|
||||
#else
|
||||
extern const char *const sys_errlist[];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void perror __P_((const char *));
|
||||
int printf __P_((const char *, ...));
|
||||
int putc __P_((int, FILE *));
|
||||
int putchar __P_((int));
|
||||
int puts __P_((const char *));
|
||||
int remove __P_((const char *));
|
||||
int rename __P_((const char *, const char *));
|
||||
void rewind __P_((FILE *));
|
||||
int scanf __P_((const char *, ...));
|
||||
void setbuf __P_((FILE *, char *));
|
||||
int setvbuf __P_((FILE *, char *, int, size_t));
|
||||
int sprintf __P_((char *, const char *, ...));
|
||||
int sscanf __P_((const char *, const char *, ...));
|
||||
FILE * tmpfile __P_((void));
|
||||
char * tmpnam __P_((char *));
|
||||
int ungetc __P_((int, FILE *));
|
||||
int vfprintf __P_((FILE *, const char *, pthread_va_list));
|
||||
int vprintf __P_((const char *, pthread_va_list));
|
||||
int vsprintf __P_((char *, const char *, pthread_va_list));
|
||||
char *mprintf __P_((const char *, ...));
|
||||
char *vmprintf __P_((const char *, pthread_va_list));
|
||||
__END_DECLS
|
||||
|
||||
/*
|
||||
* Functions defined in POSIX 1003.1.
|
||||
*/
|
||||
#ifndef _ANSI_SOURCE
|
||||
#define L_ctermid 1024 /* size for ctermid(); PATH_MAX */
|
||||
#define L_cuserid 9 /* size for cuserid(); UT_NAMESIZE + 1 */
|
||||
|
||||
__BEGIN_DECLS
|
||||
char * ctermid __P_((char *));
|
||||
char * cuserid __P_((char *));
|
||||
FILE * fdopen __P_((int, const char *));
|
||||
int fileno __P_((FILE *));
|
||||
__END_DECLS
|
||||
#endif /* not ANSI */
|
||||
|
||||
/*
|
||||
* Functions defined in POSIX 1003.4a. (1c)
|
||||
*/
|
||||
#ifndef _ANSI_SOURCE
|
||||
__BEGIN_DECLS
|
||||
void flockfile __P_((FILE *));
|
||||
void funlockfile __P_((FILE *));
|
||||
int ftrylockfile __P_((FILE *));
|
||||
__END_DECLS
|
||||
#endif /* not ANSI */
|
||||
|
||||
/*
|
||||
* Routines that are purely local.
|
||||
*/
|
||||
#if !defined (_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
|
||||
__BEGIN_DECLS
|
||||
char *fgetline __P_((FILE *, size_t *));
|
||||
int fpurge __P_((FILE *));
|
||||
int getw __P_((FILE *));
|
||||
int pclose __P_((FILE *));
|
||||
FILE *popen __P_((const char *, const char *));
|
||||
int putw __P_((int, FILE *));
|
||||
void setbuffer __P_((FILE *, char *, int));
|
||||
int setlinebuf __P_((FILE *));
|
||||
char *tempnam __P_((const char *, const char *));
|
||||
int snprintf __P_((char *, size_t, const char *, ...));
|
||||
int vsnprintf __P_((char *, size_t, const char *, pthread_va_list));
|
||||
int vscanf __P_((const char *, pthread_va_list));
|
||||
int vsscanf __P_((const char *, const char *, pthread_va_list));
|
||||
__END_DECLS
|
||||
|
||||
/*
|
||||
* This is a #define because the function is used internally and
|
||||
* (unlike vfscanf) the name __svfscanf is guaranteed not to collide
|
||||
* with a user function when _ANSI_SOURCE or _POSIX_SOURCE is defined.
|
||||
*/
|
||||
#define vfscanf __svfscanf
|
||||
|
||||
/*
|
||||
* Stdio function-access interface.
|
||||
*/
|
||||
__BEGIN_DECLS
|
||||
FILE *funopen __P_((const void *,
|
||||
int (*)(void *, char *, int),
|
||||
int (*)(void *, const char *, int),
|
||||
fpos_t (*)(void *, fpos_t, int),
|
||||
int (*)(void *)));
|
||||
__END_DECLS
|
||||
#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
|
||||
#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
|
||||
#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
|
||||
|
||||
/*
|
||||
* Functions internal to the implementation.
|
||||
*/
|
||||
__BEGIN_DECLS
|
||||
int __srget __P_((FILE *));
|
||||
int __svfscanf __P_((FILE *, const char *, pthread_va_list));
|
||||
int __swbuf __P_((int, FILE *));
|
||||
__END_DECLS
|
||||
|
||||
/*
|
||||
* The __sfoo macros are here so that we can
|
||||
* define function versions in the C library.
|
||||
*/
|
||||
#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
|
||||
|
||||
__BEGIN_DECLS
|
||||
int __getc __P_((FILE *));
|
||||
__END_DECLS
|
||||
|
||||
#define getc(fp) __getc(fp)
|
||||
#define getchar() getc(stdin)
|
||||
#define getc_unlocked(fp) __sgetc(fp)
|
||||
#define getchar_unlocked() getc_unlocked(stdin)
|
||||
|
||||
#ifdef __CAN_DO_EXTERN_INLINE
|
||||
__INLINE int __sputc(int _c, FILE *_p)
|
||||
{
|
||||
if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
|
||||
return (*_p->_p++ = _c);
|
||||
else
|
||||
return (__swbuf(_c, _p));
|
||||
}
|
||||
#else
|
||||
__BEGIN_DECLS
|
||||
int __sputc __P_((int, FILE *));
|
||||
__END_DECLS
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
int __putc __P_((int, FILE *));
|
||||
__END_DECLS
|
||||
|
||||
#define putc(x, fp) __putc(x, fp)
|
||||
#define putchar(x) putc(x, stdout)
|
||||
#define putc_unlocked(x, fp) __sputc(x, fp)
|
||||
#define putchar_unlocked(x) putc_unlocked(x, stdout)
|
||||
|
||||
#define __sfeof(p) (((p)->_flags & __SEOF) != 0)
|
||||
#define __sferror(p) (((p)->_flags & __SERR) != 0)
|
||||
#define __sfileno(p) ((p)->_file)
|
||||
|
||||
#define feof(p) __sfeof(p)
|
||||
#define ferror(p) __sferror(p)
|
||||
|
||||
#ifndef _ANSI_SOURCE
|
||||
#define fileno(p) __sfileno(p)
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,127 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* (c) UNIX System Laboratories, Inc.
|
||||
* All or some portions of this file are derived from material licensed
|
||||
* to the University of California by American Telephone and Telegraph
|
||||
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
* the permission of UNIX System Laboratories, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)time.h 5.12 (Berkeley) 3/9/91
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _STDLIB_H_
|
||||
#define _STDLIB_H_
|
||||
|
||||
#include <sys/__stdlib.h>
|
||||
|
||||
/* Returned by `div'. */
|
||||
typedef struct
|
||||
{
|
||||
int quot; /* Quotient. */
|
||||
int rem; /* Remainder. */
|
||||
} div_t;
|
||||
|
||||
/* Returned by `ldiv'. */
|
||||
typedef struct
|
||||
{
|
||||
long quot; /* Quotient. */
|
||||
long rem; /* Remainder. */
|
||||
} ldiv_t;
|
||||
|
||||
#ifndef RAND_MAX
|
||||
#define RAND_MAX 2147483647
|
||||
#endif
|
||||
|
||||
#define EXIT_FAILURE 1 /* Failing exit status. */
|
||||
#define EXIT_SUCCESS 0 /* Successful exit status. */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
double atof __P_((const char *));
|
||||
int atoi __P_((const char *));
|
||||
long atol __P_((const char *));
|
||||
double strtod __P_((const char *, char **));
|
||||
long strtol __P_((const char *, char **, int));
|
||||
unsigned long strtoul __P_((const char *, char **, int));
|
||||
|
||||
int rand __P_((void));
|
||||
void srand __P_((unsigned int));
|
||||
|
||||
long random __P_((void));
|
||||
void srandom __P_((unsigned int));
|
||||
char * initstate __P_((unsigned int, char *, int));
|
||||
char * setstate __P_((char *));
|
||||
|
||||
void * malloc __P_((size_t));
|
||||
void * realloc __P_((void *, size_t));
|
||||
void * calloc __P_((size_t, size_t));
|
||||
void free __P_((void *));
|
||||
|
||||
__NORETURN void abort __P_((void));
|
||||
int atexit __P_((void (* __func)() ));
|
||||
__NORETURN void exit __P_((int));
|
||||
int system __P_((const char *));
|
||||
|
||||
extern char ** environ;
|
||||
|
||||
char * getenv __P_((const char *));
|
||||
int putenv __P_((const char *));
|
||||
int setenv __P_((const char *, const char *, int));
|
||||
void unsetenv __P_((const char *));
|
||||
|
||||
void * bsearch __P_((const void *, const void *, size_t, size_t,
|
||||
int (* __func)__P_((const void *, const void *)) ));
|
||||
void qsort __P_((void *, size_t, size_t,
|
||||
int (* __func)__P_((const void *, const void *)) ));
|
||||
|
||||
int abs __P_((int));
|
||||
long labs __P_((long));
|
||||
div_t div __P_((int, int));
|
||||
ldiv_t ldiv __P_((long, long));
|
||||
|
||||
void * memchr __P_((const void *, int, size_t));
|
||||
|
||||
/* Stuff to do */
|
||||
int mblen __P_((const char *, size_t));
|
||||
int mbtowc __P_((wchar_t *, const char *, size_t));
|
||||
int wctomb __P_((char *, wchar_t));
|
||||
size_t mbstowcs __P_((wchar_t *, const char *, size_t));
|
||||
size_t wcstombs __P_((char *, const wchar_t *, size_t));
|
||||
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_STDLIB_H_ */
|
@ -1,85 +0,0 @@
|
||||
/* $NetBSD: string.h,v 1.6 1994/10/26 00:56:30 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)string.h 5.10 (Berkeley) 3/9/91
|
||||
*/
|
||||
|
||||
#ifndef _STRING_H_
|
||||
#define _STRING_H_
|
||||
#include <sys/cdefs.h>
|
||||
#include <pthread/types.h>
|
||||
#include <pthread/posix.h>
|
||||
#include <sys/__string.h>
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
void *memchr __P_((const void *, int, size_t));
|
||||
int memcmp __P_((const void *, const void *, size_t));
|
||||
void *memcpy __P_((void *, const void *, size_t));
|
||||
void *memmove __P_((void *, const void *, size_t));
|
||||
void *memset __P_((void *, int, size_t));
|
||||
char *strcat __P_((char *, const char *));
|
||||
char *strchr __P_((const char *, int));
|
||||
int strcmp __P_((const char *, const char *));
|
||||
int strcoll __P_((const char *, const char *));
|
||||
char *strcpy __P_((char *, const char *));
|
||||
size_t strcspn __P_((const char *, const char *));
|
||||
char *strerror __P_((int));
|
||||
size_t strlen __P_((const char *));
|
||||
char *strncat __P_((char *, const char *, size_t));
|
||||
int strncmp __P_((const char *, const char *, size_t));
|
||||
char *strncpy __P_((char *, const char *, size_t));
|
||||
char *strpbrk __P_((const char *, const char *));
|
||||
char *strrchr __P_((const char *, int));
|
||||
size_t strspn __P_((const char *, const char *));
|
||||
char *strstr __P_((const char *, const char *));
|
||||
char *strtok __P_((char *, const char *));
|
||||
char *strtok_r __P_((char *, const char *, char **));
|
||||
size_t strxfrm __P_((char *, const char *, size_t));
|
||||
|
||||
/* Nonstandard routines common to all pthreads supported platforms */
|
||||
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
|
||||
int ffs __P_((int));
|
||||
void *memccpy __P_((void *, const void *, int, size_t));
|
||||
int strcasecmp __P_((const char *, const char *));
|
||||
int strncasecmp __P_((const char *, const char *, size_t));
|
||||
char *strsignal __P_((int));
|
||||
void swab __P_((const void *, void *, size_t));
|
||||
#endif
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _STRING_H_ */
|
@ -1,101 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1982, 1986 Regents of the University of California.
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*
|
||||
* @(#)syslog.h 7.8 (Berkeley) 5/26/88
|
||||
*/
|
||||
|
||||
#ifndef SYSLOG_H
|
||||
#define SYSLOG_H
|
||||
|
||||
/* Added __[BEGIN/END]_DECLS so this file would work with C++. (mevans) */
|
||||
#include <sys/cdefs.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
/* Discipline: openlog(), closelog(), and setlogmask() are not thread-safe
|
||||
* and should only be called when other threads will not be calling syslog
|
||||
* functions. syslog() and vsyslog() are thread-safe and may be called
|
||||
* asynchronously, even if openlog() has not been called. */
|
||||
|
||||
/*
|
||||
* Facility codes
|
||||
*/
|
||||
|
||||
#define LOG_KERN (0<<3) /* kernel messages */
|
||||
#define LOG_USER (1<<3) /* random user-level messages */
|
||||
#define LOG_MAIL (2<<3) /* mail system */
|
||||
#define LOG_DAEMON (3<<3) /* system daemons */
|
||||
#define LOG_AUTH (4<<3) /* security/authorization messages */
|
||||
#define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */
|
||||
#define LOG_LPR (6<<3) /* line printer subsystem */
|
||||
#define LOG_NEWS (7<<3) /* network news subsystem */
|
||||
#define LOG_UUCP (8<<3) /* UUCP subsystem */
|
||||
/* other codes through 15 reserved for system use */
|
||||
#define LOG_LOCAL0 (16<<3) /* reserved for local use */
|
||||
#define LOG_LOCAL1 (17<<3) /* reserved for local use */
|
||||
#define LOG_LOCAL2 (18<<3) /* reserved for local use */
|
||||
#define LOG_LOCAL3 (19<<3) /* reserved for local use */
|
||||
#define LOG_LOCAL4 (20<<3) /* reserved for local use */
|
||||
#define LOG_LOCAL5 (21<<3) /* reserved for local use */
|
||||
#define LOG_LOCAL6 (22<<3) /* reserved for local use */
|
||||
#define LOG_LOCAL7 (23<<3) /* reserved for local use */
|
||||
|
||||
#define LOG_NFACILITIES 24 /* maximum number of facilities */
|
||||
#define LOG_FACMASK 0x03f8 /* mask to extract facility part */
|
||||
|
||||
#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3) /* facility of pri */
|
||||
|
||||
/*
|
||||
* Priorities (these are ordered)
|
||||
*/
|
||||
|
||||
#define LOG_EMERG 0 /* system is unusable */
|
||||
#define LOG_ALERT 1 /* action must be taken immediately */
|
||||
#define LOG_CRIT 2 /* critical conditions */
|
||||
#define LOG_ERR 3 /* error conditions */
|
||||
#define LOG_WARNING 4 /* warning conditions */
|
||||
#define LOG_NOTICE 5 /* normal but signification condition */
|
||||
#define LOG_INFO 6 /* informational */
|
||||
#define LOG_DEBUG 7 /* debug-level messages */
|
||||
|
||||
#define LOG_PRIMASK 0x0007 /* mask to extract priority part (internal) */
|
||||
#define LOG_PRI(p) ((p) & LOG_PRIMASK) /* extract priority */
|
||||
|
||||
#define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri))
|
||||
|
||||
#ifdef KERNEL
|
||||
#define LOG_PRINTF -1 /* pseudo-priority to indicate use of printf */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* arguments to setlogmask.
|
||||
*/
|
||||
#define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */
|
||||
#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */
|
||||
|
||||
/*
|
||||
* Option flags for openlog.
|
||||
*
|
||||
* LOG_ODELAY no longer does anything; LOG_NDELAY is the
|
||||
* inverse of what it used to be.
|
||||
*/
|
||||
#define LOG_PID 0x01 /* log the pid with each message */
|
||||
#define LOG_CONS 0x02 /* log on the console if errors in sending */
|
||||
#define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */
|
||||
#define LOG_NDELAY 0x08 /* don't delay open */
|
||||
#define LOG_NOWAIT 0x10 /* if forking to log on console, don't wait() */
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Syslogging functions. */
|
||||
void syslog(int pri, char *fmt, ...);
|
||||
void vsyslog(int pri, char *fmt, va_list args);
|
||||
void openlog(char *ident, int logstat, int logfac);
|
||||
void closelog(void);
|
||||
int setlogmask(int pmask);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -1,102 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* (c) UNIX System Laboratories, Inc.
|
||||
* All or some portions of this file are derived from material licensed
|
||||
* to the University of California by American Telephone and Telegraph
|
||||
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
* the permission of UNIX System Laboratories, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)time.h 5.12 (Berkeley) 3/9/91
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _TIME_H_
|
||||
#define _TIME_H_
|
||||
|
||||
#include <sys/__time.h>
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
#ifndef __hpux__
|
||||
struct tm {
|
||||
int tm_sec; /* seconds after the minute [0-60] */
|
||||
int tm_min; /* minutes after the hour [0-59] */
|
||||
int tm_hour; /* hours since midnight [0-23] */
|
||||
int tm_mday; /* day of the month [1-31] */
|
||||
int tm_mon; /* months since January [0-11] */
|
||||
int tm_year; /* years since 1900 */
|
||||
int tm_wday; /* days since Sunday [0-6] */
|
||||
int tm_yday; /* days since January 1 [0-365] */
|
||||
int tm_isdst; /* Daylight Savings Time flag */
|
||||
long tm_gmtoff; /* offset from CUT in seconds */
|
||||
char *tm_zone; /* timezone abbreviation */
|
||||
};
|
||||
#endif /* __hpux__ */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
/* clock_t clock __P_((void)); */
|
||||
|
||||
char * asctime __P_((const struct tm *));
|
||||
double difftime __P_((time_t, time_t));
|
||||
char * ctime __P_((const time_t *));
|
||||
struct tm * gmtime __P_((const time_t *));
|
||||
struct tm * localtime __P_((const time_t *));
|
||||
|
||||
char * asctime_r __P_((const struct tm *, char *));
|
||||
char * ctime_r __P_((const time_t *, char *));
|
||||
struct tm * gmtime_r __P_((const time_t *, struct tm *));
|
||||
struct tm * localtime_r __P_((const time_t *, struct tm *));
|
||||
|
||||
time_t mktime __P_((struct tm *));
|
||||
|
||||
/* size_t strftime __P_((char *, size_t, const char *, const struct tm *)); */
|
||||
time_t time __P_((time_t *));
|
||||
|
||||
#if !defined(_ANSI_SOURCE)
|
||||
/* #define CLK_TCK 100 */
|
||||
extern char *tzname[2];
|
||||
void tzset __P_((void));
|
||||
#endif /* not ANSI */
|
||||
|
||||
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
|
||||
/* char *timezone __P_((int, int)); */
|
||||
void tzsetwall __P_((void));
|
||||
#endif /* neither ANSI nor POSIX */
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_TIME_H_ */
|
@ -1,45 +0,0 @@
|
||||
/* ==== timers.h ============================================================
|
||||
* Copyright (c) 1994 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Description : Basic timers header.
|
||||
*
|
||||
* 1.00 94/06/13 proven
|
||||
* -Started coding this file.
|
||||
*/
|
||||
|
||||
#ifndef _TIMERS_H_
|
||||
#define _TIMERS_H_
|
||||
|
||||
#include <sys/timers.h>
|
||||
|
||||
#endif
|
@ -1,154 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1988 Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* Arthur David Olson of the National Cancer Institute.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)tzfile.h 5.10 (Berkeley) 4/3/91
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _TZFILE_H_
|
||||
#define _TZFILE_H_
|
||||
|
||||
#include <pthread/paths.h>
|
||||
|
||||
/*
|
||||
* Information about time zone files.
|
||||
*/
|
||||
#define TZDIR _PATH_TZDIR
|
||||
#define TZDEFAULT _PATH_TZFILE
|
||||
#define TZDEFRULES "posixrules"
|
||||
|
||||
/*
|
||||
** Each file begins with. . .
|
||||
*/
|
||||
|
||||
struct tzhead {
|
||||
char tzh_reserved[24]; /* reserved for future use */
|
||||
char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */
|
||||
char tzh_leapcnt[4]; /* coded number of leap seconds */
|
||||
char tzh_timecnt[4]; /* coded number of transition times */
|
||||
char tzh_typecnt[4]; /* coded number of local time types */
|
||||
char tzh_charcnt[4]; /* coded number of abbr. chars */
|
||||
};
|
||||
|
||||
/*
|
||||
** . . .followed by. . .
|
||||
**
|
||||
** tzh_timecnt (char [4])s coded transition times a la time(2)
|
||||
** tzh_timecnt (unsigned char)s types of local time starting at above
|
||||
** tzh_typecnt repetitions of
|
||||
** one (char [4]) coded GMT offset in seconds
|
||||
** one (unsigned char) used to set tm_isdst
|
||||
** one (unsigned char) that's an abbreviation list index
|
||||
** tzh_charcnt (char)s '\0'-terminated zone abbreviations
|
||||
** tzh_leapcnt repetitions of
|
||||
** one (char [4]) coded leap second transition times
|
||||
** one (char [4]) total correction after above
|
||||
** tzh_ttisstdcnt (char)s indexed by type; if TRUE, transition
|
||||
** time is standard time, if FALSE,
|
||||
** transition time is wall clock time
|
||||
** if absent, transition times are
|
||||
** assumed to be wall clock time
|
||||
*/
|
||||
|
||||
/*
|
||||
** In the current implementation, "tzset()" refuses to deal with files that
|
||||
** exceed any of the limits below.
|
||||
*/
|
||||
|
||||
/*
|
||||
** The TZ_MAX_TIMES value below is enough to handle a bit more than a
|
||||
** year's worth of solar time (corrected daily to the nearest second) or
|
||||
** 138 years of Pacific Presidential Election time
|
||||
** (where there are three time zone transitions every fourth year).
|
||||
*/
|
||||
#define TZ_MAX_TIMES 370
|
||||
|
||||
#define NOSOLAR /* 4BSD doesn't currently handle solar time */
|
||||
|
||||
#ifndef NOSOLAR
|
||||
#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */
|
||||
#else
|
||||
#define TZ_MAX_TYPES 10 /* Maximum number of local time types */
|
||||
#endif
|
||||
|
||||
#define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */
|
||||
|
||||
#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */
|
||||
|
||||
#define SECSPERMIN 60
|
||||
#define MINSPERHOUR 60
|
||||
#define HOURSPERDAY 24
|
||||
#define DAYSPERWEEK 7
|
||||
#define DAYSPERNYEAR 365
|
||||
#define DAYSPERLYEAR 366
|
||||
#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR)
|
||||
#define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY)
|
||||
#define MONSPERYEAR 12
|
||||
|
||||
#define TM_SUNDAY 0
|
||||
#define TM_MONDAY 1
|
||||
#define TM_TUESDAY 2
|
||||
#define TM_WEDNESDAY 3
|
||||
#define TM_THURSDAY 4
|
||||
#define TM_FRIDAY 5
|
||||
#define TM_SATURDAY 6
|
||||
|
||||
#define TM_JANUARY 0
|
||||
#define TM_FEBRUARY 1
|
||||
#define TM_MARCH 2
|
||||
#define TM_APRIL 3
|
||||
#define TM_MAY 4
|
||||
#define TM_JUNE 5
|
||||
#define TM_JULY 6
|
||||
#define TM_AUGUST 7
|
||||
#define TM_SEPTEMBER 8
|
||||
#define TM_OCTOBER 9
|
||||
#define TM_NOVEMBER 10
|
||||
#define TM_DECEMBER 11
|
||||
|
||||
#define TM_YEAR_BASE 1900
|
||||
|
||||
#define EPOCH_YEAR 1970
|
||||
#define EPOCH_WDAY TM_THURSDAY
|
||||
|
||||
/*
|
||||
** Accurate only for the past couple of centuries;
|
||||
** that will probably do.
|
||||
*/
|
||||
|
||||
#define isleap(y) (((y) % 4) == 0 && ((y) % 100) != 0 || ((y) % 400) == 0)
|
||||
|
||||
#endif /* !_TZFILE_H_ */
|
||||
|
@ -1,183 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 1991 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)unistd.h 5.13 (Berkeley) 6/17/91
|
||||
*/
|
||||
|
||||
#ifndef _UNISTD_H_
|
||||
#define _UNISTD_H_
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/__unistd.h>
|
||||
|
||||
#define R_OK 4
|
||||
#define W_OK 2
|
||||
#define X_OK 1
|
||||
#define F_OK 0
|
||||
|
||||
#ifndef SEEK_SET
|
||||
#define SEEK_SET 0 /* set file offset to offset */
|
||||
#endif
|
||||
#ifndef SEEK_CUR
|
||||
#define SEEK_CUR 1 /* set file offset to current plus offset */
|
||||
#endif
|
||||
#ifndef SEEK_END
|
||||
#define SEEK_END 2 /* set file offset to EOF plus offset */
|
||||
#endif
|
||||
|
||||
#define STDIN_FILENO 0 /* standard input file descriptor */
|
||||
#define STDOUT_FILENO 1 /* standard output file descriptor */
|
||||
#define STDERR_FILENO 2 /* standard error file descriptor */
|
||||
|
||||
__BEGIN_DECLS
|
||||
void _exit __P_((int));
|
||||
int access __P_((const char *, int));
|
||||
int chdir __P_((const char *));
|
||||
int chown __P_((const char *, uid_t, gid_t));
|
||||
int close __P_((int));
|
||||
int dup __P_((int));
|
||||
int dup2 __P_((int, int));
|
||||
int execve __P_((const char *, char * const *, char * const *));
|
||||
pid_t fork __P_((void));
|
||||
int isatty __P_((int));
|
||||
int link __P_((const char *, const char *));
|
||||
off_t lseek __P_((int, off_t, int));
|
||||
int pipe __P_((int *));
|
||||
ssize_t read __P_((int, void *, size_t));
|
||||
unsigned sleep __P_((unsigned));
|
||||
char *ttyname __P_((int));
|
||||
int unlink __P_((const char *));
|
||||
ssize_t write __P_((int, const void *, size_t));
|
||||
|
||||
/* Not implemented for threads yet */
|
||||
unsigned alarm __P_((unsigned));
|
||||
char *cuserid __P_((char *));
|
||||
int execl __P_((const char *, const char *, ...));
|
||||
int execle __P_((const char *, const char *, ...));
|
||||
int execlp __P_((const char *, const char *, ...));
|
||||
int execv __P_((const char *, char * const *));
|
||||
int execvp __P_((const char *, char * const *));
|
||||
long fpathconf __P_((int, int)); /* not yet */
|
||||
char *getcwd __P_((char *, size_t));
|
||||
gid_t getegid __P_((void));
|
||||
uid_t geteuid __P_((void));
|
||||
gid_t getgid __P_((void));
|
||||
int getgroups __P_((int, gid_t *)); /* XXX (gid_t *) */
|
||||
char *getlogin __P_((void));
|
||||
pid_t getpgrp __P_((void));
|
||||
pid_t getpid __P_((void));
|
||||
pid_t getppid __P_((void));
|
||||
uid_t getuid __P_((void));
|
||||
long pathconf __P_((const char *, int)); /* not yet */
|
||||
int pause __P_((void));
|
||||
int rmdir __P_((const char *));
|
||||
int setgid __P_((gid_t));
|
||||
int setpgid __P_((pid_t, pid_t));
|
||||
pid_t setsid __P_((void));
|
||||
int setuid __P_((uid_t));
|
||||
long sysconf __P_((int)); /* not yet */
|
||||
pid_t tcgetpgrp __P_((int));
|
||||
int tcsetpgrp __P_((int, pid_t));
|
||||
|
||||
#ifndef _POSIX_SOURCE
|
||||
|
||||
int acct __P_((const char *));
|
||||
int async_daemon __P_((void));
|
||||
char *brk __P_((const char *));
|
||||
/* int chflags __P_((const char *, long)); */
|
||||
int chroot __P_((const char *));
|
||||
char *crypt __P_((const char *, const char *));
|
||||
int des_cipher __P_((const char *, char *, long, int));
|
||||
void des_setkey __P_((const char *key));
|
||||
void encrypt __P_((char *, int));
|
||||
void endusershell __P_((void));
|
||||
int exect __P_((const char *, char * const *, char * const *));
|
||||
int fchdir __P_((int));
|
||||
/* int fchflags __P_((int, long)); */
|
||||
int fchown __P_((int, uid_t, gid_t));
|
||||
int fsync __P_((int));
|
||||
int ftruncate __P_((int, off_t));
|
||||
int getdtablesize __P_((void));
|
||||
long gethostid __P_((void));
|
||||
int gethostname __P_((char *, int));
|
||||
mode_t getmode __P_((const void *, mode_t));
|
||||
int getpagesize __P_((void));
|
||||
char *getpass __P_((const char *));
|
||||
char *getusershell __P_((void));
|
||||
char *getwd __P_((char *)); /* obsoleted by getcwd() */
|
||||
int initgroups __P_((const char *, gid_t));
|
||||
int mknod __P_((const char *, mode_t, dev_t));
|
||||
int mkstemp __P_((char *));
|
||||
char *mktemp __P_((char *));
|
||||
int nfssvc __P_((int));
|
||||
int nice __P_((int));
|
||||
void psignal __P_((unsigned, const char *));
|
||||
/* extern char *sys_siglist[]; */
|
||||
int profil __P_((char *, int, int, int));
|
||||
int rcmd __P_((char **, int, const char *,
|
||||
const char *, const char *, int *));
|
||||
char *re_comp __P_((const char *));
|
||||
int re_exec __P_((const char *));
|
||||
int readlink __P_((const char *, char *, int));
|
||||
int reboot __P_((int));
|
||||
int revoke __P_((const char *));
|
||||
int rresvport __P_((int *));
|
||||
int ruserok __P_((const char *, int, const char *, const char *));
|
||||
char *sbrk __P_((int));
|
||||
int setegid __P_((gid_t));
|
||||
int seteuid __P_((uid_t));
|
||||
int setgroups __P_((int, const gid_t *));
|
||||
void sethostid __P_((long));
|
||||
int sethostname __P_((const char *, int));
|
||||
void setkey __P_((const char *));
|
||||
int setlogin __P_((const char *));
|
||||
void *setmode __P_((const char *));
|
||||
int setpgrp __P_((pid_t pid, pid_t pgrp)); /* obsoleted by setpgid() */
|
||||
int setregid __P_((int, int));
|
||||
int setreuid __P_((int, int));
|
||||
int setrgid __P_((gid_t));
|
||||
int setruid __P_((uid_t));
|
||||
void setusershell __P_((void));
|
||||
int swapon __P_((const char *));
|
||||
int symlink __P_((const char *, const char *));
|
||||
void sync __P_((void));
|
||||
int syscall __P_((int, ...));
|
||||
int truncate __P_((const char *, off_t));
|
||||
int ttyslot __P_((void));
|
||||
unsigned ualarm __P_((unsigned, unsigned));
|
||||
void usleep __P_((unsigned));
|
||||
int vfork __P_((void));
|
||||
|
||||
#endif /* !_POSIX_SOURCE */
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
@ -1 +0,0 @@
|
||||
Makefile
|
@ -1,48 +0,0 @@
|
||||
# === GNUmakefile ============================================================
|
||||
# Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
|
||||
#
|
||||
# Description: This file is for creating the test programs for libpthread.a
|
||||
#
|
||||
# 1.00 93/08/03 proven
|
||||
# -Initial cut for pthreads.
|
||||
#
|
||||
|
||||
CC = ../pgcc -notinstalled
|
||||
srctop = @srctop@
|
||||
srcdir = @srctop@/lib
|
||||
VPATH = @srctop@/lib
|
||||
CDEBUGFLAGS = @CFLAGS@
|
||||
|
||||
CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(ADDL_CFLAGS) -DSRCDIR=\"$(srcdir)\"
|
||||
|
||||
#
|
||||
DIRS = libpthreadutil
|
||||
|
||||
################################################################################
|
||||
#
|
||||
all:
|
||||
(for i in $(DIRS); do cd $$i; $(MAKE) all; cd ..; done)
|
||||
|
||||
clean:
|
||||
(for i in $(DIRS); do cd $$i; $(MAKE) clean; cd ..; done)
|
||||
rm -f *.o $(TESTS) $(BENCHMARKS) a.out core maketmp makeout
|
||||
|
||||
depend:
|
||||
(for i in $(DIRS); do cd $$i; $(MAKE) depend; cd ..; done)
|
||||
sed '/\#\#\# Dependencies/q' < Makefile > maketmp
|
||||
(for i in $(CSRC);do $(CPP) -M $$i;done) >> maketmp
|
||||
cp maketmp Makefile
|
||||
|
||||
install:
|
||||
(for i in $(DIRS); do cd $$i; $(MAKE) install; cd ..; done)
|
||||
|
||||
realclean: clean
|
||||
(for i in $(DIRS); do cd $$i; $(MAKE) realclean; cd ..; done)
|
||||
rm -f Makefile
|
||||
|
||||
Makefile: Makefile.in
|
||||
(cd .. ; sh config.status)
|
||||
|
||||
################################################################################
|
||||
### Do not remove the following line. It is for depend #########################
|
||||
### Dependencies:
|
@ -1 +0,0 @@
|
||||
Makefile
|
@ -1,65 +0,0 @@
|
||||
# === makefile ============================================================
|
||||
# Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
|
||||
#
|
||||
# Description: This file is for creating the test programs for libpthread.a
|
||||
#
|
||||
# 1.00 93/08/03 proven
|
||||
# -Initial cut for pthreads.
|
||||
#
|
||||
|
||||
srctop = @srctop@
|
||||
srcdir = @srctop@/lib/libpthreadutil
|
||||
VPATH = @srctop@/lib/libpthreadutil
|
||||
prefix= @prefix@
|
||||
exec_prefix= @exec_prefix@
|
||||
|
||||
INSTALL_PATH = @exec_prefix@
|
||||
BINDIR = $(INSTALL_PATH)/bin
|
||||
LIBDIR = $(INSTALL_PATH)/lib
|
||||
MANDIR = $(INSTALL_PATH)/man
|
||||
INCDIR = $(INSTALL_PATH)/include
|
||||
|
||||
CC = ../../pgcc -notinstalled
|
||||
CDEBUGFLAGS = @CFLAGS@
|
||||
CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(ADDL_CFLAGS) -DSRCDIR=\"$(srcdir)\"
|
||||
RANLIB = @RANLIB@
|
||||
|
||||
OBJS = pthread_tad.o pthread_atexit.o
|
||||
LIBRARY = libpthreadutil.a
|
||||
HEADERS = pthreadutil.h
|
||||
|
||||
################################################################################
|
||||
#
|
||||
all : $(LIBRARY)
|
||||
|
||||
clean:
|
||||
rm -f *.o $(TESTS) $(BENCHMARKS) a.out core maketmp makeout
|
||||
|
||||
depend:
|
||||
sed '/\#\#\# Dependencies/q' < Makefile > maketmp
|
||||
(for i in $(CSRC);do $(CPP) -M $$i;done) >> maketmp
|
||||
cp maketmp Makefile
|
||||
|
||||
install: $(LIBRARY)
|
||||
install $(LIBRARY) $(LIBDIR)
|
||||
for x in $(HEADERS); \
|
||||
do cp $(srcdir)/$$x $(INCDIR); \
|
||||
done
|
||||
|
||||
realclean: clean
|
||||
rm -f Makefile
|
||||
|
||||
Makefile: Makefile.in
|
||||
(cd ../.. ; sh config.status)
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
$(LIBRARY) : ${OBJS}
|
||||
ar r new.a ${OBJS} && \
|
||||
$(RANLIB) new.a && \
|
||||
mv -f new.a $(LIBRARY)
|
||||
|
||||
################################################################################
|
||||
### Do not remove the following line. It is for depend #########################
|
||||
### Dependencies:
|
@ -1,135 +0,0 @@
|
||||
/* ==== pthread_atexit.c =====================================================
|
||||
* Copyright (c) 1994 by Chris Provenzano, proven@mit.edu
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano.
|
||||
* 4. The name of Chris Provenzano may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* Description : Pthread attribute functions.
|
||||
*
|
||||
* 1.20 94/02/13 proven
|
||||
* -Started coding this file.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
#define PTHREAD_KERNEL
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "pthreadutil.h"
|
||||
|
||||
static int pthread_atexit_inited = 0;
|
||||
static pthread_key_t pthread_atexit_key;
|
||||
static pthread_mutex_t pthread_atexit_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
/* ==========================================================================
|
||||
* pthread_atexit_done()
|
||||
*/
|
||||
static void pthread_atexit_done(void * arg)
|
||||
{
|
||||
pthread_atexit_t id, id_next;
|
||||
|
||||
for (id = arg; id; id = id_next) {
|
||||
id_next = id->next;
|
||||
id->rtn(id->arg);
|
||||
free(id);
|
||||
}
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
* pthread_atexit_add()
|
||||
*/
|
||||
int pthread_atexit_add(pthread_atexit_t *id, void (*rtn)(void *), void * arg)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (ret = pthread_mutex_lock(&pthread_atexit_mutex)) {
|
||||
return(ret);
|
||||
}
|
||||
if (!pthread_atexit_inited) {
|
||||
if (ret = pthread_key_create(&pthread_atexit_key, pthread_atexit_done)){
|
||||
pthread_mutex_unlock(&pthread_atexit_mutex);
|
||||
return(ret);
|
||||
}
|
||||
pthread_atexit_inited++;
|
||||
}
|
||||
pthread_mutex_unlock(&pthread_atexit_mutex);
|
||||
|
||||
if ((*id) = (pthread_atexit_t)malloc(sizeof(struct pthread_atexit))) {
|
||||
if ((*id)->next = pthread_getspecific(pthread_atexit_key)) {
|
||||
(*id)->next->prev = (*id);
|
||||
}
|
||||
pthread_setspecific(pthread_atexit_key, (void *)*id);
|
||||
(*id)->prev = NULL;
|
||||
(*id)->rtn = rtn;
|
||||
(*id)->arg = arg;
|
||||
return(OK);
|
||||
}
|
||||
return(ENOMEM);
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
* pthread_atexit_remove()
|
||||
*/
|
||||
int pthread_atexit_remove(pthread_atexit_t * id, int execute)
|
||||
{
|
||||
pthread_atexit_t old;
|
||||
|
||||
if (old = pthread_getspecific(pthread_atexit_key)) {
|
||||
if (old == *id) {
|
||||
old = old->next;
|
||||
old->prev = NULL;
|
||||
pthread_setspecific(pthread_atexit_key, old);
|
||||
} else {
|
||||
if ((*id)->next) {
|
||||
(*id)->next->prev = (*id)->prev;
|
||||
}
|
||||
(*id)->prev->next = (*id)->next;
|
||||
}
|
||||
if (execute) {
|
||||
(*id)->rtn((*id)->arg);
|
||||
}
|
||||
free((*id));
|
||||
return(OK);
|
||||
}
|
||||
return(EINVAL);
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
* A few non void functions that are often used as void functions
|
||||
*/
|
||||
void fflush_nrv(void * fp) { fflush((FILE *)fp); }
|
||||
void fclose_nrv(void * fp) { fclose((FILE *)fp); }
|
||||
|
||||
void pthread_attr_destroy_nrv(void * attr)
|
||||
{
|
||||
pthread_attr_destroy((pthread_attr_t *)attr);
|
||||
}
|
@ -1,170 +0,0 @@
|
||||
/* ==== pthread_tad.c =========================================================
|
||||
* Copyright (c) 1995 by Chris Provenzano, proven@athena.mit.edu
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano,
|
||||
* and its contributors.
|
||||
* 4. Neither the name of Chris Provenzano, nor the names of
|
||||
* its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO, AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"@(#) Copyright (c) 1995 Chris Provenzano.\nAll rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
/* tad = thread allocation domain */
|
||||
#define PTHREAD_KERNEL
|
||||
|
||||
#include "pthreadutil.h"
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
int pthread_tad_count(pthread_tad_t * tad)
|
||||
{
|
||||
int ret;
|
||||
|
||||
pthread_mutex_lock(&tad->mutex);
|
||||
ret = tad->count_current;
|
||||
pthread_mutex_unlock(&tad->mutex);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
static void pthread_tad_done(void * arg)
|
||||
{
|
||||
pthread_tad_t * tad = arg;
|
||||
pthread_mutex_lock(&tad->mutex);
|
||||
--tad->count_current;
|
||||
/* if (--tad->count_current < tad->count_max) */
|
||||
pthread_cond_broadcast(&tad->cond);
|
||||
pthread_mutex_unlock(&tad->mutex);
|
||||
}
|
||||
|
||||
#ifndef PTHREAD_KERNEL
|
||||
struct tad_start {
|
||||
pthread_tad_t * tad;
|
||||
void * (*routine)();
|
||||
void * arg;
|
||||
};
|
||||
|
||||
static void * pthread_tad_start(struct tad_start * tad_start)
|
||||
{
|
||||
void * (*routine)() = tad_start->routine;
|
||||
void * arg = tad_start->arg;
|
||||
|
||||
pthread_mutex_lock(&tad_start->tad->mutex);
|
||||
pthread_cleanup_push(pthread_tad_done, tad_start->tad);
|
||||
pthread_mutex_unlock(&tad_start->tad->mutex);
|
||||
free(tad_start);
|
||||
return(routine(arg));
|
||||
}
|
||||
#else
|
||||
static void * pthread_tad_start(void * tad_start_arg)
|
||||
{
|
||||
pthread_tad_t * tad = tad_start_arg;
|
||||
void * (*routine)() = tad->routine;
|
||||
void * arg = tad->arg;
|
||||
|
||||
tad->count_current++;
|
||||
pthread_cleanup_push(pthread_tad_done, tad);
|
||||
pthread_mutex_unlock(&tad->mutex);
|
||||
return(routine(arg));
|
||||
}
|
||||
#endif
|
||||
|
||||
int pthread_tad_create(pthread_tad_t * tad, pthread_t *thread_id,
|
||||
pthread_attr_t *attr, void * (*routine)(), void * arg)
|
||||
{
|
||||
#ifndef PTHREAD_KERNEL
|
||||
struct tad_start tad;
|
||||
#endif
|
||||
int ret;
|
||||
|
||||
pthread_mutex_lock(&tad->mutex);
|
||||
while (tad->count_max && (tad->count_current > tad->count_max))
|
||||
pthread_cond_wait(&tad->cond, &tad->mutex);
|
||||
|
||||
#ifndef PTHREAD_KERNEL
|
||||
if ((tad_start = malloc(sizeof(struct tad_start))) == NULL) {
|
||||
pthread_mutex_unlock(&tad->mutex);
|
||||
return(ENOMEM);
|
||||
}
|
||||
tad_start->routine = routine;
|
||||
tad_start->arg = arg;
|
||||
tad_start->tad = tad;
|
||||
if ((ret = pthread_create(thread_id, attr,
|
||||
pthread_tad_start, tad_start)) == OK)
|
||||
tad->count_current++;
|
||||
pthread_mutex_unlock(&tad->mutex);
|
||||
#else
|
||||
tad->routine = routine;
|
||||
tad->arg = arg;
|
||||
if (ret = pthread_create(thread_id, attr, pthread_tad_start, tad))
|
||||
pthread_mutex_unlock(&tad->mutex);
|
||||
#endif
|
||||
return(ret);
|
||||
}
|
||||
|
||||
int pthread_tad_wait(pthread_tad_t * tad, unsigned int count)
|
||||
{
|
||||
if ((tad->count_max) && (tad->count_max < count)) {
|
||||
return(EINVAL);
|
||||
}
|
||||
pthread_mutex_lock(&tad->mutex);
|
||||
while (tad->count_current > count)
|
||||
pthread_cond_wait(&tad->cond, &tad->mutex);
|
||||
pthread_mutex_unlock(&tad->mutex);
|
||||
return(OK);
|
||||
}
|
||||
|
||||
int pthread_tad_init(pthread_tad_t * tad, unsigned int max_count)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if ((ret = pthread_mutex_init(&tad->mutex, NULL)) == OK) {
|
||||
if (ret = pthread_cond_init(&tad->cond, NULL)) {
|
||||
pthread_mutex_destroy(&tad->mutex);
|
||||
} else {
|
||||
tad->count_max = max_count;
|
||||
tad->count_current = 0;
|
||||
}
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/* User is responsible to make sure their are no threads running */
|
||||
int pthread_tad_destroy(pthread_tad_t * tad)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if ((ret = pthread_mutex_destroy(&tad->mutex)) == OK) {
|
||||
ret = pthread_cond_destroy(&tad->cond);
|
||||
} else {
|
||||
pthread_cond_destroy(&tad->cond);
|
||||
}
|
||||
tad->count_max = NOTOK;
|
||||
return(ret);
|
||||
}
|
@ -1,75 +0,0 @@
|
||||
/* ==== pthread_tad.h ========================================================
|
||||
* Copyright (c) 1995 by Chris Provenzano, proven@athena.mit.edu
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Chris Provenzano,
|
||||
* and its contributors.
|
||||
* 4. Neither the name of Chris Provenzano, nor the names of
|
||||
* its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO, AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
typedef struct pthread_tad_t {
|
||||
pthread_mutex_t mutex;
|
||||
pthread_cond_t cond;
|
||||
unsigned int count_current;
|
||||
unsigned int count_max;
|
||||
void * arg;
|
||||
void * (*routine)();
|
||||
} pthread_tad_t;
|
||||
|
||||
typedef struct pthread_atexit {
|
||||
struct pthread_atexit * next;
|
||||
struct pthread_atexit * prev;
|
||||
void (*rtn)(void *);
|
||||
void * arg;
|
||||
} * pthread_atexit_t;
|
||||
|
||||
/*
|
||||
* New functions
|
||||
*/
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
int pthread_tad_count __P_((pthread_tad_t *));
|
||||
int pthread_tad_create __P_((pthread_tad_t *, pthread_t *, pthread_attr_t *,
|
||||
void *(*routine)(), void *));
|
||||
int pthread_tad_wait __P_((pthread_tad_t *, unsigned int));
|
||||
int pthread_tad_init __P_((pthread_tad_t *, unsigned int));
|
||||
int pthread_tad_destroy __P_((pthread_tad_t *));
|
||||
|
||||
int pthread_atexit_add __P_((pthread_atexit_t *, void (*)(void *), void *));
|
||||
int pthread_atexit_remove __P_((pthread_atexit_t *, int));
|
||||
|
||||
|
||||
void fclose_nrv __P_((void *));
|
||||
void fflush_nrv __P_((void *));
|
||||
void pthread_attr_destroy_nrv __P_((void *));
|
||||
|
||||
__END_DECLS
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user