os/ossrv/genericopenlibs/openenvcore/include/errno.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericopenlibs/openenvcore/include/errno.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,211 @@
     1.4 +/*-
     1.5 + * © Portions copyright (c) 2005 Nokia Corporation.  All rights reserved.
     1.6 + * Copyright (c) 1982, 1986, 1989, 1993
     1.7 + *	The Regents of the University of California.  All rights reserved.
     1.8 + * (c) UNIX System Laboratories, Inc.
     1.9 + * All or some portions of this file are derived from material licensed
    1.10 + * to the University of California by American Telephone and Telegraph
    1.11 + * Co. or Unix System Laboratories, Inc. and are reproduced herein with
    1.12 + * the permission of UNIX System Laboratories, Inc.
    1.13 + *
    1.14 + * Redistribution and use in source and binary forms, with or without
    1.15 + * modification, are permitted provided that the following conditions
    1.16 + * are met:
    1.17 + * 1. Redistributions of source code must retain the above copyright
    1.18 + *    notice, this list of conditions and the following disclaimer.
    1.19 + * 2. Redistributions in binary form must reproduce the above copyright
    1.20 + *    notice, this list of conditions and the following disclaimer in the
    1.21 + *    documentation and/or other materials provided with the distribution.
    1.22 + * 4. Neither the name of the University nor the names of its contributors
    1.23 + *    may be used to endorse or promote products derived from this software
    1.24 + *    without specific prior written permission.
    1.25 + *
    1.26 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    1.27 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1.28 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    1.29 + * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    1.30 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    1.31 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    1.32 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    1.33 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    1.34 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    1.35 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    1.36 + * SUCH DAMAGE.
    1.37 + *
    1.38 + *	@(#)errno.h	8.5 (Berkeley) 1/21/94
    1.39 + * $FreeBSD: src/sys/sys/errno.h,v 1.28 2005/04/02 12:33:28 das Exp $
    1.40 + */
    1.41 +
    1.42 +#ifndef _ERRNO_H_
    1.43 +#define _ERRNO_H_
    1.44 +
    1.45 +#ifndef _KERNEL
    1.46 +#include <sys/cdefs.h>
    1.47 +#ifndef __SYMBIAN32__
    1.48 +#include "reent.h"
    1.49 +#endif //__SYMBIAN32__
    1.50 +__BEGIN_DECLS
    1.51 +#ifdef __SYMBIAN32__
    1.52 +IMPORT_C int *__errno(void);
    1.53 +#endif //__SYMBIAN32__
    1.54 +
    1.55 +__END_DECLS
    1.56 +#ifndef __SYMBIAN32__	
    1.57 +#define	errno		(* __error())
    1.58 +#else //__SYMBIAN32__
    1.59 +#define	errno		(*__errno())
    1.60 +#endif //__SYMBIAN32__
    1.61 +
    1.62 +#endif
    1.63 +
    1.64 +#define	EPERM		1		/* Operation not permitted */
    1.65 +#define	ENOENT		2		/* No such file or directory */
    1.66 +#define	ESRCH		3		/* No such process */
    1.67 +#define	EINTR		4		/* Interrupted system call */
    1.68 +#define	EIO		5		/* Input/output error */
    1.69 +#define	ENXIO		6		/* Device not configured */
    1.70 +#define	E2BIG		7		/* Argument list too long */
    1.71 +#define	ENOEXEC		8		/* Exec format error */
    1.72 +#define	EBADF		9		/* Bad file descriptor */
    1.73 +#define	ECHILD		10		/* No child processes */
    1.74 +#define	EDEADLK		11		/* Resource deadlock avoided */
    1.75 +					/* 11 was EAGAIN */
    1.76 +#define	ENOMEM		12		/* Cannot allocate memory */
    1.77 +#define	EACCES		13		/* Permission denied */
    1.78 +#define	EFAULT		14		/* Bad address */
    1.79 +#ifndef _POSIX_SOURCE
    1.80 +#define	ENOTBLK		15		/* Block device required */
    1.81 +#endif //_POSIX_SOURCE
    1.82 +#define	EBUSY		16		/* Device busy */
    1.83 +#define	EEXIST		17		/* File exists */
    1.84 +#define	EXDEV		18		/* Cross-device link */
    1.85 +#define	ENODEV		19		/* Operation not supported by device */
    1.86 +#define	ENOTDIR		20		/* Not a directory */
    1.87 +#define	EISDIR		21		/* Is a directory */
    1.88 +#define	EINVAL		22		/* Invalid argument */
    1.89 +#define	ENFILE		23		/* Too many open files in system */
    1.90 +#define	EMFILE		24		/* Too many open files */
    1.91 +#define	ENOTTY		25		/* Inappropriate ioctl for device */
    1.92 +#ifndef _POSIX_SOURCE
    1.93 +#define	ETXTBSY		26		/* Text file busy */
    1.94 +#endif  //_POSIX_SOURCE
    1.95 +#define	EFBIG		27		/* File too large */
    1.96 +#define	ENOSPC		28		/* No space left on device */
    1.97 +#define	ESPIPE		29		/* Illegal seek */
    1.98 +#define	EROFS		30		/* Read-only filesystem */
    1.99 +#define	EMLINK		31		/* Too many links */
   1.100 +#define	EPIPE		32		/* Broken pipe */
   1.101 +
   1.102 +/* math software */
   1.103 +#define	EDOM		33		/* Numerical argument out of domain */
   1.104 +#define	ERANGE		34		/* Result too large */
   1.105 +
   1.106 +/* non-blocking and interrupt i/o */
   1.107 +#define	EAGAIN		35		/* Resource temporarily unavailable */
   1.108 +#ifndef _POSIX_SOURCE
   1.109 +#define	EWOULDBLOCK	EAGAIN		/* Operation would block */
   1.110 +#define	EINPROGRESS	36		/* Operation now in progress */
   1.111 +#define	EALREADY	37		/* Operation already in progress */
   1.112 +
   1.113 +/* ipc/network software -- argument errors */
   1.114 +#define	ENOTSOCK	38		/* Socket operation on non-socket */
   1.115 +#define	EDESTADDRREQ	39		/* Destination address required */
   1.116 +#define	EMSGSIZE	40		/* Message too long */
   1.117 +#define	EPROTOTYPE	41		/* Protocol wrong type for socket */
   1.118 +#define	ENOPROTOOPT	42		/* Protocol not available */
   1.119 +#define	EPROTONOSUPPORT	43		/* Protocol not supported */
   1.120 +#define	ESOCKTNOSUPPORT	44		/* Socket type not supported */
   1.121 +#define	EOPNOTSUPP	45		/* Operation not supported */
   1.122 +#define	ENOTSUP		EOPNOTSUPP	/* Operation not supported */
   1.123 +#define	EPFNOSUPPORT	46		/* Protocol family not supported */
   1.124 +#define	EAFNOSUPPORT	47		/* Address family not supported by protocol family */
   1.125 +#define	EADDRINUSE	48		/* Address already in use */
   1.126 +#define	EADDRNOTAVAIL	49		/* Can't assign requested address */
   1.127 +
   1.128 +/* ipc/network software -- operational errors */
   1.129 +#define	ENETDOWN	50		/* Network is down */
   1.130 +#define	ENETUNREACH	51		/* Network is unreachable */
   1.131 +#define	ENETRESET	52		/* Network dropped connection on reset */
   1.132 +#define	ECONNABORTED	53		/* Software caused connection abort */
   1.133 +#define	ECONNRESET	54		/* Connection reset by peer */
   1.134 +#define	ENOBUFS		55		/* No buffer space available */
   1.135 +#define	EISCONN		56		/* Socket is already connected */
   1.136 +#define	ENOTCONN	57		/* Socket is not connected */
   1.137 +#define	ESHUTDOWN	58		/* Can't send after socket shutdown */
   1.138 +#define	ETOOMANYREFS	59		/* Too many references: can't splice */
   1.139 +#define	ETIMEDOUT	60		/* Operation timed out */
   1.140 +#define	ECONNREFUSED	61		/* Connection refused */
   1.141 +
   1.142 +#define	ELOOP		62		/* Too many levels of symbolic links */
   1.143 +#endif /* _POSIX_SOURCE */
   1.144 +#define	ENAMETOOLONG	63		/* File name too long */
   1.145 +
   1.146 +/* should be rearranged */
   1.147 +#ifndef _POSIX_SOURCE
   1.148 +#define	EHOSTDOWN	64		/* Host is down */
   1.149 +#define	EHOSTUNREACH	65		/* No route to host */
   1.150 +#endif /* _POSIX_SOURCE */
   1.151 +#define	ENOTEMPTY	66		/* Directory not empty */
   1.152 +
   1.153 +/* quotas & mush */
   1.154 +#ifndef _POSIX_SOURCE
   1.155 +#define	EPROCLIM	67		/* Too many processes */
   1.156 +#define	EUSERS		68		/* Too many users */
   1.157 +#define	EDQUOT		69		/* Disc quota exceeded */
   1.158 +
   1.159 +/* Network File System */
   1.160 +#define	ESTALE		70		/* Stale NFS file handle */
   1.161 +#define	EREMOTE		71		/* Too many levels of remote in path */
   1.162 +#define	EBADRPC		72		/* RPC struct is bad */
   1.163 +#define	ERPCMISMATCH	73		/* RPC version wrong */
   1.164 +#define	EPROGUNAVAIL	74		/* RPC prog. not avail */
   1.165 +#define	EPROGMISMATCH	75		/* Program version wrong */
   1.166 +#define	EPROCUNAVAIL	76		/* Bad procedure for program */
   1.167 +#endif /* _POSIX_SOURCE */
   1.168 +
   1.169 +#define	ENOLCK		77		/* No locks available */
   1.170 +#define	ENOSYS		78		/* Function not implemented */
   1.171 +
   1.172 +#ifndef _POSIX_SOURCE
   1.173 +#define	EFTYPE		79		/* Inappropriate file type or format */
   1.174 +#define	EAUTH		80		/* Authentication error */
   1.175 +#define	ENEEDAUTH	81		/* Need authenticator */
   1.176 +#define	EIDRM		82		/* Identifier removed */
   1.177 +#define	ENOMSG		83		/* No message of desired type */
   1.178 +#define	EOVERFLOW	84		/* Value too large to be stored in data type */
   1.179 +#define	ECANCELED	85		/* Operation canceled */
   1.180 +#define	EILSEQ		86		/* Illegal byte sequence */
   1.181 +#define	ENOATTR		87		/* Attribute not found */
   1.182 +
   1.183 +#define EDOOFUS		88		/* Programming error */
   1.184 +#endif /* _POSIX_SOURCE */
   1.185 +
   1.186 +#define	EBADMSG		89		/* Bad message */
   1.187 +#define	EMULTIHOP	90		/* Multihop attempted */
   1.188 +#define	ENOLINK		91		/* Link has been severed */
   1.189 +#define	EPROTO		92		/* Protocol error */
   1.190 +
   1.191 +
   1.192 +#ifdef _KERNEL
   1.193 +/* pseudo-errors returned inside kernel to modify return to process */
   1.194 +#define	ERESTART	(-1)		/* restart syscall */
   1.195 +#define	EJUSTRETURN	(-2)		/* don't modify regs, just return */
   1.196 +#define	ENOIOCTL	(-3)		/* ioctl not handled by this layer */
   1.197 +#define	EDIRIOCTL	(-4)		/* do direct ioctl in GEOM */
   1.198 +#endif 
   1.199 +
   1.200 +#ifdef __SYMBIAN32__
   1.201 +#define	ECOMM 123	/* Communication error on send */
   1.202 +#define __EMAXERRNO     124
   1.203 +#endif // __SYMBIAN32__
   1.204 +
   1.205 +
   1.206 +#ifndef _POSIX_SOURCE
   1.207 +#ifndef __SYMBIAN32__
   1.208 +#define ELAST 92
   1.209 +#else
   1.210 +#define ELAST  __EMAXERRNO /* Must be equal to largest errno */
   1.211 +#endif  //__SYMBIAN32__
   1.212 +#endif  /* _POSIX_SOURCE */
   1.213 +
   1.214 +#endif  // _ERRNO_H_