os/ossrv/genericopenlibs/openenvcore/include/errno.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/*-
sl@0
     2
 * © Portions copyright (c) 2005 Nokia Corporation.  All rights reserved.
sl@0
     3
 * Copyright (c) 1982, 1986, 1989, 1993
sl@0
     4
 *	The Regents of the University of California.  All rights reserved.
sl@0
     5
 * (c) UNIX System Laboratories, Inc.
sl@0
     6
 * All or some portions of this file are derived from material licensed
sl@0
     7
 * to the University of California by American Telephone and Telegraph
sl@0
     8
 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
sl@0
     9
 * the permission of UNIX System Laboratories, Inc.
sl@0
    10
 *
sl@0
    11
 * Redistribution and use in source and binary forms, with or without
sl@0
    12
 * modification, are permitted provided that the following conditions
sl@0
    13
 * are met:
sl@0
    14
 * 1. Redistributions of source code must retain the above copyright
sl@0
    15
 *    notice, this list of conditions and the following disclaimer.
sl@0
    16
 * 2. Redistributions in binary form must reproduce the above copyright
sl@0
    17
 *    notice, this list of conditions and the following disclaimer in the
sl@0
    18
 *    documentation and/or other materials provided with the distribution.
sl@0
    19
 * 4. Neither the name of the University nor the names of its contributors
sl@0
    20
 *    may be used to endorse or promote products derived from this software
sl@0
    21
 *    without specific prior written permission.
sl@0
    22
 *
sl@0
    23
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
sl@0
    24
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
sl@0
    25
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
sl@0
    26
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
sl@0
    27
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
sl@0
    28
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
sl@0
    29
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
sl@0
    30
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
sl@0
    31
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
sl@0
    32
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
sl@0
    33
 * SUCH DAMAGE.
sl@0
    34
 *
sl@0
    35
 *	@(#)errno.h	8.5 (Berkeley) 1/21/94
sl@0
    36
 * $FreeBSD: src/sys/sys/errno.h,v 1.28 2005/04/02 12:33:28 das Exp $
sl@0
    37
 */
sl@0
    38
sl@0
    39
#ifndef _ERRNO_H_
sl@0
    40
#define _ERRNO_H_
sl@0
    41
sl@0
    42
#ifndef _KERNEL
sl@0
    43
#include <sys/cdefs.h>
sl@0
    44
#ifndef __SYMBIAN32__
sl@0
    45
#include "reent.h"
sl@0
    46
#endif //__SYMBIAN32__
sl@0
    47
__BEGIN_DECLS
sl@0
    48
#ifdef __SYMBIAN32__
sl@0
    49
IMPORT_C int *__errno(void);
sl@0
    50
#endif //__SYMBIAN32__
sl@0
    51
sl@0
    52
__END_DECLS
sl@0
    53
#ifndef __SYMBIAN32__	
sl@0
    54
#define	errno		(* __error())
sl@0
    55
#else //__SYMBIAN32__
sl@0
    56
#define	errno		(*__errno())
sl@0
    57
#endif //__SYMBIAN32__
sl@0
    58
sl@0
    59
#endif
sl@0
    60
sl@0
    61
#define	EPERM		1		/* Operation not permitted */
sl@0
    62
#define	ENOENT		2		/* No such file or directory */
sl@0
    63
#define	ESRCH		3		/* No such process */
sl@0
    64
#define	EINTR		4		/* Interrupted system call */
sl@0
    65
#define	EIO		5		/* Input/output error */
sl@0
    66
#define	ENXIO		6		/* Device not configured */
sl@0
    67
#define	E2BIG		7		/* Argument list too long */
sl@0
    68
#define	ENOEXEC		8		/* Exec format error */
sl@0
    69
#define	EBADF		9		/* Bad file descriptor */
sl@0
    70
#define	ECHILD		10		/* No child processes */
sl@0
    71
#define	EDEADLK		11		/* Resource deadlock avoided */
sl@0
    72
					/* 11 was EAGAIN */
sl@0
    73
#define	ENOMEM		12		/* Cannot allocate memory */
sl@0
    74
#define	EACCES		13		/* Permission denied */
sl@0
    75
#define	EFAULT		14		/* Bad address */
sl@0
    76
#ifndef _POSIX_SOURCE
sl@0
    77
#define	ENOTBLK		15		/* Block device required */
sl@0
    78
#endif //_POSIX_SOURCE
sl@0
    79
#define	EBUSY		16		/* Device busy */
sl@0
    80
