More additions
authorceriel <none@none>
Fri, 4 Oct 1991 17:37:32 +0000 (17:37 +0000)
committerceriel <none@none>
Fri, 4 Oct 1991 17:37:32 +0000 (17:37 +0000)
include/_tail_cc/.distr
include/_tail_cc/fcntl.h [new file with mode: 0644]
include/_tail_cc/signal.h [new file with mode: 0644]

index bb167b6..cd33f15 100644 (file)
@@ -2,11 +2,12 @@ ctype.h
 setjmp.h
 stdio.h
 assert.h
-termio.h
 varargs.h
 math.h
 time.h
 pwd.h
 grp.h
 sgtty.h
+signal.h
+fcntl.h
 sys
diff --git a/include/_tail_cc/fcntl.h b/include/_tail_cc/fcntl.h
new file mode 100644 (file)
index 0000000..c87e24f
--- /dev/null
@@ -0,0 +1,55 @@
+/* $Header$ */
+
+/* Copied from Minix, with some changes */
+/* The <fcntl.h> header is needed by the open() and fcntl() system calls,
+ * which  have a variety of parameters and flags.  They are described here.  
+ * The formats of the calls to each of these are:
+ *
+ *     open(path, oflag [,mode])       open a file
+ *     fcntl(fd, cmd [,arg])           get or set file attributes
+ * 
+ */
+
+#ifdef __BSD4_2
+#ifndef _FCNTL_H
+#define _FCNTL_H
+
+/* These values are used for cmd in fcntl().  POSIX Table 6-1.  */
+#define F_DUPFD            0   /* duplicate file descriptor */
+#define F_GETFD                   1    /* get file descriptor flags */
+#define F_SETFD            2   /* set file descriptor flags */
+#define F_GETFL            3   /* get file status flags */
+#define F_SETFL            4   /* set file status flags */
+#define F_GETLK            7   /* get record locking information */
+#define F_SETLK            8   /* set record locking information */
+#define F_SETLKW           9   /* set record locking info; wait if blocked */
+
+/* File descriptor flags used for fcntl().  POSIX Table 6-2. */
+#define FD_CLOEXEC         1   /* close on exec flag for third arg of fcntl */
+
+/* L_type values for record locking with fcntl().  POSIX Table 6-3. */
+#define F_RDLCK            1   /* shared or read lock */
+#define F_WRLCK            2   /* exclusive or write lock */
+#define F_UNLCK            3   /* unlock */
+
+/* Oflag values for open().  POSIX Table 6-4. */
+#define O_CREAT      0001000   /* creat file if it doesn't exist */
+#define O_EXCL       0004000   /* exclusive use flag */
+#define O_NOCTTY     0100000   /* do not assign a controlling terminal */
+#define O_TRUNC      0002000   /* truncate flag */
+
+/* File status flags for open() and fcntl().  POSIX Table 6-5. */
+#define O_APPEND     0000010   /* set append mode */
+#define O_NONBLOCK   0040000   /* no delay */
+#define O_NDELAY     0000004   /* no delay (BSD) */
+
+/* File access modes for open() and fcntl().  POSIX Table 6-6. */
+#define O_RDONLY           0   /* open(name, O_RDONLY) opens read only */
+#define O_WRONLY           1   /* open(name, O_WRONLY) opens write only */
+#define O_RDWR             2   /* open(name, O_RDWR) opens read/write */
+
+/* Mask for use with file access modes.  POSIX Table 6-7. */
+#define O_ACCMODE         03   /* mask for file access modes */
+
+#endif /* _FCNTL_H */
+#endif /* __BSD4_2 */
diff --git a/include/_tail_cc/signal.h b/include/_tail_cc/signal.h
new file mode 100644 (file)
index 0000000..49ac856
--- /dev/null
@@ -0,0 +1,59 @@
+/* $Header$ */
+/*
+ * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
+ * See the copyright notice in the ACK home directory, in the file "Copyright".
+ */
+#ifndef _SIGNAL_H
+#define _SIGNAL_H
+
+#ifdef __BSD4_2
+#define _NSIG             32   /* number of signals used */
+#else
+#define _NSIG             16   /* number of signals used */
+#endif
+
+#define SIGHUP            1    /* hangup */
+#define SIGINT             2   /* interrupt (DEL) */
+#define SIGQUIT            3   /* quit (ASCII FS) */
+#define SIGILL             4   /* illegal instruction */
+#define SIGTRAP            5   /* trace trap (not reset when caught) */
+#define SIGABRT            6   /* IOT instruction */
+#define SIGIOT             6   /* SIGABRT for people who speak PDP-11 */
+#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 */
+
+#ifdef __BSD4_2
+#define SIGURG            16    /* urgent condition on IO channel */
+#define SIGCHLD           20   /* child process terminated or stopped */
+#define SIGCONT           19   /* continue if stopped */
+#define SIGSTOP           17   /* stop signal */
+#define SIGTSTP           18   /* interactive stop signal */
+#define SIGTTIN           21   /* background process wants to read */
+#define SIGTTOU           22   /* background process wants to write */
+#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 */
+#endif
+
+
+#define SIG_DFL                ((void (*)())0)         /* default signal handling */
+#define SIG_IGN                ((void (*)())1)         /* ignore signal */
+#define SIG_ERR                ((void (*)())-1)
+
+void (*signal()) ();
+
+#endif /* _SIGNAL_H */