diff options
author | David Leonard <d@cvs.openbsd.org> | 1999-03-10 08:54:11 +0000 |
---|---|---|
committer | David Leonard <d@cvs.openbsd.org> | 1999-03-10 08:54:11 +0000 |
commit | 7b835a298b0b450e6af3d563b4f601ed753e04de (patch) | |
tree | 57757dbac63b32b63654d9246268e75bd98e32b8 /lib/libpthread/include | |
parent | 9755a69c88657c7badce3d6639e42d32b9bfe63d (diff) |
Goodbye, MIT pthreads... you were a handy reference implementation
Diffstat (limited to 'lib/libpthread/include')
55 files changed, 0 insertions, 4657 deletions
diff --git a/lib/libpthread/include/arpa/inet.h b/lib/libpthread/include/arpa/inet.h deleted file mode 100755 index 27e045fa615..00000000000 --- a/lib/libpthread/include/arpa/inet.h +++ /dev/null @@ -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: inet.h,v 1.1 1998/07/21 13:19:11 peter Exp $ - */ - -#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_ */ diff --git a/lib/libpthread/include/arpa/nameser.h b/lib/libpthread/include/arpa/nameser.h deleted file mode 100755 index 350d67538bd..00000000000 --- a/lib/libpthread/include/arpa/nameser.h +++ /dev/null @@ -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_ */ diff --git a/lib/libpthread/include/dirent.h b/lib/libpthread/include/dirent.h deleted file mode 100644 index c3e86cb9da1..00000000000 --- a/lib/libpthread/include/dirent.h +++ /dev/null @@ -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_ */ diff --git a/lib/libpthread/include/endian.h b/lib/libpthread/include/endian.h deleted file mode 100644 index 8fb947dbd33..00000000000 --- a/lib/libpthread/include/endian.h +++ /dev/null @@ -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 */ diff --git a/lib/libpthread/include/errno.h b/lib/libpthread/include/errno.h deleted file mode 100644 index 24b005e9369..00000000000 --- a/lib/libpthread/include/errno.h +++ /dev/null @@ -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_ */ diff --git a/lib/libpthread/include/math.h b/lib/libpthread/include/math.h deleted file mode 100644 index d5963ce6023..00000000000 --- a/lib/libpthread/include/math.h +++ /dev/null @@ -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_ */ diff --git a/lib/libpthread/include/netdb.h b/lib/libpthread/include/netdb.h deleted file mode 100644 index 12ecef51a8e..00000000000 --- a/lib/libpthread/include/netdb.h +++ /dev/null @@ -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: netdb.h,v 1.1 1998/07/21 13:19:05 peter Exp $ - */ - -#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_ */ diff --git a/lib/libpthread/include/pthread/ac-types.h b/lib/libpthread/include/pthread/ac-types.h deleted file mode 100755 index f21fc6806e4..00000000000 --- a/lib/libpthread/include/pthread/ac-types.h +++ /dev/null @@ -1,11 +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_fpos_t long -#define pthread_off_t long -#define pthread_va_list void * -#endif diff --git a/lib/libpthread/include/pthread/cleanup.h b/lib/libpthread/include/pthread/cleanup.h deleted file mode 100755 index 720f2d55445..00000000000 --- a/lib/libpthread/include/pthread/cleanup.h +++ /dev/null @@ -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: cleanup.h,v 1.1 1998/07/21 13:19:11 peter Exp $ - * - * 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 - diff --git a/lib/libpthread/include/pthread/cond.h b/lib/libpthread/include/pthread/cond.h deleted file mode 100755 index 28c283b75f4..00000000000 --- a/lib/libpthread/include/pthread/cond.h +++ /dev/null @@ -1,100 +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: cond.h,v 1.1 1998/07/21 13:19:11 peter Exp $ - * - * 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 - -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 - diff --git a/lib/libpthread/include/pthread/config.h b/lib/libpthread/include/pthread/config.h deleted file mode 100755 index d944b14a8c6..00000000000 --- a/lib/libpthread/include/pthread/config.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef _SYS___CONFIG_H_ -#define _SYS___CONFIG_H_ -#define _OS_HAS_TIMESPEC 1 -#endif diff --git a/lib/libpthread/include/pthread/debug_out.h b/lib/libpthread/include/pthread/debug_out.h deleted file mode 100755 index 6968c5ea90e..00000000000 --- a/lib/libpthread/include/pthread/debug_out.h +++ /dev/null @@ -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 */ diff --git a/lib/libpthread/include/pthread/fd.h b/lib/libpthread/include/pthread/fd.h deleted file mode 100755 index 28e55935812..00000000000 --- a/lib/libpthread/include/pthread/fd.h +++ /dev/null @@ -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: fd.h,v 1.1 1998/07/21 13:19:11 peter Exp $ - * - * 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 diff --git a/lib/libpthread/include/pthread/fd_pipe.h b/lib/libpthread/include/pthread/fd_pipe.h deleted file mode 100755 index 1561eeb6a7e..00000000000 --- a/lib/libpthread/include/pthread/fd_pipe.h +++ /dev/null @@ -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: fd_pipe.h,v 1.1 1998/07/21 13:19:11 peter Exp $ - * - * 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 - diff --git a/lib/libpthread/include/pthread/kernel.h b/lib/libpthread/include/pthread/kernel.h deleted file mode 100755 index 71518becced..00000000000 --- a/lib/libpthread/include/pthread/kernel.h +++ /dev/null @@ -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: kernel.h,v 1.1 1998/07/21 13:19:11 peter Exp $ - * - * 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 diff --git a/lib/libpthread/include/pthread/kthread.h b/lib/libpthread/include/pthread/kthread.h deleted file mode 100755 index e9eed520ae9..00000000000 --- a/lib/libpthread/include/pthread/kthread.h +++ /dev/null @@ -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: kthread.h,v 1.1 1998/07/21 13:19:11 peter Exp $ - * - * 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 diff --git a/lib/libpthread/include/pthread/mutex.h b/lib/libpthread/include/pthread/mutex.h deleted file mode 100755 index 273ae461e69..00000000000 --- a/lib/libpthread/include/pthread/mutex.h +++ /dev/null @@ -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: mutex.h,v 1.1 1998/07/21 13:19:11 peter Exp $ - * - * 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 - diff --git a/lib/libpthread/include/pthread/paths.h b/lib/libpthread/include/pthread/paths.h deleted file mode 100755 index 3d695546bc3..00000000000 --- a/lib/libpthread/include/pthread/paths.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _SYS___PATHS_H_ -#define _SYS___PATHS_H_ -#define _PATH_PTY "/devices/pseudo/" -#define _PATH_TZDIR "/usr/share/lib/zoneinfo" -#define _PATH_TZFILE "/usr/share/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 diff --git a/lib/libpthread/include/pthread/posix.h b/lib/libpthread/include/pthread/posix.h deleted file mode 100644 index 87eae80835e..00000000000 --- a/lib/libpthread/include/pthread/posix.h +++ /dev/null @@ -1,31 +0,0 @@ -/* ==== posix.h ============================================================ - * Copyright (c) 1993 by Chris Provenzano, proven@athena.mit.edu - * - * Description : Convert an Ultrix-4.2 system to a more or less POSIX system. - * - * $Id: posix.h,v 1.1 1998/07/21 19:50:19 peter Exp $ - * - * 1.00 93/07/20 proven - * -Started coding this file. - */ - -#ifndef _PTHREAD_POSIX_H_ -#define _PTHREAD_POSIX_H_ - -#include <sys/cdefs.h> - -/* More stuff for compiling */ -#if defined(__GNUC__) -#define __INLINE extern inline -#else -#define __INLINE static -#endif - -/* Make sure we have size_t defined */ -#include <pthread/types.h> - -#ifndef __WAIT_STATUS -#define __WAIT_STATUS int * -#endif - -#endif diff --git a/lib/libpthread/include/pthread/prio_queue.h b/lib/libpthread/include/pthread/prio_queue.h deleted file mode 100755 index d9c84ad25ed..00000000000 --- a/lib/libpthread/include/pthread/prio_queue.h +++ /dev/null @@ -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: prio_queue.h,v 1.1 1998/07/21 13:19:12 peter Exp $ - * - * 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 diff --git a/lib/libpthread/include/pthread/pthread_attr.h b/lib/libpthread/include/pthread/pthread_attr.h deleted file mode 100755 index 2602c1fa9c2..00000000000 --- a/lib/libpthread/include/pthread/pthread_attr.h +++ /dev/null @@ -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: pthread_attr.h,v 1.1 1998/07/21 13:19:12 peter Exp $ - * - * 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 diff --git a/lib/libpthread/include/pthread/pthread_once.h b/lib/libpthread/include/pthread/pthread_once.h deleted file mode 100755 index a9395c0f7fe..00000000000 --- a/lib/libpthread/include/pthread/pthread_once.h +++ /dev/null @@ -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: pthread_once.h,v 1.1 1998/07/21 13:19:12 peter Exp $ - * - * 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 - diff --git a/lib/libpthread/include/pthread/queue.h b/lib/libpthread/include/pthread/queue.h deleted file mode 100755 index 0d7d2d219e3..00000000000 --- a/lib/libpthread/include/pthread/queue.h +++ /dev/null @@ -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: queue.h,v 1.1 1998/07/21 13:19:12 peter Exp $ - * - * 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 diff --git a/lib/libpthread/include/pthread/sleep.h b/lib/libpthread/include/pthread/sleep.h deleted file mode 100755 index 9f8f2dccd95..00000000000 --- a/lib/libpthread/include/pthread/sleep.h +++ /dev/null @@ -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: sleep.h,v 1.1 1998/07/21 13:19:12 peter Exp $ - * - * 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 diff --git a/lib/libpthread/include/pthread/specific.h b/lib/libpthread/include/pthread/specific.h deleted file mode 100755 index 6757ceeb08e..00000000000 --- a/lib/libpthread/include/pthread/specific.h +++ /dev/null @@ -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: specific.h,v 1.1 1998/07/21 13:19:12 peter Exp $ - * - * 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 - diff --git a/lib/libpthread/include/pthread/state.def b/lib/libpthread/include/pthread/state.def deleted file mode 100755 index c62d102a9f0..00000000000 --- a/lib/libpthread/include/pthread/state.def +++ /dev/null @@ -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") diff --git a/lib/libpthread/include/pthread/types.h b/lib/libpthread/include/pthread/types.h deleted file mode 100755 index 7fdf001a0bc..00000000000 --- a/lib/libpthread/include/pthread/types.h +++ /dev/null @@ -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 */ diff --git a/lib/libpthread/include/pthread/unistd.h b/lib/libpthread/include/pthread/unistd.h deleted file mode 100755 index 3cb07533114..00000000000 --- a/lib/libpthread/include/pthread/unistd.h +++ /dev/null @@ -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 - diff --git a/lib/libpthread/include/pthread/util.h b/lib/libpthread/include/pthread/util.h deleted file mode 100755 index c9ff1dbcabd..00000000000 --- a/lib/libpthread/include/pthread/util.h +++ /dev/null @@ -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: util.h,v 1.1 1998/07/21 13:19:12 peter Exp $ - * - * 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 diff --git a/lib/libpthread/include/pthread/version.h b/lib/libpthread/include/pthread/version.h deleted file mode 100755 index ae0cbc6f4cb..00000000000 --- a/lib/libpthread/include/pthread/version.h +++ /dev/null @@ -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: version.h,v 1.1 1998/07/21 13:19:12 peter Exp $ - * - * 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 diff --git a/lib/libpthread/include/pthread/xtypes.h b/lib/libpthread/include/pthread/xtypes.h deleted file mode 100755 index 4dcc4f04f8c..00000000000 --- a/lib/libpthread/include/pthread/xtypes.h +++ /dev/null @@ -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. */ diff --git a/lib/libpthread/include/pwd.h b/lib/libpthread/include/pwd.h deleted file mode 100644 index 4607080607a..00000000000 --- a/lib/libpthread/include/pwd.h +++ /dev/null @@ -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: pwd.h,v 1.1 1998/07/21 13:19:08 peter Exp $ - */ - -#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_ */ diff --git a/lib/libpthread/include/resolv.h b/lib/libpthread/include/resolv.h deleted file mode 100644 index 7e2fcc7a5da..00000000000 --- a/lib/libpthread/include/resolv.h +++ /dev/null @@ -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: resolv.h,v 1.1 1998/07/21 13:19:08 peter Exp $ - */ - -#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_ */ - diff --git a/lib/libpthread/include/signal.h b/lib/libpthread/include/signal.h deleted file mode 100644 index 9fb1ec6e2c8..00000000000 --- a/lib/libpthread/include/signal.h +++ /dev/null @@ -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 */ diff --git a/lib/libpthread/include/stdio.h b/lib/libpthread/include/stdio.h deleted file mode 100644 index 22b263edb75..00000000000 --- a/lib/libpthread/include/stdio.h +++ /dev/null @@ -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: stdio.h,v 1.3 1998/07/21 13:53:52 peter Exp $ - */ - -#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 diff --git a/lib/libpthread/include/stdlib.h b/lib/libpthread/include/stdlib.h deleted file mode 100644 index f51c7edf694..00000000000 --- a/lib/libpthread/include/stdlib.h +++ /dev/null @@ -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: stdlib.h,v 1.1 1998/07/21 13:19:10 peter Exp $ - */ - -#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_ */ diff --git a/lib/libpthread/include/string.h b/lib/libpthread/include/string.h deleted file mode 100644 index 4143a1cfec7..00000000000 --- a/lib/libpthread/include/string.h +++ /dev/null @@ -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_ */ diff --git a/lib/libpthread/include/sys/__math.h b/lib/libpthread/include/sys/__math.h deleted file mode 100644 index 27ed0f2575d..00000000000 --- a/lib/libpthread/include/sys/__math.h +++ /dev/null @@ -1,6 +0,0 @@ -/* - * ANSI/POSIX - */ -extern char __infinity[]; -#define HUGE_VAL (*(double *) __infinity) - diff --git a/lib/libpthread/include/sys/__path.h b/lib/libpthread/include/sys/__path.h deleted file mode 100644 index e5a48d8ab73..00000000000 --- a/lib/libpthread/include/sys/__path.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * from: @(#)time.h 5.12 (Berkeley) 3/9/91 - * $Id: __path.h,v 1.1 1998/07/21 16:28:08 peter Exp $ - */ - -#ifndef _SYS__PATH_H_ -#define _SYS__PATH_H_ - -#define _PATH_PTY "/dev/" -#define _PATH_TZDIR "/usr/share/zoneinfo" -#define _PATH_TZFILE "/etc/localtime" - -#endif /* !_SYS__PATH_H_ */ - diff --git a/lib/libpthread/include/sys/__signal.h b/lib/libpthread/include/sys/__signal.h deleted file mode 100644 index 918955c9948..00000000000 --- a/lib/libpthread/include/sys/__signal.h +++ /dev/null @@ -1,8 +0,0 @@ -#include <sys/signal.h> - -#define __SIGEMPTYSET 0 -#define __SIGFILLSET 0xffffffff -#define __SIGADDSET(s, n) (*(s) |= 1 << ((n) - 1), 0) -#define __SIGDELSET(s, n) (*(s) &= ~(1 << ((n) - 1)), 0) -#define __SIGISMEMBER(s, n) ((*(s) & (1 << ((n) - 1))) != 0) - diff --git a/lib/libpthread/include/sys/__stdio.h b/lib/libpthread/include/sys/__stdio.h deleted file mode 100644 index d60b9df7a54..00000000000 --- a/lib/libpthread/include/sys/__stdio.h +++ /dev/null @@ -1,8 +0,0 @@ - -#include <machine/ansi.h> -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -typedef pthread_fpos_t fpos_t; /* Must match off_t <sys/types.h> */ diff --git a/lib/libpthread/include/sys/__stdlib.h b/lib/libpthread/include/sys/__stdlib.h deleted file mode 100644 index cfcbe91867c..00000000000 --- a/lib/libpthread/include/sys/__stdlib.h +++ /dev/null @@ -1,66 +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. - * - * from: @(#)stdlib.h 5.13 (Berkeley) 6/4/91 - * $Id: __stdlib.h,v 1.1 1998/07/21 16:28:08 peter Exp $ - */ - -#ifndef _SYS___STDLIB_H_ -#define _SYS___STDLIB_H_ - -#include <machine/ansi.h> - -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -#ifdef _BSD_WCHAR_T_ -typedef _BSD_WCHAR_T_ wchar_t; -#ifdef _BSD_RUNE_T_ -typedef _BSD_RUNE_T_ rune_t; -#undef _BSD_RUNE_T_ -#else -typedef _BSD_WCHAR_T_ rune_t; -#endif -#undef _BSD_WCHAR_T_ -#endif - -#ifndef __NORETURN -#define __NORETURN -#endif - -#ifndef NULL -#define NULL 0 -#endif - -#endif /* _STDLIB_H_ */ diff --git a/lib/libpthread/include/sys/__string.h b/lib/libpthread/include/sys/__string.h deleted file mode 100644 index 93d4fcf9dd2..00000000000 --- a/lib/libpthread/include/sys/__string.h +++ /dev/null @@ -1,21 +0,0 @@ - -#include <machine/ansi.h> -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -/* Non-standard NetBSD string routines. */ -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) -__BEGIN_DECLS -int bcmp __P_((const void *, const void *, size_t)); -void bcopy __P_((const void *, void *, size_t)); -void bzero __P_((void *, size_t)); -char *index __P_((const char *, int)); -char *rindex __P_((const char *, int)); -char *strdup __P_((const char *)); -void strmode __P_((int, char *)); -char *strsep __P_((char **, const char *)); -__END_DECLS -#endif - diff --git a/lib/libpthread/include/sys/__time.h b/lib/libpthread/include/sys/__time.h deleted file mode 100644 index 536ec0400ad..00000000000 --- a/lib/libpthread/include/sys/__time.h +++ /dev/null @@ -1,70 +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: __time.h,v 1.1 1998/07/21 16:28:08 peter Exp $ - */ - -#ifndef _SYS__TIME_H_ -#define _SYS__TIME_H_ - -#include <machine/ansi.h> -#include <machine/limits.h> - -#ifdef _BSD_CLOCK_T_ -typedef _BSD_CLOCK_T_ clock_t; -#undef _BSD_CLOCK_T_ -#endif - -#ifdef _BSD_TIME_T_ -typedef _BSD_TIME_T_ time_t; -#undef _BSD_TIME_T_ -#endif - -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -#define CLOCKS_PER_SEC 100 - -#if !defined(CLK_TCK) -#define CLK_TCK 100 -#endif /* not CLK_TCK */ - -#endif /* !_SYS__TIME_H_ */ diff --git a/lib/libpthread/include/sys/__unistd.h b/lib/libpthread/include/sys/__unistd.h deleted file mode 100644 index d4d621a8618..00000000000 --- a/lib/libpthread/include/sys/__unistd.h +++ /dev/null @@ -1,109 +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. - * - * from: @(#)stdlib.h 5.13 (Berkeley) 6/4/91 - * $Id: __unistd.h,v 1.1 1998/07/21 16:28:08 peter Exp $ - */ - -#ifndef _SYS___UNISTD_H_ -#define _SYS___UNISTD_H_ - -#include <sys/types.h> - -#ifndef NULL -#define NULL 0 -#endif - -#define ioctl_request_type unsigned long /* For fd.c */ - -/* compile-time symbolic constants */ -#define _POSIX_JOB_CONTROL /* implementation supports job control */ - -#ifdef _NOT_AVAILABLE -#define _POSIX_SAVED_IDS /* saved set-user-ID and set-group-ID */ -#endif - -#define _POSIX_VERSION 198808L -#define _POSIX2_VERSION 199212L - -/* execution-time symbolic constants */ - /* chown requires appropriate privileges */ -#define _POSIX_CHOWN_RESTRICTED 1 - /* too-long path components generate errors */ -#define _POSIX_NO_TRUNC 1 - /* may disable terminal special characters */ -/* #define _POSIX_VDISABLE 0xff */ - -/* configurable pathname variables */ -#define _PC_LINK_MAX 1 -#define _PC_MAX_CANON 2 -#define _PC_MAX_INPUT 3 -#define _PC_NAME_MAX 4 -#define _PC_PATH_MAX 5 -#define _PC_PIPE_BUF 6 -#define _PC_CHOWN_RESTRICTED 7 -#define _PC_NO_TRUNC 8 -#define _PC_VDISABLE 9 - -/* configurable system variables */ -#define _SC_ARG_MAX 1 -#define _SC_CHILD_MAX 2 -#define _SC_CLK_TCK 3 -#define _SC_NGROUPS_MAX 4 -#define _SC_OPEN_MAX 5 -#define _SC_JOB_CONTROL 6 -#define _SC_SAVED_IDS 7 -#define _SC_VERSION 8 -#define _SC_BC_BASE_MAX 9 -#define _SC_BC_DIM_MAX 10 -#define _SC_BC_SCALE_MAX 11 -#define _SC_BC_STRING_MAX 12 -#define _SC_COLL_WEIGHTS_MAX 13 -#define _SC_EXPR_NEST_MAX 14 -#define _SC_LINE_MAX 15 -#define _SC_RE_DUP_MAX 16 -#define _SC_2_VERSION 17 -#define _SC_2_C_BIND 18 -#define _SC_2_C_DEV 19 -#define _SC_2_CHAR_TERM 20 -#define _SC_2_FORT_DEV 21 -#define _SC_2_FORT_RUN 22 -#define _SC_2_LOCALEDEF 23 -#define _SC_2_SW_DEV 24 -#define _SC_2_UPE 25 -#define _SC_STREAM_MAX 26 -#define _SC_TZNAME_MAX 27 - -/* configurable system strings */ -#define _CS_PATH 1 - -#endif diff --git a/lib/libpthread/include/sys/compat.h b/lib/libpthread/include/sys/compat.h deleted file mode 100644 index 604b61e3907..00000000000 --- a/lib/libpthread/include/sys/compat.h +++ /dev/null @@ -1,43 +0,0 @@ -/* ==== compat.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: compat.h,v 1.1 1998/07/21 16:28:08 peter Exp $ - * - * Description : COmpat header to make socket code compile. - * - * 1.00 94/08/01 proven - * -Started coding this file. - */ - -#ifndef _SYS_COMPAT_H_ -#define _SYS_COMPAT_H_ - -#endif diff --git a/lib/libpthread/include/sys/dirent.h b/lib/libpthread/include/sys/dirent.h deleted file mode 100644 index 5226443f86b..00000000000 --- a/lib/libpthread/include/sys/dirent.h +++ /dev/null @@ -1,64 +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 _SYS_DIRENT_H_ -#define _SYS_DIRENT_H_ - -/* - * A directory entry has a struct dirent at the front of it, containing its - * inode number, the length of the entry, and the length of the name - * contained in the entry. These are followed by the name padded to a 4 - * byte boundary with null bytes. All names are guaranteed null terminated. - * The maximum length of a name in a directory is MAXNAMLEN. - */ - -struct dirent { - u_long d_fileno; /* file number of entry */ - u_short d_reclen; /* length of this record */ - u_short d_namlen; /* length of string in d_name */ -#ifdef _POSIX_SOURCE - char d_name[255 + 1]; /* name must be no longer than this */ -#else -#define MAXNAMLEN 255 - char d_name[MAXNAMLEN + 1]; /* name must be no longer than this */ -#endif -}; - -#define d_ino d_fileno /* backward compatibility */ - -/* definitions for library routines operating on directories. */ -#define DIRBLKSIZ 1024 - -#endif /* !_DIRENT_H_ */ diff --git a/lib/libpthread/include/sys/errno.h b/lib/libpthread/include/sys/errno.h deleted file mode 100644 index 3da61d692a3..00000000000 --- a/lib/libpthread/include/sys/errno.h +++ /dev/null @@ -1,160 +0,0 @@ -/* $NetBSD: errno.h,v 1.8 1994/06/29 06:44:02 cgd Exp $ */ - -/* - * Copyright (c) 1982, 1986, 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. - * - * @(#)errno.h 8.5 (Berkeley) 1/21/94 - */ - -#ifndef _SYS_ERRNO_H_ -#define _SYS_ERRNO_H_ - -#define EPERM 1 /* Operation not permitted */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* Input/output error */ -#define ENXIO 6 /* Device not configured */ -#define E2BIG 7 /* Argument list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file descriptor */ -#define ECHILD 10 /* No child processes */ -#define EDEADLK 11 /* Resource deadlock avoided */ - /* 11 was EAGAIN */ -#define ENOMEM 12 /* Cannot allocate memory */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#ifndef _POSIX_SOURCE -#define ENOTBLK 15 /* Block device required */ -#endif -#define EBUSY 16 /* Device busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* Operation not supported by device */ -#define ENOTDIR 20 /* Not a directory */ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* Too many open files in system */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Inappropriate ioctl for device */ -#ifndef _POSIX_SOURCE -#define ETXTBSY 26 /* Text file busy */ -#endif -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only file system */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ - -/* math software */ -#define EDOM 33 /* Numerical argument out of domain */ -#define ERANGE 34 /* Result too large */ - -/* non-blocking and interrupt i/o */ -#define EAGAIN 35 /* Resource temporarily unavailable */ -#ifndef _POSIX_SOURCE -#define EWOULDBLOCK EAGAIN /* Operation would block */ -#define EINPROGRESS 36 /* Operation now in progress */ -#define EALREADY 37 /* Operation already in progress */ - -/* ipc/network software -- argument errors */ -#define ENOTSOCK 38 /* Socket operation on non-socket */ -#define EDESTADDRREQ 39 /* Destination address required */ -#define EMSGSIZE 40 /* Message too long */ -#define EPROTOTYPE 41 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 42 /* Protocol not available */ -#define EPROTONOSUPPORT 43 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 44 /* Socket type not supported */ -#define EOPNOTSUPP 45 /* Operation not supported */ -#define EPFNOSUPPORT 46 /* Protocol family not supported */ -#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */ -#define EADDRINUSE 48 /* Address already in use */ -#define EADDRNOTAVAIL 49 /* Can't assign requested address */ - -/* ipc/network software -- operational errors */ -#define ENETDOWN 50 /* Network is down */ -#define ENETUNREACH 51 /* Network is unreachable */ -#define ENETRESET 52 /* Network dropped connection on reset */ -#define ECONNABORTED 53 /* Software caused connection abort */ -#define ECONNRESET 54 /* Connection reset by peer */ -#define ENOBUFS 55 /* No buffer space available */ -#define EISCONN 56 /* Socket is already connected */ -#define ENOTCONN 57 /* Socket is not connected */ -#define ESHUTDOWN 58 /* Can't send after socket shutdown */ -#define ETOOMANYREFS 59 /* Too many references: can't splice */ -#define ETIMEDOUT 60 /* Operation timed out */ -#define ECONNREFUSED 61 /* Connection refused */ - -#define ELOOP 62 /* Too many levels of symbolic links */ -#endif /* _POSIX_SOURCE */ -#define ENAMETOOLONG 63 /* File name too long */ - -/* should be rearranged */ -#ifndef _POSIX_SOURCE -#define EHOSTDOWN 64 /* Host is down */ -#define EHOSTUNREACH 65 /* No route to host */ -#endif /* _POSIX_SOURCE */ -#define ENOTEMPTY 66 /* Directory not empty */ - -/* quotas & mush */ -#ifndef _POSIX_SOURCE -#define EPROCLIM 67 /* Too many processes */ -#define EUSERS 68 /* Too many users */ -#define EDQUOT 69 /* Disc quota exceeded */ - -/* Network File System */ -#define ESTALE 70 /* Stale NFS file handle */ -#define EREMOTE 71 /* Too many levels of remote in path */ -#define EBADRPC 72 /* RPC struct is bad */ -#define ERPCMISMATCH 73 /* RPC version wrong */ -#define EPROGUNAVAIL 74 /* RPC prog. not avail */ -#define EPROGMISMATCH 75 /* Program version wrong */ -#define EPROCUNAVAIL 76 /* Bad procedure for program */ -#endif /* _POSIX_SOURCE */ - -#define ENOLCK 77 /* No locks available */ -#define ENOSYS 78 /* Function not implemented */ - -#ifndef _POSIX_SOURCE -#define EFTYPE 79 /* Inappropriate file type or format */ -#define EAUTH 80 /* Authentication error */ -#define ENEEDAUTH 81 /* Need authenticator */ -#define ELAST 81 /* Must be equal largest errno */ -#endif /* _POSIX_SOURCE */ - -#endif diff --git a/lib/libpthread/include/sys/timers.h b/lib/libpthread/include/sys/timers.h deleted file mode 100644 index c15b91d34ba..00000000000 --- a/lib/libpthread/include/sys/timers.h +++ /dev/null @@ -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: timers.h,v 1.1 1998/07/21 16:28:09 peter Exp $ - * - * Description : Basic timers header. - * - * 1.00 94/06/13 proven - * -Started coding this file. - */ - -#ifndef _SYS_TIMERS_H_ -#define _SYS_TIMERS_H_ - -#include <sys/time.h> - -#endif diff --git a/lib/libpthread/include/sys/wait.h b/lib/libpthread/include/sys/wait.h deleted file mode 100644 index 063dc3d766c..00000000000 --- a/lib/libpthread/include/sys/wait.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) 1982, 1986, 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. - * - * @(#)wait.h 8.1 (Berkeley) 6/2/93 - * $Id: wait.h,v 1.1 1998/07/21 16:28:09 peter Exp $ - */ - -#ifndef _SYS_WAIT_H_ -#define _SYS_WAIT_H_ - -/* - * This file holds definitions relevent to the wait4 system call - * and the alternate interfaces that use it (wait, wait3, waitpid). - */ - -/* - * Macros to test the exit status returned by wait - * and extract the relevant values. - */ -#ifdef _POSIX_SOURCE -#define _W_INT(i) (i) -#else -#define _W_INT(w) (*(int *)&(w)) /* convert union wait to int */ -#define WCOREFLAG 0200 -#endif - -#define _WSTATUS(x) (_W_INT(x) & 0177) -#define _WSTOPPED 0177 /* _WSTATUS if process is stopped */ -#define WIFSTOPPED(x) (_WSTATUS(x) == _WSTOPPED) -#define WSTOPSIG(x) (_W_INT(x) >> 8) -#define WIFSIGNALED(x) (_WSTATUS(x) != _WSTOPPED && _WSTATUS(x) != 0) -#define WTERMSIG(x) (_WSTATUS(x)) -#define WIFEXITED(x) (_WSTATUS(x) == 0) -#define WEXITSTATUS(x) (_W_INT(x) >> 8) -#ifndef _POSIX_SOURCE -#define WCOREDUMP(x) (_W_INT(x) & WCOREFLAG) - -#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) -#define W_STOPCODE(sig) ((sig) << 8 | _WSTOPPED) -#endif - -/* - * Option bits for the third argument of wait4. WNOHANG causes the - * wait to not hang if there are no stopped or terminated processes, rather - * returning an error indication in this case (pid==0). WUNTRACED - * indicates that the caller should receive status about untraced children - * which stop due to signals. If children are stopped and a wait without - * this option is done, it is as though they were still running... nothing - * about them is returned. - */ -#define WNOHANG 1 /* dont hang in wait */ -#define WUNTRACED 2 /* tell about stopped, untraced children */ - -#ifndef _POSIX_SOURCE -/* POSIX extensions and 4.2/4.3 compatability: */ - -/* - * Tokens for special values of the "pid" parameter to wait4. - */ -#define WAIT_ANY (-1) /* any process */ -#define WAIT_MYPGRP 0 /* any process in my process group */ - -#include <machine/endian.h> - -/* - * Deprecated: - * Structure of the information in the status word returned by wait4. - * If w_stopval==WSTOPPED, then the second structure describes - * the information returned, else the first. - */ -union wait { - int w_status; /* used in syscall */ - /* - * Terminated process status. - */ - struct { -#if BYTE_ORDER == LITTLE_ENDIAN - unsigned int w_Termsig:7, /* termination signal */ - w_Coredump:1, /* core dump indicator */ - w_Retcode:8, /* exit code if w_termsig==0 */ - w_Filler:16; /* upper bits filler */ -#endif -#if BYTE_ORDER == BIG_ENDIAN - unsigned int w_Filler:16, /* upper bits filler */ - w_Retcode:8, /* exit code if w_termsig==0 */ - w_Coredump:1, /* core dump indicator */ - w_Termsig:7; /* termination signal */ -#endif - } w_T; - /* - * Stopped process status. Returned - * only for traced children unless requested - * with the WUNTRACED option bit. - */ - struct { -#if BYTE_ORDER == LITTLE_ENDIAN - unsigned int w_Stopval:8, /* == W_STOPPED if stopped */ - w_Stopsig:8, /* signal that stopped us */ - w_Filler:16; /* upper bits filler */ -#endif -#if BYTE_ORDER == BIG_ENDIAN - unsigned int w_Filler:16, /* upper bits filler */ - w_Stopsig:8, /* signal that stopped us */ - w_Stopval:8; /* == W_STOPPED if stopped */ -#endif - } w_S; -}; -#define w_termsig w_T.w_Termsig -#define w_coredump w_T.w_Coredump -#define w_retcode w_T.w_Retcode -#define w_stopval w_S.w_Stopval -#define w_stopsig w_S.w_Stopsig - -#define WSTOPPED _WSTOPPED -#endif /* _POSIX_SOURCE */ - -#ifndef KERNEL -#include <sys/types.h> -#include <sys/cdefs.h> - -__BEGIN_DECLS -struct rusage; /* forward declaration */ - -pid_t wait __P_((int *)); -pid_t waitpid __P_((pid_t, int *, int)); -#ifndef _POSIX_SOURCE -pid_t wait3 __P_((int *, int, void *)); -pid_t wait4 __P_((pid_t, int *, int, void *)); -#endif -__END_DECLS -#endif - -#endif diff --git a/lib/libpthread/include/syslog.h b/lib/libpthread/include/syslog.h deleted file mode 100644 index 31b42285fc1..00000000000 --- a/lib/libpthread/include/syslog.h +++ /dev/null @@ -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 - diff --git a/lib/libpthread/include/time.h b/lib/libpthread/include/time.h deleted file mode 100644 index c27e66838a3..00000000000 --- a/lib/libpthread/include/time.h +++ /dev/null @@ -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: time.h,v 1.1 1998/07/21 13:19:10 peter Exp $ - */ - -#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_ */ diff --git a/lib/libpthread/include/timers.h b/lib/libpthread/include/timers.h deleted file mode 100644 index af9db4a5b01..00000000000 --- a/lib/libpthread/include/timers.h +++ /dev/null @@ -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: timers.h,v 1.1 1998/07/21 13:19:10 peter Exp $ - * - * 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 diff --git a/lib/libpthread/include/tzfile.h b/lib/libpthread/include/tzfile.h deleted file mode 100644 index 95bbc424be7..00000000000 --- a/lib/libpthread/include/tzfile.h +++ /dev/null @@ -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: tzfile.h,v 1.1 1998/07/21 13:19:10 peter Exp $ - */ - -#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_ */ - diff --git a/lib/libpthread/include/unistd.h b/lib/libpthread/include/unistd.h deleted file mode 100644 index 213aa983172..00000000000 --- a/lib/libpthread/include/unistd.h +++ /dev/null @@ -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 |