#define	EEXIST		17		/* File exists */
sl@0
    81
#define	EXDEV		18		/* Cross-device link */
sl@0
    82
#define	ENODEV		19		/* Operation not supported by device */
sl@0
    83
#define	ENOTDIR		20		/* Not a directory */
sl@0
    84
#define	EISDIR		21		/* Is a directory */
sl@0
    85
#define	EINVAL		22		/* Invalid argument */
sl@0
    86
#define	ENFILE		23		/* Too many open files in system */
sl@0
    87
#define	EMFILE		24		/* Too many open files */
sl@0
    88
#define	ENOTTY		25		/* Inappropriate ioctl for device */
sl@0
    89
#ifndef _POSIX_SOURCE
sl@0
    90
#define	ETXTBSY		26		/* Text file busy */
sl@0
    91
#endif  //_POSIX_SOURCE
sl@0
    92
#define	EFBIG		27		/* File too large */
sl@0
    93
#define	ENOSPC		28		/* No space left on device */
sl@0
    94
#define	ESPIPE		29		/* Illegal seek */
sl@0
    95
#define	EROFS		30		/* Read-only filesystem */
sl@0
    96
#define	EMLINK		31		/* Too many links */
sl@0
    97
#define	EPIPE		32		/* Broken pipe */
sl@0
    98
sl@0
    99
/* math software */
sl@0
   100
#define	EDOM		33		/* Numerical argument out of domain */
sl@0
   101
#define	ERANGE		34		/* Result too large */
sl@0
   102
sl@0
   103
/* non-blocking and interrupt i/o */
sl@0
   104
#define	EAGAIN		35		/* Resource temporarily unavailable */
sl@0
   105
#ifndef _POSIX_SOURCE
sl@0
   106
#define	EWOULDBLOCK	EAGAIN		/* Operation would block */
sl@0
   107
#define	EINPROGRESS	36		/* Operation now in progress */
sl@0
   108
#define	EALREADY	37		/* Operation already in progress */
sl@0
   109
sl@0
   110
/* ipc/network software -- argument errors */
sl@0
   111
#define	ENOTSOCK	38		/* Socket operation on non-socket */
sl@0
   112
#define	EDESTADDRREQ	39		/* Destination address required */
sl@0
   113
#define	EMSGSIZE	40		/* Message too long */
sl@0
   114
#define	EPROTOTYPE	41		/* Protocol wrong type for socket */
sl@0
   115
#define	ENOPROTOOPT	42		/* Protocol not available */
sl@0
   116
#define	EPROTONOSUPPORT	43		/* Protocol not supported */
sl@0
   117
#define	ESOCKTNOSUPPORT	44		/* Socket type not supported */
sl@0
   118
#define	EOPNOTSUPP	45		/* Operation not supported */
sl@0
   119
#define	ENOTSUP		EOPNOTSUPP	/* Operation not supported */
sl@0
   120
#define	EPFNOSUPPORT	46		/* Protocol family not supported */
sl@0
   121
#define	EAFNOSUPPORT	47		/* Address family not supported by protocol family */
sl@0
   122
#define	EADDRINUSE	48		/* Address already in use */
sl@0
   123
#define	EADDRNOTAVAIL	49		/* Can't assign requested address */
sl@0
   124
sl@0
   125
/* ipc/network software -- operational errors */
sl@0
   126
#define	ENETDOWN	50		/* Network is down */
sl@0
   127
#define	ENETUNREACH	51		/* Network is unreachable */
sl@0
   128
#define	ENETRESET	52		/* Network dropped connection on reset */
sl@0
   129
#define	ECONNABORTED	53		/* Software caused connection abort */
sl@0
   130
#define	ECONNRESET	54		/* Connection reset by peer */
sl@0
   131
#define	ENOBUFS		55		/* No buffer space available */
sl@0
   132
#define	EISCONN		56		/* Socket is already connected */
sl@0
   133
#define	ENOTCONN	57		/* Socket is not connected */
sl@0
   134
#define	ESHUTDOWN	58		/* Can't send after socket shutdown */
sl@0
   135
#define	ETOOMANYREFS	59		/* Too many references: can't splice */
sl@0
   136
#define	ETIMEDOUT	60		/* Operation timed out */
sl@0
   137
#define	ECONNREFUSED	61		/* Connection refused */
sl@0
   138
sl@0
   139
#define	ELOOP		62		/* Too many levels of symbolic links */
sl@0
   140
