Done a major overhaul of the way target include files are installed and
how platform libraries are built. The ARCH pm variable has now been renamed PLATFORM (which is more accurate) and a different ARCH variable added, which represents the CPU family rather than the hardware platform.
This commit is contained in:
5
lang/cem/libcc/headers/sys/.distr
Normal file
5
lang/cem/libcc/headers/sys/.distr
Normal file
@@ -0,0 +1,5 @@
|
||||
dir.h
|
||||
stat.h
|
||||
types.h
|
||||
stdtypes.h
|
||||
errno.h
|
||||
45
lang/cem/libcc/headers/sys/dir.h
Normal file
45
lang/cem/libcc/headers/sys/dir.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/* $Id$ */
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*/
|
||||
#ifndef _DIR_H
|
||||
#define _DIR_H
|
||||
|
||||
#ifdef __BSD4_2
|
||||
#define MAXNAMLEN 255
|
||||
#else
|
||||
#define MAXNAMLEN 14
|
||||
#endif
|
||||
#define DIRBLKSIZ 512
|
||||
#undef DIRSIZ
|
||||
#define DIRSIZ(dp) \
|
||||
((sizeof(struct direct) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1+3)&~3))
|
||||
struct direct {
|
||||
long d_ino;
|
||||
short d_reclen;
|
||||
short d_namlen;
|
||||
char d_name[MAXNAMLEN+1];
|
||||
};
|
||||
|
||||
struct _dirdesc {
|
||||
int dd_fd;
|
||||
long dd_loc;
|
||||
long dd_size;
|
||||
char *dd_buf;
|
||||
int dd_bsize;
|
||||
};
|
||||
|
||||
typedef struct _dirdesc DIR;
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
extern DIR *opendir();
|
||||
extern struct direct *readdir();
|
||||
extern long telldir();
|
||||
extern seekdir();
|
||||
#define rewinddir(dirp) seekdir((dirp), 0L)
|
||||
extern closedir();
|
||||
|
||||
#endif /* _DIR_H */
|
||||
144
lang/cem/libcc/headers/sys/errno.h
Normal file
144
lang/cem/libcc/headers/sys/errno.h
Normal file
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* sys/errno.h - error numbers
|
||||
*/
|
||||
/* $Id$ */
|
||||
|
||||
#if !defined(_SYS_ERRNO_H)
|
||||
#define _SYS_ERRNO_H
|
||||
|
||||
#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 EMLINK 31 /* Too many links */
|
||||
#define EPIPE 32 /* Broken pipe */
|
||||
|
||||
#if defined(__USG)
|
||||
/* Only ENOMSG, EIDRM and EDEADLK are documented */
|
||||
#define ENOMSG 35 /* No message of desired type */
|
||||
#define EIDRM 36 /* Identifier Removed */
|
||||
#define ECHRNG 37 /* Channel number out of range */
|
||||
#define EL2NSYNC 38 /* Level 2 not synchronized */
|
||||
#define EL3HLT 39 /* Level 3 halted */
|
||||
#define EL3RST 40 /* Level 3 reset */
|
||||
#define ELNRNG 41 /* Link number out of range */
|
||||
#define EUNATCH 42 /* Protocol driver not attached */
|
||||
#define ENOCSI 43 /* No CSI structure available */
|
||||
#define EL2HLT 44 /* Level 2 halted */
|
||||
#define EDEADLK 45 /* DeadLock */
|
||||
#endif /* __USG */
|
||||
|
||||
#if defined(__BSD4_2)
|
||||
/* 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 */
|
||||
/* ipc/network software */
|
||||
|
||||
/* argument errors */
|
||||
#define ENOTSOCK 38 /* Socket operation on non-socket */
|
||||
#define EDESTADDRREQ 39 /* Destination address required */
|
||||
#define EMSGSIZE 40 /* Message too long */
|
||||
#define EPROTOTYPE 41 /* Protocol wrong type for socket */
|
||||
#define ENOPROTOOPT 42 /* Protocol not available */
|
||||
#define EPROTONOSUPPORT 43 /* Protocol not supported */
|
||||
#define ESOCKTNOSUPPORT 44 /* Socket type not supported */
|
||||
#define EOPNOTSUPP 45 /* Operation not supported on socket */
|
||||
#define EPFNOSUPPORT 46 /* Protocol family not supported */
|
||||
#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */
|
||||
#define EADDRINUSE 48 /* Address already in use */
|
||||
#define EADDRNOTAVAIL 49 /* Can't assign requested address */
|
||||
|
||||
/* operational errors */
|
||||
#define ENETDOWN 50 /* Network is down */
|
||||
#define ENETUNREACH 51 /* Network is unreachable */
|
||||
#define ENETRESET 52 /* Network dropped connection on reset */
|
||||
#define ECONNABORTED 53 /* Software caused connection abort */
|
||||
#define ECONNRESET 54 /* Connection reset by peer */
|
||||
#define ENOBUFS 55 /* No buffer space available */
|
||||
#define EISCONN 56 /* Socket is already connected */
|
||||
#define ENOTCONN 57 /* Socket is not connected */
|
||||
#define ESHUTDOWN 58 /* Can't send after socket shutdown */
|
||||
/* ETOOMANYREFS is not documented */
|
||||
#define ETOOMANYREFS 59 /* Too many references: can't splice */
|
||||
#define ETIMEDOUT 60 /* Connection timed out */
|
||||
#define ECONNREFUSED 61 /* Connection refused */
|
||||
|
||||
/* */
|
||||
#define ELOOP 62 /* Too many levels of symbolic links */
|
||||
#define ENAMETOOLONG 63 /* File name too long */
|
||||
|
||||
/* In BSD4.2, ENOTEMPTY is defined as 64. */
|
||||
/* Just use BSD4.3 & Sun UNIX 4.2 definitions */
|
||||
#define EHOSTDOWN 64 /* Host is down */
|
||||
#define EHOSTUNREACH 65 /* No route to host */
|
||||
#define ENOTEMPTY 66 /* Directory not empty */
|
||||
|
||||
/* quotas & mush */
|
||||
/* EPROCLIM and EUSERS are not documented */
|
||||
#define EPROCLIM 67 /* Too many processes */
|
||||
#define EUSERS 68 /* Too many users */
|
||||
#define EDQUOT 69 /* Disc quota exceeded */
|
||||
|
||||
/* Network File System */
|
||||
#define ESTALE 70 /* Stale NFS file handle */
|
||||
#define EREMOTE 71 /* Too many levels of remote in path */
|
||||
|
||||
/* streams */
|
||||
/* only ENOMSG is documented */
|
||||
#define ENOSTR 72 /* Device is not a stream */
|
||||
#define ETIME 73 /* Timer expired */
|
||||
#define ENOSR 74 /* Out of streams resources */
|
||||
#define ENOMSG 75 /* No message of desired type */
|
||||
#define EBADMSG 76 /* Trying to read unreadable message */
|
||||
|
||||
#define EIDRM 77 /* Identifier removed */
|
||||
|
||||
/* SystemV Record Locking */
|
||||
#define EDEADLK 78 /* Deadlock condition. */
|
||||
#define ENOLCK 79 /* No record locks available. */
|
||||
|
||||
#endif /* __BSD4_2 */
|
||||
|
||||
#if defined(_POSIX_SOURCE)
|
||||
#if defined(_MINIX)
|
||||
#define EDEADLK 35 /* resource deadlock avoided */
|
||||
#define ENAMETOOLONG 36 /* file name too long */
|
||||
#define ENOLCK 37 /* no locks available */
|
||||
#define ENOSYS 38 /* function not implemented */
|
||||
#define ENOTEMPTY 39 /* directory not empty */
|
||||
|
||||
#define ELOCKED 101 /* can't send message */
|
||||
#define EBADCALL 102 /* error on send/recieve */
|
||||
#define ELONGSTRING 103 /* string too long */
|
||||
#endif
|
||||
/* Room for other POSIX implementations */
|
||||
#endif
|
||||
|
||||
#endif /* _SYS_ERRNO_H */
|
||||
85
lang/cem/libcc/headers/sys/stat.h
Normal file
85
lang/cem/libcc/headers/sys/stat.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*/
|
||||
/* $Id$ */
|
||||
|
||||
#if !defined(_SYS_STAT_H)
|
||||
#define _SYS_STAT_H
|
||||
|
||||
struct stat {
|
||||
dev_t st_dev;
|
||||
ino_t st_ino;
|
||||
u_short st_mode;
|
||||
short st_nlink;
|
||||
short st_uid;
|
||||
short st_gid;
|
||||
dev_t st_rdev;
|
||||
off_t st_size;
|
||||
time_t st_atime;
|
||||
#if defined(__BSD4_2)
|
||||
long st_spare1;
|
||||
#endif
|
||||
time_t st_mtime;
|
||||
#if defined(__BSD4_2)
|
||||
long st_spare2;
|
||||
#endif
|
||||
time_t st_ctime;
|
||||
#if defined(__BSD4_2)
|
||||
long st_spare3;
|
||||
long st_blksize;
|
||||
long st_blocks;
|
||||
long st_spare4[2];
|
||||
#endif
|
||||
};
|
||||
|
||||
#define S_IFMT 0170000
|
||||
#define S_IFDIR 0040000
|
||||
#define S_IFCHR 0020000
|
||||
#define S_IFBLK 0060000
|
||||
#define S_IFREG 0100000
|
||||
#if !defined(__BSD4_2)
|
||||
#if !defined(__USG) && !defined(_POSIX_SOURCE)
|
||||
#define S_IFMPC 0030000
|
||||
#define S_IFMPB 0070000
|
||||
#else
|
||||
#define S_IFIFO 0010000
|
||||
#endif
|
||||
#else
|
||||
#define S_IFLNK 0120000
|
||||
#define S_IFSOCK 0140000
|
||||
#endif
|
||||
#define S_ISUID 0004000
|
||||
#define S_ISGID 0002000
|
||||
#define S_ISVTX 0001000
|
||||
#define S_IREAD 0000400
|
||||
#define S_IWRITE 0000200
|
||||
#define S_IEXEC 0000100
|
||||
|
||||
#if defined(__BSD4_2) || defined(_POSIX_SOURCE)
|
||||
#define S_IRWXU 00700 /* owner: rwx------ */
|
||||
#define S_IRUSR 00400 /* owner: r-------- */
|
||||
#define S_IWUSR 00200 /* owner: -w------- */
|
||||
#define S_IXUSR 00100 /* owner: --x------ */
|
||||
|
||||
#define S_IRWXG 00070 /* group: ---rwx--- */
|
||||
#define S_IRGRP 00040 /* group: ---r----- */
|
||||
#define S_IWGRP 00020 /* group: ----w---- */
|
||||
#define S_IXGRP 00010 /* group: -----x--- */
|
||||
|
||||
#define S_IRWXO 00007 /* others: ------rwx */
|
||||
#define S_IROTH 00004 /* others: ------r-- */
|
||||
#define S_IWOTH 00002 /* others: -------w- */
|
||||
#define S_IXOTH 00001 /* others: --------x */
|
||||
|
||||
#if defined(_POSIX_SOURCE)
|
||||
/* The following macros test st_mode (from POSIX Sec. 5.6.1.1.) */
|
||||
#define S_ISREG(m) ((m & S_IFMT) == S_IFREG) /* is a reg file */
|
||||
#define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) /* is a directory */
|
||||
#define S_ISCHR(m) ((m & S_IFMT) == S_IFCHR) /* is a char spec */
|
||||
#define S_ISBLK(m) ((m & S_IFMT) == S_IFBLK) /* is a block spec */
|
||||
#define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO) /* is a pipe/FIFO */
|
||||
#endif /* _POSIX_SOURCE */
|
||||
#endif /* BSD4_2 || _POSIX_SOURCE */
|
||||
|
||||
#endif /* _SYS_STAT_H */
|
||||
25
lang/cem/libcc/headers/sys/stdtypes.h
Normal file
25
lang/cem/libcc/headers/sys/stdtypes.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* This include file exists so that <sys/types.h> can still safely be
|
||||
included. On a SUN, this would cause problems because sometimes time_t
|
||||
and/or size_t were defined twice.
|
||||
*/
|
||||
|
||||
#ifndef __STDTYPES_H__
|
||||
#define __STDTYPES_H__
|
||||
|
||||
typedef long sigset_t; /* for <signal.h> on SUN's */
|
||||
#ifndef __STDC__
|
||||
typedef long time_t;
|
||||
typedef long size_t;
|
||||
typedef long clock_t;
|
||||
#endif
|
||||
typedef int pid_t;
|
||||
typedef unsigned short gid_t;
|
||||
typedef unsigned short uid_t;
|
||||
typedef unsigned int speed_t;
|
||||
typedef unsigned long tcflag_t;
|
||||
typedef unsigned char cc_t;
|
||||
|
||||
|
||||
#endif /* __STDTYPES_H__ */
|
||||
79
lang/cem/libcc/headers/sys/types.h
Normal file
79
lang/cem/libcc/headers/sys/types.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/* $Id$ */
|
||||
/*
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*/
|
||||
|
||||
/*
|
||||
* Basic system types and major/minor device constructing/busting macros.
|
||||
*/
|
||||
|
||||
#if !defined(_SYS_TYPES_H)
|
||||
#define _SYS_TYPES_H
|
||||
|
||||
#ifdef __STDC__
|
||||
#if !defined(_SIZE_T)
|
||||
#define _SIZE_T
|
||||
typedef unsigned int size_t; /* type returned by sizeof */
|
||||
#endif /* _SIZE_T */
|
||||
|
||||
#if !defined(_TIME_T)
|
||||
#define _TIME_T
|
||||
typedef unsigned long time_t;
|
||||
#endif /* TIME_T */
|
||||
#endif
|
||||
|
||||
#if !defined(_POSIX_SOURCE)
|
||||
|
||||
/* 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)))
|
||||
|
||||
typedef unsigned char u_char;
|
||||
typedef unsigned short u_short;
|
||||
typedef unsigned int u_int;
|
||||
typedef unsigned long u_long;
|
||||
|
||||
typedef struct _physadr { int r[1]; } *physadr;
|
||||
typedef long daddr_t;
|
||||
typedef char * caddr_t;
|
||||
#if defined(__BSD4_2)
|
||||
typedef u_long ino_t;
|
||||
#else
|
||||
typedef u_short ino_t;
|
||||
#endif
|
||||
typedef long swblk_t;
|
||||
|
||||
#include <sys/stdtypes.h>
|
||||
|
||||
typedef long label_t[14];
|
||||
typedef short dev_t;
|
||||
typedef long off_t;
|
||||
|
||||
/* system V compatibility: */
|
||||
typedef unsigned int uint;
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned char uchar_t;
|
||||
typedef short cnt_t;
|
||||
typedef long paddr_t;
|
||||
typedef long key_t;
|
||||
|
||||
#else /* _POSIX_SOURCE */
|
||||
#if defined(_MINIX)
|
||||
typedef unsigned short dev_t; /* hold (major|minor) device pair */
|
||||
typedef unsigned char gid_t; /* group id */
|
||||
typedef unsigned short ino_t; /* i-node number */
|
||||
typedef unsigned short mode_t; /* mode number within an i-node */
|
||||
typedef unsigned char nlink_t; /* number-of-links field within an i-node */
|
||||
typedef long off_t; /* offsets within a file */
|
||||
typedef int pid_t; /* type for pids (must be signed) */
|
||||
typedef unsigned short uid_t; /* user id */
|
||||
#endif /* _MINIX */
|
||||
#endif /* _POSIX_SOURCE */
|
||||
|
||||
#endif /* _SYS_TYPES_H */
|
||||
Reference in New Issue
Block a user