summaryrefslogtreecommitdiff
path: root/mit-pthreads/machdep/sunos-4.1.3
diff options
context:
space:
mode:
Diffstat (limited to 'mit-pthreads/machdep/sunos-4.1.3')
-rwxr-xr-xmit-pthreads/machdep/sunos-4.1.3/__math.h5
-rwxr-xr-xmit-pthreads/machdep/sunos-4.1.3/__path.h12
-rwxr-xr-xmit-pthreads/machdep/sunos-4.1.3/__signal.h11
-rwxr-xr-xmit-pthreads/machdep/sunos-4.1.3/__stdio.h4
-rwxr-xr-xmit-pthreads/machdep/sunos-4.1.3/__stdlib.h28
-rwxr-xr-xmit-pthreads/machdep/sunos-4.1.3/__string.h14
-rwxr-xr-xmit-pthreads/machdep/sunos-4.1.3/__time.h2
-rwxr-xr-xmit-pthreads/machdep/sunos-4.1.3/__unistd.h73
-rwxr-xr-xmit-pthreads/machdep/sunos-4.1.3/cdefs.h61
-rwxr-xr-xmit-pthreads/machdep/sunos-4.1.3/compat.h45
-rwxr-xr-xmit-pthreads/machdep/sunos-4.1.3/dirent.h64
-rwxr-xr-xmit-pthreads/machdep/sunos-4.1.3/fcntlcom.h163
-rwxr-xr-xmit-pthreads/machdep/sunos-4.1.3/signal.h98
-rwxr-xr-xmit-pthreads/machdep/sunos-4.1.3/stat.h94
-rwxr-xr-xmit-pthreads/machdep/sunos-4.1.3/time.h69
-rwxr-xr-xmit-pthreads/machdep/sunos-4.1.3/timers.h68
-rwxr-xr-xmit-pthreads/machdep/sunos-4.1.3/wait.h22
17 files changed, 833 insertions, 0 deletions
diff --git a/mit-pthreads/machdep/sunos-4.1.3/__math.h b/mit-pthreads/machdep/sunos-4.1.3/__math.h
new file mode 100755
index 00000000000..9de1dc6d4bd
--- /dev/null
+++ b/mit-pthreads/machdep/sunos-4.1.3/__math.h
@@ -0,0 +1,5 @@
+/*
+ * Posix (actually ansi C) section
+ */
+#define HUGE_VAL (__infinity()) /* Produces IEEE Infinity. */
+
diff --git a/mit-pthreads/machdep/sunos-4.1.3/__path.h b/mit-pthreads/machdep/sunos-4.1.3/__path.h
new file mode 100755
index 00000000000..2665b5a0e8a
--- /dev/null
+++ b/mit-pthreads/machdep/sunos-4.1.3/__path.h
@@ -0,0 +1,12 @@
+/*
+ * $Id$
+ */
+
+#ifndef _SYS__PATH_H_
+#define _SYS__PATH_H_
+
+#define _PATH_PTY "/dev/"
+#define _PATH_TZDIR "/usr/share/zoneinfo"
+#define _PATH_TZFILE "localtime"
+
+#endif /* !_SYS__PATH_H_ */
diff --git a/mit-pthreads/machdep/sunos-4.1.3/__signal.h b/mit-pthreads/machdep/sunos-4.1.3/__signal.h
new file mode 100755
index 00000000000..f8b4fb8b6de
--- /dev/null
+++ b/mit-pthreads/machdep/sunos-4.1.3/__signal.h
@@ -0,0 +1,11 @@
+
+#include <sys/signal.h>
+#include <sys/stdtypes.h>
+
+typedef int sig_atomic_t;
+
+#define __SIGFILLSET 0xffffffff
+#define __SIGEMPTYSET 0
+#define __SIGADDSET(s,n) ((*s) |= (1 << ((n) - 1)))
+#define __SIGDELSET(s,n) ((*s) &= ~(1 << ((n) - 1)))
+#define __SIGISMEMBER(s,n) ((*s) & (1 << ((n) - 1)))
diff --git a/mit-pthreads/machdep/sunos-4.1.3/__stdio.h b/mit-pthreads/machdep/sunos-4.1.3/__stdio.h
new file mode 100755
index 00000000000..6ca5e57396d
--- /dev/null
+++ b/mit-pthreads/machdep/sunos-4.1.3/__stdio.h
@@ -0,0 +1,4 @@
+
+typedef pthread_fpos_t fpos_t;
+
+#include <sys/stdtypes.h>
diff --git a/mit-pthreads/machdep/sunos-4.1.3/__stdlib.h b/mit-pthreads/machdep/sunos-4.1.3/__stdlib.h
new file mode 100755
index 00000000000..7bb9093c51c
--- /dev/null
+++ b/mit-pthreads/machdep/sunos-4.1.3/__stdlib.h
@@ -0,0 +1,28 @@
+/* $Id$ */
+
+#ifndef __sys_stdtypes_h
+
+#ifndef _SYS___STDLIB_H_
+#define _SYS___STDLIB_H_
+
+#include <sys/stdtypes.h> /* to get size_t */
+
+#if (! defined _SIZE_T_ ) && (! defined(_GCC_SIZE_T))
+#define _SIZE_T_
+#define _GCC_SIZE_T
+typedef pthread_size_t size_t;
+#endif
+
+#if (! defined _WCHAR_T_ ) && (! defined(_GCC_WCHAR_T))
+#define _WCHAR_T_
+#define _GCC_WCHAR_T
+typedef unsigned int wchar_t;
+#endif
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+#endif
+
+#endif
diff --git a/mit-pthreads/machdep/sunos-4.1.3/__string.h b/mit-pthreads/machdep/sunos-4.1.3/__string.h
new file mode 100755
index 00000000000..0859a80cf24
--- /dev/null
+++ b/mit-pthreads/machdep/sunos-4.1.3/__string.h
@@ -0,0 +1,14 @@
+
+#include <sys/stdtypes.h>
+
+/* Non-standard SunOS 4.x 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 *));
+__END_DECLS
+#endif
diff --git a/mit-pthreads/machdep/sunos-4.1.3/__time.h b/mit-pthreads/machdep/sunos-4.1.3/__time.h
new file mode 100755
index 00000000000..1ffa0e47d3f
--- /dev/null
+++ b/mit-pthreads/machdep/sunos-4.1.3/__time.h
@@ -0,0 +1,2 @@
+
+#include <sys/stdtypes.h>
diff --git a/mit-pthreads/machdep/sunos-4.1.3/__unistd.h b/mit-pthreads/machdep/sunos-4.1.3/__unistd.h
new file mode 100755
index 00000000000..3b86527252c
--- /dev/null
+++ b/mit-pthreads/machdep/sunos-4.1.3/__unistd.h
@@ -0,0 +1,73 @@
+/*-
+ * 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$
+ */
+
+#ifndef _SYS___UNISTD_H_
+#define _SYS___UNISTD_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+#define _SC_ARG_MAX 1 /* space for argv & envp */
+#define _SC_CHILD_MAX 2 /* maximum children per process??? */
+#define _SC_CLK_TCK 3 /* clock ticks/sec */
+#define _SC_NGROUPS_MAX 4 /* number of groups if multple supp. */
+#define _SC_OPEN_MAX 5 /* max open files per process */
+#define _SC_JOB_CONTROL 6 /* do we have job control */
+#define _SC_SAVED_IDS 7 /* do we have saved uid/gids */
+#define _SC_VERSION 8 /* POSIX version supported */
+
+#define _POSIX_JOB_CONTROL 1
+#define _POSIX_SAVED_IDS 1
+#define _POSIX_VERSION 198808
+
+#define _PC_LINK_MAX 1 /* max links to file/dir */
+#define _PC_MAX_CANON 2 /* max line length */
+#define _PC_MAX_INPUT 3 /* max "packet" to a tty device */
+#define _PC_NAME_MAX 4 /* max pathname component length */
+#define _PC_PATH_MAX 5 /* max pathname length */
+#define _PC_PIPE_BUF 6 /* size of a pipe */
+#define _PC_CHOWN_RESTRICTED 7 /* can we give away files */
+#define _PC_NO_TRUNC 8 /* trunc or error on >NAME_MAX */
+#define _PC_VDISABLE 9 /* best char to shut off tty c_cc */
+#define _PC_LAST 9 /* highest value of any _PC_* */
+
+#ifndef NULL
+#define NULL 0 /* null pointer constant */
+#endif
+
+typedef int ssize_t;
+
+#endif
diff --git a/mit-pthreads/machdep/sunos-4.1.3/cdefs.h b/mit-pthreads/machdep/sunos-4.1.3/cdefs.h
new file mode 100755
index 00000000000..a059fa3d3fc
--- /dev/null
+++ b/mit-pthreads/machdep/sunos-4.1.3/cdefs.h
@@ -0,0 +1,61 @@
+/* ==== cdefs.h ============================================================
+ * Copyright (c) 1994 by Chris Provenzano, proven@athena.mit.edu
+ *
+ * Description : Similar to the BSD cdefs.h file.
+ *
+ * 1.00 94/01/26 proven
+ * -Started coding this file.
+ */
+
+#ifndef _PTHREAD_SYS_CDEFS_H_
+#define _PTHREAD_SYS_CDEFS_H_
+
+/* Stuff for compiling */
+#if defined(__GNUC__)
+#if defined(__cplusplus)
+#define __INLINE static inline
+#define __BEGIN_DECLS extern "C" {
+#define __END_DECLS };
+#else
+#define __INLINE extern inline
+#define __CAN_DO_EXTERN_INLINE
+#define __BEGIN_DECLS
+#define __END_DECLS
+#if !defined(__STDC__)
+#define const __const
+#define inline __inline
+#define signed __signed
+#define volatile __volatile
+#endif
+#endif
+#else /* !__GNUC__ */
+#define __BEGIN_DECLS
+#define __END_DECLS
+#define __INLINE static
+#endif
+
+#ifndef __NORETURN
+#define __NORETURN
+#endif /* __NORETURN not defined. */
+
+#ifndef _U_INT32_T_
+#define _U_INT32_T_
+typedef unsigned int u_int32_t;
+#endif
+
+#ifndef _U_INT16_T_
+#define _U_INT16_T_
+typedef unsigned short u_int16_t;
+#endif
+
+#ifndef _INT32_T_
+#define _INT32_T_
+typedef int int32_t;
+#endif
+
+#ifndef _INT16_T_
+#define _INT16_T_
+typedef short int16_t;
+#endif
+
+#endif
diff --git a/mit-pthreads/machdep/sunos-4.1.3/compat.h b/mit-pthreads/machdep/sunos-4.1.3/compat.h
new file mode 100755
index 00000000000..b2a846d00ee
--- /dev/null
+++ b/mit-pthreads/machdep/sunos-4.1.3/compat.h
@@ -0,0 +1,45 @@
+/* ==== 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$
+ *
+ * Description : Basic timers header.
+ *
+ * 1.00 94/06/13 proven
+ * -Started coding this file.
+ */
+
+#ifndef _SYS_COMPAT_H_
+#define _SYS_COMPAT_H_
+
+#define omsghdr msghdr
+
+#endif
diff --git a/mit-pthreads/machdep/sunos-4.1.3/dirent.h b/mit-pthreads/machdep/sunos-4.1.3/dirent.h
new file mode 100755
index 00000000000..c2048b1741c
--- /dev/null
+++ b/mit-pthreads/machdep/sunos-4.1.3/dirent.h
@@ -0,0 +1,64 @@
+/*-
+ * 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 {
+ off_t d_off; /* offset of next disk dir entry */
+ 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
+
+#endif /* !_SYS_DIRENT_H_ */
+
+
diff --git a/mit-pthreads/machdep/sunos-4.1.3/fcntlcom.h b/mit-pthreads/machdep/sunos-4.1.3/fcntlcom.h
new file mode 100755
index 00000000000..2b7acce7696
--- /dev/null
+++ b/mit-pthreads/machdep/sunos-4.1.3/fcntlcom.h
@@ -0,0 +1,163 @@
+/* @(#)fcntlcom.h 1.13 91/06/18 SMI; from UCB fcntl.h 5.2 1/8/86 */
+
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
+#ifndef __sys_fcntlcom_h
+#define __sys_fcntlcom_h
+
+#include <sys/cdefs.h>
+
+/*
+ * Rewack the FXXXXX values as _FXXXX so that _POSIX_SOURCE works.
+ */
+#define _FOPEN (-1) /* from sys/file.h, kernel use only */
+#define _FREAD 0x0001 /* read enabled */
+#define _FWRITE 0x0002 /* write enabled */
+#define _FNDELAY 0x0004 /* non blocking I/O (4.2 style) */
+#define _FAPPEND 0x0008 /* append (writes guaranteed at the end) */
+#define _FSETBLK 0x0010 /* use block offsets */
+#define _FASYNC 0x0040 /* signal pgrp when data ready */
+#define _FSHLOCK 0x0080 /* BSD flock() shared lock present */
+#define _FEXLOCK 0x0100 /* BSD flock() exclusive lock present */
+#define _FCREAT 0x0200 /* open with file create */
+#define _FTRUNC 0x0400 /* open with truncation */
+#define _FEXCL 0x0800 /* error on open if file exists */
+#define _FNBIO 0x1000 /* non blocking I/O (sys5 style) */
+#define _FSYNC 0x2000 /* do all writes synchronously */
+#define _FNONBLOCK 0x4000 /* non blocking I/O (POSIX style) */
+#define _FNOCTTY 0x8000 /* don't assign a ctty on this open */
+#define _FMARK 0x10000 /* internal; mark during gc() */
+#define _FDEFER 0x20000 /* internal; defer for next gc pass */
+
+#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
+
+/*
+ * Flag values for open(2) and fcntl(2)
+ * The kernel adds 1 to the open modes to turn it into some
+ * combination of FREAD and FWRITE.
+ */
+#define O_RDONLY 0 /* +1 == FREAD */
+#define O_WRONLY 1 /* +1 == FWRITE */
+#define O_RDWR 2 /* +1 == FREAD|FWRITE */
+#define O_APPEND _FAPPEND
+#define O_CREAT _FCREAT
+#define O_TRUNC _FTRUNC
+#define O_EXCL _FEXCL
+/* O_SYNC _FSYNC not posix, defined below */
+/* O_NDELAY _FNDELAY set in include/fcntl.h */
+/* O_NDELAY _FNBIO set in 5include/fcntl.h */
+#define O_NONBLOCK _FNONBLOCK
+#define O_NOCTTY _FNOCTTY
+
+#ifndef _POSIX_SOURCE
+
+#define O_SYNC _FSYNC
+
+/*
+ * Flags that work for fcntl(fd, F_SETFL, FXXXX)
+ */
+#define FAPPEND _FAPPEND
+#define FSYNC _FSYNC
+#define FASYNC _FASYNC
+#define FNBIO _FNBIO
+#define FNONBIO _FNONBLOCK /* XXX fix to be NONBLOCK everywhere */
+#define FNDELAY _FNDELAY
+
+/*
+ * Flags that are disallowed for fcntl's (FCNTLCANT);
+ * used for opens, internal state, or locking.
+ */
+#define FREAD _FREAD
+#define FWRITE _FWRITE
+#define FMARK _FMARK
+#define FDEFER _FDEFER
+#define FSETBLK _FSETBLK
+#define FSHLOCK _FSHLOCK
+#define FEXLOCK _FEXLOCK
+
+/*
+ * The rest of the flags, used only for opens
+ */
+#define FOPEN _FOPEN
+#define FCREAT _FCREAT
+#define FTRUNC _FTRUNC
+#define FEXCL _FEXCL
+#define FNOCTTY _FNOCTTY
+
+#endif !_POSIX_SOURCE
+
+/* XXX close on exec request; must match UF_EXCLOSE in user.h */
+#define FD_CLOEXEC 1 /* posix */
+
+/* fcntl(2) requests */
+#define F_DUPFD 0 /* Duplicate fildes */
+#define F_GETFD 1 /* Get fildes flags (close on exec) */
+#define F_SETFD 2 /* Set fildes flags (close on exec) */
+#define F_GETFL 3 /* Get file flags */
+#define F_SETFL 4 /* Set file flags */
+#ifndef _POSIX_SOURCE
+#define F_GETOWN 5 /* Get owner - for ASYNC */
+#define F_SETOWN 6 /* Set owner - for ASYNC */
+#endif /* !_POSIX_SOURCE */
+#define F_GETLK 7 /* Get record-locking information */
+#define F_SETLK 8 /* Set or Clear a record-lock (Non-Blocking) */
+#define F_SETLKW 9 /* Set or Clear a record-lock (Blocking) */
+#ifndef _POSIX_SOURCE
+#define F_RGETLK 10 /* Test a remote lock to see if it is blocked */
+#define F_RSETLK 11 /* Set or unlock a remote lock */
+#define F_CNVT 12 /* Convert a fhandle to an open fd */
+#define F_RSETLKW 13 /* Set or Clear remote record-lock(Blocking) */
+#endif /* !_POSIX_SOURCE */
+
+/* fcntl(2) flags (l_type field of flock structure) */
+#define F_RDLCK 1 /* read lock */
+#define F_WRLCK 2 /* write lock */
+#define F_UNLCK 3 /* remove lock(s) */
+#ifndef _POSIX_SOURCE
+#define F_UNLKSYS 4 /* remove remote locks for a given system */
+#endif /* !_POSIX_SOURCE */
+
+#include <sys/stdtypes.h>
+
+/* file segment locking set data type - information passed to system by user */
+struct flock {
+ short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */
+ short l_whence; /* flag to choose starting offset */
+ long l_start; /* relative offset, in bytes */
+ long l_len; /* length, in bytes; 0 means lock to EOF */
+ short l_pid; /* returned with F_GETLK */
+ short l_xxx; /* reserved for future use */
+};
+
+#ifndef _POSIX_SOURCE
+/* extended file segment locking set data type */
+struct eflock {
+ short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */
+ short l_whence; /* flag to choose starting offset */
+ long l_start; /* relative offset, in bytes */
+ long l_len; /* length, in bytes; 0 means lock to EOF */
+ short l_pid; /* returned with F_GETLK */
+ short l_xxx; /* reserved for future use */
+ long l_rpid; /* Remote process id wanting this lock */
+ long l_rsys; /* Remote system id wanting this lock */
+};
+#endif /* !_POSIX_SOURCE */
+
+#ifndef KERNEL
+#include <sys/stat.h> /* sigh. for the mode bits for open/creat */
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+int open __P_((const char *path, int flags, ...));
+int creat __P_((const char *path, mode_t modes));
+int fcntl __P_((int fd, int cmd, ...));
+
+__END_DECLS
+
+#endif /* !KERNEL */
+#endif /* !__sys_fcntlcom_h */
diff --git a/mit-pthreads/machdep/sunos-4.1.3/signal.h b/mit-pthreads/machdep/sunos-4.1.3/signal.h
new file mode 100755
index 00000000000..02a19860922
--- /dev/null
+++ b/mit-pthreads/machdep/sunos-4.1.3/signal.h
@@ -0,0 +1,98 @@
+#ifndef __sys_signal_h
+#define __sys_signal_h
+
+#define NSIG 32
+
+/*
+ * If any signal defines (SIG*) are added, deleted, or changed, the same
+ * changes must be made in /usr/include/signal.h as well.
+ */
+#define SIGHUP 1 /* hangup */
+#define SIGINT 2 /* interrupt */
+#define SIGQUIT 3 /* quit */
+#define SIGILL 4 /* illegal instruction (not reset when caught) */
+#define SIGTRAP 5 /* trace trap (not reset when caught) */
+#define SIGIOT 6 /* IOT instruction */
+#define SIGABRT 6 /* used by abort, replace SIGIOT in the future */
+#define SIGEMT 7 /* EMT instruction */
+#define SIGFPE 8 /* floating point exception */
+#define SIGKILL 9 /* kill (cannot be caught or ignored) */
+#define SIGBUS 10 /* bus error */
+#define SIGSEGV 11 /* segmentation violation */
+#define SIGSYS 12 /* bad argument to system call */
+#define SIGPIPE 13 /* write on a pipe with no one to read it */
+#define SIGALRM 14 /* alarm clock */
+#define SIGTERM 15 /* software termination signal from kill */
+#define SIGURG 16 /* urgent condition on IO channel */
+#define SIGSTOP 17 /* sendable stop signal not from tty */
+#define SIGTSTP 18 /* stop signal from tty */
+#define SIGCONT 19 /* continue a stopped process */
+#define SIGCHLD 20 /* to parent on child stop or exit */
+#define SIGCLD 20 /* System V name for SIGCHLD */
+#define SIGTTIN 21 /* to readers pgrp upon background tty read */
+#define SIGTTOU 22 /* like TTIN for output if (tp->t_local&LTOSTOP) */
+#define SIGIO 23 /* input/output possible signal */
+#define SIGPOLL SIGIO /* System V name for SIGIO */
+#define SIGXCPU 24 /* exceeded CPU time limit */
+#define SIGXFSZ 25 /* exceeded file size limit */
+#define SIGVTALRM 26 /* virtual time alarm */
+#define SIGPROF 27 /* profiling time alarm */
+#define SIGWINCH 28 /* window changed */
+#define SIGLOST 29 /* resource lost (eg, record-lock lost) */
+#define SIGUSR1 30 /* user defined signal 1 */
+#define SIGUSR2 31 /* user defined signal 2 */
+
+struct sigvec {
+ void (*sv_handler)(); /* signal handler */
+ int sv_mask; /* signal mask to apply */
+ int sv_flags; /* see signal options below */
+};
+#define SV_ONSTACK 0x0001 /* take signal on signal stack */
+#define SV_INTERRUPT 0x0002 /* do not restart system on signal return */
+#define SV_RESETHAND 0x0004 /* reset signal handler to SIG_DFL when signal taken */
+/*
+ * If any SA_NOCLDSTOP or SV_NOCLDSTOP is change, the same
+ * changes must be made in /usr/include/signal.h as well.
+ */
+#define SV_NOCLDSTOP 0x0008 /* don't send a SIGCHLD on child stop */
+#define SA_ONSTACK SV_ONSTACK
+#define SA_INTERRUPT SV_INTERRUPT
+#define SA_RESETHAND SV_RESETHAND
+
+#define SA_NOCLDSTOP SV_NOCLDSTOP
+#define sv_onstack sv_flags /* isn't compatibility wonderful! */
+
+/*
+ * If SIG_ERR, SIG_DFL, SIG_IGN, or SIG_HOLD are changed, the same changes
+ * must be made in /usr/include/signal.h as well.
+ */
+#define SIG_ERR (void (*)())-1
+#define SIG_DFL (void (*)())0
+#define SIG_IGN (void (*)())1
+
+/*
+ * Macro for converting signal number to a mask suitable for sigblock().
+ */
+#define sigmask(m) (1 << ((m)-1))
+
+/*
+ * If SIG_BLOCK, SIG_UNBLOCK, or SIG_SETMASK are changed, the same changes
+ * must be made in /usr/include/signal.h as well.
+ */
+#define SIG_BLOCK 0x0001
+#define SIG_UNBLOCK 0x0002
+#define SIG_SETMASK 0x0004
+
+/*
+ * If changes are made to sigset_t or struct sigaction, the same changes
+ * must be made in /usr/include/signal.h as well.
+ */
+#include <sys/stdtypes.h>
+
+struct sigaction {
+ void (*sa_handler)();
+ sigset_t sa_mask;
+ int sa_flags;
+};
+
+#endif /* !__sys_signal_h */
diff --git a/mit-pthreads/machdep/sunos-4.1.3/stat.h b/mit-pthreads/machdep/sunos-4.1.3/stat.h
new file mode 100755
index 00000000000..35e7f760204
--- /dev/null
+++ b/mit-pthreads/machdep/sunos-4.1.3/stat.h
@@ -0,0 +1,94 @@
+/* @(#)stat.h 2.19 90/01/24 SMI; from UCB 4.7 83/05/21 */
+
+/*
+ * NOTE: changes to this file should also be made to xpg2include/sys/stat.h
+ */
+
+#ifndef __sys_stat_h
+#define __sys_stat_h
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+struct stat {
+ dev_t st_dev;
+ ino_t st_ino;
+ mode_t st_mode;
+ short st_nlink;
+ uid_t st_uid;
+ gid_t st_gid;
+ dev_t st_rdev;
+ off_t st_size;
+ time_t st_atime;
+ int st_spare1;
+ time_t st_mtime;
+ int st_spare2;
+ time_t st_ctime;
+ int st_spare3;
+ long st_blksize;
+ long st_blocks;
+ long st_spare4[2];
+};
+
+#define _IFMT 0170000 /* type of file */
+#define _IFDIR 0040000 /* directory */
+#define _IFCHR 0020000 /* character special */
+#define _IFBLK 0060000 /* block special */
+#define _IFREG 0100000 /* regular */
+#define _IFLNK 0120000 /* symbolic link */
+#define _IFSOCK 0140000 /* socket */
+#define _IFIFO 0010000 /* fifo */
+
+#define S_ISUID 0004000 /* set user id on execution */
+#define S_ISGID 0002000 /* set group id on execution */
+#ifndef _POSIX_SOURCE
+#define S_ISVTX 0001000 /* save swapped text even after use */
+#define S_IREAD 0000400 /* read permission, owner */
+#define S_IWRITE 0000200 /* write permission, owner */
+#define S_IEXEC 0000100 /* execute/search permission, owner */
+
+#define S_ENFMT 0002000 /* enforcement-mode locking */
+
+#define S_IFMT _IFMT
+#define S_IFDIR _IFDIR
+#define S_IFCHR _IFCHR
+#define S_IFBLK _IFBLK
+#define S_IFREG _IFREG
+#define S_IFLNK _IFLNK
+#define S_IFSOCK _IFSOCK
+#define S_IFIFO _IFIFO
+#endif !_POSIX_SOURCE
+
+#define S_IRWXU 0000700 /* rwx, owner */
+#define S_IRUSR 0000400 /* read permission, owner */
+#define S_IWUSR 0000200 /* write permission, owner */
+#define S_IXUSR 0000100 /* execute/search permission, owner */
+#define S_IRWXG 0000070 /* rwx, group */
+#define S_IRGRP 0000040 /* read permission, group */
+#define S_IWGRP 0000020 /* write permission, grougroup */
+#define S_IXGRP 0000010 /* execute/search permission, group */
+#define S_IRWXO 0000007 /* rwx, other */
+#define S_IROTH 0000004 /* read permission, other */
+#define S_IWOTH 0000002 /* write permission, other */
+#define S_IXOTH 0000001 /* execute/search permission, other */
+
+#define S_ISBLK(m) (((m)&_IFMT) == _IFBLK)
+#define S_ISCHR(m) (((m)&_IFMT) == _IFCHR)
+#define S_ISDIR(m) (((m)&_IFMT) == _IFDIR)
+#define S_ISFIFO(m) (((m)&_IFMT) == _IFIFO)
+#define S_ISREG(m) (((m)&_IFMT) == _IFREG)
+#ifndef _POSIX_SOURCE
+#define S_ISLNK(m) (((m)&_IFMT) == _IFLNK)
+#define S_ISSOCK(m) (((m)&_IFMT) == _IFSOCK)
+#endif
+
+__BEGIN_DECLS
+int chmod __P_((const char *path, mode_t mode));
+int fstat __P_((int fd, struct stat *sbuf));
+int mkdir __P_((char *path, mode_t mode));
+int mkfifo __P_((char *path, mode_t mode));
+int stat __P_((const char *path, struct stat *sbuf));
+mode_t umask __P_((mode_t mask));
+__END_DECLS
+
+#endif /* !__sys_stat_h */
diff --git a/mit-pthreads/machdep/sunos-4.1.3/time.h b/mit-pthreads/machdep/sunos-4.1.3/time.h
new file mode 100755
index 00000000000..20bb085e4d8
--- /dev/null
+++ b/mit-pthreads/machdep/sunos-4.1.3/time.h
@@ -0,0 +1,69 @@
+/* @(#)time.h 2.12 91/05/22 SMI; from UCB 7.1 6/4/86 */
+
+/*
+ * 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.
+ */
+
+#ifndef _SYS_TIME_H_
+#define _SYS_TIME_H_
+
+#include <sys/cdefs.h>
+/*
+ * Structure returned by gettimeofday(2) system call,
+ * and used in other calls.
+ */
+
+struct timeval {
+ long tv_sec; /* seconds */
+ long tv_usec; /* and microseconds */
+};
+
+struct timezone {
+ int tz_minuteswest; /* minutes west of Greenwich */
+ int tz_dsttime; /* type of dst correction */
+};
+
+#define DST_NONE 0 /* not on dst */
+#define DST_USA 1 /* USA style dst */
+#define DST_AUST 2 /* Australian style dst */
+#define DST_WET 3 /* Western European dst */
+#define DST_MET 4 /* Middle European dst */
+#define DST_EET 5 /* Eastern European dst */
+#define DST_CAN 6 /* Canada */
+#define DST_GB 7 /* Great Britain and Eire */
+#define DST_RUM 8 /* Rumania */
+#define DST_TUR 9 /* Turkey */
+#define DST_AUSTALT 10 /* Australian style with shift in 1986 */
+
+/*
+ * Operations on timevals.
+ *
+ * NB: timercmp does not work for >= or <=.
+ */
+#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
+#define timercmp(tvp, uvp, cmp) \
+ ((tvp)->tv_sec cmp (uvp)->tv_sec || \
+ (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec)
+#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
+
+/*
+ * Names of the interval timers, and structure
+ * defining a timer setting.
+ */
+#define ITIMER_REAL 0
+#define ITIMER_VIRTUAL 1
+#define ITIMER_PROF 2
+
+struct itimerval {
+ struct timeval it_interval; /* timer interval */
+ struct timeval it_value; /* current value */
+};
+
+__BEGIN_DECLS
+int gettimeofday __P_((struct timeval *, struct timezone *));
+__END_DECLS
+
+
+#endif
diff --git a/mit-pthreads/machdep/sunos-4.1.3/timers.h b/mit-pthreads/machdep/sunos-4.1.3/timers.h
new file mode 100755
index 00000000000..3c4d057976a
--- /dev/null
+++ b/mit-pthreads/machdep/sunos-4.1.3/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.
+ *
+ * $Id$
+ *
+ * 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 {
+ time_t 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/sunos-4.1.3/wait.h b/mit-pthreads/machdep/sunos-4.1.3/wait.h
new file mode 100755
index 00000000000..97f5fb261f7
--- /dev/null
+++ b/mit-pthreads/machdep/sunos-4.1.3/wait.h
@@ -0,0 +1,22 @@
+#ifndef _SYS_WAIT_H_
+#define _SYS_WAIT_H_
+
+#define WNOHANG 1 /* dont hang in wait */
+#define WUNTRACED 2 /* tell about stopped, untraced children */
+
+pid_t wait __P_((int *));
+pid_t waitpid __P_((pid_t, int *, int));
+
+#define _W_INT(i) (i)
+#define WCOREFLAG 0200
+
+#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)
+
+#endif /* _SYS_WAIT_H_ */