This commit is contained in:
Daveo 2000-08-29 16:26:01 +00:00
commit 47aee91ef4
396 changed files with 32003 additions and 0 deletions

View file

@ -0,0 +1,59 @@
/*
* Error codes
* $RCSfile: errno.h,v $
* $Id: errno.h,v 1.3 1995/02/28 10:02:53 yoshi Exp $
*/
/*
* $PSLibId: Run-time Library Release 4.7$
*/
#ifndef _ERRNO_H
#define _ERRNO_H
/* Error codes */
#define EPERM 1 /* Not owner */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
#define EINTR 4 /* Interrupted system call */
#define EIO 5 /* I/O error */
#define ENXIO 6 /* No such device or address */
#define E2BIG 7 /* Arg list too long */
#define ENOEXEC 8 /* Exec format error */
#define EBADF 9 /* Bad file number */
#define ECHILD 10 /* No children */
#define EAGAIN 11 /* No more processes */
#define ENOMEM 12 /* Not enough core */
#define EACCES 13 /* Permission denied */
#define EFAULT 14 /* Bad address */
#define ENOTBLK 15 /* Block device required */
#define EBUSY 16 /* Mount device busy */
#define EEXIST 17 /* File exists */
#define EXDEV 18 /* Cross-device link */
#define ENODEV 19 /* No such device */
#define ENOTDIR 20 /* Not a directory*/
#define EISDIR 21 /* Is a directory */
#define EINVAL 22 /* Invalid argument */
#define ENFILE 23 /* File table overflow */
#define EMFILE 24 /* Too many open files */
#define ENOTTY 25 /* Not a typewriter */
#define ETXTBSY 26 /* Text file busy */
#define EFBIG 27 /* File too large */
#define ENOSPC 28 /* No space left on device */
#define ESPIPE 29 /* Illegal seek */
#define EROFS 30 /* Read-only file system */
#define EFORMAT 31 /* Bad file format */
#define EPIPE 32 /* Broken pipe */
/* math software */
#define EDOM 33 /* Argument too large */
#define ERANGE 34 /* Result too large */
/* non-blocking and interrupt i/o */
#define EWOULDBLOCK 35 /* Operation would block */
#define EINPROGRESS 36 /* Operation now in progress */
#define EALREADY 37 /* Operation already in progress */
extern int errno;
#endif /* _ERRNO_H */

View file

@ -0,0 +1,25 @@
/*
* File:fcntl.h
*/
/*
* $PSLibId: Run-time Library Release 4.7$
*/
#ifndef _SYS_FCNTL_H
#define _SYS_FCNTL_H
/* flags */
#define FREAD 0x0001 /* readable */
#define FWRITE 0x0002 /* writable */
#define FNBLOCK 0x0004 /* non-blocking reads */
#define FRLOCK 0x0010 /* read locked (non-shared) */
#define FWLOCK 0x0020 /* write locked (non-shared) */
#define FAPPEND 0x0100 /* append on each write */
#define FCREAT 0x0200 /* create if nonexistant */
#define FTRUNC 0x0400 /* truncate to zero length */
#define FSCAN 0x1000 /* scan type */
#define FRCOM 0x2000 /* remote command entry */
#define FNBUF 0x4000 /* no ring buf. and console interrupt */
#define FASYNC 0x8000 /* asyncronous i/o */
#endif /* _SYS_FCNTL_H */

View file

@ -0,0 +1,33 @@
/*
* File:file.h
*/
/*
* $PSLibId: Run-time Library Release 4.7$
*/
#ifndef _SYS_FILE_H
#define _SYS_FILE_H
#include <sys/fcntl.h>
/* Flag for open() */
#define O_RDONLY FREAD
#define O_WRONLY FWRITE
#define O_RDWR FREAD|FWRITE
#define O_CREAT FCREAT /* open with file create */
#define O_NOBUF FNBUF /* no device buffer and console interrupt */
#define O_NBLOCK FNBLOCK /* non blocking mode */
#define O_NOWAIT FASYNC /* asyncronous i/o */
#ifndef SEEK_SET
#define SEEK_SET 0
#endif
#ifndef SEEK_CUR
#define SEEK_CUR 1
#endif
#ifndef SEEK_END
#define SEEK_END 2
#endif
#endif /* _SYS_FILE_H */

