17c478bdstevel@tonic-gate/*
27c478bdstevel@tonic-gate * CDDL HEADER START
37c478bdstevel@tonic-gate *
47c478bdstevel@tonic-gate * The contents of this file are subject to the terms of the
57c478bdstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only
67c478bdstevel@tonic-gate * (the "License").  You may not use this file except in compliance
77c478bdstevel@tonic-gate * with the License.
87c478bdstevel@tonic-gate *
97c478bdstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107c478bdstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
117c478bdstevel@tonic-gate * See the License for the specific language governing permissions
127c478bdstevel@tonic-gate * and limitations under the License.
137c478bdstevel@tonic-gate *
147c478bdstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
157c478bdstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167c478bdstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
177c478bdstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
187c478bdstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
197c478bdstevel@tonic-gate *
207c478bdstevel@tonic-gate * CDDL HEADER END
217c478bdstevel@tonic-gate */
227c478bdstevel@tonic-gate/*
237c478bdstevel@tonic-gate * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
247c478bdstevel@tonic-gate * Use is subject to license terms.
257c478bdstevel@tonic-gate */
267c478bdstevel@tonic-gate
277c478bdstevel@tonic-gate/*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
28b4203d7Marcel Telka/*	  All Rights Reserved	*/
297c478bdstevel@tonic-gate
307c478bdstevel@tonic-gate/*
317c478bdstevel@tonic-gate * University Copyright- Copyright (c) 1982, 1986, 1988
327c478bdstevel@tonic-gate * The Regents of the University of California
337c478bdstevel@tonic-gate * All Rights Reserved
347c478bdstevel@tonic-gate *
357c478bdstevel@tonic-gate * University Acknowledgment- Portions of this document are derived from
367c478bdstevel@tonic-gate * software developed by the University of California, Berkeley, and its
377c478bdstevel@tonic-gate * contributors.
387c478bdstevel@tonic-gate */
397c478bdstevel@tonic-gate
407c478bdstevel@tonic-gate#ifndef _SYS_ERRNO_H
417c478bdstevel@tonic-gate#define	_SYS_ERRNO_H
427c478bdstevel@tonic-gate
437c478bdstevel@tonic-gate#ifdef	__cplusplus
447c478bdstevel@tonic-gateextern "C" {
457c478bdstevel@tonic-gate#endif
467c478bdstevel@tonic-gate
477c478bdstevel@tonic-gate/*
487c478bdstevel@tonic-gate * Error codes
497c478bdstevel@tonic-gate */
507c478bdstevel@tonic-gate
517c478bdstevel@tonic-gate#define	EPERM	1	/* Not super-user			*/
527c478bdstevel@tonic-gate#define	ENOENT	2	/* No such file or directory		*/
537c478bdstevel@tonic-gate#define	ESRCH	3	/* No such process			*/
547c478bdstevel@tonic-gate#define	EINTR	4	/* interrupted system call		*/
557c478bdstevel@tonic-gate#define	EIO	5	/* I/O error				*/
567c478bdstevel@tonic-gate#define	ENXIO	6	/* No such device or address		*/
577c478bdstevel@tonic-gate#define	E2BIG	7	/* Arg list too long			*/
587c478bdstevel@tonic-gate#define	ENOEXEC	8	/* Exec format error			*/
597c478bdstevel@tonic-gate#define	EBADF	9	/* Bad file number			*/
607c478bdstevel@tonic-gate#define	ECHILD	10	/* No children				*/
617c478bdstevel@tonic-gate#define	EAGAIN	11	/* Resource temporarily unavailable	*/
627c478bdstevel@tonic-gate#define	ENOMEM	12	/* Not enough core			*/
637c478bdstevel@tonic-gate#define	EACCES	13	/* Permission denied			*/
647c478bdstevel@tonic-gate#define	EFAULT	14	/* Bad address				*/
657c478bdstevel@tonic-gate#define	ENOTBLK	15	/* Block device required		*/
667c478bdstevel@tonic-gate#define	EBUSY	16	/* Mount device busy			*/
677c478bdstevel@tonic-gate#define	EEXIST	17	/* File exists				*/
687c478bdstevel@tonic-gate#define	EXDEV	18	/* Cross-device link			*/
697c478bdstevel@tonic-gate#define	ENODEV	19	/* No such device			*/
707c478bdstevel@tonic-gate#define	ENOTDIR	20	/* Not a directory			*/
717c478bdstevel@tonic-gate#define	EISDIR	21	/* Is a directory			*/
727c478bdstevel@tonic-gate#define	EINVAL	22	/* Invalid argument			*/
737c478bdstevel@tonic-gate#define	ENFILE	23	/* File table overflow			*/
747c478bdstevel@tonic-gate#define	EMFILE	24	/* Too many open files			*/
757c478bdstevel@tonic-gate#define	ENOTTY	25	/* Inappropriate ioctl for device	*/
767c478bdstevel@tonic-gate#define	ETXTBSY	26	/* Text file busy			*/
777c478bdstevel@tonic-gate#define	EFBIG	27	/* File too large			*/
787c478bdstevel@tonic-gate#define	ENOSPC	28	/* No space left on device		*/
797c478bdstevel@tonic-gate#define	ESPIPE	29	/* Illegal seek				*/
807c478bdstevel@tonic-gate#define	EROFS	30	/* Read only file system		*/
817c478bdstevel@tonic-gate#define	EMLINK	31	/* Too many links			*/
827c478bdstevel@tonic-gate#define	EPIPE	32	/* Broken pipe				*/
837c478bdstevel@tonic-gate#define	EDOM	33	/* Math arg out of domain of func	*/
847c478bdstevel@tonic-gate#define	ERANGE	34	/* Math result not representable	*/
857c478bdstevel@tonic-gate#define	ENOMSG	35	/* No message of desired type		*/
867c478bdstevel@tonic-gate#define	EIDRM	36	/* Identifier removed			*/
877c478bdstevel@tonic-gate#define	ECHRNG	37	/* Channel number out of range		*/
887c478bdstevel@tonic-gate#define	EL2NSYNC 38	/* Level 2 not synchronized		*/
897c478bdstevel@tonic-gate#define	EL3HLT	39	/* Level 3 halted			*/
907c478bdstevel@tonic-gate#define	EL3RST	40	/* Level 3 reset			*/
917c478bdstevel@tonic-gate#define	ELNRNG	41	/* Link number out of range		*/
927c478bdstevel@tonic-gate#define	EUNATCH 42	/* Protocol driver not attached		*/
937c478bdstevel@tonic-gate#define	ENOCSI	43	/* No CSI structure available		*/
947c478bdstevel@tonic-gate#define	EL2HLT	44	/* Level 2 halted			*/
957c478bdstevel@tonic-gate#define	EDEADLK	45	/* Deadlock condition.			*/
967c478bdstevel@tonic-gate#define	ENOLCK	46	/* No record locks available.		*/
977c478bdstevel@tonic-gate#define	ECANCELED 47	/* Operation canceled			*/
987c478bdstevel@tonic-gate#define	ENOTSUP	48	/* Operation not supported		*/
997c478bdstevel@tonic-gate
1007c478bdstevel@tonic-gate/* Filesystem Quotas */
1017c478bdstevel@tonic-gate#define	EDQUOT	49	/* Disc quota exceeded			*/
1027c478bdstevel@tonic-gate
1037c478bdstevel@tonic-gate/* Convergent Error Returns */
1047c478bdstevel@tonic-gate#define	EBADE	50	/* invalid exchange			*/
1057c478bdstevel@tonic-gate#define	EBADR	51	/* invalid request descriptor		*/
1067c478bdstevel@tonic-gate#define	EXFULL	52	/* exchange full			*/
1077c478bdstevel@tonic-gate#define	ENOANO	53	/* no anode				*/
1087c478bdstevel@tonic-gate#define	EBADRQC	54	/* invalid request code			*/
1097c478bdstevel@tonic-gate#define	EBADSLT	55	/* invalid slot				*/
1107c478bdstevel@tonic-gate#define	EDEADLOCK 56	/* file locking deadlock error		*/
1117c478bdstevel@tonic-gate
1127c478bdstevel@tonic-gate#define	EBFONT	57	/* bad font file fmt			*/
1137c478bdstevel@tonic-gate
1147c478bdstevel@tonic-gate/* Interprocess Robust Locks */
1157c478bdstevel@tonic-gate#define	EOWNERDEAD	58	/* process died with the lock */
1167c478bdstevel@tonic-gate#define	ENOTRECOVERABLE	59	/* lock is not recoverable */
1177c478bdstevel@tonic-gate
1187c478bdstevel@tonic-gate/* stream problems */
1197c478bdstevel@tonic-gate#define	ENOSTR	60	/* Device not a stream			*/
1207c478bdstevel@tonic-gate#define	ENODATA	61	/* no data (for no delay io)		*/
1217c478bdstevel@tonic-gate#define	ETIME	62	/* timer expired			*/
1227c478bdstevel@tonic-gate#define	ENOSR	63	/* out of streams resources		*/
1237c478bdstevel@tonic-gate
1247c478bdstevel@tonic-gate#define	ENONET	64	/* Machine is not on the network	*/
1257c478bdstevel@tonic-gate#define	ENOPKG	65	/* Package not installed		*/
1267c478bdstevel@tonic-gate#define	EREMOTE	66	/* The object is remote			*/
1277c478bdstevel@tonic-gate#define	ENOLINK	67	/* the link has been severed		*/
1287c478bdstevel@tonic-gate#define	EADV	68	/* advertise error			*/
1297c478bdstevel@tonic-gate#define	ESRMNT	69	/* srmount error			*/
1307c478bdstevel@tonic-gate
1317c478bdstevel@tonic-gate#define	ECOMM	70	/* Communication error on send		*/
1327c478bdstevel@tonic-gate#define	EPROTO	71	/* Protocol error			*/
1337c478bdstevel@tonic-gate
1347c478bdstevel@tonic-gate/* Interprocess Robust Locks */
1357c478bdstevel@tonic-gate#define	ELOCKUNMAPPED	72	/* locked lock was unmapped */
1367c478bdstevel@tonic-gate
1377c478bdstevel@tonic-gate#define	ENOTACTIVE 73	/* Facility is not active		*/
1387c478bdstevel@tonic-gate#define	EMULTIHOP 74	/* multihop attempted			*/
1397c478bdstevel@tonic-gate#define	EBADMSG 77	/* trying to read unreadable message	*/
1407c478bdstevel@tonic-gate#define	ENAMETOOLONG 78	/* path name is too long		*/
1417c478bdstevel@tonic-gate#define	EOVERFLOW 79	/* value too large to be stored in data type */
1427c478bdstevel@tonic-gate#define	ENOTUNIQ 80	/* given log. name not unique		*/
1437c478bdstevel@tonic-gate#define	EBADFD	81	/* f.d. invalid for this operation	*/
1447c478bdstevel@tonic-gate#define	EREMCHG	82	/* Remote address changed		*/
1457c478bdstevel@tonic-gate
1467c478bdstevel@tonic-gate/* shared library problems */
1477c478bdstevel@tonic-gate#define	ELIBACC	83	/* Can't access a needed shared lib.	*/
1487c478bdstevel@tonic-gate#define	ELIBBAD	84	/* Accessing a corrupted shared lib.	*/
1497c478bdstevel@tonic-gate#define	ELIBSCN	85	/* .lib section in a.out corrupted.	*/
1507c478bdstevel@tonic-gate#define	ELIBMAX	86	/* Attempting to link in too many libs.	*/
1517c478bdstevel@tonic-gate#define	ELIBEXEC 87	/* Attempting to exec a shared library.	*/
1527c478bdstevel@tonic-gate#define	EILSEQ	88	/* Illegal byte sequence.		*/
1537c478bdstevel@tonic-gate#define	ENOSYS	89	/* Unsupported file system operation	*/
1547c478bdstevel@tonic-gate#define	ELOOP	90	/* Symbolic link loop			*/
1557c478bdstevel@tonic-gate#define	ERESTART 91	/* Restartable system call		*/
1567c478bdstevel@tonic-gate#define	ESTRPIPE 92	/* if pipe/FIFO, don't sleep in stream head */
1577c478bdstevel@tonic-gate#define	ENOTEMPTY 93	/* directory not empty			*/
1587c478bdstevel@tonic-gate#define	EUSERS	94	/* Too many users (for UFS)		*/
1597c478bdstevel@tonic-gate
1607c478bdstevel@tonic-gate/* BSD Networking Software */
1617c478bdstevel@tonic-gate	/* argument errors */
1627c478bdstevel@tonic-gate#define	ENOTSOCK	95	/* Socket operation on non-socket */
1637c478bdstevel@tonic-gate#define	EDESTADDRREQ	96	/* Destination address required */
1647c478bdstevel@tonic-gate#define	EMSGSIZE	97	/* Message too long */
1657c478bdstevel@tonic-gate#define	EPROTOTYPE	98	/* Protocol wrong type for socket */
1667c478bdstevel@tonic-gate#define	ENOPROTOOPT	99	/* Protocol not available */
1677c478bdstevel@tonic-gate#define	EPROTONOSUPPORT	120	/* Protocol not supported */
1687c478bdstevel@tonic-gate#define	ESOCKTNOSUPPORT	121	/* Socket type not supported */
1697c478bdstevel@tonic-gate#define	EOPNOTSUPP	122	/* Operation not supported on socket */
1707c478bdstevel@tonic-gate#define	EPFNOSUPPORT	123	/* Protocol family not supported */
1717c478bdstevel@tonic-gate#define	EAFNOSUPPORT	124	/* Address family not supported by */
1727c478bdstevel@tonic-gate				/* protocol family */
1737c478bdstevel@tonic-gate#define	EADDRINUSE	125	/* Address already in use */
1747c478bdstevel@tonic-gate#define	EADDRNOTAVAIL	126	/* Can't assign requested address */
1757c478bdstevel@tonic-gate	/* operational errors */
1767c478bdstevel@tonic-gate#define	ENETDOWN	127	/* Network is down */
1777c478bdstevel@tonic-gate#define	ENETUNREACH	128	/* Network is unreachable */
1787c478bdstevel@tonic-gate#define	ENETRESET	129	/* Network dropped connection because */
1797c478bdstevel@tonic-gate				/* of reset */
1807c478bdstevel@tonic-gate#define	ECONNABORTED	130	/* Software caused connection abort */
1817c478bdstevel@tonic-gate#define	ECONNRESET	131	/* Connection reset by peer */
1827c478bdstevel@tonic-gate#define	ENOBUFS		132	/* No buffer space available */
1837c478bdstevel@tonic-gate#define	EISCONN		133	/* Socket is already connected */
1847c478bdstevel@tonic-gate#define	ENOTCONN	134	/* Socket is not connected */
1857c478bdstevel@tonic-gate/* XENIX has 135 - 142 */
1867c478bdstevel@tonic-gate#define	ESHUTDOWN	143	/* Can't send after socket shutdown */
1877c478bdstevel@tonic-gate#define	ETOOMANYREFS	144	/* Too many references: can't splice */
1887c478bdstevel@tonic-gate#define	ETIMEDOUT	145	/* Connection timed out */
1897c478bdstevel@tonic-gate#define	ECONNREFUSED	146	/* Connection refused */
1907c478bdstevel@tonic-gate#define	EHOSTDOWN	147	/* Host is down */
1917c478bdstevel@tonic-gate#define	EHOSTUNREACH	148	/* No route to host */
1927c478bdstevel@tonic-gate#define	EWOULDBLOCK	EAGAIN
1937c478bdstevel@tonic-gate#define	EALREADY	149	/* operation already in progress */
1947c478bdstevel@tonic-gate#define	EINPROGRESS	150	/* operation now in progress */
1957c478bdstevel@tonic-gate
1967c478bdstevel@tonic-gate/* SUN Network File System */
1977c478bdstevel@tonic-gate#define	ESTALE		151	/* Stale NFS file handle */
1987c478bdstevel@tonic-gate
1997c478bdstevel@tonic-gate
2007c478bdstevel@tonic-gate#ifdef	__cplusplus
2017c478bdstevel@tonic-gate}
2027c478bdstevel@tonic-gate#endif
2037c478bdstevel@tonic-gate
2047c478bdstevel@tonic-gate#endif	/* _SYS_ERRNO_H */
205