diff options
Diffstat (limited to 'mit-pthreads/machdep/sco-3.2v5')
-rwxr-xr-x | mit-pthreads/machdep/sco-3.2v5/__math.h | 219 | ||||
-rwxr-xr-x | mit-pthreads/machdep/sco-3.2v5/__signal.h | 109 | ||||
-rwxr-xr-x | mit-pthreads/machdep/sco-3.2v5/__stdio.h | 113 | ||||
-rwxr-xr-x | mit-pthreads/machdep/sco-3.2v5/__stdlib.h | 137 | ||||
-rwxr-xr-x | mit-pthreads/machdep/sco-3.2v5/__string.h | 125 | ||||
-rwxr-xr-x | mit-pthreads/machdep/sco-3.2v5/__time.h | 141 | ||||
-rwxr-xr-x | mit-pthreads/machdep/sco-3.2v5/__unistd.h | 48 | ||||
-rwxr-xr-x | mit-pthreads/machdep/sco-3.2v5/compat.h | 46 | ||||
-rwxr-xr-x | mit-pthreads/machdep/sco-3.2v5/dirent.h | 145 | ||||
-rwxr-xr-x | mit-pthreads/machdep/sco-3.2v5/posix/__signal.h | 69 | ||||
-rwxr-xr-x | mit-pthreads/machdep/sco-3.2v5/socket.h | 490 | ||||
-rwxr-xr-x | mit-pthreads/machdep/sco-3.2v5/syscall.h | 175 | ||||
-rwxr-xr-x | mit-pthreads/machdep/sco-3.2v5/timers.h | 68 | ||||
-rwxr-xr-x | mit-pthreads/machdep/sco-3.2v5/trash.can | 1 |
14 files changed, 1886 insertions, 0 deletions
diff --git a/mit-pthreads/machdep/sco-3.2v5/__math.h b/mit-pthreads/machdep/sco-3.2v5/__math.h new file mode 100755 index 00000000000..4852683fcbf --- /dev/null +++ b/mit-pthreads/machdep/sco-3.2v5/__math.h @@ -0,0 +1,219 @@ +/* Copyright 1994-1995 The Santa Cruz Operation, Inc. All Rights Reserved. */ + + +#if defined(_NO_PROTOTYPE) /* Old, crufty environment */ +#include <oldstyle/__math.h> +#elif defined(_XOPEN_SOURCE) || defined(_XPG4_VERS) /* Xpg4 environment */ +#include <xpg4/__math.h> +#elif defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) /* Posix environment */ +#include <posix/__math.h> +#elif _STRICT_ANSI /* Pure Ansi/ISO environment */ +#include <ansi/__math.h> +#elif defined(_SCO_ODS_30) /* Old, Tbird compatible environment */ +#include <ods_30_compat/__math.h> +#else /* Normal, default environment */ +/* + * Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc. + * All Rights Reserved. + * + * The information in this file is provided for the exclusive use of + * the licensees of The Santa Cruz Operation, Inc. Such users have the + * right to use, modify, and incorporate this code into other products + * for purposes authorized by the license agreement provided they include + * this notice and the associated copyright notice with any such product. + * The information in this file is provided "AS IS" without warranty. + */ + +/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */ +/* Portions Copyright (c) 1979 - 1990 AT&T */ +/* All Rights Reserved */ + +/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */ +/* UNIX System Laboratories, Inc. */ +/* The copyright notice above does not evidence any */ +/* actual or intended publication of such source code. */ + +#ifndef ___MATH_H +#define ___MATH_H + +#pragma comment(exestr, "xpg4plus @(#) math.h 20.1 94/12/04 ") + +#pragma pack(4) + +#ifdef __cplusplus +extern "C" { +#endif + + +extern double acos(double); +extern double asin(double); +extern double atan(double); +extern double atan2(double, double); +extern double cos(double); +extern double sin(double); +extern double tan(double); + +extern double cosh(double); +extern double sinh(double); +extern double tanh(double); + +extern double exp(double); +extern double frexp(double, int *); +extern double ldexp(double, int); +extern double log(double); +extern double log10(double); +extern double modf(double, double *); + +extern double pow(double, double); +extern double sqrt(double); + +extern double ceil(double); +extern double fabs(double); +extern double floor(double); +extern double fmod(double, double); + +#ifndef HUGE_VAL +extern const double __huge_val; +#define HUGE_VAL (+__huge_val) +#endif + + +extern double erf(double); +extern double erfc(double); +extern double gamma(double); +extern double hypot(double, double); +extern double j0(double); +extern double j1(double); +extern double jn(int, double); +extern double y0(double); +extern double y1(double); +extern double yn(int, double); +extern double lgamma(double); +extern int isnan(double); + +#define MAXFLOAT ((float)3.40282346638528860e+38) + + + +#define HUGE MAXFLOAT + +/* + * The following are all legal as XPG4 external functions but must only + * be declared in the non standards environments as they conflict with + * the user name space + */ + +extern long double frexpl(long double, int *); +extern long double ldexpl(long double, int); +extern long double modfl(long double, long double *); + +extern float acosf(float); +extern float asinf(float); +extern float atanf(float); +extern float atan2f(float, float); +extern float cosf(float); +extern float sinf(float); +extern float tanf(float); + +extern float coshf(float); +extern float sinhf(float); +extern float tanhf(float); + +extern float expf(float); +extern float logf(float); +extern float log10f(float); + +extern float powf(float, float); +extern float sqrtf(float); + +extern float ceilf(float); +extern float fabsf(float); +extern float floorf(float); +extern float fmodf(float, float); +extern float modff(float, float *); + +/* These are all extensions from XPG4 */ + +extern double atof(const char *); +extern double scalb(double, double); +extern double logb(double); +extern double log1p(double); +extern double nextafter(double, double); +extern double acosh(double); +extern double asinh(double); +extern double atanh(double); +extern double cbrt(double); +extern double copysign(double, double); +extern double expm1(double); +extern int ilogb(double); +extern double remainder(double, double); +extern double rint(double); +extern int unordered(double, double); +extern int finite(double); + +extern long double scalbl(long double, long double); +extern long double logbl(long double); +extern long double nextafterl(long double, long double); +extern int unorderedl(long double, long double); +extern int finitel(long double); + + + + +extern int signgam; + +#define M_E 2.7182818284590452354 +#define M_LOG2E 1.4426950408889634074 +#define M_LOG10E 0.43429448190325182765 +#define M_LN2 0.69314718055994530942 +#define M_LN10 2.30258509299404568402 +#define M_PI 3.14159265358979323846 +#define M_PI_2 1.57079632679489661923 +#define M_PI_4 0.78539816339744830962 +#define M_1_PI 0.31830988618379067154 +#define M_2_PI 0.63661977236758134308 +#define M_2_SQRTPI 1.12837916709551257390 +#define M_SQRT2 1.41421356237309504880 +#define M_SQRT1_2 0.70710678118654752440 + + + +#define _ABS(x) ((x) < 0 ? -(x) : (x)) + +#define _REDUCE(TYPE, X, XN, C1, C2) { \ + double x1 = (double)(TYPE)X, x2 = X - x1; \ + X = x1 - (XN) * (C1); X += x2; X -= (XN) * (C2); } + +#define DOMAIN 1 +#define SING 2 +#define OVERFLOW 3 +#define UNDERFLOW 4 +#define TLOSS 5 +#define PLOSS 6 + +#define _POLY1(x, c) ((c)[0] * (x) + (c)[1]) +#define _POLY2(x, c) (_POLY1((x), (c)) * (x) + (c)[2]) +#define _POLY3(x, c) (_POLY2((x), (c)) * (x) + (c)[3]) +#define _POLY4(x, c) (_POLY3((x), (c)) * (x) + (c)[4]) +#define _POLY5(x, c) (_POLY4((x), (c)) * (x) + (c)[5]) +#define _POLY6(x, c) (_POLY5((x), (c)) * (x) + (c)[6]) +#define _POLY7(x, c) (_POLY6((x), (c)) * (x) + (c)[7]) +#define _POLY8(x, c) (_POLY7((x), (c)) * (x) + (c)[8]) +#define _POLY9(x, c) (_POLY8((x), (c)) * (x) + (c)[9]) + + +#ifdef __cplusplus +} +inline int sqr(int i) {return(i*i);} +inline double sqr(double i) {return(i*i);} + +#endif /* __cplusplus */ + +#pragma pack() + +#if __cplusplus && !defined(PI) +#define PI M_PI +#endif /* __cplusplus */ + +#endif /* _MATH_H */ +#endif diff --git a/mit-pthreads/machdep/sco-3.2v5/__signal.h b/mit-pthreads/machdep/sco-3.2v5/__signal.h new file mode 100755 index 00000000000..6a33d37a261 --- /dev/null +++ b/mit-pthreads/machdep/sco-3.2v5/__signal.h @@ -0,0 +1,109 @@ +/* Copyright 1994-1995 The Santa Cruz Operation, Inc. All Rights Reserved. */ + + +#if defined(_NO_PROTOTYPE) /* Old, crufty environment */ +#include <sys/oldstyle/signal.h> +#elif defined(_XOPEN_SOURCE) || defined(_XPG4_VERS) /* Xpg4 environment */ +#include <xpg4/signal.h> +#elif defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) /* Posix environment */ +#include <sys/posix/__signal.h> +#elif _STRICT_ANSI /* Pure Ansi/ISO environment */ +#include <sys/ansi/signal.h> +#elif defined(_SCO_ODS_30) /* Old, Tbird compatible environment */ +#include <sys/ods_30_compat/signal.h> +#else /* Normal, default environment */ +/* + * Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc. + * All Rights Reserved. + * + * The information in this file is provided for the exclusive use of + * the licensees of The Santa Cruz Operation, Inc. Such users have the + * right to use, modify, and incorporate this code into other products + * for purposes authorized by the license agreement provided they include + * this notice and the associated copyright notice with any such product. + * The information in this file is provided "AS IS" without warranty. + */ + +/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */ +/* Portions Copyright (c) 1979 - 1990 AT&T */ +/* All Rights Reserved */ + +/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */ +/* UNIX System Laboratories, Inc. */ +/* The copyright notice above does not evidence any */ +/* actual or intended publication of such source code. */ + +#ifndef ___SIGNAL_H +#define ___SIGNAL_H + +#pragma comment(exestr, "xpg4plus @(#) signal.h 20.3 94/12/19 ") + +#ifndef _SIG_ATOMIC_T +#define _SIG_ATOMIC_T + /* atomic entity for signal handling */ +typedef int sig_atomic_t; +#endif + +extern const char * const _sys_siglist[]; +extern const int _sys_nsig; + +#ifndef _SYS_SIGNAL_H +#include <sys/signal.h> +#endif + +#define SignalBad ((SignalHandler)-1) +#define SignalDefault ((SignalHandler)0) +#define SignalIgnore ((SignalHandler)1) + +#define __sigmask(sig) (1 << ((sig) - 1)) +#define __SIGEMPTYSET (~SIGALL) +#define __SIGFILLSET SIGALL +#define __SIGADDSET(s,n) ((*s) |= (__sigmask(n))) +#define __SIGDELSET(s,n) ((*s) &= ~(__sigmask(n))) +#define __SIGISMEMBER(s,n) ((*s) & (__sigmask(n))) + +#if !defined(_SYS_TYPES_H) +#include <sys/types.h> +#endif + + +#if __cplusplus +extern "C" { +#endif + +extern void (*signal(int, void(*)(int)))(int); +extern int raise(int); + +extern void (*bsd_signal(int, void(*)(int)))(int); +extern int ( *ssignal( int, int(*)(int) ) )(int); +extern void ( *sigset( int, void(*)(int) ) )(int); +extern int killpg(pid_t, int); +#ifdef SS_ONSTACK /* Not defined on old versions of the OS */ +extern int sigaltstack(const stack_t *, stack_t *); +extern int sigstack(struct sigstack *, struct sigstack *); +#endif +extern int sighold(int); +extern int sigignore(int); +extern int siginterrupt(int, int); +extern int sigpause(int); +extern int sigrelse(int); + +extern int (sigfillset)(sigset_t *); +extern int (sigemptyset)(sigset_t *); +extern int (sigaddset)(sigset_t *, int); +extern int (sigdelset)(sigset_t *, int); +extern int (sigismember)(const sigset_t *, int); +extern int sigpending(sigset_t *); +extern int sigsuspend(const sigset_t *); +extern int sigprocmask(int, const sigset_t *, sigset_t *); +extern int kill(pid_t, int); +extern int sigaction(int, const struct sigaction *, struct sigaction *); + +#if __cplusplus +}; +#endif + + +#endif /* ___SIGNAL_H */ + +#endif diff --git a/mit-pthreads/machdep/sco-3.2v5/__stdio.h b/mit-pthreads/machdep/sco-3.2v5/__stdio.h new file mode 100755 index 00000000000..f19672980ec --- /dev/null +++ b/mit-pthreads/machdep/sco-3.2v5/__stdio.h @@ -0,0 +1,113 @@ +/* Copyright 1994-1995 The Santa Cruz Operation, Inc. All Rights Reserved. */ + + +#if defined(_NO_PROTOTYPE) /* Old, crufty environment */ +#include <oldstyle/__stdio.h> +#elif defined(_XOPEN_SOURCE) || defined(_XPG4_VERS) /* Xpg4 environment */ +#include <xpg4/__stdio.h> +#elif defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) /* Posix environment */ +#include <posix/__stdio.h> +#elif _STRICT_ANSI /* Pure Ansi/ISO environment */ +#include <ansi/__stdio.h> +#elif defined(_SCO_ODS_30) /* Old, Tbird compatible environment */ +#include <ods_30_compat/__stdio.h> +#else /* Normal, default environment */ +/* + * Portions Copyright (C) 1984-1995 The Santa Cruz Operation, Inc. + * All Rights Reserved. + * + * The information in this file is provided for the exclusive use of + * the licensees of The Santa Cruz Operation, Inc. Such users have the + * right to use, modify, and incorporate this code into other products + * for purposes authorized by the license agreement provided they include + * this notice and the associated copyright notice with any such product. + * The information in this file is provided "AS IS" without warranty. + */ + +/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */ +/* Portions Copyright (c) 1979 - 1990 AT&T */ +/* All Rights Reserved */ + +/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */ +/* UNIX System Laboratories, Inc. */ +/* The copyright notice above does not evidence any */ +/* actual or intended publication of such source code. */ + +#ifndef ___STDIO_H +#define ___STDIO_H + +#pragma comment(exestr, "xpg4plus @(#) stdio.h 20.1 94/12/04 ") + +#pragma pack(4) + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _SIZE_T +#define _SIZE_T +typedef unsigned int size_t; +#endif + +#ifndef _FPOS_T +#define _FPOS_T +typedef long fpos_t; +#endif + +#ifndef _WCHAR_T +#define _WCHAR_T +typedef long wchar_t; +#endif + +#ifndef _WINT_T +#define _WINT_T +typedef long wint_t; +#endif + +#ifndef NULL +#define NULL 0 +#endif /* NULL */ + +#ifndef EOF +#define EOF (-1) +#endif + +#define SEEK_SET 0 +#define SEEK_CUR 1 +#define SEEK_END 2 + +#ifndef TMP_MAX +#define TMP_MAX 17576 /* 26 * 26 * 26 */ +#endif + +#define BUFSIZ 1024 /* default buffer size */ + + +#define _IOEOF 0020 /* EOF reached on read */ +#define _IOERR 0040 /* I/O error from system */ + +#define _IOREAD 0001 /* currently reading */ +#define _IOWRT 0002 /* currently writing */ +#define _IORW 0200 /* opened for reading and writing */ +#define _IOMYBUF 0010 /* stdio malloc()'d buffer */ + +#define _SBFSIZ 8 + +#define L_cuserid 9 + +/* Non name space polluting version of above */ +#define _P_tmpdir "/usr/tmp/" + +#ifndef _VA_LIST +#define _VA_LIST char * +#endif + + +#ifdef __cplusplus +} +#endif + +#pragma pack() + +#endif /* ___STDIO_H */ +#endif diff --git a/mit-pthreads/machdep/sco-3.2v5/__stdlib.h b/mit-pthreads/machdep/sco-3.2v5/__stdlib.h new file mode 100755 index 00000000000..db6a8a56151 --- /dev/null +++ b/mit-pthreads/machdep/sco-3.2v5/__stdlib.h @@ -0,0 +1,137 @@ +/* + * Copyright (C) 1984-1995 The Santa Cruz Operation, Inc. + * All Rights Reserved. + * + * The information in this file is provided for the exclusive use of + * the licensees of The Santa Cruz Operation, Inc. Such users have the + * right to use, modify, and incorporate this code into other products + * for purposes authorized by the license agreement provided they include + * this notice and the associated copyright notice with any such product. + * The information in this file is provided "AS IS" without warranty. + */ + +/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */ +/* Portions Copyright (c) 1979 - 1990 AT&T */ +/* All Rights Reserved */ + +/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */ +/* UNIX System Laboratories, Inc. */ +/* The copyright notice above does not evidence any */ +/* actual or intended publication of such source code. */ + +#ifndef ___STDLIB_H +#define ___STDLIB_H + +#pragma comment(exestr, "posix @(#) stdlib.h 20.1 94/12/04 ") + +#ifdef __cplusplus +extern "C" { +#endif + +#pragma pack(4) + +#ifndef _DIV_T +#define _DIV_T +typedef struct +{ + int quot; + int rem; +} div_t; +#endif + +#ifndef _LDIV_T +#define _LDIV_T +typedef struct +{ + long quot; + long rem; +} ldiv_t; +#endif + +#ifndef _SIZE_T +#define _SIZE_T +typedef unsigned int size_t; +#endif + +#if !defined(_SSIZE_T) +#define _SSIZE_T +typedef int ssize_t; +#endif + +#ifndef _WCHAR_T +#define _WCHAR_T +typedef long wchar_t; +#endif + +#ifndef NULL +#define NULL 0 +#endif /* NULL */ + +#define EXIT_FAILURE 1 +#define EXIT_SUCCESS 0 +#define RAND_MAX 077777 + + + +extern unsigned char __ctype[]; + +#define MB_CUR_MAX ((int)__ctype[520]) + +extern double atof(const char *); +extern int atoi(const char *); +extern long atol(const char *); +extern double strtod(const char *, char **); +extern float strtof(const char *, char **); +extern long strtol(const char *, char **, int); +extern unsigned long strtoul(const char *, char **, int); + +extern int rand(void); +extern void srand(unsigned int); + +extern void *calloc(size_t, size_t); +extern void free(void *); +extern void *malloc(size_t); +extern void *realloc(void *, size_t); + +extern void abort(void); +extern void exit(int); +extern char *getenv(const char *); +extern int system(const char *); + +extern void *bsearch(const void *, const void *, size_t, size_t, + int (*)(const void *, const void *)); +extern void qsort(void *, size_t, size_t, + int (*)(const void *, const void *)); + +#ifdef __cplusplus +#ifndef _ABS_INL +#define _ABS_INL +inline int (abs)(int i) {return (i > 0) ? i : -i;} +#endif +#else +extern int (abs)(int); /* Protect from macro definitions */ +#endif + +extern div_t div(int, int); +extern long labs(long); +extern ldiv_t ldiv(long, long); + +extern int mbtowc(wchar_t *, const char *, size_t); +extern int mblen(const char *, size_t); +extern int wctomb(char *, wchar_t); + +extern size_t mbstowcs(wchar_t *, const char *, size_t); +extern size_t wcstombs(char *, const wchar_t *, size_t); + + + + +#define mblen(s, n) mbtowc((wchar_t *)0, s, n) + +#ifdef __cplusplus +} +#endif + +#pragma pack() + +#endif /* ___STDLIB_H */ diff --git a/mit-pthreads/machdep/sco-3.2v5/__string.h b/mit-pthreads/machdep/sco-3.2v5/__string.h new file mode 100755 index 00000000000..e4bb93afe5a --- /dev/null +++ b/mit-pthreads/machdep/sco-3.2v5/__string.h @@ -0,0 +1,125 @@ +/* Copyright 1994-1995 The Santa Cruz Operation, Inc. All Rights Reserved. */ + + +#if defined(_NO_PROTOTYPE) /* Old, crufty environment */ +#include <oldstyle/string.h> +#elif defined(_XOPEN_SOURCE) || defined(_XPG4_VERS) /* Xpg4 environment */ +#include <xpg4/string.h> +#elif defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) /* Posix environment */ +#include <posix/string.h> +#elif _STRICT_ANSI /* Pure Ansi/ISO environment */ +#include <ansi/string.h> +#elif defined(_SCO_ODS_30) /* Old, Tbird compatible environment */ +#include <ods_30_compat/string.h> +#else /* Normal, default environment */ +/* + * Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc. + * All Rights Reserved. + * + * The information in this file is provided for the exclusive use of + * the licensees of The Santa Cruz Operation, Inc. Such users have the + * right to use, modify, and incorporate this code into other products + * for purposes authorized by the license agreement provided they include + * this notice and the associated copyright notice with any such product. + * The information in this file is provided "AS IS" without warranty. + */ + +/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */ +/* Portions Copyright (c) 1979 - 1990 AT&T */ +/* All Rights Reserved */ + +/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */ +/* UNIX System Laboratories, Inc. */ +/* The copyright notice above does not evidence any */ +/* actual or intended publication of such source code. */ + +#ifndef ___STRING_H +#define ___STRING_H + +#pragma comment(exestr, "xpg4plus @(#) string.h 20.1 94/12/04 ") + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _SIZE_T +#define _SIZE_T +typedef unsigned int size_t; +#endif + +#ifndef NULL +#define NULL 0 +#endif /* NULL */ + + + +extern void *memchr(const void *, int, size_t); +extern void *memcpy(void *, const void *, size_t); +extern void *memccpy(void *, const void *, int, size_t); +extern void *memmove(void *, const void *, size_t); +extern void *memset(void *, int, size_t); + +extern char *strchr(const char *, int); +extern char *strcpy(char *, const char *); +extern char *strncpy(char *, const char *, size_t); +extern char *strcat(char *, const char *); +extern char *strncat(char *, const char *, size_t); +extern char *strpbrk(const char *, const char *); +extern char *strrchr(const char *, int); +extern char *strstr(const char *, const char *); +extern char *strtok(char *, const char *); +extern char *strtok_r(char *, const char *, char **); +extern char *strerror(int); +extern char *strlist(char *, const char *, ...); + +extern int memcmp(const void *, const void *, size_t); +extern int strcmp(const char *, const char *); +extern int strcoll(const char *, const char *); +extern int strncmp(const char *, const char *, size_t); + +extern void perror(const char *); +extern char *strdup(const char *); +extern int strncoll(const char *, const char *, int); +extern size_t strnxfrm(char *, const char *, size_t , int); + +extern size_t strxfrm(char *, const char *, size_t); +extern size_t strcspn(const char *, const char *); +extern size_t strspn(const char *, const char *); +extern size_t strlen(const char *); + +#ifdef __USLC__ +#pragma int_to_unsigned strcspn +#pragma int_to_unsigned strspn +#pragma int_to_unsigned strlen +#endif + +#if !defined(__cplusplus) && defined(__USLC__) +/* Use intrinsic ??? */ +#ifndef strlen +#define strlen __std_hdr_strlen +#endif +#ifndef strcpy +#define strcpy __std_hdr_strcpy +#endif +#ifndef strncpy +#define strncpy __std_hdr_strncpy +#endif +#endif + + +extern int ffs(int); +/* + * The following two functions were withdrawn in XPG3, + * but are provided for backwards compatibility. + */ +extern int nl_strcmp(char *, char *); +extern int nl_strncmp(char *, char *, int n); + + + +#ifdef __cplusplus +} +#endif + +#endif /* ___STRING_H */ +#endif diff --git a/mit-pthreads/machdep/sco-3.2v5/__time.h b/mit-pthreads/machdep/sco-3.2v5/__time.h new file mode 100755 index 00000000000..4aeee737601 --- /dev/null +++ b/mit-pthreads/machdep/sco-3.2v5/__time.h @@ -0,0 +1,141 @@ +/* Copyright 1994-1995 The Santa Cruz Operation, Inc. All Rights Reserved. */ + + +#if defined(_NO_PROTOTYPE) /* Old, crufty environment */ +#include <oldstyle/time.h> +#elif defined(_XOPEN_SOURCE) || defined(_XPG4_VERS) /* Xpg4 environment */ +#include <xpg4/time.h> +#elif defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) /* Posix environment */ +#include <posix/time.h> +#elif _STRICT_ANSI /* Pure Ansi/ISO environment */ +#include <ansi/time.h> +#elif defined(_SCO_ODS_30) /* Old, Tbird compatible environment */ +#include <ods_30_compat/time.h> +#else /* Normal, default environment */ +/* + * Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc. + * All Rights Reserved. + * + * The information in this file is provided for the exclusive use of + * the licensees of The Santa Cruz Operation, Inc. Such users have the + * right to use, modify, and incorporate this code into other products + * for purposes authorized by the license agreement provided they include + * this notice and the associated copyright notice with any such product. + * The information in this file is provided "AS IS" without warranty. + */ + +/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */ +/* Portions Copyright (c) 1979 - 1990 AT&T */ +/* All Rights Reserved */ + +/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */ +/* UNIX System Laboratories, Inc. */ +/* The copyright notice above does not evidence any */ +/* actual or intended publication of such source code. */ + +#ifndef ___TIME_H +#define ___TIME_H + +#pragma comment(exestr, "xpg4plus @(#) time.h 20.2 95/01/04 ") + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef NULL +#define NULL 0 +#endif /* NULL */ + +#ifndef _SIZE_T +#define _SIZE_T +typedef unsigned int size_t; +#endif +#ifndef _CLOCK_T +#define _CLOCK_T +typedef long clock_t; +#endif +#ifndef _TIME_T +#define _TIME_T +typedef long time_t; +#endif + +#ifdef _POSIXTIMERS +#include <sys/sudstime.h> +#endif + +#define CLOCKS_PER_SEC 1000000 /* As required by XPG4 and friends */ + +#pragma pack(4) + +#ifndef _STRUCT_TM +#define _STRUCT_TM +struct tm +{ + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; +#define LTZNMAX 50 + long tm_tzadj; + char tm_name[LTZNMAX]; /* name of timezone */ +}; + +#pragma pack() +#endif /* _STRUCT_TM */ + + +extern clock_t clock(void); +extern double difftime(time_t, time_t); +extern time_t mktime(struct tm *); +extern time_t time(time_t *); +extern char *asctime(const struct tm *); +extern char *ctime (const time_t *); +extern struct tm *gmtime(const time_t *); +extern struct tm *localtime(const time_t *); +extern size_t strftime(char *, size_t, const char *, const struct tm *); + + +extern void tzset(void); +extern char *tzname[]; + +#ifndef CLK_TCK +#define CLK_TCK _sysconf(2) /* 2 is _SC_CLK_TCK */ +#endif + +extern long timezone; +extern int daylight; +extern char *strptime(const char *, const char *, struct tm *); + + + + +#include <sys/timeb.h> +extern int ftime ( struct timeb * ); +extern char * nl_cxtime( long *, char * ); +extern char * nl_ascxtime( struct tm *, char * ); +extern int cftime(char *, const char *, const time_t *); +extern int ascftime(char *, const char *, const struct tm *); +extern long altzone; +extern struct tm *getdate(const char *); +extern int getdate_err; +extern char *asctime_r(const struct tm *, char *,int); +extern char *ctime_r(const time_t *, char *,int); +extern struct tm *localtime_r(const time_t *, struct tm *); +extern struct tm *gmtime_r(const time_t *, struct tm *); + + +#ifdef __cplusplus +} +#endif + +#ifndef difftime +#define difftime(t1, t0) ((double)((t1) - (t0))) +#endif + +#endif /* ___TIME_H */ +#endif diff --git a/mit-pthreads/machdep/sco-3.2v5/__unistd.h b/mit-pthreads/machdep/sco-3.2v5/__unistd.h new file mode 100755 index 00000000000..408886301f5 --- /dev/null +++ b/mit-pthreads/machdep/sco-3.2v5/__unistd.h @@ -0,0 +1,48 @@ +/*- + * 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 + * __unistd.h,v 1.1 1995/01/03 12:54:54 proven Exp + */ + +#ifndef ___UNISTD_H_ +#define ___UNISTD_H_ + +#include <sys/types.h> +#include <stddef.h> + +#ifndef MAXPATHLEN +#define MAXPATHLEN 1024 +#endif + +#endif + diff --git a/mit-pthreads/machdep/sco-3.2v5/compat.h b/mit-pthreads/machdep/sco-3.2v5/compat.h new file mode 100755 index 00000000000..3befbffa68d --- /dev/null +++ b/mit-pthreads/machdep/sco-3.2v5/compat.h @@ -0,0 +1,46 @@ +/* ==== 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. + * + * compat.h,v 1.52 1995/10/20 09:32:56 proven Exp + * + * Description : Basic timers header. + * + * 1.00 94/06/13 proven + * -Started coding this file. + */ + +#ifndef _SYS_COMPAT_H_ +#define _SYS_COMPAT_H_ + +#include <sys/types.h> + +#define omsghdr msghdr +#endif diff --git a/mit-pthreads/machdep/sco-3.2v5/dirent.h b/mit-pthreads/machdep/sco-3.2v5/dirent.h new file mode 100755 index 00000000000..6f6804590bb --- /dev/null +++ b/mit-pthreads/machdep/sco-3.2v5/dirent.h @@ -0,0 +1,145 @@ +/* Copyright 1994-1995 The Santa Cruz Operation, Inc. All Rights Reserved. */ + + +#if defined(_NO_PROTOTYPE) /* Old, crufty environment */ +#include <oldstyle/dirent.h> +#elif defined(_XOPEN_SOURCE) || defined(_XPG4_VERS) /* Xpg4 environment */ +#include <xpg4/dirent.h> +#elif defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) /* Posix environment */ +#include <posix/dirent.h> +#elif defined(_SCO_ODS_30) /* Old, Tbird compatible environment */ +#include <ods_30_compat/dirent.h> +#else /* Normal, default environment */ +/* + * Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc. + * All Rights Reserved. + * + * The information in this file is provided for the exclusive use of + * the licensees of The Santa Cruz Operation, Inc. Such users have the + * right to use, modify, and incorporate this code into other products + * for purposes authorized by the license agreement provided they include + * this notice and the associated copyright notice with any such product. + * The information in this file is provided "AS IS" without warranty. + */ + +/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */ +/* Portions Copyright (c) 1979 - 1990 AT&T */ +/* All Rights Reserved */ + +/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */ +/* UNIX System Laboratories, Inc. */ +/* The copyright notice above does not evidence any */ +/* actual or intended publication of such source code. */ + +#ifndef _DIRENT_H +#define _DIRENT_H + +#pragma comment(exestr, "xpg4plus @(#) dirent.h 20.1 94/12/04 ") + +#ifdef __cplusplus +extern "C" { +#endif + +#pragma pack(4) + +#define MAXNAMLEN 512 /* maximum filename length */ +#ifndef MAXPATHLEN +#define MAXPATHLEN 1024 +#endif +#undef DIRBLKSIZ +#define DIRBLKSIZ 1048 /* buffer size for fs-indep. dirs */ + +#ifndef _SYS_TYPES_H +#include <sys/types.h> +#endif + +#ifndef _SYS_DIRENT_H +#define _SYS_DIRENT_H +#ifdef __STDC__ +#pragma comment(exestr, "@(#) dirent.h 25.8 94/09/22 ") +#else +#ident "@(#) dirent.h 25.8 94/09/22 " +#endif +/* + * Copyright (C) 1988-1994 The Santa Cruz Operation, Inc. + * All Rights Reserved. + * The information in this file is provided for the exclusive use of + * the licensees of The Santa Cruz Operation, Inc. Such users have the + * right to use, modify, and incorporate this code into other products + * for purposes authorized by the license agreement provided they include + * this notice and the associated copyright notice with any such product. + * The information in this file is provided "AS IS" without warranty. + */ +/* Copyright (c) 1984, 1986, 1987, 1988 AT&T */ +/* All Rights Reserved */ + +/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */ +/* The copyright notice above does not evidence any */ +/* actual or intended publication of such source code. */ + +/* #ident "@)#(head.sys:dirent.h 1.3" */ + +/* + * The following structure defines the file + * system independent directory entry. + * + */ + +#include <sys/types.h> + +#ifdef _M_I386 +#pragma pack(4) +#else +#pragma pack(2) +#endif + +#ifdef _INKERNEL +/* + * dirent used by the kernel + */ +struct dirent { + ino32_t d_ino; /* inode number of entry */ + off_t d_off; /* offset of disk directory entry */ + unsigned short d_reclen; /* length of this record */ + char d_name[MAXNAMLEN+1]; /* name of file */ +}; + +#else /* !_INKERNEL */ +/* + * dirent as used by application code + * For now leave the declaration as is. When the new development system + * is implemented, ino_t may be ushort or ulong. If ino_t is ulong, there + * will be no d_pad field. + */ +struct dirent /* data from readdir() */ + { +#if defined(_IBCS2) + long d_ino; +#else /* !_IBCS2 */ + ino_t d_ino; /* inode number of entry */ +#if defined(_INO_16_T) + short d_pad; /* because ino_t is ushort */ +#endif /* defined(_INO_16_T) */ +#endif /* defined(_IBCS2) */ + off_t d_off; /* offset of disk directory entry */ + unsigned short d_reclen; /* length of this record */ + char d_name[MAXNAMLEN+1]; /* name of file */ + }; +#endif /* _INKERNEL */ + +typedef struct dirent dirent_t; + +#pragma pack() +#endif /* _SYS_DIRENT_H */ + +#define d_fileno d_ino +#define d_namlen d_reclen + +#ifdef __cplusplus +} +#endif + +#pragma pack() + +#endif /* _DIRENT_H */ +#endif diff --git a/mit-pthreads/machdep/sco-3.2v5/posix/__signal.h b/mit-pthreads/machdep/sco-3.2v5/posix/__signal.h new file mode 100755 index 00000000000..5680fc1491a --- /dev/null +++ b/mit-pthreads/machdep/sco-3.2v5/posix/__signal.h @@ -0,0 +1,69 @@ +/* + * Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc. + * All Rights Reserved. + * + * The information in this file is provided for the exclusive use of + * the licensees of The Santa Cruz Operation, Inc. Such users have the + * right to use, modify, and incorporate this code into other products + * for purposes authorized by the license agreement provided they include + * this notice and the associated copyright notice with any such product. + * The information in this file is provided "AS IS" without warranty. + */ + +/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */ +/* Portions Copyright (c) 1979 - 1990 AT&T */ +/* All Rights Reserved */ + +/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */ +/* UNIX System Laboratories, Inc. */ +/* The copyright notice above does not evidence any */ +/* actual or intended publication of such source code. */ + +#ifndef ___SIGNAL_H +#define ___SIGNAL_H + +#pragma comment(exestr, "posix @(#) signal.h 20.3 94/12/19 ") + +#ifndef _SIG_ATOMIC_T +#define _SIG_ATOMIC_T + /* atomic entity for signal handling */ +typedef int sig_atomic_t; +#endif + + +#ifndef _SYS_SIGNAL_H +#include <sys/signal.h> +#endif + +#if !defined(_SYS_TYPES_H) +#include <sys/types.h> +#endif + + +#if __cplusplus +extern "C" { +#endif + +extern void (*signal(int, void(*)(int)))(int); +extern int raise(int); + + + +extern int (sigfillset)(sigset_t *); +extern int (sigemptyset)(sigset_t *); +extern int (sigaddset)(sigset_t *, int); +extern int (sigdelset)(sigset_t *, int); +extern int (sigismember)(const sigset_t *, int); +extern int sigpending(sigset_t *); +extern int sigsuspend(const sigset_t *); +extern int sigprocmask(int, const sigset_t *, sigset_t *); +extern int kill(pid_t, int); +extern int sigaction(int, const struct sigaction *, struct sigaction *); + +#if __cplusplus +}; +#endif + + +#endif /* ___SIGNAL_H */ + diff --git a/mit-pthreads/machdep/sco-3.2v5/socket.h b/mit-pthreads/machdep/sco-3.2v5/socket.h new file mode 100755 index 00000000000..4a53c7176f9 --- /dev/null +++ b/mit-pthreads/machdep/sco-3.2v5/socket.h @@ -0,0 +1,490 @@ +/* @(#)socket.h 6.23 7/18/94 - STREAMware TCP/IP source */ +/* + * Copyrighted as an unpublished work. + * (c) Copyright 1987-1994 Legent Corporation + * All rights reserved. + * + * RESTRICTED RIGHTS + * + * These programs are supplied under a license. They may be used, + * disclosed, and/or copied only as permitted under such license + * agreement. Any copy must contain the above copyright notice and + * this restricted rights notice. Use, copying, and/or disclosure + * of the programs is strictly prohibited unless otherwise provided + * in the license agreement. + * + */ +/* SCCS IDENTIFICATION */ +/* + * Copyright (c) 1985 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#ifndef __sys_socket_h +#define __sys_socket_h + +#if !defined(FD_SETSIZE) +/* Pick up select stuff from standard system include */ +#include <sys/types.h> +#endif + +/* socket.h 6.1 83/07/29 */ + +/* + * Definitions related to sockets: types, address families, options. + */ + +/* + * Types + */ +#define SOCK_STREAM 1 /* stream socket */ +#define SOCK_DGRAM 2 /* datagram socket */ +#define SOCK_RAW 3 /* raw-protocol interface */ +#define SOCK_RDM 4 /* reliably-delivered message */ +#define SOCK_SEQPACKET 5 /* sequenced packet stream */ + +/* + * Option flags per-socket. + */ +#define SO_DEBUG 0x0001 /* turn on debugging info recording */ +#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */ +#define SO_REUSEADDR 0x0004 /* allow local address reuse */ +#define SO_KEEPALIVE 0x0008 /* keep connections alive */ +#define SO_DONTROUTE 0x0010 /* just use interface addresses */ +#define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */ +#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */ +#define SO_LINGER 0x0080 /* linger on close if data present */ +#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ +#define SO_ORDREL 0x0200 /* give use orderly release */ +#define SO_IMASOCKET 0x0400 /* use socket semantics (affects bind) */ +#define SO_MGMT 0x0800 /* => it is used for mgmt. purposes */ +#define SO_REUSEPORT 0x1000 /* allow local port reuse */ + +/* + * Additional options, not kept in so_options. + */ +#define SO_SNDBUF 0x1001 /* send buffer size */ +#define SO_RCVBUF 0x1002 /* receive buffer size */ +#define SO_SNDLOWAT 0x1003 /* send low-water mark */ +#define SO_RCVLOWAT 0x1004 /* receive low-water mark */ +#define SO_SNDTIMEO 0x1005 /* send timeout */ +#define SO_RCVTIMEO 0x1006 /* receive timeout */ +#define SO_ERROR 0x1007 /* get error status and clear */ +#define SO_TYPE 0x1008 /* get socket type */ +#define SO_PROTOTYPE 0x1009 /* get/set protocol type */ + +/* + * Structure used for manipulating linger option. + */ +struct linger { + int l_onoff; /* option on/off */ + int l_linger; /* linger time */ +}; + +/* + * Level number for (get/set)sockopt() to apply to socket itself. + */ +#define SOL_SOCKET 0xffff /* options for socket level */ + +/* + * An option specification consists of an opthdr, followed by the value of + * the option. An options buffer contains one or more options. The len + * field of opthdr specifies the length of the option value in bytes. This + * length must be a multiple of sizeof(long) (use OPTLEN macro). + */ + +struct opthdr { + long level; /* protocol level affected */ + long name; /* option to modify */ + long len; /* length of option value */ +}; + +#define OPTLEN(x) ((((x) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) +#define OPTVAL(opt) ((char *)(opt + 1)) + +#if defined(INKERNEL) || defined(_KERNEL) || defined(_INKERNEL) +/* + * the optdefault structure is used for internal tables of option default + * values. + */ +struct optdefault { + int optname;/* the option */ + char *val; /* ptr to default value */ + int len; /* length of value */ +}; + +/* + * the opproc structure is used to build tables of options processing + * functions for in_dooptions(). + */ +struct opproc { + int level; /* options level this function handles */ + int (*func) (); /* the function */ +}; +#endif + +/* + * Address families. + */ +#define AF_UNSPEC 0 /* unspecified */ +#define AF_UNIX 1 /* local to host (pipes, portals) */ +#define AF_INET 2 /* internetwork: UDP, TCP, etc. */ +#define AF_IMPLINK 3 /* arpanet imp addresses */ +#define AF_PUP 4 /* pup protocols: e.g. BSP */ +#define AF_CHAOS 5 /* mit CHAOS protocols */ +#define AF_NS 6 /* XEROX NS protocols */ +#define AF_ISO 7 /* ISO protocols */ +#define AF_OSI AF_ISO +#define AF_ECMA 8 /* european computer manufacturers */ +#define AF_DATAKIT 9 /* datakit protocols */ +#define AF_CCITT 10 /* CCITT protocols, X.25 etc */ +#define AF_SNA 11 /* IBM SNA */ +#define AF_DECnet 12 /* DECnet */ +#define AF_DLI 13 /* Direct data link interface */ +#define AF_LAT 14 /* LAT */ +#define AF_HYLINK 15 /* NSC Hyperchannel */ +#define AF_APPLETALK 16 /* Apple Talk */ +#define AF_ROUTE 17 /* Internal Routing Protocol */ +#define AF_LINK 18 /* Link layer interface */ +#define pseudo_AF_XTP 19 /* eXpress Transfer Protocol (no AF) */ + +#define AF_MAX 20 + +/* + * Structure used by kernel to store most addresses. + */ +struct sockaddr { + u_short sa_family; /* address family */ + char sa_data[14]; /* up to 14 bytes of direct address */ +}; + +/* + * Structure used by kernel to pass protocol information in raw sockets. + */ +struct sockproto { + unsigned short sp_family; /* address family */ + unsigned short sp_protocol; /* protocol */ +}; + +/* + * Protocol families, same as address families for now. + */ +#define PF_UNSPEC AF_UNSPEC +#define PF_UNIX AF_UNIX +#define PF_INET AF_INET +#define PF_IMPLINK AF_IMPLINK +#define PF_PUP AF_PUP +#define PF_CHAOS AF_CHAOS +#define PF_NS AF_NS +#define PF_NBS AF_NBS +#define PF_ECMA AF_ECMA +#define PF_DATAKIT AF_DATAKIT +#define PF_CCITT AF_CCITT +#define PF_SNA AF_SNA +#define PF_DECnet AF_DECnet +#define PF_DLI AF_DLI +#define PF_LAT AF_LAT +#define PF_HYLINK AF_HYLINK +#define PF_APPLETALK AF_APPLETALK +#define PF_ROUTE AF_ROUTE +#define PF_LINK AF_LINK +#define PF_XTP pseudo_AF_XTP /* really just proto family, no AF */ + +#define PF_MAX AF_MAX + +/* + * Maximum queue length specifiable by listen. + */ +#define SOMAXCONN 5 + +/* + * Message header for recvmsg and sendmsg calls. + * Used value-result for recmvsg, value only for sendmsg. + */ +struct msghdr { + caddr_t msg_name; /* optional address */ + u_int msg_namelen; /* size of address */ + struct iovec *msg_iov; /* scatter/gather array */ + u_int msg_iovlen; /* # elements msg_iov */ + caddr_t msg_control; /* ancillary data, see below */ + u_int msg_controllen; /* ancillary data buffer len */ + int msg_flags; /* flags on received message */ +}; +#define msg_accrights msg_control +#define msg_accrightslen msg_controllen + +#define MSG_OOB 0x1 /* process out-of-band data */ +#define MSG_PEEK 0x2 /* peek at incoming message */ +#define MSG_DONTROUTE 0x4 /* send without using routing tables */ +#define MSG_EOR 0x8 /* data completes record */ /*notused*/ +#define MSG_TRUNC 0x10 /* data discarded before delivery */ +#define MSG_CTRUNC 0x20 /* control data lost before delivery */ +#define MSG_WAITALL 0x40 /* wait for full request or error */ /*notused*/ + +#define MSG_MAXIOVLEN 16 + +/* + * Header for ancillary data objects in msg_control buffer. + * Used for additional information with/about a datagram + * not expressible by flags. The format is a sequence + * of message elements headed by cmsghdr structures. + * In STREAMware, we shuffle the fields around a little from what + * they were in net-2, so that they line up the same as an opthdr + * which simplifies our socket implementation amazingly. + * + * Unfortunately, the opthdrs don't include their own length, which the + * cmsghdrs do. What this means is that TLI programmers will not be + * able to take something returned using these macros and immediately give + * it back to the stack. The size of the struct cmsghdr will have to be + * subtracted out. + * There doesn't seem to be a way to avoid this, since several applications + * look into the cmsg_len field and won't work if it doesn't include the size + * of the struct cmsghdr. + */ +struct cmsghdr { + int cmsg_level; /* originating protocol */ + int cmsg_type; /* protocol-specific type */ + u_int cmsg_len; /* data byte count, including hdr */ +/* followed by u_char cmsg_data[]; */ +}; + +/* given pointer to struct adatahdr, return pointer to data */ +#define CMSG_DATA(cmsg) ((u_char *)((cmsg) + 1)) + +/* given pointer to struct adatahdr, return pointer to next adatahdr */ +#define CMSG_NXTHDR(mhdr, cmsg) \ + (((caddr_t)(cmsg) + (cmsg)->cmsg_len + sizeof(struct cmsghdr) > \ + (mhdr)->msg_control + (mhdr)->msg_controllen) ? \ + (struct cmsghdr *)NULL : \ + (struct cmsghdr *)((caddr_t)(cmsg) + OPTLEN((cmsg)->cmsg_len))) + +#define CMSG_FIRSTHDR(mhdr) ((struct cmsghdr *)(mhdr)->msg_control) + +/* "Socket"-level control message types: */ +#define SCM_RIGHTS 0x01 /* access rights (array of int) */ + +/* + * This ioctl code uses BSD style ioctls to avoid copyin/out problems. + * Ioctls have the command encoded in the lower word, and the size of any in + * or out parameters in the upper word. The high 2 bits of the upper word + * are used to encode the in/out status of the parameter; for now we restrict + * parameters to at most 128 bytes. + */ +#define IOCPARM_MASK 0x7f /* parameters must be < 128 bytes */ +#define IOC_VOID 0x20000000 /* no parameters */ +#define IOC_OUT 0x40000000 /* copy out parameters */ +#define IOC_IN 0x80000000 /* copy in parameters */ +#define IOC_INOUT (IOC_IN|IOC_OUT) +/* the 0x20000000 is so we can distinguish new ioctls from old */ +#define _IOS(x,y) (IOC_VOID|(x<<8)|y) +#define _IOSR(x,y,t) (IOC_OUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y) +#define _IOSW(x,y,t) (IOC_IN|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y) +/* this should be _IOSRW, but stdio got there first */ +#define _IOSWR(x,y,t) (IOC_INOUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y) + +/* + * Socket ioctl commands + */ + +#define SIOCSHIWAT _IOSW('S', 1, int) /* set high watermark */ +#define SIOCGHIWAT _IOSR('S', 2, int) /* get high watermark */ +#define SIOCSLOWAT _IOSW('S', 3, int) /* set low watermark */ +#define SIOCGLOWAT _IOSR('S', 4, int) /* get low watermark */ +#define SIOCATMARK _IOSR('S', 5, int) /* at oob mark? */ +#define SIOCSPGRP _IOSW('S', 6, int) /* set process group */ +#define SIOCGPGRP _IOSR('S', 7, int) /* get process group */ +#define FIONREAD _IOSR('S', 8, int) /* BSD compatibilty */ +#define FIONBIO _IOSW('S', 9, int) /* BSD compatibilty */ +#define FIOASYNC _IOSW('S', 10, int) /* BSD compatibilty */ +#define SIOCPROTO _IOSW('S', 11, struct socknewproto) /* link proto */ +#define SIOCGETNAME _IOSR('S', 12, struct sockaddr) /* getsockname */ +#define SIOCGETPEER _IOSR('S', 13, struct sockaddr) /* getpeername */ +#define IF_UNITSEL _IOSW('S', 14, int) /* set unit number */ +#define SIOCXPROTO _IOS('S', 15) /* empty proto table */ +#define SIOCSHRDTYPE _IOSW('S', 16, int) /* set hardware type */ + +#define SIOCADDRT _IOSW('R', 9, struct ortentry) /* add route */ +#define SIOCDELRT _IOSW('R', 10, struct ortentry) /* delete route */ + +#define SIOCSIFADDR _IOSW('I', 11, struct ifreq) /* set ifnet address */ +#define SIOCGIFADDR _IOSWR('I', 12, struct ifreq) /* get ifnet address */ +#define SIOCSIFDSTADDR _IOSW('I', 13, struct ifreq) /* set p-p address */ +#define SIOCGIFDSTADDR _IOSWR('I', 14, struct ifreq) /* get p-p address */ +#define SIOCSIFFLAGS _IOSW('I', 15, struct ifreq) /* set ifnet flags */ +#define SIOCGIFFLAGS _IOSWR('I', 16, struct ifreq) /* get ifnet flags */ +#define SIOCGIFCONF _IOSWR('I', 17, struct ifconf) /* get ifnet list */ + +#define SIOCSIFMTU _IOSW('I', 21, struct ifreq) /* get if_mtu */ +#define SIOCGIFMTU _IOSWR('I', 22, struct ifreq) /* set if_mtu */ + + +#define SIOCGIFBRDADDR _IOSWR('I', 32, struct ifreq) /* get broadcast addr */ +#define SIOCSIFBRDADDR _IOSW('I', 33, struct ifreq) /* set broadcast addr */ +#define SIOCGIFNETMASK _IOSWR('I', 34, struct ifreq) /* get net addr mask */ +#define SIOCSIFNETMASK _IOSW('I', 35, struct ifreq) /* set net addr mask */ +#define SIOCGIFMETRIC _IOSWR('I', 36, struct ifreq) /* get IF metric */ +#define SIOCSIFMETRIC _IOSW('I', 37, struct ifreq) /* set IF metric */ + +#define SIOCSARP _IOSW('I', 38, struct arpreq) /* set arp entry */ +#define SIOCGARP _IOSWR('I', 39, struct arpreq) /* get arp entry */ +#define SIOCDARP _IOSW('I', 40, struct arpreq) /* delete arp entry */ + +#define SIOCSIFNAME _IOSW('I', 41, struct ifreq) /* set interface name */ +#define SIOCGIFONEP _IOSWR('I', 42, struct ifreq) /* get one-packet params */ +#define SIOCSIFONEP _IOSW('I', 43, struct ifreq) /* set one-packet params */ +#define SIOCDIFADDR _IOSW('I', 44, struct ifreq) /* delete IF addr */ +#define SIOCAIFADDR _IOSW('I', 45, struct ifaliasreq) /*add/change IF alias*/ +#define SIOCADDMULTI _IOSW('I', 49, struct ifreq) /* add m'cast addr */ +#define SIOCDELMULTI _IOSW('I', 50, struct ifreq) /* del m'cast addr */ +#define SIOCGIFALIAS _IOSWR('I', 51, struct ifaliasreq) /* get IF alias */ + + +#define SIOCSOCKSYS _IOSW('I', 66, struct socksysreq) /* Pseudo socket syscall */ + +/* these use ifr_metric to pass the information */ +#define SIOCSIFDEBUG _IOSW('I', 67, struct ifreq) /* set if debug level */ +#define SIOCGIFDEBUG _IOSWR('I', 68, struct ifreq) /* get if debug level */ + +#define SIOCSIFTYPE _IOSW('I', 69, struct ifreq) /* set if MIB type */ +#define SIOCGIFTYPE _IOSWR('I', 70, struct ifreq) /* get if MIB type */ + +#define SIOCGIFNUM _IOSR('I', 71, int) /* get number of ifs */ +/* + * This returns the number of ifreqs that SIOCGIFCONF would return, including + * aliases. This is the preferred way of sizing a buffer big enough to hold + * all interfaces. + */ +#define SIOCGIFANUM _IOSR('I', 72, int) /* get number of ifreqs */ +/* + * Interface specific performance tuning + */ +#define SIOCGIFPERF _IOSR('I', 73, struct ifreq) /* get perf info */ +#define SIOCSIFPERF _IOSR('I', 74, struct ifreq) /* get perf info */ + +/* + * This structure is used to encode pseudo system calls + */ +struct socksysreq { + /* When porting, make this the widest thing it can be */ + int args[7]; +}; + +/* + * This structure is used for adding new protocols to the list supported by + * sockets. + */ +struct socknewproto { + int family; /* address family (AF_INET, etc.) */ + int type; /* protocol type (SOCK_STREAM, etc.) */ + int proto; /* per family proto number */ + dev_t dev; /* major/minor to use (must be a clone) */ + int flags; /* protosw flags */ +}; + +/* + * utility definitions. + */ + +#ifdef MIN +#undef MIN +#endif +#define MIN(x,y) ((x) < (y) ? (x) : (y)) +#ifndef MAX +#define MAX(x,y) ((x) > (y) ? (x) : (y)) +#endif + +#define MAXHOSTNAMELEN 256 + +#define NBBY 8 /* number of bits in a byte */ + + +/* defines for user/kernel interface */ + +#define MAX_MINOR (makedev(1,0) - 1) /* could be non-portable */ + +#define SOCKETSYS 140 /* SCO 3.2v5 */ + +#define SO_ACCEPT 1 +#define SO_BIND 2 +#define SO_CONNECT 3 +#define SO_GETPEERNAME 4 +#define SO_GETSOCKNAME 5 +#define SO_GETSOCKOPT 6 +#define SO_LISTEN 7 +#define SO_RECV 8 +#define SO_RECVFROM 9 +#define SO_SEND 10 +#define SO_SENDTO 11 +#define SO_SETSOCKOPT 12 +#define SO_SHUTDOWN 13 +#define SO_SOCKET 14 +#define SO_SELECT 15 +#define SO_GETIPDOMAIN 16 +#define SO_SETIPDOMAIN 17 +#define SO_ADJTIME 18 +#define SO_SETREUID 19 +#define SO_SETREGID 20 +#define SO_GETTIME 21 +#define SO_SETTIME 22 +#define SO_GETITIMER 23 +#define SO_SETITIMER 24 +#define SO_RECVMSG 25 +#define SO_SENDMSG 26 +#define SO_SOCKPAIR 27 + +/* + * message flags + */ +#define M_BCAST 0x80000000 + +/* Definitions and structures used for extracting */ +/* the size and/or the contents of kernel tables */ + +/* Copyin/out values */ +#define GIARG 0x1 +#define CONTI 0x2 +#define GITAB 0x4 + +struct gi_arg { + caddr_t gi_where; + unsigned gi_size; +}; + +#if !defined(_KERNEL) && !defined(INKERNEL) && !defined(_INKERNEL) + +#include <sys/cdefs.h> + +__BEGIN_DECLS +int accept __P_((int, struct sockaddr *, int *)); +int bind __P_((int, const struct sockaddr *, int)); +int connect __P_((int, const struct sockaddr *, int)); +int getpeername __P_((int, struct sockaddr *, int *)); +int getsockname __P_((int, struct sockaddr *, int *)); +int getsockopt __P_((int, int, int, void *, int *)); +int setsockopt __P_((int, int, int, const void *, int)); +int listen __P_((int, int)); +ssize_t recv __P_((int, void *, size_t, int)); +ssize_t recvfrom __P_((int, void *, size_t, int, struct sockaddr *, int *)); +int recvmsg __P_((int, struct msghdr *, int)); +ssize_t send __P_((int, const void *, size_t, int)); +int sendmsg __P_((int, const struct msghdr *, int)); +ssize_t sendto __P_((int, const void *, size_t, int, const struct sockaddr *, int)); +int shutdown __P_((int, int)); +int socket __P_((int, int, int)); +int socketpair __P_((int, int, int, int[2])); +__END_DECLS + +#endif /* !INKERNEL */ +#endif /* __sys_socket_h */ diff --git a/mit-pthreads/machdep/sco-3.2v5/syscall.h b/mit-pthreads/machdep/sco-3.2v5/syscall.h new file mode 100755 index 00000000000..f49fba81b6e --- /dev/null +++ b/mit-pthreads/machdep/sco-3.2v5/syscall.h @@ -0,0 +1,175 @@ +/* Copyright 1994-1995 The Santa Cruz Operation, Inc. All Rights Reserved. */ + + +#if defined(_NO_PROTOTYPE) /* Old, crufty environment */ +#include <oldstyle/syscall.h> +#elif defined(_SCO_ODS_30) /* Old, Tbird compatible environment */ +#include <ods_30_compat/syscall.h> +#else /* Normal, default environment */ +/* +/ Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc. + * All Rights Reserved. + * + * The information in this file is provided for the exclusive use of + * the licensees of The Santa Cruz Operation, Inc. Such users have the + * right to use, modify, and incorporate this code into other products + * for purposes authorized by the license agreement provided they include + * this notice and the associated copyright notice with any such product. + * The information in this file is provided "AS IS" without warranty. + */ + +/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */ +/* Portions Copyright (c) 1979 - 1990 AT&T */ + +#ident "xpg4plus @(#) sys.i386 20.1 94/12/04 " +/* #ident "xpg4plus @(#)head:sys.i386 1.2" */ + +/* +/* Definitions of Kernel Entry Call Gates +*/ + +#ifndef _SYSCALL_H_ +#define _SYSCALL_H_ + +/*#define SYSCALL $0x7,$0*/ +/*#define SIGCALL $0xF,$0*/ + +/* +/* Definitions of System Call Entry Point Numbers +*/ + +#define SYS_access 33 +#define SYS_acct 51 +#define SYS_advfs 70 +#define SYS_alarm 27 +#define SYS_break 17 +#define SYS_brk 17 +#define SYS_chdir 12 +#define SYS_chmod 15 +#define SYS_chown 16 +#define SYS_chroot 61 +#define SYS_close 6 +#define SYS_creat 8 +#define SYS_dup 41 +#define SYS_exec 11 +#define SYS_execve 59 +#define SYS_exit 1 +#define SYS_fcntl 62 +#define SYS_fork 2 +#define SYS_fstat 28 +#define SYS_fstatfs 38 +#define SYS_fxstat 125 +#define SYS_getdents 81 +#define SYS_getgid 47 +#define SYS_getmsg 85 +#define SYS_getpid 20 +#define SYS_gettimeofday 171 +#define SYS_getuid 24 +#define SYS_gtty 32 +#define SYS_ioctl 54 +#define SYS_kill 37 +#define SYS_link 9 +#define SYS_lock 45 +#define SYS_lseek 19 +#define SYS_lstat 91 +#define SYS_lxstat 124 +#define SYS_mkdir 80 +#define SYS_mknod 14 +#define SYS_mount 21 +#define SYS_msgsys 49 +#define SYS_nice 34 +#define SYS_open 5 +#define SYS_pause 29 +#define SYS_pipe 42 +#define SYS_plock 45 +#define SYS_poll 87 +#define SYS_prof 44 +#define SYS_ptrace 26 +#define SYS_putmsg 86 +#define SYS_rdebug 76 +#define SYS_read 3 +#define SYS_readlink 92 +#define SYS_readv 121 +#define SYS_rfstart 74 +#define SYS_rfstop 77 +#define SYS_rfsys 78 +#define SYS_rmdir 79 +#define SYS_rmount 72 +#define SYS_rumount 73 +#define SYS_seek 19 +#define SYS_semsys 53 +#define SYS_setgid 46 +#define SYS_setpgrp 39 +#define SYS_settimeofday 172 +#define SYS_setuid 23 +#define SYS_shmsys 52 +#define SYS_signal 48 +#define SYS_stat 18 +#define SYS_statfs 35 +#define SYS_stime 25 +#define SYS_stty 31 +#define SYS_symlink 90 +#define SYS_sync 36 +#define SYS_sys3b 50 +#define SYS_sysi86 50 +#define SYS_sysacct 51 +#define SYS_sysfs 84 +#define SYS_time 13 +#define SYS_times 43 +#define SYS_uadmin 55 +#define SYS_ulimit 63 +#define SYS_umask 60 +#define SYS_umount 22 +#define SYS_unadvfs 71 +#define SYS_unlink 10 +#define SYS_utime 30 +#define SYS_utssys 57 +#define SYS_wait 7 +#define SYS_write 4 +#define SYS_writev 122 +#define SYS_xstat 123 +#define SYS_ftruncate 192 + +/* cxenix numbers are created by the formula + * (table index << 8) + CXENIX + */ + +#define CXENIX 0x28 /* Decimal 40 */ + +#define XLOCKING 0x0128 +#define CREATSEM 0x0228 +#define OPENSEM 0x0328 +#define SIGSEM 0x0428 +#define WAITSEM 0x0528 +#define NBWAITSEM 0x0628 +#define RDCHK 0x0728 +#define CHSIZE 0x0a28 +#define SYS_ftime 0x0b28 +#define NAP 0x0c28 +#define SDGET 0x0d28 +#define SDFREE 0x0e28 +#define SDENTER 0x0f28 +#define SDLEAVE 0x1028 +#define SDGETV 0x1128 +#define SDWAITV 0x1228 +#define PROCTL 0x2028 +#define EXECSEG 0x2128 +#define UNEXECSEG 0x2228 +#define SYS_select 0x2428 +#define SYS_eaccess 0x2528 +#define SYS_paccess 0x2628 +#define SYS_sigaction 0x2728 +#define SYS_sigprocmask 0x2828 +#define SYS_sigpending 0x2928 +#define SYS_sigsuspend 0x2a28 +#define SYS_getgroups 0x2b28 +#define SYS_setgroups 0x2c28 +#define SYS_sysconf 0x2d28 +#define SYS_pathconf 0x2e28 +#define SYS_fpathconf 0x2f28 +#define SYS_rename 0x3028 +#define SYS_setitimer 0x3828 + +#define CLOCAL 127 +#endif +#endif diff --git a/mit-pthreads/machdep/sco-3.2v5/timers.h b/mit-pthreads/machdep/sco-3.2v5/timers.h new file mode 100755 index 00000000000..cbc48ccc8d8 --- /dev/null +++ b/mit-pthreads/machdep/sco-3.2v5/timers.h @@ -0,0 +1,68 @@ +/* ==== 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. + * + * timers.h,v 1.50.8.1 1996/03/05 08:28:36 proven 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/types.h> +#include <time.h> + +struct timespec { + long tv_sec; + long tv_nsec; +}; + +#define TIMEVAL_TO_TIMESPEC(tv, ts) { \ + (ts)->tv_sec = (tv)->tv_sec; \ + (ts)->tv_nsec = (tv)->tv_usec * 1000; \ +} +#define TIMESPEC_TO_TIMEVAL(tv, ts) { \ + (tv)->tv_sec = (ts)->tv_sec; \ + (tv)->tv_usec = (ts)->tv_nsec / 1000; \ +} + +/* + * New functions + */ + +__BEGIN_DECLS + +__END_DECLS + +#endif diff --git a/mit-pthreads/machdep/sco-3.2v5/trash.can b/mit-pthreads/machdep/sco-3.2v5/trash.can new file mode 100755 index 00000000000..33edf65aab6 --- /dev/null +++ b/mit-pthreads/machdep/sco-3.2v5/trash.can @@ -0,0 +1 @@ +make: *** No targets specified and no makefile found. Stop. |