View file

@ -0,0 +1,44 @@
/*
* File:ioctl.h
*/
/*
* $PSLibId: Run-time Library Release 4.7$
*/
#ifndef _SYS_IOCTL_H
#define _SYS_IOCTL_H
#ifndef NULL
#define NULL 0
#endif
#ifndef EOF
#define EOF (-1) /* EOF from getc() */
#endif
/* general */
#define FIOCNBLOCK (('f'<<8)|1) /* set non-blocking io */
#define FIOCSCAN (('f'<<8)|2) /* scan for input */
/* tty and sio */
#define TIOCRAW (('t'<<8)|1) /* disable xon/xoff control */
#define TIOCFLUSH (('t'<<8)|2) /* flush input buffer */
#define TIOCREOPEN (('t'<<8)|3) /* reopen */
#define TIOCBAUD (('t'<<8)|4) /* set baud rate */
#define TIOCEXIT (('t'<<8)|5) /* console interrup */
#define TIOCDTR (('t'<<8)|6) /* control DTR line */
#define TIOCRTS (('t'<<8)|7) /* control RTS line */
#define TIOCLEN (('t'<<8)|8) /* stop<<16 | char */
/* stop 0:none 1:1 2:1.5 3:2bit */
/* char 0:5 1:6 2:7 3:8bit */
#define TIOCPARITY (('t'<<8)|9) /* parity 0:none 1:e 3:o */
#define TIOSTATUS (('t'<<8)|10) /* return status */
#define TIOERRRST (('t'<<8)|11) /* error reset */
#define TIOEXIST (('t'<<8)|12) /* exist test with DTR/CTS */
#define TIORLEN (('t'<<8)|13) /* receive buffer length */
/* disk */
#define DIOFORMAT (('d'<<8)|1) /* format */
#endif /* _SYS_IOCTL_H */

View file

@ -0,0 +1,80 @@
/*
* File:types.h
*/
/*
* $PSLibId: Run-time Library Release 4.7$
*/
#ifndef _SYS_TYPES_H
#define _SYS_TYPES_H
/*
* Basic system types and major/minor device constructing/busting macros.
*/
/* major part of a device */
#define major(x) ((int)(((unsigned)(x)>>8)&0377))
/* minor part of a device */
#define minor(x) ((int)((x)&0377))
/* make a device number */
#define makedev(x,y) ((dev_t)(((x)<<8) | (y)))
#ifndef _UCHAR_T
#define _UCHAR_T
typedef unsigned char u_char;
#endif
#ifndef _USHORT_T
#define _USHORT_T
typedef unsigned short u_short;
#endif
#ifndef _UINT_T
#define _UINT_T
typedef unsigned int u_int;
#endif
#ifndef _ULONG_T
#define _ULONG_T
typedef unsigned long u_long;
#endif
#ifndef _SYSIII_USHORT
#define _SYSIII_USHORT
typedef unsigned short ushort; /* sys III compat */
#endif
#ifndef __psx__
#ifndef _SYSV_UINT
#define _SYSV_UINT
typedef unsigned int uint; /* sys V compat */
#endif
#ifndef _SYSV_ULONG
#define _SYSV_ULONG
typedef unsigned long ulong; /* sys V compat */
#endif
#endif /* ! __psx__ */
typedef struct _physadr { int r[1]; } *physadr;
typedef struct label_t {
int val[12];
} label_t;
typedef struct _quad { long val[2]; } quad;
typedef long daddr_t;
typedef char * caddr_t;
typedef long * qaddr_t; /* should be typedef quad * qaddr_t; */
typedef u_long ino_t;
typedef long swblk_t;
#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned int size_t;
#endif
typedef long time_t;
typedef short dev_t;
typedef long off_t;
typedef u_short uid_t;
typedef u_short gid_t;
#define NBBY 8 /* number of bits in a byte */
#endif /* _SYS_TYPES_H */