diff options
| author | Toomas Soome <tsoome@me.com> | 2020-02-08 20:24:21 +0200 |
|---|---|---|
| committer | Toomas Soome <tsoome@me.com> | 2020-03-18 19:36:25 +0200 |
| commit | 97b5374547d500fded52d886ceba8a9962af0527 (patch) | |
| tree | 58133eb5538d122ed076707c9abe35530356cc0c /usr/src/lib/libbc/inc/include/sys | |
| parent | 20d3bf629e3e91ea61dee8153d5bc47daeab26b0 (diff) | |
| download | illumos-gate-97b5374547d500fded52d886ceba8a9962af0527.tar.gz | |
12292 retire libbc
Reviewed by: Peter Tribble <peter.tribble@gmail.com>
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Alexander Eremin <aeremin@tintri.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/lib/libbc/inc/include/sys')
47 files changed, 0 insertions, 4850 deletions
diff --git a/usr/src/lib/libbc/inc/include/sys/audit.h b/usr/src/lib/libbc/inc/include/sys/audit.h deleted file mode 100644 index a3ba237f20..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/audit.h +++ /dev/null @@ -1,233 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1988 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" -/* - * Audit trail structures; - */ - -#ifndef _sys_audit_h -#define _sys_audit_h - -/* - * Maximum size for audit data passed from the audit system call - * This value is arbitrary, so offers of better numbers are invited. - */ - -#define AUP_USER (0x8000) -#define MAXAUDITDATA (AUP_USER - 1) -#define AUDITMAGIC 0x00070009 - -/* - * Audit conditions, statements reguarding what's to be done with - * audit records. - */ -#define AUC_UNSET 0 /* on/off hasn't been decided */ -#define AUC_AUDITING 1 /* auditing is being done */ -#define AUC_NOAUDIT 2 /* auditing is not being done */ -#define AUC_FCHDONE 3 /* no auditing, and you never can */ - -/* - * Minimum and maximum record type values. Change AUR_MAXRECTYPE when - * adding new record types. - */ -#define AUR_MINRECTYPE 1 -#define AUR_MAXRECTYPE 63 - -/* - * Audit record type codes - */ -#define AUR_ACCESS 1 -#define AUR_CHMOD 2 -#define AUR_CHOWN 3 -#define AUR_CREAT 4 -#define AUR_FCHMOD 5 -#define AUR_FCHOWN 6 -#define AUR_FTRUNCATE 7 -#define AUR_LINK 8 -#define AUR_MKDIR 9 -#define AUR_MKNOD 10 -#define AUR_OPEN 11 -#define AUR_RMDIR 12 -#define AUR_RENAME 13 -#define AUR_STAT 14 -#define AUR_SYMLINK 15 -#define AUR_TRUNCATE 16 -#define AUR_UNLINK 17 -#define AUR_UTIMES 18 -#define AUR_EXECV 19 -#define AUR_MSGCONV 20 -#define AUR_MSGCTL 21 -#define AUR_MSGGET 22 -#define AUR_MSGRCV 23 -#define AUR_MSGSND 24 -#define AUR_SEMCTL 25 -#define AUR_SEMGET 26 -#define AUR_SEMOP 27 -#define AUR_SHMAT 28 -#define AUR_SHMCTL 29 -#define AUR_SHMDT 30 -#define AUR_SHMGET 31 -#define AUR_SOCKET 32 -#define AUR_PTRACE 33 -#define AUR_KILL 34 -#define AUR_KILLPG 35 -#define AUR_EXECVE 36 -#define AUR_CORE 37 -#define AUR_ADJTIME 38 -#define AUR_SETTIMEOFDAY 39 -#define AUR_SETHOSTNAME 40 -#define AUR_SETDOMAINNAME 41 -#define AUR_REBOOT 42 -#define AUR_REBOOTFAIL 43 -#define AUR_SYSACCT 44 -#define AUR_MOUNT_UFS 45 -#define AUR_MOUNT_NFS 46 -#define AUR_MOUNT 47 -#define AUR_UNMOUNT 48 -#define AUR_READLINK 49 -#define AUR_QUOTA_ON 50 -#define AUR_QUOTA_OFF 51 -#define AUR_QUOTA_SET 52 -#define AUR_QUOTA_LIM 53 -#define AUR_QUOTA_SYNC 54 -#define AUR_QUOTA 55 -#define AUR_STATFS 56 -#define AUR_CHROOT 57 -#define AUR_TEXT 58 -#define AUR_CHDIR 59 -#define AUR_MSGCTLRMID 60 -#define AUR_SEMCTL3 61 -#define AUR_SEMCTLALL 62 -#define AUR_SHMCTLRMID 63 - -#define AUR_TRAILER 1000 - -/* - * The classes of audit events - */ -#define AU_DREAD 0x00000001 -#define AU_DWRITE 0x00000002 -#define AU_DACCESS 0x00000004 -#define AU_DCREATE 0x00000008 -#define AU_LOGIN 0x00000010 -#define AU_SREAD 0x00000020 -#define AU_SCTL 0x00000040 -#define AU_MINPRIV 0x00000080 -#define AU_MAJPRIV 0x00000100 -#define AU_ADMIN 0x00000200 -#define AU_ASSIGN 0x00000400 - -/* - * Success and failure are defined here because not everyone agrees on - * which values rate success and which failure. - */ -#define AU_EITHER -1 -#define AU_SUCCESS 0 -#define AU_FAILURE 1 - -/* - * The user id -2(0xfffe) is never audited - in fact, a setauid(AU_NOAUDITID) - * will turn off auditing. - */ -#define AU_NOAUDITID -2 - -/* - * The sturcture of the audit state - */ -struct audit_state { - unsigned int as_success; /* success bits */ - unsigned int as_failure; /* failure bits */ -}; -typedef struct audit_state audit_state_t; - -/* - * The audit file header structure. - * In the file it will be followed by a path name, the length of which is - * kept in the ah_namelen field. - */ -struct audit_header { - int ah_magic; /* magic number */ - time_t ah_time; /* the time */ - short ah_namelen; /* length of file name */ -}; -typedef struct audit_header audit_header_t; - -/* - * The audit file trailer record structure. - * In the file it will be followed by a path name, the length of which is - * kept in the at_namelen field. - */ -struct audit_trailer { - short at_record_size; /* size of this */ - short at_record_type; /* its type, a trailer */ - time_t at_time; /* the time */ - short at_namelen; /* length of file name */ -}; -typedef struct audit_trailer audit_trailer_t; - -/* - * The audit file record structure. - * au_record_size is the size of the entire record. - * au_param_count is the number of data items which follow the record. - * There is a short ( 16 bit ) length for each of the following - * parameters, then the parameters themselves. There is no way to know - * what the parameters are from the data, unless the au_record_type - * is understood. - * The first parameter is the group list, hence au_param_count will - * always be at least one. - */ -struct audit_record { - short au_record_size; /* size of this */ - short au_record_type; /* its type */ - unsigned int au_event; /* the event */ - time_t au_time; /* the time */ - uid_t au_uid; /* real uid */ - uid_t au_auid; /* audit uid */ - uid_t au_euid; /* effective */ - gid_t au_gid; /* real group */ - short au_pid; /* process id */ - int au_errno; /* error code */ - int au_return; /* a return value */ - blabel_t au_label; /* also ... */ - short au_param_count; /* # of parameters */ -}; -typedef struct audit_record audit_record_t; - -/* - * This structure controls a buffer for generating full pathnames - * for filenames. - */ -struct au_path_s { - u_int ap_size; /* Size of buffer */ - caddr_t ap_buf; /* Address of buffer */ - caddr_t ap_ptr; /* Current position */ -}; -typedef struct au_path_s au_path_t; - -#define AU_ALIGN(x) (((x) + 1) & ~1) - -#endif /*!_sys_audit_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/des.h b/usr/src/lib/libbc/inc/include/sys/des.h deleted file mode 100644 index 795e3b0544..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/des.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _sys_des_h -#define _sys_des_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Generic DES driver interface - * Keep this file hardware independent! - */ - -#define DES_MAXLEN 65536 /* maximum # of bytes to encrypt */ -#define DES_QUICKLEN 16 /* maximum # of bytes to encrypt quickly */ - -enum desdir { ENCRYPT, DECRYPT }; -enum desmode { CBC, ECB }; - -/* - * parameters to ioctl call - */ -struct desparams { - u_char des_key[8]; /* key (with low bit parity) */ - enum desdir des_dir; /* direction */ - enum desmode des_mode; /* mode */ - u_char des_ivec[8]; /* input vector */ - unsigned des_len; /* number of bytes to crypt */ - union { - u_char UDES_data[DES_QUICKLEN]; - u_char *UDES_buf; - } UDES; -#define des_data UDES.UDES_data /* direct data here if quick */ -#define des_buf UDES.UDES_buf /* otherwise, pointer to data */ -}; - -/* - * Encrypt an arbitrary sized buffer - */ -#define DESIOCBLOCK _IOWR('d', 6, struct desparams) - -/* - * Encrypt of small amount of data, quickly - */ -#define DESIOCQUICK _IOWR('d', 7, struct desparams) - -#endif /* !_sys_des_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/dir.h b/usr/src/lib/libbc/inc/include/sys/dir.h deleted file mode 100644 index afc1f77fd0..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/dir.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Filesystem-independent directory information. - * Directory entry structures are of variable length. - * Each directory entry is a struct direct containing its file number, the - * offset of the next entry (a cookie interpretable only the filesystem - * type that generated it), the length of the entry, and the length of the - * name contained in the entry. These are followed by the name. The - * entire entry is padded with null bytes to a 4 byte boundary. All names - * are guaranteed null terminated. The maximum length of a name in a - * directory is MAXNAMLEN, plus a null byte. - * Note: this file is present only for backwards compatibility. It is superseded - * by the files /usr/include/dirent.h and /usr/include/sys/dirent.h. It will - * disappear in a future major release. - */ - -#ifndef _sys_dir_h -#define _sys_dir_h - -#define MAXNAMLEN 255 - -struct direct { - off_t d_off; /* offset of next disk directory 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 */ - char d_name[MAXNAMLEN + 1]; /* name (up to MAXNAMLEN + 1) */ -}; - -/* - * The macro DIRSIZ(dp) gives the minimum amount of space required to represent - * a directory entry. For any directory entry dp->d_reclen >= DIRSIZ(dp). - * Specific filesystem typesm may use this macro to construct the value - * for d_reclen. - */ -#undef DIRSIZ -#define DIRSIZ(dp) \ - (((sizeof (struct direct) - (MAXNAMLEN+1) + ((dp)->d_namlen+1)) + 3) & ~3) - -#ifndef KERNEL -#define d_ino d_fileno /* compatability */ - - -/* - * Definitions for library routines operating on directories. - */ - -typedef struct _dirdesc { - int dd_fd; /* file descriptor */ - long dd_loc; /* buf offset of entry from last readddir() */ - long dd_size; /* amount of valid data in buffer */ - long dd_bsize; /* amount of entries read at a time */ - long dd_off; /* Current offset in dir (for telldir) */ - char *dd_buf; /* directory data buffer */ -} DIR; - -#ifndef NULL -#define NULL 0 -#endif -extern DIR *opendir(); -extern struct direct *readdir(); -extern long telldir(); -extern void seekdir(); -#define rewinddir(dirp) seekdir((dirp), (long)0) -extern int closedir(); -#endif - -#endif /*!_sys_dir_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/dirent.h b/usr/src/lib/libbc/inc/include/sys/dirent.h deleted file mode 100644 index f4a154290a..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/dirent.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Filesystem-independent directory information. - * Directory entry structures are of variable length. - * Each directory entry is a struct dirent containing its file number, the - * offset of the next entry (a cookie interpretable only the filesystem - * type that generated it), the length of the entry, and the length of the - * name contained in the entry. These are followed by the name. The - * entire entry is padded with null bytes to a 4 byte boundary. All names - * are guaranteed null terminated. The maximum length of a name in a - * directory is MAXNAMLEN, plus a null byte. - */ - -#ifndef __sys_dirent_h -#define __sys_dirent_h - -struct dirent { - off_t d_off; /* offset of next disk dir entry */ - unsigned long d_fileno; /* file number of entry */ - unsigned short d_reclen; /* length of this record */ - unsigned short d_namlen; /* length of string in d_name */ - char d_name[255+1]; /* name (up to MAXNAMLEN + 1) */ -}; - -#ifndef _POSIX_SOURCE -/* - * It's unlikely to change, but make sure that sizeof d_name above is - * at least MAXNAMLEN + 1 (more may be added for padding). - */ -#define MAXNAMLEN 255 -/* - * The macro DIRSIZ(dp) gives the minimum amount of space required to represent - * a directory entry. For any directory entry dp->d_reclen >= DIRSIZ(dp). - * Specific filesystem types may use this macro to construct the value - * for d_reclen. - */ -#undef DIRSIZ -#define DIRSIZ(dp) \ - (((sizeof(struct dirent) - (MAXNAMLEN+1) + ((dp)->d_namlen+1)) +3) & ~3) - -#endif /* !_POSIX_SOURCE */ -#endif /* !__sys_dirent_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/errno.h b/usr/src/lib/libbc/inc/include/sys/errno.h deleted file mode 100644 index 5d45616601..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/errno.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1993 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * If error codes are added or changed here, they should be updated in - * /usr/src/lib/libc/gen/common/errlst.c as well. - */ - -/* - * Error codes - */ - -#ifndef _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 */ - -/* 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 */ -/* 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 */ -#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 */ - -/* should be rearranged */ -#define EHOSTDOWN 64 /* Host is down */ -#define EHOSTUNREACH 65 /* No route to host */ -#define ENOTEMPTY 66 /* Directory not empty */ - -/* quotas & mush */ -#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 */ -#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 */ - -/* SystemV IPC */ -#define EIDRM 77 /* Identifier removed */ - -/* SystemV Record Locking */ -#define EDEADLK 78 /* Deadlock condition. */ -#define ENOLCK 79 /* No record locks available. */ - -/* POSIX */ -#define ENOSYS 90 /* function not implemented */ - -#endif /*!_sys_errno_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/exec.h b/usr/src/lib/libbc/inc/include/sys/exec.h deleted file mode 100644 index bb0b450dd4..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/exec.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1985 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _sys_exec_h -#define _sys_exec_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * format of the exec header - * known by kernel and by user programs - */ -struct exec { - unsigned char a_dynamic:1; /* has a __DYNAMIC */ - unsigned char a_toolversion:7;/* version of toolset used to create this file */ - unsigned char a_machtype; /* machine type */ - unsigned short a_magic; /* magic number */ - unsigned long a_text; /* size of text segment */ - unsigned long a_data; /* size of initialized data */ - unsigned long a_bss; /* size of uninitialized data */ - unsigned long a_syms; /* size of symbol table */ - unsigned long a_entry; /* entry point */ - unsigned long a_trsize; /* size of text relocation */ - unsigned long a_drsize; /* size of data relocation */ -}; - -#define OMAGIC 0407 /* old impure format */ -#define NMAGIC 0410 /* read-only text */ -#define ZMAGIC 0413 /* demand load format */ - -/* machine types */ - -#define M_OLDSUN2 0 /* old sun-2 executable files */ -#define M_68010 1 /* runs on either 68010 or 68020 */ -#define M_68020 2 /* runs only on 68020 */ -#define M_SPARC 3 /* runs only on SPARC */ - -#define TV_SUN2_SUN3 0 -#define TV_SUN4 1 - -#endif /* !_sys_exec_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/fcntl.h b/usr/src/lib/libbc/inc/include/sys/fcntl.h deleted file mode 100644 index 9bdb987b35..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/fcntl.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* @(#)fcntl.h 1.6 88/02/08 SMI */ - -#ifndef _FCNTL_ -#define _FCNTL_ - -#include <sys/fcntlcom.h> - -#define O_NDELAY _FNDELAY /* Non-blocking I/O (4.2 style) */ - -#endif /* !_FCNTL_ */ diff --git a/usr/src/lib/libbc/inc/include/sys/fcntlcom.h b/usr/src/lib/libbc/inc/include/sys/fcntlcom.h deleted file mode 100644 index 8caf65e2a3..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/fcntlcom.h +++ /dev/null @@ -1,193 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2016 Gary Mills - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * 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 - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * 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 _FMARK 0x0010 /* internal; mark during gc() */ -#define _FDEFER 0x0020 /* internal; defer for next gc pass */ -#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 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 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_CNVT 12 /* Convert a fhandle to an open fd */ -#endif /* !_POSIX_SOURCE */ - -/* Needed by flock.c */ -#define F_FLOCKW F_SETLKW -#define F_FLOCK F_SETLK - -/* 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 */ - -/* needed for _syscall(SYS_openat, AT_FDCWD, ...) */ -#define AT_FDCWD 0xffd19553 -#define AT_SYMLINK_NOFOLLOW 0x1000 -#define AT_REMOVEDIR 0x1 - -#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 */ - -int open(/* char *path, int flags, mode_t modes */); -int creat(/* char *path, mode_t modes */); -int fcntl(/* int fd, cmd, ... */); -#endif /* !KERNEL */ - -#ifdef __cplusplus -} -#endif - -#endif /* __SYS_FCNTLCOM_H */ diff --git a/usr/src/lib/libbc/inc/include/sys/file.h b/usr/src/lib/libbc/inc/include/sys/file.h deleted file mode 100644 index 60105370d2..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/file.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2001 by Sun Microsystems, Inc. - * All rights reserved. - */ - -/* - * 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_FILE_H -#define __SYS_FILE_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <sys/types.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef KERNEL -/* - * Descriptor table entry. - * One for each kernel object. - */ -struct file { - int f_flag; /* see below */ - short f_type; /* descriptor type */ - short f_count; /* reference count */ - short f_msgcount; /* references from message queue */ - struct fileops { - int (*fo_rw)(); - int (*fo_ioctl)(); - int (*fo_select)(); - int (*fo_close)(); - } *f_ops; - caddr_t f_data; /* ptr to file specific struct (vnode/socket) */ - off_t f_offset; - struct ucred *f_cred; /* credentials of user who opened file */ -}; - -struct file *file, *fileNFILE; -int nfile; -struct file *getf(); -struct file *falloc(); -#endif /* KERNEL */ - -#include <sys/fcntlcom.h> - -/* - * bits to save after an open. The no delay bits mean "don't wait for - * carrier at open" in all cases. Sys5 & POSIX save the no delay bits, - * using them to also mean "don't block on reads"; BSD has you reset it - * with an fcntl() if you want the "don't block on reads" behavior. - */ -#define FMASK (FREAD|FWRITE|FAPPEND|FSYNC|FNBIO|FNONBIO) -#define FCNTLCANT (FREAD|FWRITE|FMARK|FDEFER|FSHLOCK|FEXLOCK) - -/* - * User definitions. - */ - -/* - * Flock call. - */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* don't block when locking */ -#define LOCK_UN 8 /* unlock */ - -/* - * Access call. Also maintained in unistd.h - */ -#define F_OK 0 /* does file exist */ -#define X_OK 1 /* is it executable by caller */ -#define W_OK 2 /* writable by caller */ -#define R_OK 4 /* readable by caller */ - -/* - * Lseek call. Also maintained in 5include/stdio.h and sys/unistd.h as SEEK_* - */ -#define L_SET 0 /* absolute offset */ -#define L_INCR 1 /* relative to current offset */ -#define L_XTND 2 /* relative to end of file */ - -#ifdef KERNEL -#define GETF(fp, fd) { \ - if ((fd) < 0 || (fd) > u.u_lastfile || \ - ((fp) = u.u_ofile[fd]) == NULL) { \ - u.u_error = EBADF; \ - return; \ - } \ -} - -#define DTYPE_VNODE 1 /* file */ -#define DTYPE_SOCKET 2 /* communications endpoint */ -#endif /* KERNEL */ - -#ifdef __cplusplus -} -#endif - -#endif /* __SYS_FILE_H */ diff --git a/usr/src/lib/libbc/inc/include/sys/filio.h b/usr/src/lib/libbc/inc/include/sys/filio.h deleted file mode 100644 index 4e87bf2494..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/filio.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * 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_filio_h -#define _sys_filio_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * General file ioctl definitions. - */ - -#include <sys/ioccom.h> - -#define FIOCLEX _IO('f', 1) /* set exclusive use on fd */ -#define FIONCLEX _IO('f', 2) /* remove exclusive use */ -/* another local */ -#define FIONREAD _IOR('f', 127, int) /* get # bytes to read */ -#define FIONBIO _IOW('f', 126, int) /* set/clear non-blocking i/o */ -#define FIOASYNC _IOW('f', 125, int) /* set/clear async i/o */ -#define FIOSETOWN _IOW('f', 124, int) /* set owner */ -#define FIOGETOWN _IOR('f', 123, int) /* get owner */ - -#endif /* !_sys_filio_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/ieeefp.h b/usr/src/lib/libbc/inc/include/sys/ieeefp.h deleted file mode 100644 index 1f7b26f7e8..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/ieeefp.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Copyright (c) 1987 by Sun Microsystems, Inc. - */ - -/* - * Definitions for constants and types for IEEE floating point. - */ - -#ifndef _sys_ieeefp_h -#define _sys_ieeefp_h - - -/* Sun TYPES for IEEE floating point. */ - -#ifdef sparc -enum fp_direction_type /* rounding direction */ - { - fp_nearest = 0, - fp_tozero = 1, - fp_positive = 2, - fp_negative = 3 - } ; -#endif -#ifdef i386 -enum fp_direction_type /* rounding direction */ - { - fp_nearest = 0, - fp_negative = 1, - fp_positive = 2, - fp_tozero = 3 - } ; -#endif -#ifdef mc68000 -enum fp_direction_type /* rounding direction */ - { - fp_nearest = 0, - fp_tozero = 1, - fp_negative = 2, - fp_positive = 3 - } ; -#endif - -#ifdef i386 -enum fp_precision_type /* extended rounding precision */ - { - fp_single = 0, - fp_precision_3 = 1, - fp_double = 2, - fp_extended = 3 - } ; -#else -enum fp_precision_type /* extended rounding precision */ - { - fp_extended = 0, - fp_single = 1, - fp_double = 2, - fp_precision_3 = 3 - } ; -#endif - -#ifdef i386 -enum fp_exception_type /* exceptions according to bit number */ - { - fp_invalid = 0, - fp_denormalized = 1, - fp_division = 2, - fp_overflow = 3, - fp_underflow = 4, - fp_inexact = 5 - } ; -#else -enum fp_exception_type /* exceptions according to bit number */ - { - fp_inexact = 0, - fp_division = 1, - fp_underflow = 2, - fp_overflow = 3, - fp_invalid = 4 - } ; -#endif - -enum fp_class_type /* floating-point classes */ - { - fp_zero = 0, - fp_subnormal = 1, - fp_normal = 2, - fp_infinity = 3, - fp_quiet = 4, - fp_signaling = 5 - } ; - -#endif /*!_sys_ieeefp_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/ioccom.h b/usr/src/lib/libbc/inc/include/sys/ioccom.h deleted file mode 100644 index 0d7029ae4b..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/ioccom.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * 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_ioccom_h -#define __sys_ioccom_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Ioctl's 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 255 bytes. - */ -#define _IOCPARM_MASK 0xff /* parameters must be < 256 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 ioctl's from old */ -#define _IO(x,y) (_IOC_VOID|(x<<8)|y) -#define _IOR(x,y,t) (_IOC_OUT|((sizeof(t)&_IOCPARM_MASK)<<16)|(x<<8)|y) -#define _IORN(x,y,t) (_IOC_OUT|(((t)&_IOCPARM_MASK)<<16)|(x<<8)|y) -#define _IOW(x,y,t) (_IOC_IN|((sizeof(t)&_IOCPARM_MASK)<<16)|(x<<8)|y) -#define _IOWN(x,y,t) (_IOC_IN|(((t)&_IOCPARM_MASK)<<16)|(x<<8)|y) -/* this should be _IORW, but stdio got there first */ -#define _IOWR(x,y,t) (_IOC_INOUT|((sizeof(t)&_IOCPARM_MASK)<<16)|(x<<8)|y) -#define _IOWRN(x,y,t) (_IOC_INOUT|(((t)&_IOCPARM_MASK)<<16)|(x<<8)|y) - -/* - * Registry of ioctl characters, culled from system sources - * - * char file where defined notes - * ---- ------------------ ----- - * F sun/fbio.h - * G sun/gpio.h - * H vaxif/if_hy.h - * M sundev/mcpcmd.h *overlap* - * M sys/modem.h *overlap* - * S sys/stropts.h - * T sys/termio.h -no overlap- - * T sys/termios.h -no overlap- - * V sundev/mdreg.h - * a vaxuba/adreg.h - * d sun/dkio.h -no overlap with sys/des.h- - * d sys/des.h (possible overlap) - * d vax/dkio.h (possible overlap) - * d vaxuba/rxreg.h (possible overlap) - * f sys/filio.h - * g sunwindow/win_ioctl.h -no overlap- - * g sunwindowdev/winioctl.c !no manifest constant! -no overlap- - * h sundev/hrc_common.h - * i sys/sockio.h *overlap* - * i vaxuba/ikreg.h *overlap* - * k sundev/kbio.h - * m sundev/msio.h (possible overlap) - * m sundev/msreg.h (possible overlap) - * m sys/mtio.h (possible overlap) - * n sun/ndio.h - * p net/nit_buf.h (possible overlap) - * p net/nit_if.h (possible overlap) - * p net/nit_pf.h (possible overlap) - * p sundev/fpareg.h (possible overlap) - * p sys/sockio.h (possible overlap) - * p vaxuba/psreg.h (possible overlap) - * q sun/sqz.h - * r sys/sockio.h - * s sys/sockio.h - * t sys/ttold.h (possible overlap) - * t sys/ttycom.h (possible overlap) - * v sundev/vuid_event.h *overlap* - * v sys/vcmd.h *overlap* - * - * End of Registry - */ - -#endif /* !__sys_ioccom_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/ioctl.h b/usr/src/lib/libbc/inc/include/sys/ioctl.h deleted file mode 100644 index 1920418ae5..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/ioctl.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 1987 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * 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. - */ - -/* - * Ioctl definitions - */ - -#ifndef _sys_ioctl_h -#define _sys_ioctl_h - -#include <sys/ttychars.h> -#include <sys/ttydev.h> -#include <sys/ttold.h> - -#define TANDEM O_TANDEM -#define CBREAK O_CBREAK -#define LCASE O_LCASE -#define ECHO O_ECHO -#define CRMOD O_CRMOD -#define RAW O_RAW -#define ODDP O_ODDP -#define EVENP O_EVENP -#define ANYP O_ANYP -#define NLDELAY O_NLDELAY -#define NL0 O_NL0 -#define NL1 O_NL1 -#define NL2 O_NL2 -#define NL3 O_NL3 -#define TBDELAY O_TBDELAY -#define TAB0 O_TAB0 -#define TAB1 O_TAB1 -#define TAB2 O_TAB2 -#define XTABS O_XTABS -#define CRDELAY O_CRDELAY -#define CR0 O_CR0 -#define CR1 O_CR1 -#define CR2 O_CR2 -#define CR3 O_CR3 -#define VTDELAY O_VTDELAY -#define FF0 O_FF0 -#define FF1 O_FF1 -#define BSDELAY O_BSDELAY -#define BS0 O_BS0 -#define BS1 O_BS1 -#define ALLDELAY O_ALLDELAY -#define CRTBS O_CRTBS -#define PRTERA O_PRTERA -#define CRTERA O_CRTERA -#define TILDE O_TILDE -#define MDMBUF O_MDMBUF -#define LITOUT O_LITOUT -#define TOSTOP O_TOSTOP -#define FLUSHO O_FLUSHO -#define NOHANG O_NOHANG -#define L001000 O_L001000 -#define CRTKIL O_CRTKIL -#define PASS8 O_PASS8 -#define CTLECH O_CTLECH -#define PENDIN O_PENDIN -#define DECCTQ O_DECCTQ -#define NOFLSH O_NOFLSH - -#include <sys/filio.h> - -#include <sys/sockio.h> - -#endif /*!_sys_ioctl_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/ipc.h b/usr/src/lib/libbc/inc/include/sys/ipc.h deleted file mode 100644 index e0d545b10f..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/ipc.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* Common IPC Access Structure */ - -#ifndef _sys_ipc_h -#define _sys_ipc_h - -struct ipc_perm { - ushort uid; /* owner's user id */ - ushort gid; /* owner's group id */ - ushort cuid; /* creator's user id */ - ushort cgid; /* creator's group id */ - ushort mode; /* access modes */ - ushort seq; /* slot usage sequence number */ - key_t key; /* key */ -}; - -/* Common IPC Definitions. */ -/* Mode bits. */ -#define IPC_ALLOC 0100000 /* entry currently allocated */ -#define IPC_CREAT 0001000 /* create entry if key doesn't exist */ -#define IPC_EXCL 0002000 /* fail if key exists */ -#define IPC_NOWAIT 0004000 /* error if request must wait */ - -/* Keys. */ -#define IPC_PRIVATE (key_t)0 /* private key */ - -/* Control Commands. */ -#define IPC_RMID 0 /* remove identifier */ -#define IPC_SET 1 /* set options */ -#define IPC_STAT 2 /* get options */ - -#endif /*!_sys_ipc_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/label.h b/usr/src/lib/libbc/inc/include/sys/label.h deleted file mode 100644 index c89f157b3d..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/label.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1987 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * label - the security label structure - */ - -#ifndef _sys_label_h -#define _sys_label_h - -struct binary_label { - short sl_level; - char sl_categories[16]; - char sl_unused[14]; -}; - -typedef struct binary_label blabel_t; - -#endif /*!_sys_label_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/lock.h b/usr/src/lib/libbc/inc/include/sys/lock.h deleted file mode 100644 index 980761a50c..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/lock.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * flags for locking procs and texts - */ - -#ifndef _sys_lock_h -#define _sys_lock_h - -#define UNLOCK 0 -#define PROCLOCK 1 -#define TXTLOCK 2 -#define DATLOCK 4 - -#endif /*!_sys_lock_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/mman.h b/usr/src/lib/libbc/inc/include/sys/mman.h deleted file mode 100644 index b8bdd27db1..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/mman.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _sys_mman_h -#define _sys_mman_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Protections are chosen from these bits, or-ed together. - * Note - not all implementations literally provide all possible - * combinations. PROT_WRITE is often implemented as (PROT_READ | - * PROT_WRITE) and (PROT_EXECUTE as PROT_READ | PROT_EXECUTE). - * However, no implementation will permit a write to succeed - * where PROT_WRITE has not been set. Also, no implementation will - * allow any access to succeed where prot is specified as PROT_NONE. - */ -#define PROT_READ 0x1 /* pages can be read */ -#define PROT_WRITE 0x2 /* pages can be written */ -#define PROT_EXEC 0x4 /* pages can be executed */ - -#define PROT_NONE 0x0 /* pages cannot be accessed */ - -/* sharing types: must choose either SHARED or PRIVATE */ -#define MAP_SHARED 1 /* share changes */ -#define MAP_PRIVATE 2 /* changes are private */ -#define MAP_TYPE 0xf /* mask for share type */ - -/* other flags to mmap (or-ed in to MAP_SHARED or MAP_PRIVATE) */ -#define MAP_FIXED 0x10 /* user assigns address */ - -/* these flags not yet implemented */ -#define MAP_RENAME 0x20 /* rename private pages to file */ -#define MAP_NORESERVE 0x40 /* don't reserve needed swap area */ - -/* - * For the sake of backward object compatibility, we use the _MAP_NEW flag. - * This flag will be automatically or'ed in by the C library for all - * new mmap calls. Previous binaries with old mmap calls with continue - * to get 0 or -1 for return values. New mmap calls will get the mapped - * address as the return value if successful and -1 on errors. By default, - * new mmap calls automatically have the kernel assign the map address - * unless the MAP_FIXED flag is given. - */ -#define _MAP_NEW 0x80000000 /* user's should not need to use this */ - -#if !defined(LOCORE) && !defined(KERNEL) -#include <sys/types.h> - -/* - * Except for old binaries mmap() will return the resultant - * address of mapping on success and (caddr_t)-1 on error. - */ -extern caddr_t mmap(); -#endif /* !LOCORE && !KERNEL */ - -/* advice to madvise */ -#define MADV_NORMAL 0 /* no further special treatment */ -#define MADV_RANDOM 1 /* expect random page references */ -#define MADV_SEQUENTIAL 2 /* expect sequential page references */ -#define MADV_WILLNEED 3 /* will need these pages */ -#define MADV_DONTNEED 4 /* don't need these pages */ - -/* flags to msync */ -#define MS_ASYNC 0x1 /* return immediately */ -#define MS_INVALIDATE 0x2 /* invalidate caches */ - -/* functions to mctl */ -#define MC_SYNC 1 /* sync with backing store */ -#define MC_LOCK 2 /* lock pages in memory */ -#define MC_UNLOCK 3 /* unlock pages from memory */ -#define MC_ADVISE 4 /* give advice to management */ -#define MC_LOCKAS 5 /* lock address space in memory */ -#define MC_UNLOCKAS 6 /* unlock address space from memory */ - -/* flags to mlockall */ -#define MCL_CURRENT 0x1 /* lock current mappings */ -#define MCL_FUTURE 0x2 /* lock future mappings */ - -#endif /* !_sys_mman_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/mount.h b/usr/src/lib/libbc/inc/include/sys/mount.h deleted file mode 100644 index 5a087d4c80..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/mount.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1993 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _sys_mount_h -#define _sys_mount_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * mount options - */ - -#define M_RDONLY 0x01 /* mount fs read only */ -#define M_NOSUID 0x02 /* mount fs with setuid not allowed */ -#define M_NEWTYPE 0x04 /* use type string instead of int */ -#define M_GRPID 0x08 /* Old BSD group-id on create */ -#define M_REMOUNT 0x10 /* change options on an existing mount */ -#define M_NOSUB 0x20 /* Disallow mounts beneath this mount */ -#define M_MULTI 0x40 /* Do multi-component lookup on files */ -#define M_SYS5 0x80 /* Mount with Sys 5-specific semantics */ - -struct ufs_args { - char *fspec; -}; - - -#define _PC_LAST 9 /* highest value of any _PC_ */ -#define _BITS (8 * sizeof(short)) -#define _PC_N ((_PC_LAST + _BITS - 1) / _BITS) -#define _PC_ISSET(n, a) (a[(n) / _BITS] & (1 << ((n) % _BITS))) -#define _PC_SET(n, a) (a[(n) / _BITS] |= (1 << ((n) % _BITS))) -#define _PC_ERROR 0 - -struct pathcnf { - /* - * pathconf() information - */ - int pc_link_max; /* max links allowed */ - short pc_max_canon; /* max line len for a tty */ - short pc_max_input; /* input a tty can eat all once */ - short pc_name_max; /* max file name length (dir entry) */ - short pc_path_max; /* path name len (/x/y/z/...) */ - short pc_pipe_buf; /* size of a pipe (bytes) */ - cc_t pc_vdisable; /* safe char to turn off c_cc[i] */ - char pc_xxx; /* alignment padding; cc_t == char */ - short pc_mask[_PC_N]; /* see below */ -}; - - -struct nfs_args { - struct sockaddr_in *addr; /* file server address */ - caddr_t fh; /* File handle to be mounted */ - int flags; /* flags */ - int wsize; /* write size in bytes */ - int rsize; /* read size in bytes */ - int timeo; /* initial timeout in .1 secs */ - int retrans; /* times to retry send */ - char *hostname; /* server's hostname */ - int acregmin; /* attr cache file min secs */ - int acregmax; /* attr cache file max secs */ - int acdirmin; /* attr cache dir min secs */ - int acdirmax; /* attr cache dir max secs */ - char *netname; /* server's netname */ - struct pathcnf *pathconf; /* static pathconf kludge */ -}; - -/* - * NFS mount option flags - */ -#define NFSMNT_SOFT 0x001 /* soft mount (hard is default) */ -#define NFSMNT_WSIZE 0x002 /* set write size */ -#define NFSMNT_RSIZE 0x004 /* set read size */ -#define NFSMNT_TIMEO 0x008 /* set initial timeout */ -#define NFSMNT_RETRANS 0x010 /* set number of request retrys */ -#define NFSMNT_HOSTNAME 0x020 /* set hostname for error printf */ -#define NFSMNT_INT 0x040 /* allow interrupts on hard mount */ -#define NFSMNT_NOAC 0x080 /* don't cache attributes */ -#define NFSMNT_ACREGMIN 0x0100 /* set min secs for file attr cache */ -#define NFSMNT_ACREGMAX 0x0200 /* set max secs for file attr cache */ -#define NFSMNT_ACDIRMIN 0x0400 /* set min secs for dir attr cache */ -#define NFSMNT_ACDIRMAX 0x0800 /* set max secs for dir attr cache */ -#define NFSMNT_SECURE 0x1000 /* secure mount */ -#define NFSMNT_NOCTO 0x2000 /* no close-to-open consistency */ -#define NFSMNT_POSIX 0x4000 /* static pathconf kludge info */ - -#endif /* !_sys_mount_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/msg.h b/usr/src/lib/libbc/inc/include/sys/msg.h deleted file mode 100644 index e5f73a2686..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/msg.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1987 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#ifndef _sys_msg_h -#define _sys_msg_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * IPC Message Facility. - */ - -/* - * Message Operation Flags. - */ -#define MSG_NOERROR 010000 /* no error if big message */ - -/* - * Structure Definitions. - */ - -/* - * There is one msg queue id data structure for each q in the system. - */ - -struct msqid_ds { - struct ipc_perm msg_perm; /* operation permission struct */ - struct msg *msg_first; /* ptr to first message on q */ - struct msg *msg_last; /* ptr to last message on q */ - ushort msg_cbytes; /* current # bytes on q */ - ushort msg_qnum; /* # of messages on q */ - ushort msg_qbytes; /* max # of bytes on q */ - ushort msg_lspid; /* pid of last msgsnd */ - ushort msg_lrpid; /* pid of last msgrcv */ - time_t msg_stime; /* last msgsnd time */ - time_t msg_rtime; /* last msgrcv time */ - time_t msg_ctime; /* last change time */ -}; - -/* - * User message buffer template for msgsnd and msgrcv system calls. - */ - -/* HACK :: change the name when compiling the kernel to avoid conflicts */ -struct msgbuf { - long mtype; /* message type */ - char mtext[1]; /* message text */ -}; - -/* - * There is one msg structure for each message that may be in the system. - */ - -struct msg { - struct msg *msg_next; /* ptr to next message on q */ - long msg_type; /* message type */ - ushort msg_ts; /* message text size */ - ushort msg_spot; /* message text map address */ -}; - -#endif /* !_sys_msg_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/msio.h b/usr/src/lib/libbc/inc/include/sys/msio.h deleted file mode 100644 index 2fdc4a1795..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/msio.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _sundev_msio_h -#define _sundev_msio_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Mouse related ioctls - */ -#include <sys/ioccom.h> - -typedef struct { - int jitter_thresh; - int speed_law; - int speed_limit; -} Ms_parms; - -#define MSIOGETPARMS _IOR('m', 2, Ms_parms) /* get / set jitter, speed */ -#define MSIOSETPARMS _IOW('m', 3, Ms_parms) /* law, or speed limit */ - -#endif /* !_sundev_msio_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/param.h b/usr/src/lib/libbc/inc/include/sys/param.h deleted file mode 100644 index 4ac91fcb79..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/param.h +++ /dev/null @@ -1,207 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef __sys_param_h -#define __sys_param_h - -/* - * Machine type dependent parameters. - */ -#include <machine/param.h> - -#define NPTEPG (NBPG/(sizeof (struct pte))) - -/* - * Machine-independent constants - */ -#define NMOUNT 40 /* est. of # mountable fs for quota calc */ -#define MSWAPX 15 /* pseudo mount table index for swapdev */ -#define MAXUPRC 25 /* max processes per user */ -#define NOFILE 256 /* max open files per process */ -#define MAXPID 30000 /* max process id */ -#define MAXUID 0xfffd /* max user id (from 60000) */ -#define MAXLINK 32767 /* max links */ -#define CANBSIZ 256 /* max size of typewriter line */ -#define VDISABLE 0 /* use this to turn off c_cc[i] */ -#define PIPE_BUF 4096 /* pipe buffer size */ -#ifndef KERNEL -/* - * HZ defines the ticks/second for system calls, eg, times(), which - * return values just in ticks; but not for getrusage(), which returns - * values in ticks*pages. HZ *must* be 60 for compatibility reasons. - */ -#define HZ 60 -#endif -#define NCARGS 0x100000 /* (absolute) max # characters in exec arglist */ -/* If NGROUPS changes, change <sys/limits.h> NGROUPS_MAX at the same time. */ -#define NGROUPS 16 /* max number groups */ - -#define NOGROUP -1 /* marker for empty group set member */ - -#ifdef KERNEL -/* - * Priorities - */ -#define PMASK 0177 -#define PCATCH 0400 /* return if sleep interrupted, don't longjmp */ -#define PSWP 0 -#define PINOD 10 -#define PAMAP 10 -#define PRIBIO 20 -#define PRIUBA 24 -#define PZERO 25 -#define PPIPE 26 -#define PVFS 27 -#define PWAIT 30 -#define PLOCK 35 -#define PSLEP 40 - -#ifdef VPIX -#define PV86 41 -#endif - -#define PFLCK 42 /* File/Record lock */ - -#define PUSER 50 - -#define NZERO 20 -#endif /* KERNEL */ - -/* - * Signals - */ -#include <sys/signal.h> - -#define ISSIG(p, flag) \ - ((p)->p_sig && ((p)->p_flag&STRC || \ - ((p)->p_sig &~ ((p)->p_sigignore | (p)->p_sigmask))) && issig(flag)) - -#define NBPW sizeof (int) /* number of bytes in an integer */ - -#ifndef NULL -#define NULL 0 -#endif -#define CMASK 0 /* default mask for file creation */ -#define NODEV (dev_t)(-1) - -#ifndef INTRLVE -/* macros replacing interleaving functions */ -#define dkblock(bp) ((bp)->b_blkno) -#define dkunit(bp) (minor((bp)->b_dev) >> 3) -#endif - -#define CBSIZE 28 /* number of chars in a clist block */ -#define CROUND 0x1F /* clist rounding; sizeof (int *) + CBSIZE-1 */ - -#if !defined(LOCORE) || !defined(KERNEL) -#include <sys/types.h> -#endif - -/* - * File system parameters and macros. - * - * The file system is made out of blocks of at most MAXBSIZE units, - * with smaller units (fragments) only in the last direct block. - * MAXBSIZE primarily determines the size of buffers in the buffer - * pool. It may be made larger without any effect on existing - * file systems; however making it smaller make make some file - * systems unmountable. - * - * Note that the blocked devices are assumed to have DEV_BSIZE - * "sectors" and that fragments must be some multiple of this size. - */ -#define MAXBSIZE 8192 -#define DEV_BSIZE 512 -#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ -#define MAXFRAG 8 - -#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \ - ((unsigned)(bytes) >> DEV_BSHIFT) -#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \ - ((unsigned)(db) << DEV_BSHIFT) - -/* - * Map a ``block device block'' to a file system block. - * XXX - this is currently only being used for tape drives. - */ -#define BLKDEV_IOSIZE 2048 -#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE)) - -/* - * MAXPATHLEN defines the longest permissable path length, - * including the terminating null, after expanding symbolic links. - * MAXSYMLINKS defines the maximum number of symbolic links - * that may be expanded in a path name. It should be set high - * enough to allow all legitimate uses, but halt infinite loops - * reasonably quickly. - */ -#define MAXPATHLEN 1024 -#define MAXSYMLINKS 20 - -/* - * bit map related macros - */ -#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) -#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) -#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) -#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) - -/* - * Macros for fast min/max. - */ -#ifndef MIN -#define MIN(a,b) (((a)<(b))?(a):(b)) -#endif -#ifndef MAX -#define MAX(a,b) (((a)>(b))?(a):(b)) -#endif - -/* - * Macros for counting and rounding. - */ -#ifdef sun386 -#define howmany(x, y) ((((u_int)(x))+(((u_int)(y))-1))/((u_int)(y))) -#define roundup(x, y) ((((u_int)(x)+((u_int)(y)-1))/(u_int)(y))*(u_int)(y)) -#else -#define howmany(x, y) (((x)+((y)-1))/(y)) -#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) -#endif - -/* - * Scale factor for scaled integers used to count - * %cpu time and load averages. - */ -#define FSHIFT 8 /* bits to right of fixed binary point */ -#define FSCALE (1<<FSHIFT) - -/* - * Maximum size of hostname recognized and stored in the kernel. - */ -#define MAXHOSTNAMELEN 64 - -#endif /* !__sys_param_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/resource.h b/usr/src/lib/libbc/inc/include/sys/resource.h deleted file mode 100644 index 33faf90733..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/resource.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef _sys_resource_h -#define _sys_resource_h - -/* - * Process priority specifications to get/setpriority. - */ -#define PRIO_MIN -20 -#define PRIO_MAX 20 - -#define PRIO_PROCESS 0 -#define PRIO_PGRP 1 -#define PRIO_USER 2 - -/* - * Resource utilization information. - */ - -#define RUSAGE_SELF 0 -#define RUSAGE_CHILDREN -1 - -struct rusage { - struct timeval ru_utime; /* user time used */ - struct timeval ru_stime; /* system time used */ - long ru_maxrss; -#define ru_first ru_ixrss - long ru_ixrss; /* XXX: 0 */ - long ru_idrss; /* XXX: sum of rm_asrss */ - long ru_isrss; /* XXX: 0 */ - long ru_minflt; /* any page faults not requiring I/O */ - long ru_majflt; /* any page faults requiring I/O */ - long ru_nswap; /* swaps */ - long ru_inblock; /* block input operations */ - long ru_oublock; /* block output operations */ - long ru_msgsnd; /* messages sent */ - long ru_msgrcv; /* messages received */ - long ru_nsignals; /* signals received */ - long ru_nvcsw; /* voluntary context switches */ - long ru_nivcsw; /* involuntary " */ -#define ru_last ru_nivcsw -}; - -/* - * Resource limits - */ -#define RLIMIT_CPU 0 /* cpu time in milliseconds */ -#define RLIMIT_FSIZE 1 /* maximum file size */ -#define RLIMIT_DATA 2 /* data size */ -#define RLIMIT_STACK 3 /* stack size */ -#define RLIMIT_CORE 4 /* core file size */ -#define RLIMIT_RSS 5 /* resident set size */ -#define RLIMIT_NOFILE 6 /* maximum descriptor index + 1 */ - -#define RLIM_NLIMITS 7 /* number of resource limits */ - -#define RLIM_INFINITY 0x7fffffff - -struct rlimit { - int rlim_cur; /* current (soft) limit */ - int rlim_max; /* maximum value for rlim_cur */ -}; - -#endif /*!_sys_resource_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/sem.h b/usr/src/lib/libbc/inc/include/sys/sem.h deleted file mode 100644 index be304cc724..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/sem.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1986 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#ifndef _sys_sem_h -#define _sys_sem_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * IPC Semaphore Facility. - */ - -/* - * Semaphore Operation Flags. - */ -#define SEM_UNDO 010000 /* set up adjust on exit entry */ - -/* - * Semctl Command Definitions. - */ - -#define GETNCNT 3 /* get semncnt */ -#define GETPID 4 /* get sempid */ -#define GETVAL 5 /* get semval */ -#define GETALL 6 /* get all semval's */ -#define GETZCNT 7 /* get semzcnt */ -#define SETVAL 8 /* set semval */ -#define SETALL 9 /* set all semval's */ - -/* - * Structure Definitions. - */ - -/* - * There is one semaphore id data structure for each set of semaphores - * in the system. - */ - -struct semid_ds { - struct ipc_perm sem_perm; /* operation permission struct */ - struct sem *sem_base; /* ptr to first semaphore in set */ - ushort sem_nsems; /* # of semaphores in set */ - time_t sem_otime; /* last semop time */ - time_t sem_ctime; /* last change time */ -}; - -/* - * There is one semaphore structure for each semaphore in the system. - */ - -struct sem { - ushort semval; /* semaphore text map address */ - short sempid; /* pid of last operation */ - ushort semncnt; /* # awaiting semval > cval */ - ushort semzcnt; /* # awaiting semval = 0 */ -}; - -/* - * User semaphore template for semop system calls. - */ - -struct sembuf { - short sem_num; /* semaphore # */ - short sem_op; /* semaphore operation */ - short sem_flg; /* operation flags */ -}; - -/* - * 'arg' argument template for semctl system calls. - */ -union semun { - int val; /* value for SETVAL */ - struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ - ushort *array; /* array for GETALL & SETALL */ -}; - -#endif /* !_sys_sem_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/setjmp.h b/usr/src/lib/libbc/inc/include/sys/setjmp.h deleted file mode 100644 index 1954bdd08c..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/setjmp.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* from UCB 4.1 83/05/03 */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef __sparc_setjmp_h -#define __sparc_setjmp_h - -/* - * onsstack,sigmask,sp,pc,npc,psr,g1,o0,wbcnt (sigcontext). - * All else recovered by under/over(flow) handling. - */ -#define _JBLEN 9 - -typedef int jmp_buf[_JBLEN]; - -/* - * One extra word for the "signal mask saved here" flag. - */ -typedef int sigjmp_buf[_JBLEN+1]; - -int setjmp(/* jmp_buf env */); -int _setjmp(/* jmp_buf env */); -int sigsetjmp(/* sigjmp_buf env, int savemask */); -void longjmp(/* jmp_buf env, int val */); -void _longjmp(/* jmp_buf env, int val */); -void siglongjmp(/* sigjmp_buf env, int val */); - -/* - * Routines that call setjmp have strange control flow graphs, - * since a call to a routine that calls resume/longjmp will eventually - * return at the setjmp site, not the original call site. This - * utterly wrecks control flow analysis. - */ -#pragma unknown_control_flow(sigsetjmp, setjmp, _setjmp) - -#endif /* !__sparc_setjmp_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/shm.h b/usr/src/lib/libbc/inc/include/sys/shm.h deleted file mode 100644 index bf3bf80eac..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/shm.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#ifndef _sys_shm_h -#define _sys_shm_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * IPC Shared Memory Facility. - */ - -#include <sys/param.h> -/* #include <machine/mmu.h> */ - -/* - * Shared Memory Operation Flags. - */ - -#define SHM_RDONLY 010000 /* attach read-only (else read-write) */ -#define SHM_RND 020000 /* round attach address to SHMLBA */ - -/* - * Shmctl Command Definitions. - */ - -#define SHM_LOCK 3 /* Lock segment in core */ -#define SHM_UNLOCK 4 /* Unlock segment */ - -/* - * Implementation Constants. - */ -#define SHMLBA PAGESIZE /* segment low boundary address multiple */ - /* (SHMLBA must be a power of 2) */ - -/* - * Structure Definitions. - */ - -/* - * There is a shared mem id data structure for each segment in the system. - */ - -struct shmid_ds { - struct ipc_perm shm_perm; /* operation permission struct */ - uint shm_segsz; /* size of segment in bytes */ - ushort shm_lpid; /* pid of last shmop */ - ushort shm_cpid; /* pid of creator */ - ushort shm_nattch; /* number of current attaches */ - time_t shm_atime; /* last shmat time */ - time_t shm_dtime; /* last shmdt time */ - time_t shm_ctime; /* last change time */ - struct anon_map *shm_amp; /* segment anon_map pointer */ -}; - -#endif /* !_sys_shm_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/signal.h b/usr/src/lib/libbc/inc/include/sys/signal.h deleted file mode 100644 index 586222b541..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/signal.h +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Copyright (c) 1982 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#ifndef __sys_signal_h -#define __sys_signal_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <vm/faultcode.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 ILL_STACK 0x00 /* bad stack */ -#define ILL_ILLINSTR_FAULT 0x02 /* illegal instruction fault */ -#define ILL_PRIVINSTR_FAULT 0x03 /* privileged instruction fault */ -/* codes from 0x80 to 0xff are software traps */ -#define ILL_TRAP_FAULT(n) ((n)+0x80) /* trap n fault */ - -#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 EMT_TAG 0x0a /* tag overflow */ - -#define SIGFPE 8 /* floating point exception */ - -#define FPE_INTOVF_TRAP 0x1 /* integer overflow */ -#define FPE_STARTSIG_TRAP 0x2 /* process using fp */ -#define FPE_INTDIV_TRAP 0x14 /* integer divide by zero */ -#define FPE_FLTINEX_TRAP 0xc4 /* [floating inexact result] */ -#define FPE_FLTDIV_TRAP 0xc8 /* [floating divide by zero] */ -#define FPE_FLTUND_TRAP 0xcc /* [floating underflow] */ -#define FPE_FLTOPERR_TRAP 0xd0 /* [floating operand error] */ -#define FPE_FLTOVF_TRAP 0xd4 /* [floating overflow] */ - -#define SIGKILL 9 /* kill (cannot be caught or ignored) */ -/* - * The codes for SIGBUS and SIGSEGV are described in <vm/faultcode.h> - */ -#define SIGBUS 10 /* bus error */ -#define BUS_HWERR FC_HWERR /* misc hardware error (e.g. timeout) */ -#define BUS_ALIGN FC_ALIGN /* hardware alignment error */ -#define BUS_OBJERR FC_OBJERR /* object returned errno value */ -/* - * The BUS_CODE(code) will be one of the above. In the BUS_OBJERR case, - * doing a BUS_ERRNO(code) gives an errno value reported by the underlying - * file object mapped at the fault address. Note that this appears to be - * duplicated with the segmentation fault case below -- unfortunate, since - * the specification has always claimed that such errors produce SIGBUS. - * The segmentation cases are left defined as a transition aid. - */ -#define BUS_CODE(C) FC_CODE(C) -#define BUS_ERRNO(C) FC_ERRNO(C) -#define SIGSEGV 11 /* segmentation violation */ -#define SEGV_NOMAP FC_NOMAP /* no mapping at the fault address */ -#define SEGV_PROT FC_PROT /* access exceeded protections */ -#define SEGV_OBJERR FC_OBJERR /* object returned errno value */ -/* - * The SEGV_CODE(code) will be SEGV_NOMAP, SEGV_PROT, or SEGV_OBJERR. - * In the SEGV_OBJERR case, doing a SEGV_ERRNO(code) gives an errno value - * reported by the underlying file object mapped at the fault address. - */ -#define SEGV_CODE(C) FC_CODE(C) -#define SEGV_ERRNO(C) FC_ERRNO(C) -#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<OSTOP) */ -#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 */ -/* - * If addr cannot be computed it is set to SIG_NOADDR. - */ -#define SIG_NOADDR ((char *)~0) - -#if !defined(KERNEL) && !defined(LOCORE) -void (*signal())(); -/* - * Define BSD 4.1 reliable signals for SVID compatibility. - * These functions may go away in a future release. - */ -void (*sigset())(); -int sighold(); -int sigrelse(); -int sigignore(); -#endif /* !KERNEL && !LOCORE */ - -#ifndef LOCORE -/* - * Signal vector "template" used in sigvec call. - */ -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! */ - -/* - * Structure used in sigstack call. - */ -struct sigstack { - char *ss_sp; /* signal stack pointer */ - int ss_onstack; /* current status */ -}; - -/* - * Information pushed on stack when a signal is delivered. - * This is used by the kernel to restore state following - * execution of the signal handler. It is also made available - * to the handler to allow it to properly restore state if - * a non-standard exit is performed. - */ -struct sigcontext { - int sc_onstack; /* sigstack state to restore */ - int sc_mask; /* signal mask to restore */ -#define SPARC_MAXREGWINDOW 31 /* max usable windows in sparc */ - int sc_sp; /* sp to restore */ - int sc_pc; /* pc to retore */ - int sc_npc; /* next pc to restore */ - int sc_psr; /* psr to restore */ - int sc_g1; /* register that must be restored */ - int sc_o0; - int sc_wbcnt; /* number of outstanding windows */ - char *sc_spbuf[SPARC_MAXREGWINDOW]; /* sp's for each wbuf */ - int sc_wbuf[SPARC_MAXREGWINDOW][16]; /* window save buf */ -}; -#endif /* !LOCORE */ - -#define BADSIG (void (*)())-1 - -/* - * 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 - -#define SIG_HOLD (void (*)())3 - -/* - * Macro for converting signal number to a mask suitable for sigblock(). - */ -#define sigmask(m) (1 << ((m)-1)) -/* - * signals that can't caught, blocked, or ignored - */ - -/* - * 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 !defined(LOCORE) && !defined(KERNEL) - -/* - * 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; -}; - -/* - * If changes are made to the function prototypes, the same changes - * must be made in /usr/include/signal.h as well. - */ -void (*signal())(); -int kill(/* pid_t p, int sig */); -int sigaction(/* int signo, - struct sigaction *act, struct sigaction *oldact */); -int sigaddset(/* sigset_t *mask, int signo */); -int sigdelset(/* sigset_t *mask, int signo */); -int sigemptyset(/* sigset_t *mask */); -int sigfillset(/* sigset_t *mask */); -int sigismember(/* sigset_t *mask, int signo */); -int sigpending(/* sigset_t *set */); -int sigprocmask(/* int how, sigset_t *set, *oldset */); -int sigsuspend(/* sigset_t *mask */); - -#endif /* !LOCORE && !KERNEL */ -#endif /* !__sys_signal_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/socket.h b/usr/src/lib/libbc/inc/include/sys/socket.h deleted file mode 100644 index 6607721e62..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/socket.h +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Copyright (c) 1982, 1985, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#ifndef _sys_socket_h -#define _sys_socket_h - -/* - * 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 */ -/* - * N.B.: The following definition is present only for compatibility - * with release 3.0. It will disappear in later releases. - */ -#define SO_DONTLINGER (~SO_LINGER) /* ~SO_LINGER */ - -/* - * 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 */ - -/* - * 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 */ - -/* - * 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_NBS 7 /* nbs protocols */ -#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_NIT 17 /* Network Interface Tap */ -#define AF_802 18 /* IEEE 802.2, also ISO 8802 */ -#define AF_OSI 19 /* umbrella for all families used - * by OSI (e.g. protosw lookup) */ -#define AF_X25 20 /* CCITT X.25 in particular */ -#define AF_OSINET 21 /* AFI = 47, IDI = 4 */ -#define AF_GOSIP 22 /* U.S. Government OSI */ - -#define AF_MAX 21 - -/* - * 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 { - u_short sp_family; /* address family */ - u_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_NIT AF_NIT -#define PF_802 AF_802 -#define PF_OSI AF_OSI -#define PF_X25 AF_X25 -#define PF_OSINET AF_OSINET -#define PF_GOSIP AF_GOSIP - -#define PF_MAX AF_MAX - -/* - * Maximum queue length specifiable by listen. - */ -#define SOMAXCONN 5 - -/* - * Message header for recvmsg and sendmsg calls. - */ -struct msghdr { - caddr_t msg_name; /* optional address */ - int msg_namelen; /* size of address */ - struct iovec *msg_iov; /* scatter/gather array */ - int msg_iovlen; /* # elements in msg_iov */ - caddr_t msg_accrights; /* access rights sent/received */ - int msg_accrightslen; -}; - -#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 */ - -#endif /*!_sys_socket_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/socketvar.h b/usr/src/lib/libbc/inc/include/sys/socketvar.h deleted file mode 100644 index 35e8677e20..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/socketvar.h +++ /dev/null @@ -1,176 +0,0 @@ -/* from UCB 7.3 12/30/87 */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * 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_socketvar_h -#define _sys_socketvar_h - -/* - * Kernel structure per socket. - * Contains send and receive buffer queues, - * handle on protocol and pointer to protocol - * private data and error information. - */ -struct socket { - short so_type; /* generic type, see socket.h */ - short so_options; /* from socket call, see socket.h */ - short so_linger; /* time to linger while closing */ - short so_state; /* internal state flags SS_*, below */ - caddr_t so_pcb; /* protocol control block */ - struct protosw *so_proto; /* protocol handle */ -/* - * Variables for connection queueing. - * Socket where accepts occur is so_head in all subsidiary sockets. - * If so_head is 0, socket is not related to an accept. - * For head socket so_q0 queues partially completed connections, - * while so_q is a queue of connections ready to be accepted. - * If a connection is aborted and it has so_head set, then - * it has to be pulled out of either so_q0 or so_q. - * We allow connections to queue up based on current queue lengths - * and limit on number of queued connections for this socket. - */ - struct socket *so_head; /* back pointer to accept socket */ - struct socket *so_q0; /* queue of partial connections */ - struct socket *so_q; /* queue of incoming connections */ - short so_q0len; /* partials on so_q0 */ - short so_qlen; /* number of connections on so_q */ - short so_qlimit; /* max number queued connections */ - short so_timeo; /* connection timeout */ - u_short so_error; /* error affecting connection */ - short so_pgrp; /* pgrp for signals */ - u_long so_oobmark; /* chars to oob mark */ -/* - * Variables for socket buffering. - */ - struct sockbuf { - u_long sb_cc; /* actual chars in buffer */ - u_long sb_hiwat; /* max actual char count */ - u_long sb_mbcnt; /* chars of mbufs used */ - u_long sb_mbmax; /* max chars of mbufs to use */ - u_long sb_lowat; /* low water mark (not used yet) */ - struct mbuf *sb_mb; /* the mbuf chain */ - struct proc *sb_sel; /* process selecting read/write */ - short sb_timeo; /* timeout (not used yet) */ - short sb_flags; /* flags, see below */ - } so_rcv, so_snd; -#define SB_MAX (64*1024) /* max chars in sockbuf */ -#define SB_LOCK 0x01 /* lock on data queue (so_rcv only) */ -#define SB_WANT 0x02 /* someone is waiting to lock */ -#define SB_WAIT 0x04 /* someone is waiting for data/space */ -#define SB_SEL 0x08 /* buffer is selected */ -#define SB_COLL 0x10 /* collision selecting */ -/* - * Hooks for alternative wakeup strategies. - * These are used by kernel subsystems wishing to access the socket - * abstraction. If so_wupfunc is nonnull, it is called in place of - * wakeup any time that wakeup would otherwise be called with an - * argument whose value is an address lying within a socket structure. - */ - struct wupalt *so_wupalt; -}; - -struct wupalt { - int (*wup_func)(); /* function to call instead of wakeup */ - caddr_t wup_arg; /* argument for so_wupfunc */ - /* - * Other state information here, for example, for a stream - * connected to a socket. - */ -}; - -/* - * Socket state bits. - */ -#define SS_NOFDREF 0x001 /* no file table ref any more */ -#define SS_ISCONNECTED 0x002 /* socket connected to a peer */ -#define SS_ISCONNECTING 0x004 /* in process of connecting to peer */ -#define SS_ISDISCONNECTING 0x008 /* in process of disconnecting */ -#define SS_CANTSENDMORE 0x010 /* can't send more data to peer */ -#define SS_CANTRCVMORE 0x020 /* can't receive more data from peer */ -#define SS_RCVATMARK 0x040 /* at mark on input */ - -#define SS_PRIV 0x080 /* privileged for broadcast, raw... */ -#define SS_NBIO 0x100 /* non-blocking ops */ -#define SS_ASYNC 0x200 /* async i/o notify */ -#define SS_PIPE 0x400 /* pipe behavior for POSIX & SVID */ - - -/* - * Macros for sockets and socket buffering. - */ - -/* how much space is there in a socket buffer (so->so_snd or so->so_rcv) */ -#define sbspace(sb) \ - (MIN((int)((sb)->sb_hiwat - (sb)->sb_cc),\ - (int)((sb)->sb_mbmax - (sb)->sb_mbcnt))) - -/* do we have to send all at once on a socket? */ -#define sosendallatonce(so) \ - ((so)->so_proto->pr_flags & PR_ATOMIC) - -/* can we read something from so? */ -#define soreadable(so) \ - ((so)->so_rcv.sb_cc || ((so)->so_state & SS_CANTRCVMORE) || \ - (so)->so_qlen || (so)->so_error) - -/* can we write something to so? */ -#define sowriteable(so) \ - (sbspace(&(so)->so_snd) > 0 && \ - (((so)->so_state&SS_ISCONNECTED) || \ - ((so)->so_proto->pr_flags&PR_CONNREQUIRED)==0) || \ - ((so)->so_state & SS_CANTSENDMORE) || \ - (so)->so_error) - -/* adjust counters in sb reflecting allocation of m */ -#define sballoc(sb, m) { \ - (sb)->sb_cc += (m)->m_len; \ - (sb)->sb_mbcnt += MSIZE; \ - if ((m)->m_off > MMAXOFF) \ - (sb)->sb_mbcnt += MCLBYTES; \ -} - -/* adjust counters in sb reflecting freeing of m */ -#define sbfree(sb, m) { \ - (sb)->sb_cc -= (m)->m_len; \ - (sb)->sb_mbcnt -= MSIZE; \ - if ((m)->m_off > MMAXOFF) \ - (sb)->sb_mbcnt -= MCLBYTES; \ -} - -/* set lock on sockbuf sb */ -#define sblock(so, sb) { \ - while ((sb)->sb_flags & SB_LOCK) { \ - (sb)->sb_flags |= SB_WANT; \ - (void) sleep((caddr_t)&(sb)->sb_flags, PZERO+1); \ - } \ - (sb)->sb_flags |= SB_LOCK; \ -} - -/* release lock on sockbuf sb */ -#define sbunlock(so, sb) { \ - (sb)->sb_flags &= ~SB_LOCK; \ - if ((sb)->sb_flags & SB_WANT) { \ - (sb)->sb_flags &= ~SB_WANT; \ - if ((so)->so_wupalt) \ - (*(so)->so_wupalt->wup_func)(so, \ - (caddr_t)&(sb)->sb_flags, \ - (so)->so_wupalt->wup_arg);\ - else \ - wakeup((caddr_t)&(sb)->sb_flags); \ - } \ -} - -#define sorwakeup(so) sowakeup((so), &(so)->so_rcv) -#define sowwakeup(so) sowakeup((so), &(so)->so_snd) - -#ifdef KERNEL -struct socket *sonewconn(); -#endif - -#endif /*!_sys_socketvar_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/sockio.h b/usr/src/lib/libbc/inc/include/sys/sockio.h deleted file mode 100644 index 884399c44f..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/sockio.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * 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_sockio_h -#define _sys_sockio_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * General socket ioctl definitions. - */ - -#include <sys/ioccom.h> - -/* socket i/o controls */ -#define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */ -#define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */ -#define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */ -#define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */ -#define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */ -#define SIOCSPGRP _IOW('s', 8, int) /* set process group */ -#define SIOCGPGRP _IOR('s', 9, int) /* get process group */ - -#define SIOCADDRT _IOW('r', 10, struct rtentry) /* add route */ -#define SIOCDELRT _IOW('r', 11, struct rtentry) /* delete route */ - -#define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */ -#define SIOCGIFADDR _IOWR('i',13, struct ifreq) /* get ifnet address */ -#define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */ -#define SIOCGIFDSTADDR _IOWR('i',15, struct ifreq) /* get p-p address */ -#define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set ifnet flags */ -#define SIOCGIFFLAGS _IOWR('i',17, struct ifreq) /* get ifnet flags */ -#define SIOCSIFMEM _IOW('i', 18, struct ifreq) /* set interface mem */ -#define SIOCGIFMEM _IOWR('i',19, struct ifreq) /* get interface mem */ -#define SIOCGIFCONF _IOWR('i',20, struct ifconf) /* get ifnet list */ -#define SIOCSIFMTU _IOW('i', 21, struct ifreq) /* set if_mtu */ -#define SIOCGIFMTU _IOWR('i',22, struct ifreq) /* get if_mtu */ - - /* from 4.3BSD */ -#define SIOCGIFBRDADDR _IOWR('i',23, struct ifreq) /* get broadcast addr */ -#define SIOCSIFBRDADDR _IOW('i',24, struct ifreq) /* set broadcast addr */ -#define SIOCGIFNETMASK _IOWR('i',25, struct ifreq) /* get net addr mask */ -#define SIOCSIFNETMASK _IOW('i',26, struct ifreq) /* set net addr mask */ -#define SIOCGIFMETRIC _IOWR('i',27, struct ifreq) /* get IF metric */ -#define SIOCSIFMETRIC _IOW('i',28, struct ifreq) /* set IF metric */ - -#define SIOCSARP _IOW('i', 30, struct arpreq) /* set arp entry */ -#define SIOCGARP _IOWR('i',31, struct arpreq) /* get arp entry */ -#define SIOCDARP _IOW('i', 32, struct arpreq) /* delete arp entry */ -#define SIOCUPPER _IOW('i', 40, struct ifreq) /* attach upper layer */ -#define SIOCLOWER _IOW('i', 41, struct ifreq) /* attach lower layer */ -#define SIOCSETSYNC _IOW('i', 44, struct ifreq) /* set syncmode */ -#define SIOCGETSYNC _IOWR('i', 45, struct ifreq) /* get syncmode */ -#define SIOCSSDSTATS _IOWR('i', 46, struct ifreq) /* sync data stats */ -#define SIOCSSESTATS _IOWR('i', 47, struct ifreq) /* sync error stats */ - -#define SIOCSPROMISC _IOW('i', 48, int) /* request promisc mode - on/off */ -#define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* set m/c address */ -#define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* clr m/c address */ - -/* FDDI controls */ -#define SIOCFDRESET _IOW('i', 51, struct ifreq) /* Reset FDDI */ -#define SIOCFDSLEEP _IOW('i', 52, struct ifreq) /* Sleep until next dnld req */ -#define SIOCSTRTFMWAR _IOW('i', 53, struct ifreq) /* Start FW at an addr */ -#define SIOCLDNSTRTFW _IOW('i', 54, struct ifreq) /* Load the shared memory */ -#define SIOCGETFDSTAT _IOW('i', 55, struct ifreq) /* Get FDDI stats */ -#define SIOCFDNMIINT _IOW('i', 56, struct ifreq) /* NMI to fddi */ -#define SIOCFDEXUSER _IOW('i', 57, struct ifreq) /* Exec in user mode */ -#define SIOCFDGNETMAP _IOW('i', 58, struct ifreq) /* Get a netmap entry */ -#define SIOCFDGIOCTL _IOW('i', 59, struct ifreq) /* Generic ioctl for fddi */ - -/* protocol i/o controls */ -#define SIOCSNIT _IOW('p', 0, struct nit_ioc) /* set nit modes */ -#define SIOCGNIT _IOWR('p', 1, struct nit_ioc) /* get nit modes */ - -#endif /* !_sys_sockio_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/stat.h b/usr/src/lib/libbc/inc/include/sys/stat.h deleted file mode 100644 index 53c80c69dd..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/stat.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2001 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef __SYS_STAT_H -#define __SYS_STAT_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * NOTE: changes to this file should also be made to xpg2include/sys/stat.h - */ - -#include <sys/types.h> - -#ifdef __cplusplus -extern "C" { -#endif - -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 - -int chmod(char *, mode_t); -int fstat(int, struct stat *); -int mkdir(char *, mode_t); -int mkfifo(char *, mode_t); -int stat(char *, struct stat *); -mode_t umask(mode_t); - -#ifdef __cplusplus -} -#endif - -#endif /* __SYS_STAT_H */ diff --git a/usr/src/lib/libbc/inc/include/sys/stdtypes.h b/usr/src/lib/libbc/inc/include/sys/stdtypes.h deleted file mode 100644 index 687932cbb3..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/stdtypes.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright (c) 1997-1998 by Sun Microsystems, Inc. - * All rights reserved. - */ - -/* - * Suppose you have an ANSI C or POSIX thingy that needs a typedef - * for thingy_t. Put it here and include this file wherever you - * define the thingy. This is used so that we don't have size_t in - * N (N > 1) different places and so that we don't have to have - * types.h included all the time and so that we can include this in - * the lint libs instead of termios.h which conflicts with ioctl.h. - */ - -#ifndef __SYS_STDTYPES_H -#define __SYS_STDTYPES_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef int sigset_t; /* signal mask - may change */ - -typedef unsigned int speed_t; /* tty speeds */ -typedef unsigned long tcflag_t; /* tty line disc modes */ -typedef unsigned char cc_t; /* tty control char */ -typedef int pid_t; /* process id */ - -typedef unsigned short mode_t; /* file mode bits */ -typedef short nlink_t; /* links to a file */ - -typedef long clock_t; /* units=ticks (typically 60/sec) */ -typedef long time_t; /* value = secs since epoch */ - -typedef int size_t; /* ??? */ -typedef int ptrdiff_t; /* result of subtracting two pointers */ - -typedef unsigned short wchar_t; /* big enough for biggest char set */ - -/* - * POSIX Extensions - */ -typedef unsigned char uchar_t; -typedef unsigned short ushort_t; -typedef unsigned int uint_t; -typedef unsigned long ulong_t; - -#ifdef __cplusplus -} -#endif - -#endif /* __SYS_STDTYPES_H */ diff --git a/usr/src/lib/libbc/inc/include/sys/stropts.h b/usr/src/lib/libbc/inc/include/sys/stropts.h deleted file mode 100644 index 20418dc439..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/stropts.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#ifndef _sys_stropts_h -#define _sys_stropts_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Read options - */ -#define RNORM 0 /* read msg norm */ -#define RMSGD 1 /* read msg discard */ -#define RMSGN 2 /* read msg no discard */ - -/* - * Flush options - */ - -#define FLUSHR 1 /* flush read queue */ -#define FLUSHW 2 /* flush write queue */ -#define FLUSHRW 3 /* flush both queues */ - -/* - * Events for which to be sent SIGPOLL signal - */ -#define S_INPUT 001 /* regular priority msg on read Q */ -#define S_HIPRI 002 /* high priority msg on read Q */ -#define S_OUTPUT 004 /* write Q no longer full */ -#define S_MSG 010 /* signal msg at front of read Q */ - -/* - * Flags for recv() and send() syscall arguments - */ -#define RS_HIPRI 1 /* send/recv high priority message */ - -/* - * Flags returned as value of recv() syscall - */ -#define MORECTL 1 /* more ctl info is left in message */ -#define MOREDATA 2 /* more data is left in message */ - -#ifndef FMNAMESZ -#define FMNAMESZ 8 -#endif - -#include <sys/ioccom.h> - -/* - * Stream Ioctl defines - */ -#define I_NREAD _IOR('S',01,int) -#define I_PUSH _IOWN('S',02,FMNAMESZ+1) -#define I_POP _IO('S',03) -#define I_LOOK _IORN('S',04,FMNAMESZ+1) -#define I_FLUSH _IO('S',05) -#define I_SRDOPT _IO('S',06) -#define I_GRDOPT _IOR('S',07,int) -#define I_STR _IOWR('S',010,struct strioctl) -#define I_SETSIG _IO('S',011) -#define I_GETSIG _IOR('S',012,int) -#define I_FIND _IOWN('S',013,FMNAMESZ+1) -#define I_LINK _IO('S',014) -#define I_UNLINK _IO('S',015) -#define I_PEEK _IOWR('S',017,struct strpeek) -#define I_FDINSERT _IOW('S',020,struct strfdinsert) -#define I_SENDFD _IO('S',021) -#define I_RECVFD _IOR('S',022,struct strrecvfd) -#define I_PLINK _IO('S',023) -#define I_PUNLINK _IO('S',024) - - -/* - * User level ioctl format for ioctl that go downstream I_STR - */ -struct strioctl { - int ic_cmd; /* command */ - int ic_timout; /* timeout value */ - int ic_len; /* length of data */ - char *ic_dp; /* pointer to data */ -}; - - -/* - * Value for timeouts (ioctl, select) that denotes infinity - */ -#define INFTIM -1 - - -/* - * Stream buffer structure for send and recv system calls - */ -struct strbuf { - int maxlen; /* no. of bytes in buffer */ - int len; /* no. of bytes returned */ - char *buf; /* pointer to data */ -}; - - -/* - * stream I_PEEK ioctl format - */ - -struct strpeek { - struct strbuf ctlbuf; - struct strbuf databuf; - long flags; -}; - -/* - * stream I_FDINSERT ioctl format - */ -struct strfdinsert { - struct strbuf ctlbuf; - struct strbuf databuf; - long flags; - int fildes; - int offset; -}; - - -/* - * receive file descriptor structure - */ -struct strrecvfd { - int fd; - unsigned short uid; - unsigned short gid; - char fill[8]; -}; - -#endif /* !_sys_stropts_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/syslog.h b/usr/src/lib/libbc/inc/include/sys/syslog.h deleted file mode 100644 index 2d8690fb53..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/syslog.h +++ /dev/null @@ -1,70 +0,0 @@ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * 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_syslog_h -#define _sys_syslog_h - -/* - * Facility codes - */ -#define LOG_KERN (0<<3) /* kernel messages */ -#define LOG_USER (1<<3) /* random user-level messages */ -#define LOG_MAIL (2<<3) /* mail system */ -#define LOG_DAEMON (3<<3) /* system daemons */ -#define LOG_AUTH (4<<3) /* security/authorization messages */ -#define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */ -#define LOG_LPR (6<<3) /* line printer subsystem */ -#define LOG_NEWS (7<<3) /* netnews subsystem */ -#define LOG_UUCP (8<<3) /* uucp subsystem */ -#define LOG_CRON (15<<3) /* cron/at subsystem */ - /* other codes through 15 reserved for system use */ -#define LOG_LOCAL0 (16<<3) /* reserved for local use */ -#define LOG_LOCAL1 (17<<3) /* reserved for local use */ -#define LOG_LOCAL2 (18<<3) /* reserved for local use */ -#define LOG_LOCAL3 (19<<3) /* reserved for local use */ -#define LOG_LOCAL4 (20<<3) /* reserved for local use */ -#define LOG_LOCAL5 (21<<3) /* reserved for local use */ -#define LOG_LOCAL6 (22<<3) /* reserved for local use */ -#define LOG_LOCAL7 (23<<3) /* reserved for local use */ - -#define LOG_NFACILITIES 24 /* maximum number of facilities */ -#define LOG_FACMASK 0x03f8 /* mask to extract facility part */ - -/* - * Priorities (these are ordered) - */ -#define LOG_EMERG 0 /* system is unusable */ -#define LOG_ALERT 1 /* action must be taken immediately */ -#define LOG_CRIT 2 /* critical conditions */ -#define LOG_ERR 3 /* error conditions */ -#define LOG_WARNING 4 /* warning conditions */ -#define LOG_NOTICE 5 /* normal but signification condition */ -#define LOG_INFO 6 /* informational */ -#define LOG_DEBUG 7 /* debug-level messages */ - -#define LOG_PRIMASK 0x0007 /* mask to extract priority part (internal) */ - -/* - * arguments to setlogmask. - */ -#define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */ -#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */ - -/* - * Option flags for openlog. - * - * LOG_ODELAY no longer does anything; LOG_NDELAY is the - * inverse of what it used to be. - */ -#define LOG_PID 0x01 /* log the pid with each message */ -#define LOG_CONS 0x02 /* log on the console if errors in sending */ -#define LOG_ODELAY 0x04 /* delay open until syslog() is called */ -#define LOG_NDELAY 0x08 /* don't delay open */ -#define LOG_NOWAIT 0x10 /* if forking to log on console, don't wait() */ - -#endif /*!_sys_syslog_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/sysmacros.h b/usr/src/lib/libbc/inc/include/sys/sysmacros.h deleted file mode 100644 index 1482b87c03..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/sysmacros.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1986 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -/* - * Portions of this source code were derived from Berkeley 4.3 BSD - * under license from the Regents of the University of California. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Major/minor device constructing/busting macros. - */ - -#ifndef _sys_sysmacros_h -#define _sys_sysmacros_h - -/* 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))) - -#endif /*!_sys_sysmacros_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/termio.h b/usr/src/lib/libbc/inc/include/sys/termio.h deleted file mode 100644 index 7d159ae53f..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/termio.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#ifndef _sys_termio_h -#define _sys_termio_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <sys/ioccom.h> -#include <sys/termios.h> - -#define NCC 8 - -#define SSPEED 7 /* default speed: 300 baud */ - -/* - * Ioctl control packet - */ -struct termio { - unsigned short c_iflag; /* input modes */ - unsigned short c_oflag; /* output modes */ - unsigned short c_cflag; /* control modes */ - unsigned short c_lflag; /* line discipline modes */ - char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control chars */ -}; - -#define TCGETA _IOR('T', 1, struct termio) -#define TCSETA _IOW('T', 2, struct termio) -#define TCSETAW _IOW('T', 3, struct termio) -#define TCSETAF _IOW('T', 4, struct termio) -#define TCSBRK _IO('T', 5) - -#endif /* !_sys_termio_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/termios.h b/usr/src/lib/libbc/inc/include/sys/termios.h deleted file mode 100644 index 6182f49fd5..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/termios.h +++ /dev/null @@ -1,278 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef __SYS_TERMIOS_H -#define __SYS_TERMIOS_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <sys/stdtypes.h> -#include <sys/ioccom.h> -#include <sys/ttydev.h> -#include <sys/ttycom.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#define NCCS 17 - -/* - * control characters - * the following are not (yet) posix - * VEOL2, VSWTCH, VDSUSP, VREPRINT, VDISCARD, VWERASE, VLNEXT, VSTATUS - */ -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VEOL 5 -#ifndef _POSIX_SOURCE -#define VEOL2 6 -#define VSWTCH 7 -#endif -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#ifndef _POSIX_SOURCE -#define VDSUSP 11 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VSTATUS 16 -#endif - -#define VMIN VEOF -#define VTIME VEOL - -#ifndef _POSIX_SOURCE -#define _CTRL(c) ('c'&037) - -/* - * default control chars. - * guarded for ttychars.h. - */ -#ifndef CINTR -#define CINTR _CTRL(c) -#define CQUIT 034 /* FS, ^\ */ -#define CERASE 0177 /* DEL, ^? */ -#define CKILL _CTRL(u) -#define CEOF _CTRL(d) -#define CEOT CEOF -#define CEOL 0 -#define CEOL2 0 -#define CSWTCH 0 -#define CNSWTCH 0 -#define CSTART _CTRL(q) -#define CSTOP _CTRL(s) -#define CSUSP _CTRL(z) -#define CDSUSP _CTRL(y) -#define CRPRNT _CTRL(r) -#define CFLUSH _CTRL(o) -#define CWERASE _CTRL(w) -#define CLNEXT _CTRL(v) -#endif /* !CINTR */ - -#define CESC '\\' -#define CNUL 0 -#define CDEL 0377 -#endif /* !_POSIX_SOURCE */ - -/* input modes */ -#define IGNBRK 0x00000001 -#define BRKINT 0x00000002 -#define IGNPAR 0x00000004 -#define PARMRK 0x00000008 -#define INPCK 0x00000010 -#define ISTRIP 0x00000020 -#define INLCR 0x00000040 -#define IGNCR 0x00000080 -#define ICRNL 0x00000100 -/* IUCLC 0x00000200 not posix, defined below */ -#define IXON 0x00000400 -/* IXANY 0x00000800 not posix, defined below */ -#define IXOFF 0x00001000 -/* IMAXBEL 0x00002000 not posix, defined below */ - -#ifndef _POSIX_SOURCE -#define IUCLC 0x00000200 -#define IXANY 0x00000800 -#define IMAXBEL 0x00002000 -#endif /* !_POSIX_SOURCE */ - -/* output modes */ -#define OPOST 0x00000001 -#ifndef _POSIX_SOURCE -#define OLCUC 0x00000002 -#define ONLCR 0x00000004 -#define OCRNL 0x00000008 -#define ONOCR 0x00000010 -#define ONLRET 0x00000020 -#define OFILL 0x00000040 -#define OFDEL 0x00000080 -#define NLDLY 0x00000100 -#define NL0 0 -#define NL1 0x00000100 -#define CRDLY 0x00000600 -#define CR0 0 -#define CR1 0x00000200 -#define CR2 0x00000400 -#define CR3 0x00000600 -#define TABDLY 0x00001800 -#define TAB0 0 -#define TAB1 0x00000800 -#define TAB2 0x00001000 -#define XTABS 0x00001800 -#define TAB3 XTABS -#define BSDLY 0x00002000 -#define BS0 0 -#define BS1 0x00002000 -#define VTDLY 0x00004000 -#define VT0 0 -#define VT1 0x00004000 -#define FFDLY 0x00008000 -#define FF0 0 -#define FF1 0x00008000 -#define PAGEOUT 0x00010000 -#define WRAP 0x00020000 -#endif /* !_POSIX_SOURCE */ - -/* control modes */ -#ifndef _POSIX_SOURCE -#define CBAUD 0x0000000f -#endif -#define CSIZE 0x00000030 -#define CS5 0 -#define CS6 0x00000010 -#define CS7 0x00000020 -#define CS8 0x00000030 -#define CSTOPB 0x00000040 -#define CREAD 0x00000080 -#define PARENB 0x00000100 -#define PARODD 0x00000200 -#define HUPCL 0x00000400 -#define CLOCAL 0x00000800 -#ifndef _POSIX_SOURCE -#define LOBLK 0x00001000 -#define CIBAUD 0x000f0000 -#define CRTSXOFF 0x40000000 -#define CRTSCTS 0x80000000 -#define CBAUDEXT 0x200000 -#define CIBAUDEXT 0x400000 - -/* - * 4.4BSD flags for hardware flow control - */ -#define CRTS_IFLOW 0x40000000 -#define CCTS_OFLOW 0x80000000 - -#define IBSHIFT 16 -#endif /* !_POSIX_SOURCE */ - -/* line discipline 0 modes */ -#define ISIG 0x00000001 -#define ICANON 0x00000002 -/* XCASE 0x00000004 not posix, defined below */ -#define ECHO 0x00000008 -#define ECHOE 0x00000010 -#define ECHOK 0x00000020 -#define ECHONL 0x00000040 -#define NOFLSH 0x00000080 -#define TOSTOP 0x00000100 -/* ECHOCTL 0x00000200 not posix, defined below */ -/* ECHOPRT 0x00000400 not posix, defined below */ -/* ECHOKE 0x00000800 not posix, defined below */ -/* DEFECHO 0x00001000 not posix, defined below */ -/* FLUSHO 0x00002000 not posix, defined below */ -/* PENDIN 0x00004000 not posix, defined below */ -#define IEXTEN 0x00008000 - -#ifndef _POSIX_SOURCE -#define XCASE 0x00000004 -#define ECHOCTL 0x00000200 -#define ECHOPRT 0x00000400 -#define ECHOKE 0x00000800 -#define DEFECHO 0x00001000 -#define FLUSHO 0x00002000 -#define PENDIN 0x00004000 -#endif /* !_POSIX_SOURCE */ - -#ifndef _POSIX_SOURCE -/* - * codes 1 through 5, not shown here, are old "termio" calls - */ -#define TCXONC _IO('T', 6) -#define TCFLSH _IO('T', 7) -#define TCGETS _IOR('T', 8, struct termios) -#define TCSETS _IOW('T', 9, struct termios) -#define TCSETSW _IOW('T', 10, struct termios) -#define TCSETSF _IOW('T', 11, struct termios) -#endif /* !_POSIX_SOURCE */ - -#define TCOOFF 0 /* arg to TCXONC & tcflow() */ -#define TCOON 1 /* arg to TCXONC & tcflow() */ -#define TCIOFF 2 /* arg to TCXONC & tcflow() */ -#define TCION 3 /* arg to TCXONC & tcflow() */ -#define TCIFLUSH 0 /* arg to TCFLSH & tcflush() */ -#define TCOFLUSH 1 /* arg to TCFLSH & tcflush() */ -#define TCIOFLUSH 2 /* arg to TCFLSH & tcflush() */ -#define TCSANOW 0 /* arg to tcsetattr() */ -#define TCSADRAIN 1 /* arg to tcsetattr() */ -#define TCSAFLUSH 2 /* arg to tcsetattr() */ - -/* - * Ioctl control packet - */ -struct termios { - tcflag_t c_iflag; /* input modes */ - tcflag_t c_oflag; /* output modes */ - tcflag_t c_cflag; /* control modes */ - tcflag_t c_lflag; /* line discipline modes */ - char c_line; /* line discipline XXX */ - cc_t c_cc[NCCS]; /* control chars */ -}; - - -#ifndef KERNEL -speed_t cfgetispeed(/* struct termios *termios_p */); -speed_t cfgetospeed(/* struct termios *termios_p */); -int cfsetispeed(/* struct termios *termios_p, speed_t speed */); -int cfsetospeed(/* struct termios *termios_p, speed_t speed */); -int tcdrain(/* int fildes */); -int tcflow(/* int fildes, int action */); -int tcflush(/* int fildes, int queue_selector */); -int tcgetattr(/* int fildes, struct termios *termios_p */); -int tcsendbreak(/* int fildes, int duration */); -int tcsetattr(/* int fildes, int optional_actions, struct *termios_p */); -#endif /* !KERNEL */ - -#ifdef __cplusplus -} -#endif - -#endif /* __SYS_TERMIOS_H */ diff --git a/usr/src/lib/libbc/inc/include/sys/time.h b/usr/src/lib/libbc/inc/include/sys/time.h deleted file mode 100644 index a79fb2df9f..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/time.h +++ /dev/null @@ -1,65 +0,0 @@ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * 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 - -/* - * 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 */ -}; - -#ifndef KERNEL -#include <time.h> -#endif - -#endif /*!_sys_time_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/times.h b/usr/src/lib/libbc/inc/include/sys/times.h deleted file mode 100644 index 392d2a25d3..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/times.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Structure returned by times() - */ - -#ifndef __sys_times_h -#define __sys_times_h - -#include <sys/types.h> - -struct tms { - clock_t tms_utime; /* user time */ - clock_t tms_stime; /* system time */ - clock_t tms_cutime; /* user time, children */ - clock_t tms_cstime; /* system time, children */ -}; - -#ifndef KERNEL -clock_t times(/* struct tms *tmsp */); -#endif - -#endif /* !__sys_times_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/ttold.h b/usr/src/lib/libbc/inc/include/sys/ttold.h deleted file mode 100644 index baf4817108..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/ttold.h +++ /dev/null @@ -1,198 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#ifndef _sys_ttold_h -#define _sys_ttold_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -struct tchars { - char t_intrc; /* interrupt */ - char t_quitc; /* quit */ - char t_startc; /* start output */ - char t_stopc; /* stop output */ - char t_eofc; /* end-of-file */ - char t_brkc; /* input delimiter (like nl) */ -}; - -struct ltchars { - char t_suspc; /* stop process signal */ - char t_dsuspc; /* delayed stop process signal */ - char t_rprntc; /* reprint line */ - char t_flushc; /* flush output (toggles) */ - char t_werasc; /* word erase */ - char t_lnextc; /* literal next character */ -}; - -/* - * Structure for TIOCGETP and TIOCSETP ioctls. - */ - -#ifndef _SGTTYB_ -#define _SGTTYB_ -struct sgttyb { - char sg_ispeed; /* input speed */ - char sg_ospeed; /* output speed */ - char sg_erase; /* erase character */ - char sg_kill; /* kill character */ - short sg_flags; /* mode flags */ -}; -#endif - -#include <sys/ioccom.h> - -/* - * 4.3BSD tty ioctl commands that are either: - * 1) deprecated - * 2) not implemented (and never were implemented) - * 3) implemented on top of new-style "ioctl"s. - */ -#define TIOCGETD _IOR('t', 0, int) /* get line discipline */ -#define TIOCSETD _IOW('t', 1, int) /* set line discipline */ -#define TIOCHPCL _IO('t', 2) /* hang up on last close */ -#define TIOCMODG _IOR('t', 3, int) /* get modem state - OBSOLETE */ -#define TIOCMODS _IOW('t', 4, int) /* set modem state - OBSOLETE */ -#define TIOCGETP _IOR('t', 8,struct sgttyb)/* get parameters -- gtty */ -#define TIOCSETP _IOW('t', 9,struct sgttyb)/* set parameters -- stty */ -#define TIOCSETN _IOW('t',10,struct sgttyb)/* as above, but no flushtty */ -#define TIOCEXCL _IO('t', 13) /* set exclusive use of tty */ -#define TIOCNXCL _IO('t', 14) /* reset exclusive use of tty */ -#define TIOCFLUSH _IOW('t', 16, int) /* flush buffers */ -#define TIOCSETC _IOW('t',17,struct tchars)/* set special characters */ -#define TIOCGETC _IOR('t',18,struct tchars)/* get special characters */ -#define O_TANDEM 0x00000001 /* send stopc on out q full */ -#define O_CBREAK 0x00000002 /* half-cooked mode */ -#define O_LCASE 0x00000004 /* simulate lower case */ -#define O_ECHO 0x00000008 /* echo input */ -#define O_CRMOD 0x00000010 /* map \r to \r\n on output */ -#define O_RAW 0x00000020 /* no i/o processing */ -#define O_ODDP 0x00000040 /* get/send odd parity */ -#define O_EVENP 0x00000080 /* get/send even parity */ -#define O_ANYP 0x000000c0 /* get any parity/send none */ -#define O_NLDELAY 0x00000300 /* \n delay */ -#define O_NL0 0x00000000 -#define O_NL1 0x00000100 /* tty 37 */ -#define O_NL2 0x00000200 /* vt05 */ -#define O_NL3 0x00000300 -#define O_TBDELAY 0x00000c00 /* horizontal tab delay */ -#define O_TAB0 0x00000000 -#define O_TAB1 0x00000400 /* tty 37 */ -#define O_TAB2 0x00000800 -#define O_XTABS 0x00000c00 /* expand tabs on output */ -#define O_CRDELAY 0x00003000 /* \r delay */ -#define O_CR0 0x00000000 -#define O_CR1 0x00001000 /* tn 300 */ -#define O_CR2 0x00002000 /* tty 37 */ -#define O_CR3 0x00003000 /* concept 100 */ -#define O_VTDELAY 0x00004000 /* vertical tab delay */ -#define O_FF0 0x00000000 -#define O_FF1 0x00004000 /* tty 37 */ -#define O_BSDELAY 0x00008000 /* \b delay */ -#define O_BS0 0x00000000 -#define O_BS1 0x00008000 -#define O_ALLDELAY (O_NLDELAY|O_TBDELAY|O_CRDELAY|O_VTDELAY|O_BSDELAY) -#define O_CRTBS 0x00010000 /* do backspacing for crt */ -#define O_PRTERA 0x00020000 /* \ ... / erase */ -#define O_CRTERA 0x00040000 /* " \b " to wipe out char */ -#define O_TILDE 0x00080000 /* hazeltine tilde kludge */ -#define O_MDMBUF 0x00100000 /* start/stop output on carrier intr */ -#define O_LITOUT 0x00200000 /* literal output */ -#define O_TOSTOP 0x00400000 /* SIGSTOP on background output */ -#define O_FLUSHO 0x00800000 /* flush output to terminal */ -#define O_NOHANG 0x01000000 /* no SIGHUP on carrier drop */ -#define O_L001000 0x02000000 -#define O_CRTKIL 0x04000000 /* kill line with " \b " */ -#define O_PASS8 0x08000000 -#define O_CTLECH 0x10000000 /* echo control chars as ^X */ -#define O_PENDIN 0x20000000 /* tp->t_rawq needs reread */ -#define O_DECCTQ 0x40000000 /* only ^Q starts after ^S */ -#define O_NOFLSH 0x80000000 /* no output flush on signal */ -/* locals, from 127 down */ -#define TIOCLBIS _IOW('t', 127, int) /* bis local mode bits */ -#define TIOCLBIC _IOW('t', 126, int) /* bic local mode bits */ -#define TIOCLSET _IOW('t', 125, int) /* set entire local mode word */ -#define TIOCLGET _IOR('t', 124, int) /* get local modes */ -#define LCRTBS (O_CRTBS>>16) -#define LPRTERA (O_PRTERA>>16) -#define LCRTERA (O_CRTERA>>16) -#define LTILDE (O_TILDE>>16) -#define LMDMBUF (O_MDMBUF>>16) -#define LLITOUT (O_LITOUT>>16) -#define LTOSTOP (O_TOSTOP>>16) -#define LFLUSHO (O_FLUSHO>>16) -#define LNOHANG (O_NOHANG>>16) -#define LCRTKIL (O_CRTKIL>>16) -#define LPASS8 (O_PASS8>>16) -#define LCTLECH (O_CTLECH>>16) -#define LPENDIN (O_PENDIN>>16) -#define LDECCTQ (O_DECCTQ>>16) -#define LNOFLSH (O_NOFLSH>>16) -#define TIOCSBRK _IO('t', 123) /* set break bit */ -#define TIOCCBRK _IO('t', 122) /* clear break bit */ -#define TIOCSDTR _IO('t', 121) /* set data terminal ready */ -#define TIOCCDTR _IO('t', 120) /* clear data terminal ready */ -#define TIOCSLTC _IOW('t',117,struct ltchars)/* set local special chars */ -#define TIOCGLTC _IOR('t',116,struct ltchars)/* get local special chars */ -#define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ -#define TIOCSTART _IO('t', 110) /* start output, like ^Q */ - -/* - * Sun-specific ioctls, which have been moved to the Sun-specific range. - * The old codes will be kept around for binary compatibility; the - * codes for TIOCCONS and TIOCGSIZE don't collide with the 4.3BSD codes - * because the structure size and copy direction fields are different. - * Unfortunately, the old TIOCSSIZE code does collide with TIOCSWINSZ, - * but they can be disambiguated by checking whether a "struct ttysize" - * structure's "ts_lines" field is greater than 64K or not. If so, - * it's almost certainly a "struct winsize" instead. - */ -#define _O_TIOCCONS _IO('t', 104) /* get console I/O */ -#define _O_TIOCSSIZE _IOW('t',103,struct ttysize)/* get tty size */ -#define _O_TIOCGSIZE _IOR('t',102,struct ttysize)/* get tty size */ - -/* - * Sun-specific ioctls. - */ -#define TIOCSETX _IOW('t', 34, int) /* set extra modes for S5 compatibility */ -#define TIOCGETX _IOR('t', 35, int) /* get extra modes for S5 compatibility */ -#define NOPOST 0x00000001 /* no processing on output (LITOUT with 7 bits + parity) */ -#define NOISIG 0x00000002 /* disable all signal-generating characters */ -#define STOPB 0x00000004 /* two stop bits */ - -#define OTTYDISC 0 /* old, v7 std tty driver */ -#define NETLDISC 1 /* line discip for berk net */ -#define NTTYDISC 2 /* new tty discipline */ -#define TABLDISC 3 /* hitachi tablet discipline */ -#define NTABLDISC 4 /* gtco tablet discipline */ -#define MOUSELDISC 5 /* mouse discipline */ -#define KBDLDISC 6 /* up/down keyboard trans (console) */ - -#include <sys/ttycom.h> - -#endif /* !_sys_ttold_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/ttychars.h b/usr/src/lib/libbc/inc/include/sys/ttychars.h deleted file mode 100644 index 8ab232d3d2..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/ttychars.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * User visible structures and constants - * related to terminal handling. - */ - -#ifndef _sys_ttychars_h -#define _sys_ttychars_h - -struct ttychars { - char tc_erase; /* erase last character */ - char tc_kill; /* erase entire line */ - char tc_intrc; /* interrupt */ - char tc_quitc; /* quit */ - char tc_startc; /* start output */ - char tc_stopc; /* stop output */ - char tc_eofc; /* end-of-file */ - char tc_brkc; /* input delimiter (like nl) */ - char tc_suspc; /* stop process signal */ - char tc_dsuspc; /* delayed stop process signal */ - char tc_rprntc; /* reprint line */ - char tc_flushc; /* flush output (toggles) */ - char tc_werasc; /* word erase */ - char tc_lnextc; /* literal next character */ -}; - -#ifndef CTRL -#define CTRL(c) ('c'&037) -#endif - -/* - * default special characters. - * guarded because termio[s].h also define these. - */ -#ifndef CERASE -#define CERASE 0177 -#define CKILL CTRL(u) -#define CINTR CTRL(c) -#define CQUIT 034 /* FS, ^\ */ -#define CSTART CTRL(q) -#define CSTOP CTRL(s) -#define CEOF CTRL(d) -#define CEOT CEOF -#define CBRK 0377 -#define CSUSP CTRL(z) -#define CDSUSP CTRL(y) -#define CRPRNT CTRL(r) -#define CFLUSH CTRL(o) -#define CWERASE CTRL(w) -#define CLNEXT CTRL(v) -#endif /* !CERASE */ - -#endif /* !_sys_ttychars_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/ttycom.h b/usr/src/lib/libbc/inc/include/sys/ttycom.h deleted file mode 100644 index de4d7a97bd..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/ttycom.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef __sys_ttycom_h -#define __sys_ttycom_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef _POSIX_SOURCE - -/* - * Window/terminal size structure. - * This information is stored by the kernel - * in order to provide a consistent interface, - * but is not used by the kernel. - * - * Type must be "unsigned short" so that types.h not required. - */ -struct winsize { - unsigned short ws_row; /* rows, in characters */ - unsigned short ws_col; /* columns, in characters */ - unsigned short ws_xpixel; /* horizontal size, pixels - not used */ - unsigned short ws_ypixel; /* vertical size, pixels - not used */ -}; - -#define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ -#define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ - -/* - * Sun version of same. - */ -struct ttysize { - int ts_lines; /* number of lines on terminal */ - int ts_cols; /* number of columns on terminal */ -}; - -#define TIOCSSIZE _IOW('t',37,struct ttysize)/* set tty size */ -#define TIOCGSIZE _IOR('t',38,struct ttysize)/* get tty size */ - -/* - * 4.3BSD and SunOS terminal "ioctl"s with no "termios" equivalents. - * This file is included by <sys/termios.h> and indirectly by <sys/ioctl.h> - * so that programs that include either one have these "ioctl"s defined. - */ -#define TIOCSCTTY _IO('t', 132) /* get a ctty */ -#define TIOCGPGRP _IOR('t', 119, int) /* get pgrp of tty */ -#define TIOCGETPGRP _IOR('t', 131, int) /* get pgrp of tty (posix) */ -#define TIOCSPGRP _IOW('t', 118, int) /* set pgrp of tty */ -#define TIOCSETPGRP _IOW('t', 130, int) /* set pgrp of tty (posix) */ -#define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ -#define TIOCSTI _IOW('t', 114, char) /* simulate terminal input */ -#define TIOCNOTTY _IO('t', 113) /* void tty association */ -#define TIOCPKT _IOW('t', 112, int) /* pty: set/clear packet mode */ -#define TIOCPKT_DATA 0x00 /* data packet */ -#define TIOCPKT_FLUSHREAD 0x01 /* flush data not yet written to controller */ -#define TIOCPKT_FLUSHWRITE 0x02 /* flush data read from controller but not yet processed */ -#define TIOCPKT_STOP 0x04 /* stop output */ -#define TIOCPKT_START 0x08 /* start output */ -#define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ -#define TIOCPKT_DOSTOP 0x20 /* now do ^S, ^Q */ -#define TIOCPKT_IOCTL 0x40 /* "ioctl" packet */ -#define TIOCMSET _IOW('t', 109, int) /* set all modem bits */ -#define TIOCMBIS _IOW('t', 108, int) /* bis modem bits */ -#define TIOCMBIC _IOW('t', 107, int) /* bic modem bits */ -#define TIOCMGET _IOR('t', 106, int) /* get all modem bits */ -#define TIOCM_LE 0001 /* line enable */ -#define TIOCM_DTR 0002 /* data terminal ready */ -#define TIOCM_RTS 0004 /* request to send */ -#define TIOCM_ST 0010 /* secondary transmit */ -#define TIOCM_SR 0020 /* secondary receive */ -#define TIOCM_CTS 0040 /* clear to send */ -#define TIOCM_CAR 0100 /* carrier detect */ -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RNG 0200 /* ring */ -#define TIOCM_RI TIOCM_RNG -#define TIOCM_DSR 0400 /* data set ready */ - -#define TIOCREMOTE _IOW('t', 105, int) /* remote input editing */ -#define TIOCUCNTL _IOW('t', 102, int) /* pty: set/clr usr cntl mode */ - -/* - * Sun-specific ioctls with no "termios" equivalents. - */ -#define TIOCTCNTL _IOW('t', 32, int) /* pty: set/clr intercept ioctl mode */ -#define TIOCSIGNAL _IOW('t', 33, int) /* pty: send signal to slave */ -#define TIOCCONS _IO('t', 36) /* get console I/O */ -#define TIOCSSOFTCAR _IOW('t', 101, int) /* set soft carrier flag */ -#define TIOCGSOFTCAR _IOR('t', 100, int) /* get soft carrier flag */ -#define TIOCISPACE _IOR('t', 128, int) /* space left in input queue */ -#define TIOCISIZE _IOR('t', 129, int) /* size of input queue */ - -#endif /* !_POSIX_SOURCE */ -#endif /* !__sys_ttycom_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/ttydev.h b/usr/src/lib/libbc/inc/include/sys/ttydev.h deleted file mode 100644 index 567db2853e..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/ttydev.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Terminal definitions related to underlying hardware. - */ - -#ifndef __sys_ttydev_h -#define __sys_ttydev_h - -/* - * Speeds - */ -#define B0 0 -#define B50 1 -#define B75 2 -#define B110 3 -#define B134 4 -#define B150 5 -#define B200 6 -#define B300 7 -#define B600 8 -#define B1200 9 -#define B1800 10 -#define B2400 11 -#define B4800 12 -#define B9600 13 -#define B19200 14 -#define B38400 15 -#ifndef _POSIX_SOURCE -#define EXTA 14 -#define EXTB 15 -#endif - -#ifdef KERNEL -/* - * Hardware bits. - * SHOULD NOT BE HERE. - */ -#define DONE 0200 -#define IENABLE 0100 - -/* - * Modem control commands. - */ -#define DMSET 0 -#define DMBIS 1 -#define DMBIC 2 -#define DMGET 3 -#endif /* KERNEL */ - -#endif /* !__sys_ttydev_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/types.h b/usr/src/lib/libbc/inc/include/sys/types.h deleted file mode 100644 index 765d3ea55e..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/types.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * 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_types_h -#define __sys_types_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Basic system types. - */ - -#include <sys/stdtypes.h> /* ANSI & POSIX types */ - -#ifndef _POSIX_SOURCE -#include <sys/sysmacros.h> - -#define physadr physadr_t -#define quad quad_t - -typedef unsigned char u_char; -typedef unsigned short u_short; -typedef unsigned int u_int; -typedef unsigned long u_long; -typedef unsigned short ushort; /* System V compatibility */ -typedef unsigned int uint; /* System V compatibility */ -#endif /* !_POSIX_SOURCE */ - -typedef struct _physadr_t { int r[1]; } *physadr_t; -typedef struct label_t { - int val[2]; -} label_t; -typedef struct _quad_t { long val[2]; } quad_t; -typedef long daddr_t; -typedef char * caddr_t; -typedef unsigned long ino_t; -typedef short dev_t; -typedef long off_t; -typedef unsigned short uid_t; -typedef unsigned short gid_t; -typedef long key_t; -typedef char * addr_t; - -#ifndef _POSIX_SOURCE - -#define NBBY 8 /* number of bits in a byte */ -/* - * Select uses bit masks of file descriptors in longs. - * These macros manipulate such bit fields (the filesystem macros use chars). - * FD_SETSIZE may be defined by the user, but the default here - * should be >= NOFILE (param.h). - */ -#ifndef FD_SETSIZE -#define FD_SETSIZE 256 -#endif - -typedef long fd_mask; -#define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */ -#ifndef howmany -#define howmany(x, y) (((x)+((y)-1))/(y)) -#endif - -typedef struct fd_set { - fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)]; -} fd_set; - - -#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) -#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) -#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) -#define FD_ZERO(p) bzero((char *)(p), sizeof (*(p))) - -#endif /* !_POSIX_SOURCE */ -#endif /* !__sys_types_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/uio.h b/usr/src/lib/libbc/inc/include/sys/uio.h deleted file mode 100644 index 3509436478..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/uio.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * 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. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef _sys_uio_h -#define _sys_uio_h - -struct iovec { - caddr_t iov_base; - int iov_len; -}; - -/* - * The uio_seg define below is obsolete and is included only - * for compatibility with previous releases. New code should - * use the uio_segflg field. - */ -struct uio { - struct iovec *uio_iov; - int uio_iovcnt; - off_t uio_offset; - short uio_segflg; -#define uio_seg uio_segflg /* obsolete */ - short uio_fmode; /* careful what you put here, the file - * bits that fill this are an int. */ - int uio_resid; -}; - -enum uio_rw { UIO_READ, UIO_WRITE }; - -/* - * Segment flag values (should be enum). - * - * The UIOSEG_* defines are obsolete and are included only - * for compatibility with previous releases. New code should - * use the UIO_* definitions. - */ -#define UIO_USERSPACE 0 /* from user data space */ -#define UIO_SYSSPACE 1 /* from system space */ -#define UIO_USERISPACE 2 /* from user I space */ - -#define UIOSEG_USER 0 /* obsolete */ -#define UIOSEG_KERNEL 1 /* obsolete */ - -#endif /*!_sys_uio_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/utsname.h b/usr/src/lib/libbc/inc/include/sys/utsname.h deleted file mode 100644 index 623dc23119..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/utsname.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ -/* from S5R2 6.1 */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef __sys_utsname_h -#define __sys_utsname_h - -struct utsname { - char sysname[9]; - char nodename[9]; - char nodeext[65-9]; /* extends nodename to MAXHOSTNAMELEN+1 chars */ - char release[9]; - char version[9]; - char machine[9]; -}; - -#ifdef KERNEL -extern struct utsname utsname; -#else -int uname(/* struct utsname *name */); -#endif - -#endif /* !__sys_utsname_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/vfs.h b/usr/src/lib/libbc/inc/include/sys/vfs.h deleted file mode 100644 index b593914bfe..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/vfs.h +++ /dev/null @@ -1,164 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1988 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * File system identifier. Should be unique (at least per machine). - */ - -#ifndef _sys_vfs_h -#define _sys_vfs_h - -typedef struct { - long val[2]; /* file system id type */ -} fsid_t; - -/* - * File identifier. Should be unique per filesystem on a single machine. - */ -#define MAXFIDSZ 16 -#define freefid(fidp) \ - kmem_free((caddr_t)(fidp), sizeof (struct fid) - MAXFIDSZ + (fidp)->fid_len) - -struct fid { - u_short fid_len; /* length of data in bytes */ - char fid_data[MAXFIDSZ]; /* data (variable length) */ -}; - -/* - * Structure per mounted file system. - * Each mounted file system has an array of - * operations and an instance record. - * The file systems are put on a singly linked list. - * If vfs_stats is non-NULL statistics are gathered, see vfs_stat.h - */ -struct vfs { - struct vfs *vfs_next; /* next vfs in vfs list */ - struct vfsops *vfs_op; /* operations on vfs */ - struct vnode *vfs_vnodecovered; /* vnode we mounted on */ - int vfs_flag; /* flags */ - int vfs_bsize; /* native block size */ - fsid_t vfs_fsid; /* file system id */ - caddr_t vfs_stats; /* filesystem statistics */ - caddr_t vfs_data; /* private data */ -}; - -/* - * vfs flags. - * VFS_MLOCK lock the vfs so that name lookup cannot proceed past the vfs. - * This keeps the subtree stable during mounts and unmounts. - */ -#define VFS_RDONLY 0x01 /* read only vfs */ -#define VFS_MLOCK 0x02 /* lock vfs so that subtree is stable */ -#define VFS_MWAIT 0x04 /* someone is waiting for lock */ -#define VFS_NOSUID 0x08 /* turn off set-uid on exec */ -#define VFS_GRPID 0x10 /* Old BSD group-id on create */ -#define VFS_NOSUB 0x20 /* No mounts allowed beneath this fs */ -#define VFS_REMOUNT 0x40 /* modify mount otions only */ -#define VFS_MULTI 0x80 /* Do multi-component lookup on files */ - -/* - * Operations supported on virtual file system. - */ -struct vfsops { - int (*vfs_mount)(); /* mount file system */ - int (*vfs_unmount)(); /* unmount file system */ - int (*vfs_root)(); /* get root vnode */ - int (*vfs_statfs)(); /* get fs statistics */ - int (*vfs_sync)(); /* flush fs buffers */ - int (*vfs_vget)(); /* get vnode from fid */ - int (*vfs_mountroot)(); /* mount the root filesystem */ - int (*vfs_swapvp)(); /* return vnode for swap */ -}; - -#define VFS_MOUNT(VFSP, PATH, DATA) \ - (*(VFSP)->vfs_op->vfs_mount)(VFSP, PATH, DATA) -#define VFS_UNMOUNT(VFSP) (*(VFSP)->vfs_op->vfs_unmount)(VFSP) -#define VFS_ROOT(VFSP, VPP) (*(VFSP)->vfs_op->vfs_root)(VFSP,VPP) -#define VFS_STATFS(VFSP, SBP) (*(VFSP)->vfs_op->vfs_statfs)(VFSP,SBP) -#define VFS_SYNC(VFSP) (*(VFSP)->vfs_op->vfs_sync)(VFSP) -#define VFS_VGET(VFSP, VPP, FIDP) (*(VFSP)->vfs_op->vfs_vget)(VFSP, VPP, FIDP) -#define VFS_MOUNTROOT(VFSP, VPP, NM) \ - (*(VFSP)->vfs_op->vfs_mountroot)(VFSP, VPP, NM) -#define VFS_SWAPVP(VFSP, VPP, NM) (*(VFSP)->vfs_op->vfs_swapvp)(VFSP, VPP, NM) - -/* - * file system statistics - */ -struct statfs { - long f_type; /* type of info, zero for now */ - long f_bsize; /* fundamental file system block size */ - long f_blocks; /* total blocks in file system */ - long f_bfree; /* free block in fs */ - long f_bavail; /* free blocks avail to non-superuser */ - long f_files; /* total file nodes in file system */ - long f_ffree; /* free file nodes in fs */ - fsid_t f_fsid; /* file system id */ - long f_spare[7]; /* spare for later */ -}; - -#ifdef KERNEL -/* - * Filesystem type switch table - */ -struct vfssw { - char *vsw_name; /* type name string */ - struct vfsops *vsw_ops; /* filesystem operations vector */ -}; - -/* - * public operations - */ -extern void vfs_mountroot(); /* mount the root */ -extern int vfs_add(); /* add a new vfs to mounted vfs list */ -extern void vfs_remove(); /* remove a vfs from mounted vfs list */ -extern int vfs_lock(); /* lock a vfs */ -extern void vfs_unlock(); /* unlock a vfs */ -extern struct vfs *getvfs(); /* return vfs given fsid */ -extern struct vfssw *getfstype(); /* find default filesystem type */ -extern int vfs_getmajor(); /* get major device # for an fs type */ -extern void vfs_putmajor(); /* free major device # for an fs type */ -extern int vfs_getnum(); /* get device # for an fs type */ -extern void vfs_putnum(); /* release device # for an fs type */ - -#define VFS_INIT(VFSP, OP, DATA) { \ - (VFSP)->vfs_next = (struct vfs *)0; \ - (VFSP)->vfs_op = (OP); \ - (VFSP)->vfs_flag = 0; \ - (VFSP)->vfs_stats = NULL; \ - (VFSP)->vfs_data = (DATA); \ -} - -/* - * globals - */ -extern struct vfs *rootvfs; /* ptr to root vfs structure */ -extern struct vfssw vfssw[]; /* table of filesystem types */ -extern struct vfssw *vfsNVFS; /* vfs switch table end marker */ -#endif - -#endif /*!_sys_vfs_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/wait.h b/usr/src/lib/libbc/inc/include/sys/wait.h deleted file mode 100644 index e374f677f6..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/wait.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * 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_wait_h -#define __sys_wait_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * This file holds definitions relevant to the wait system call. - * Some of the options here are available only through the ``wait3'' - * entry point; the old entry point with one argument has more fixed - * semantics, never returning status of unstopped children, hanging until - * a process terminates if any are outstanding, and never returns - * detailed information about process resource utilization (<vtimes.h>). - */ - -#ifndef _POSIX_SOURCE -#define __wait wait -#define w_termsig __w_termsig -#define w_coredump __w_coredump -#define w_retcode __w_retcode -#define w_stopval __w_stopval -#define w_stopsig __w_stopsig -#define WSTOPPED _WSTOPPED -#endif /* !_POSIX_SOURCE */ - -/* - * Structure of the information in the first word returned by both - * wait and wait3. If w_stopval==WSTOPPED, then the second structure - * describes the information returned, else the first. See WUNTRACED below. - */ -union __wait { - int w_status; /* used in syscall */ - /* - * Terminated process status. - */ - struct { - unsigned short w_Fill1:16; /* high 16 bits unused */ - unsigned short w_Retcode:8; /* exit code if w_termsig==0 */ - unsigned short w_Coredump:1; /* core dump indicator */ - unsigned short w_Termsig:7; /* termination signal */ - } w_T; - /* - * Stopped process status. Returned - * only for traced children unless requested - * with the WUNTRACED option bit. - */ - struct { - unsigned short w_Fill2:16; /* high 16 bits unused */ - unsigned short w_Stopsig:8; /* signal that stopped us */ - unsigned short w_Stopval:8; /* == W_STOPPED if stopped */ - } w_S; -}; -#define __w_termsig w_T.w_Termsig -#define __w_coredump w_T.w_Coredump -#define __w_retcode w_T.w_Retcode -#define __w_stopval w_S.w_Stopval -#define __w_stopsig w_S.w_Stopsig -#define _WSTOPPED 0177 /* value of s.stopval if process is stopped */ - -/* - * Option bits for the second argument of wait3. WNOHANG causes the - * wait to not hang if there are no stopped or terminated processes, rather - * returning an error indication in this case (pid==0). WUNTRACED - * indicates that the caller should receive status about untraced children - * which stop due to signals. If children are stopped and a wait without - * this option is done, it is as though they were still running... nothing - * about them is returned. - */ -#define WNOHANG 1 /* dont hang in wait */ -#define WUNTRACED 2 /* tell about stopped, untraced children */ - -#define WIFSTOPPED(x) (((union __wait*)&(x))->__w_stopval == _WSTOPPED) -#define WIFSIGNALED(x) (((union __wait*)&(x))->__w_stopval != _WSTOPPED && \ - ((union __wait*)&(x))->__w_termsig != 0) -#define WIFEXITED(x) (((union __wait*)&(x))->__w_stopval != _WSTOPPED && \ - ((union __wait*)&(x))->__w_termsig == 0) -#define WEXITSTATUS(x) (((union __wait*)&(x))->__w_retcode) -#define WTERMSIG(x) (((union __wait*)&(x))->__w_termsig) -#define WSTOPSIG(x) (((union __wait*)&(x))->__w_stopsig) - -#include <sys/stdtypes.h> - -pid_t wait(/* int *loc */); -pid_t waitpid(/* pid_t pid, int *loc, int opts */); - -#endif /* !__sys_wait_h */ |