#endif /* _POSIX_SOURCE */
sl@0
   141
#define	ENAMETOOLONG	63		/* File name too long */
sl@0
   142
sl@0
   143
/* should be rearranged */
sl@0
   144
#ifndef _POSIX_SOURCE
sl@0
   145
#define	EHOSTDOWN	64		/* Host is down */
sl@0
   146
#define	EHOSTUNREACH	65		/* No route to host */
sl@0
   147
#endif /* _POSIX_SOURCE */
sl@0
   148
#define	ENOTEMPTY	66		/* Directory not empty */
sl@0
   149
sl@0
   150
/* quotas & mush */
sl@0
   151
#ifndef _POSIX_SOURCE
sl@0
   152
#define	EPROCLIM	67		/* Too many processes */
sl@0
   153
#define	EUSERS		68		/* Too many users */
sl@0
   154
#define	EDQUOT		69		/* Disc quota exceeded */
sl@0
   155
sl@0
   156
/* Network File System */
sl@0
   157
#define	ESTALE		70		/* Stale NFS file handle */
sl@0
   158
#define	EREMOTE		71		/* Too many levels of remote in path */
sl@0
   159
#define	EBADRPC		72		/* RPC struct is bad */
sl@0
   160
#define	ERPCMISMATCH	73		/* RPC version wrong */
sl@0
   161
#define	EPROGUNAVAIL	74		/* RPC prog. not avail */
sl@0
   162
#define	EPROGMISMATCH	75		/* Program version wrong */
sl@0
   163
#define	EPROCUNAVAIL	76		/* Bad procedure for program */
sl@0
   164
#endif /* _POSIX_SOURCE */
sl@0
   165
sl@0
   166
#define	ENOLCK		77		/* No locks available */
sl@0
   167
#define	ENOSYS		78		/* Function not implemented */
sl@0
   168
sl@0
   169
#ifndef _POSIX_SOURCE
sl@0
   170
#define	EFTYPE		79		/* Inappropriate file type or format */
sl@0
   171
#define	EAUTH		80		/* Authentication error */
sl@0
   172
#define	ENEEDAUTH	81		/* Need authenticator */
sl@0
   173
#define	EIDRM		82		/* Identifier removed */
sl@0
   174
#define	ENOMSG		83		/* No message of desired type */
sl@0
   175
#define	EOVERFLOW	84		/* Value too large to be stored in data type */
sl@0
   176
#define	ECANCELED	85		/* Operation canceled */
sl@0
   177
#define	EILSEQ		86		/* Illegal byte sequence */
sl@0
   178
#define	ENOATTR		87		/* Attribute not found */
sl@0
   179
sl@0
   180
#define EDOOFUS		88		/* Programming error */
sl@0
   181
#endif /* _POSIX_SOURCE */
sl@0
   182
sl@0
   183
#define	EBADMSG		89		/* Bad message */
sl@0
   184
#define	EMULTIHOP	90		/* Multihop attempted */
sl@0
   185
#define	ENOLINK		91		/* Link has been severed */
sl@0
   186
#define	EPROTO		92		/* Protocol error */
sl@0
   187
sl@0
   188
sl@0
   189
#ifdef _KERNEL
sl@0
   190
/* pseudo-errors returned inside kernel to modify return to process */
sl@0
   191
#define	ERESTART	(-1)		/* restart syscall */
sl@0
   192
#define	EJUSTRETURN	(-2)		/* don't modify regs, just return */
sl@0
   193
#define	ENOIOCTL	(-3)		/* ioctl not handled by this layer */
sl@0
   194
#define	EDIRIOCTL	(-4)		/* do direct ioctl in GEOM */
sl@0
   195
#endif 
sl@0
   196
sl@0
   197
#ifdef __SYMBIAN32__
sl@0
   198
#define	ECOMM 123	/* Communication error on send */
sl@0
   199
#define __EMAXERRNO     124
sl@0
   200
#endif // __SYMBIAN32__
sl@0
   201
sl@0
   202
sl@0
   203
#ifndef _POSIX_SOURCE
sl@0
   204
#ifndef __SYMBIAN32__
sl@0
   205
#define ELAST 92
sl@0
   206
#else
sl@0
   207
#define ELAST  __EMAXERRNO /* Must be equal to largest errno */
sl@0
   208
#endif  //__SYMBIAN32__
sl@0
   209
#endif  /* _POSIX_SOURCE */
sl@0
   210
sl@0
   211
#endif  // _ERRNO_H_