Changeset 385


Ignore:
Timestamp:
Jul 15, 2003, 8:19:59 PM (22 years ago)
Author:
bird
Message:

#427,#434: FreeBSD 5.1 level.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/emx/include/sys/errno.h

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