Raymond Toy pushed to branch issue-386-generate-def-unix-error at cmucl / cmucl

Commits:

2 changed files:

Changes:

  • bin/create-errno.sh
    ... ... @@ -8,251 +8,9 @@
    8 8
     # Where the output should go.
    
    9 9
     OUTPUT="src/code/errno.lisp"
    
    10 10
     
    
    11
    -# The header was copied from code/unix.lisp.  This includes all the
    
    12
    -# support code for DEF-UNIX-ERROR and for all OSes that don't use the
    
    13
    -# awk script to create the DEF-UNIX-ERROR forms.
    
    14
    -#
    
    15
    -cat > $OUTPUT <<EOF
    
    16
    -;;; -*- Package: ERRNO -*-
    
    17
    -;;;
    
    18
    -;;; **********************************************************************
    
    19
    -;;; This code was written as part of the CMU Common Lisp project at
    
    20
    -;;; Carnegie Mellon University, and has been placed in the public domain.
    
    21
    -;;;
    
    22
    -(ext:file-comment
    
    23
    -  "$Header: src/code/unix-errno.lisp $")
    
    24
    -;;;
    
    25
    -;;; **********************************************************************
    
    26
    -;;;
    
    27
    -;;; This file contains the UNIX low-level support, just enough to run
    
    28
    -;;; CMUCL.
    
    29
    -;;;
    
    30
    -(in-package "ERRNO")
    
    31
    -(intl:textdomain "cmucl-unix")
    
    32
    -
    
    33
    -;;;; Errno stuff.
    
    34
    -(eval-when (compile eval)
    
    35
    -
    
    36
    -(defparameter *compiler-unix-errors* nil)
    
    37
    -
    
    38
    -(defmacro def-unix-error (name number &optional description)
    
    39
    -  "Define a constant named Name corresponding to the Unix errno value
    
    40
    -  Number.  A description of the errno is optional in Description."
    
    41
    -  \`(progn
    
    42
    -     (eval-when (compile eval)
    
    43
    -       (push (cons ,number ,description) *compiler-unix-errors*))
    
    44
    -     (defconstant ,name ,number ,description)
    
    45
    -     (export ',name)))
    
    46
    -
    
    47
    -(defmacro emit-unix-errors ()
    
    48
    -  (let* ((max (apply #'max (mapcar #'car *compiler-unix-errors*)))
    
    49
    -	 (array (make-array (1+ max) :initial-element nil)))
    
    50
    -    (dolist (error *compiler-unix-errors*)
    
    51
    -      (setf (svref array (car error)) (cdr error)))
    
    52
    -    \`(progn
    
    53
    -       (defvar *unix-errors* ',array)
    
    54
    -       (declaim (simple-vector *unix-errors*)))))
    
    55
    -
    
    56
    -) ;eval-when
    
    57
    -EOF
    
    58
    -
    
    59
    -# Output the default def-unix-error forms for the OSes where we don't
    
    60
    -# grovel the include files to get the errno definitions.
    
    61
    -cat >> $OUTPUT <<EOF
    
    62
    -;;; 
    
    63
    -;;; From <errno.h>
    
    64
    -;;; 
    
    65
    -(def-unix-error ESUCCESS 0 _N"Successful")
    
    66
    -#-linux
    
    67
    -(progn
    
    68
    -(def-unix-error EPERM 1 _N"Operation not permitted")
    
    69
    -(def-unix-error ENOENT 2 _N"No such file or directory")
    
    70
    -(def-unix-error ESRCH 3 _N"No such process")
    
    71
    -(def-unix-error EINTR 4 _N"Interrupted system call")
    
    72
    -(def-unix-error EIO 5 _N"I/O error")
    
    73
    -(def-unix-error ENXIO 6 _N"Device not configured")
    
    74
    -(def-unix-error E2BIG 7 _N"Arg list too long")
    
    75
    -(def-unix-error ENOEXEC 8 _N"Exec format error")
    
    76
    -(def-unix-error EBADF 9 _N"Bad file descriptor")
    
    77
    -(def-unix-error ECHILD 10 _N"No child process")
    
    78
    -)
    
    79
    -#+bsd(def-unix-error EDEADLK 11 _N"Resource deadlock avoided")
    
    80
    -#-(or bsd linux) (def-unix-error EAGAIN 11 #-linux _N"No more processes" #+linux _N"Try again")
    
    81
    -#-linux
    
    82
    -(progn
    
    83
    -(def-unix-error ENOMEM 12 _N"Out of memory")
    
    84
    -(def-unix-error EACCES 13 _N"Permission denied")
    
    85
    -(def-unix-error EFAULT 14 _N"Bad address")
    
    86
    -(def-unix-error ENOTBLK 15 _N"Block device required")
    
    87
    -(def-unix-error EBUSY 16 _N"Device or resource busy")
    
    88
    -(def-unix-error EEXIST 17 _N"File exists")
    
    89
    -(def-unix-error EXDEV 18 _N"Cross-device link")
    
    90
    -(def-unix-error ENODEV 19 _N"No such device")
    
    91
    -(def-unix-error ENOTDIR 20 _N"Not a director")
    
    92
    -(def-unix-error EISDIR 21 _N"Is a directory")
    
    93
    -(def-unix-error EINVAL 22 _N"Invalid argument")
    
    94
    -(def-unix-error ENFILE 23 _N"File table overflow")
    
    95
    -(def-unix-error EMFILE 24 _N"Too many open files")
    
    96
    -(def-unix-error ENOTTY 25 _N"Inappropriate ioctl for device")
    
    97
    -(def-unix-error ETXTBSY 26 _N"Text file busy")
    
    98
    -(def-unix-error EFBIG 27 _N"File too large")
    
    99
    -(def-unix-error ENOSPC 28 _N"No space left on device")
    
    100
    -(def-unix-error ESPIPE 29 _N"Illegal seek")
    
    101
    -(def-unix-error EROFS 30 _N"Read-only file system")
    
    102
    -(def-unix-error EMLINK 31 _N"Too many links")
    
    103
    -(def-unix-error EPIPE 32 _N"Broken pipe")
    
    104
    -;;; 
    
    105
    -;;; Math
    
    106
    -(def-unix-error EDOM 33 _N"Numerical argument out of domain")
    
    107
    -(def-unix-error ERANGE 34 #-linux _N"Result too large" #+linux _N"Math result not representable")
    
    108
    -)
    
    109
    -;;; 
    
    110
    -#-(or linux svr4)
    
    111
    -(progn
    
    112
    -;;; non-blocking and interrupt i/o
    
    113
    -(def-unix-error EWOULDBLOCK 35 _N"Operation would block")
    
    114
    -#-bsd(def-unix-error EDEADLK 35 _N"Operation would block") ; Ditto
    
    115
    -#+bsd(def-unix-error EAGAIN 35 _N"Resource temporarily unavailable")
    
    116
    -(def-unix-error EINPROGRESS 36 _N"Operation now in progress")
    
    117
    -(def-unix-error EALREADY 37 _N"Operation already in progress")
    
    118
    -;;;
    
    119
    -;;; ipc/network software
    
    120
    -(def-unix-error ENOTSOCK 38 _N"Socket operation on non-socket")
    
    121
    -(def-unix-error EDESTADDRREQ 39 _N"Destination address required")
    
    122
    -(def-unix-error EMSGSIZE 40 _N"Message too long")
    
    123
    -(def-unix-error EPROTOTYPE 41 _N"Protocol wrong type for socket")
    
    124
    -(def-unix-error ENOPROTOOPT 42 _N"Protocol not available")
    
    125
    -(def-unix-error EPROTONOSUPPORT 43 _N"Protocol not supported")
    
    126
    -(def-unix-error ESOCKTNOSUPPORT 44 _N"Socket type not supported")
    
    127
    -(def-unix-error EOPNOTSUPP 45 _N"Operation not supported on socket")
    
    128
    -(def-unix-error EPFNOSUPPORT 46 _N"Protocol family not supported")
    
    129
    -(def-unix-error EAFNOSUPPORT 47 _N"Address family not supported by protocol family")
    
    130
    -(def-unix-error EADDRINUSE 48 _N"Address already in use")
    
    131
    -(def-unix-error EADDRNOTAVAIL 49 _N"Can't assign requested address")
    
    132
    -;;;
    
    133
    -;;; operational errors
    
    134
    -(def-unix-error ENETDOWN 50 _N"Network is down")
    
    135
    -(def-unix-error ENETUNREACH 51 _N"Network is unreachable")
    
    136
    -(def-unix-error ENETRESET 52 _N"Network dropped connection on reset")
    
    137
    -(def-unix-error ECONNABORTED 53 _N"Software caused connection abort")
    
    138
    -(def-unix-error ECONNRESET 54 _N"Connection reset by peer")
    
    139
    -(def-unix-error ENOBUFS 55 _N"No buffer space available")
    
    140
    -(def-unix-error EISCONN 56 _N"Socket is already connected")
    
    141
    -(def-unix-error ENOTCONN 57 _N"Socket is not connected")
    
    142
    -(def-unix-error ESHUTDOWN 58 _N"Can't send after socket shutdown")
    
    143
    -(def-unix-error ETOOMANYREFS 59 _N"Too many references: can't splice")
    
    144
    -(def-unix-error ETIMEDOUT 60 _N"Connection timed out")
    
    145
    -(def-unix-error ECONNREFUSED 61 _N"Connection refused")
    
    146
    -;;; 
    
    147
    -(def-unix-error ELOOP 62 _N"Too many levels of symbolic links")
    
    148
    -(def-unix-error ENAMETOOLONG 63 _N"File name too long")
    
    149
    -;;; 
    
    150
    -(def-unix-error EHOSTDOWN 64 _N"Host is down")
    
    151
    -(def-unix-error EHOSTUNREACH 65 _N"No route to host")
    
    152
    -(def-unix-error ENOTEMPTY 66 _N"Directory not empty")
    
    153
    -;;; 
    
    154
    -;;; quotas & resource 
    
    155
    -(def-unix-error EPROCLIM 67 _N"Too many processes")
    
    156
    -(def-unix-error EUSERS 68 _N"Too many users")
    
    157
    -(def-unix-error EDQUOT 69 _N"Disc quota exceeded")
    
    158
    -;;;
    
    159
    -;;; CMU RFS
    
    160
    -(def-unix-error ELOCAL 126 _N"namei should continue locally")
    
    161
    -(def-unix-error EREMOTE 127 _N"namei was handled remotely")
    
    162
    -;;;
    
    163
    -;;; VICE
    
    164
    -(def-unix-error EVICEERR 70 _N"Remote file system error _N")
    
    165
    -(def-unix-error EVICEOP 71 _N"syscall was handled by Vice")
    
    166
    -)
    
    167
    -#+svr4
    
    168
    -(progn
    
    169
    -(def-unix-error ENOMSG 35 _N"No message of desired type")
    
    170
    -(def-unix-error EIDRM 36 _N"Identifier removed")
    
    171
    -(def-unix-error ECHRNG 37 _N"Channel number out of range")
    
    172
    -(def-unix-error EL2NSYNC 38 _N"Level 2 not synchronized")
    
    173
    -(def-unix-error EL3HLT 39 _N"Level 3 halted")
    
    174
    -(def-unix-error EL3RST 40 _N"Level 3 reset")
    
    175
    -(def-unix-error ELNRNG 41 _N"Link number out of range")
    
    176
    -(def-unix-error EUNATCH 42 _N"Protocol driver not attached")
    
    177
    -(def-unix-error ENOCSI 43 _N"No CSI structure available")
    
    178
    -(def-unix-error EL2HLT 44 _N"Level 2 halted")
    
    179
    -(def-unix-error EDEADLK 45 _N"Deadlock situation detected/avoided")
    
    180
    -(def-unix-error ENOLCK 46 _N"No record locks available")
    
    181
    -(def-unix-error ECANCELED 47 _N"Error 47")
    
    182
    -(def-unix-error ENOTSUP 48 _N"Error 48")
    
    183
    -(def-unix-error EBADE 50 _N"Bad exchange descriptor")
    
    184
    -(def-unix-error EBADR 51 _N"Bad request descriptor")
    
    185
    -(def-unix-error EXFULL 52 _N"Message tables full")
    
    186
    -(def-unix-error ENOANO 53 _N"Anode table overflow")
    
    187
    -(def-unix-error EBADRQC 54 _N"Bad request code")
    
    188
    -(def-unix-error EBADSLT 55 _N"Invalid slot")
    
    189
    -(def-unix-error EDEADLOCK 56 _N"File locking deadlock")
    
    190
    -(def-unix-error EBFONT 57 _N"Bad font file format")
    
    191
    -(def-unix-error ENOSTR 60 _N"Not a stream device")
    
    192
    -(def-unix-error ENODATA 61 _N"No data available")
    
    193
    -(def-unix-error ETIME 62 _N"Timer expired")
    
    194
    -(def-unix-error ENOSR 63 _N"Out of stream resources")
    
    195
    -(def-unix-error ENONET 64 _N"Machine is not on the network")
    
    196
    -(def-unix-error ENOPKG 65 _N"Package not installed")
    
    197
    -(def-unix-error EREMOTE 66 _N"Object is remote")
    
    198
    -(def-unix-error ENOLINK 67 _N"Link has been severed")
    
    199
    -(def-unix-error EADV 68 _N"Advertise error")
    
    200
    -(def-unix-error ESRMNT 69 _N"Srmount error")
    
    201
    -(def-unix-error ECOMM 70 _N"Communication error on send")
    
    202
    -(def-unix-error EPROTO 71 _N"Protocol error")
    
    203
    -(def-unix-error EMULTIHOP 74 _N"Multihop attempted")
    
    204
    -(def-unix-error EBADMSG 77 _N"Not a data message")
    
    205
    -(def-unix-error ENAMETOOLONG 78 _N"File name too long")
    
    206
    -(def-unix-error EOVERFLOW 79 _N"Value too large for defined data type")
    
    207
    -(def-unix-error ENOTUNIQ 80 _N"Name not unique on network")
    
    208
    -(def-unix-error EBADFD 81 _N"File descriptor in bad state")
    
    209
    -(def-unix-error EREMCHG 82 _N"Remote address changed")
    
    210
    -(def-unix-error ELIBACC 83 _N"Can not access a needed shared library")
    
    211
    -(def-unix-error ELIBBAD 84 _N"Accessing a corrupted shared library")
    
    212
    -(def-unix-error ELIBSCN 85 _N".lib section in a.out corrupted")
    
    213
    -(def-unix-error ELIBMAX 86 _N"Attempting to link in more shared libraries than system limit")
    
    214
    -(def-unix-error ELIBEXEC 87 _N"Can not exec a shared library directly")
    
    215
    -(def-unix-error EILSEQ 88 _N"Error 88")
    
    216
    -(def-unix-error ENOSYS 89 _N"Operation not applicable")
    
    217
    -(def-unix-error ELOOP 90 _N"Number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS")
    
    218
    -(def-unix-error ERESTART 91 _N"Error 91")
    
    219
    -(def-unix-error ESTRPIPE 92 _N"Error 92")
    
    220
    -(def-unix-error ENOTEMPTY 93 _N"Directory not empty")
    
    221
    -(def-unix-error EUSERS 94 _N"Too many users")
    
    222
    -(def-unix-error ENOTSOCK 95 _N"Socket operation on non-socket")
    
    223
    -(def-unix-error EDESTADDRREQ 96 _N"Destination address required")
    
    224
    -(def-unix-error EMSGSIZE 97 _N"Message too long")
    
    225
    -(def-unix-error EPROTOTYPE 98 _N"Protocol wrong type for socket")
    
    226
    -(def-unix-error ENOPROTOOPT 99 _N"Option not supported by protocol")
    
    227
    -(def-unix-error EPROTONOSUPPORT 120 _N"Protocol not supported")
    
    228
    -(def-unix-error ESOCKTNOSUPPORT 121 _N"Socket type not supported")
    
    229
    -(def-unix-error EOPNOTSUPP 122 _N"Operation not supported on transport endpoint")
    
    230
    -(def-unix-error EPFNOSUPPORT 123 _N"Protocol family not supported")
    
    231
    -(def-unix-error EAFNOSUPPORT 124 _N"Address family not supported by protocol family")
    
    232
    -(def-unix-error EADDRINUSE 125 _N"Address already in use")
    
    233
    -(def-unix-error EADDRNOTAVAIL 126 _N"Cannot assign requested address")
    
    234
    -(def-unix-error ENETDOWN 127 _N"Network is down")
    
    235
    -(def-unix-error ENETUNREACH 128 _N"Network is unreachable")
    
    236
    -(def-unix-error ENETRESET 129 _N"Network dropped connection because of reset")
    
    237
    -(def-unix-error ECONNABORTED 130 _N"Software caused connection abort")
    
    238
    -(def-unix-error ECONNRESET 131 _N"Connection reset by peer")
    
    239
    -(def-unix-error ENOBUFS 132 _N"No buffer space available")
    
    240
    -(def-unix-error EISCONN 133 _N"Transport endpoint is already connected")
    
    241
    -(def-unix-error ENOTCONN 134 _N"Transport endpoint is not connected")
    
    242
    -(def-unix-error ESHUTDOWN 143 _N"Cannot send after socket shutdown")
    
    243
    -(def-unix-error ETOOMANYREFS 144 _N"Too many references: cannot splice")
    
    244
    -(def-unix-error ETIMEDOUT 145 _N"Connection timed out")
    
    245
    -(def-unix-error ECONNREFUSED 146 _N"Connection refused")
    
    246
    -(def-unix-error EHOSTDOWN 147 _N"Host is down")
    
    247
    -(def-unix-error EHOSTUNREACH 148 _N"No route to host")
    
    248
    -(def-unix-error EWOULDBLOCK 11 _N"Resource temporarily unavailable")
    
    249
    -(def-unix-error EALREADY 149 _N"Operation already in progress")
    
    250
    -(def-unix-error EINPROGRESS 150 _N"Operation now in progress")
    
    251
    -(def-unix-error ESTALE 151 _N"Stale NFS file handle")
    
    252
    -)
    
    253
    -
    
    254
    -;;; Auto-generated forms, if any.
    
    255
    -EOF
    
    11
    +# Copy the main errno template to the output.  The template is a lisp
    
    12
    +# file so we can read and modify it more easily.
    
    13
    +cat bin/errno-template.lisp > $OUTPUT
    
    256 14
     
    
    257 15
     # Create appropriate DEF-UNIX-ERROR forms by reading header files
    
    258 16
     # containing the C definitions.
    

  • bin/errno-template.lisp
    1
    +;;; -*- Package: ERRNO -*-
    
    2
    +;;;
    
    3
    +;;; **********************************************************************
    
    4
    +;;; This code was written as part of the CMU Common Lisp project at
    
    5
    +;;; Carnegie Mellon University, and has been placed in the public domain.
    
    6
    +;;;
    
    7
    +(ext:file-comment
    
    8
    +  "$Header: src/code/errno.lisp $")
    
    9
    +;;;
    
    10
    +;;; **********************************************************************
    
    11
    +;;;
    
    12
    +;;; This file contains the UNIX low-level support, just enough to run
    
    13
    +;;; CMUCL.
    
    14
    +;;;
    
    15
    +(in-package "ERRNO")
    
    16
    +(intl:textdomain "cmucl-unix")
    
    17
    +
    
    18
    +;;;; Errno stuff.
    
    19
    +
    
    20
    +(eval-when (compile eval)
    
    21
    +
    
    22
    +(defparameter *compiler-unix-errors* nil)
    
    23
    +
    
    24
    +(defmacro def-unix-error (name number &optional description)
    
    25
    +  `(progn
    
    26
    +     (eval-when (compile eval)
    
    27
    +       (push (cons ,number ,description) *compiler-unix-errors*))
    
    28
    +     (defconstant ,name ,number ,description)
    
    29
    +     (export ',name)))
    
    30
    +
    
    31
    +(defmacro emit-unix-errors ()
    
    32
    +  (let* ((max (apply #'max (mapcar #'car *compiler-unix-errors*)))
    
    33
    +	 (array (make-array (1+ max) :initial-element nil)))
    
    34
    +    (dolist (error *compiler-unix-errors*)
    
    35
    +      (setf (svref array (car error)) (cdr error)))
    
    36
    +    `(progn
    
    37
    +       (defvar *unix-errors* ',array)
    
    38
    +       (declaim (simple-vector *unix-errors*)))))
    
    39
    +
    
    40
    +) ;eval-when
    
    41
    +
    
    42
    +;;; 
    
    43
    +;;; From <errno.h>
    
    44
    +;;; 
    
    45
    +(def-unix-error ESUCCESS 0 _N"Successful")
    
    46
    +(def-unix-error EPERM 1 _N"Operation not permitted")
    
    47
    +(def-unix-error ENOENT 2 _N"No such file or directory")
    
    48
    +(def-unix-error ESRCH 3 _N"No such process")
    
    49
    +(def-unix-error EINTR 4 _N"Interrupted system call")
    
    50
    +(def-unix-error EIO 5 _N"I/O error")
    
    51
    +(def-unix-error ENXIO 6 _N"Device not configured")
    
    52
    +(def-unix-error E2BIG 7 _N"Arg list too long")
    
    53
    +(def-unix-error ENOEXEC 8 _N"Exec format error")
    
    54
    +(def-unix-error EBADF 9 _N"Bad file descriptor")
    
    55
    +(def-unix-error ECHILD 10 _N"No child process")
    
    56
    +#+bsd(def-unix-error EDEADLK 11 _N"Resource deadlock avoided")
    
    57
    +#-bsd(def-unix-error EAGAIN 11 #-linux _N"No more processes" #+linux _N"Try again")
    
    58
    +(def-unix-error ENOMEM 12 _N"Out of memory")
    
    59
    +(def-unix-error EACCES 13 _N"Permission denied")
    
    60
    +(def-unix-error EFAULT 14 _N"Bad address")
    
    61
    +(def-unix-error ENOTBLK 15 _N"Block device required")
    
    62
    +(def-unix-error EBUSY 16 _N"Device or resource busy")
    
    63
    +(def-unix-error EEXIST 17 _N"File exists")
    
    64
    +(def-unix-error EXDEV 18 _N"Cross-device link")
    
    65
    +(def-unix-error ENODEV 19 _N"No such device")
    
    66
    +(def-unix-error ENOTDIR 20 _N"Not a director")
    
    67
    +(def-unix-error EISDIR 21 _N"Is a directory")
    
    68
    +(def-unix-error EINVAL 22 _N"Invalid argument")
    
    69
    +(def-unix-error ENFILE 23 _N"File table overflow")
    
    70
    +(def-unix-error EMFILE 24 _N"Too many open files")
    
    71
    +(def-unix-error ENOTTY 25 _N"Inappropriate ioctl for device")
    
    72
    +(def-unix-error ETXTBSY 26 _N"Text file busy")
    
    73
    +(def-unix-error EFBIG 27 _N"File too large")
    
    74
    +(def-unix-error ENOSPC 28 _N"No space left on device")
    
    75
    +(def-unix-error ESPIPE 29 _N"Illegal seek")
    
    76
    +(def-unix-error EROFS 30 _N"Read-only file system")
    
    77
    +(def-unix-error EMLINK 31 _N"Too many links")
    
    78
    +(def-unix-error EPIPE 32 _N"Broken pipe")
    
    79
    +;;; 
    
    80
    +;;; Math
    
    81
    +(def-unix-error EDOM 33 _N"Numerical argument out of domain")
    
    82
    +(def-unix-error ERANGE 34 #-linux _N"Result too large" #+linux _N"Math result not representable")
    
    83
    +;;; 
    
    84
    +#-(or linux svr4)
    
    85
    +(progn
    
    86
    +;;; non-blocking and interrupt i/o
    
    87
    +(def-unix-error EWOULDBLOCK 35 _N"Operation would block")
    
    88
    +#-bsd(def-unix-error EDEADLK 35 _N"Operation would block") ; Ditto
    
    89
    +#+bsd(def-unix-error EAGAIN 35 _N"Resource temporarily unavailable")
    
    90
    +(def-unix-error EINPROGRESS 36 _N"Operation now in progress")
    
    91
    +(def-unix-error EALREADY 37 _N"Operation already in progress")
    
    92
    +;;;
    
    93
    +;;; ipc/network software
    
    94
    +(def-unix-error ENOTSOCK 38 _N"Socket operation on non-socket")
    
    95
    +(def-unix-error EDESTADDRREQ 39 _N"Destination address required")
    
    96
    +(def-unix-error EMSGSIZE 40 _N"Message too long")
    
    97
    +(def-unix-error EPROTOTYPE 41 _N"Protocol wrong type for socket")
    
    98
    +(def-unix-error ENOPROTOOPT 42 _N"Protocol not available")
    
    99
    +(def-unix-error EPROTONOSUPPORT 43 _N"Protocol not supported")
    
    100
    +(def-unix-error ESOCKTNOSUPPORT 44 _N"Socket type not supported")
    
    101
    +(def-unix-error EOPNOTSUPP 45 _N"Operation not supported on socket")
    
    102
    +(def-unix-error EPFNOSUPPORT 46 _N"Protocol family not supported")
    
    103
    +(def-unix-error EAFNOSUPPORT 47 _N"Address family not supported by protocol family")
    
    104
    +(def-unix-error EADDRINUSE 48 _N"Address already in use")
    
    105
    +(def-unix-error EADDRNOTAVAIL 49 _N"Can't assign requested address")
    
    106
    +;;;
    
    107
    +;;; operational errors
    
    108
    +(def-unix-error ENETDOWN 50 _N"Network is down")
    
    109
    +(def-unix-error ENETUNREACH 51 _N"Network is unreachable")
    
    110
    +(def-unix-error ENETRESET 52 _N"Network dropped connection on reset")
    
    111
    +(def-unix-error ECONNABORTED 53 _N"Software caused connection abort")
    
    112
    +(def-unix-error ECONNRESET 54 _N"Connection reset by peer")
    
    113
    +(def-unix-error ENOBUFS 55 _N"No buffer space available")
    
    114
    +(def-unix-error EISCONN 56 _N"Socket is already connected")
    
    115
    +(def-unix-error ENOTCONN 57 _N"Socket is not connected")
    
    116
    +(def-unix-error ESHUTDOWN 58 _N"Can't send after socket shutdown")
    
    117
    +(def-unix-error ETOOMANYREFS 59 _N"Too many references: can't splice")
    
    118
    +(def-unix-error ETIMEDOUT 60 _N"Connection timed out")
    
    119
    +(def-unix-error ECONNREFUSED 61 _N"Connection refused")
    
    120
    +;;; 
    
    121
    +(def-unix-error ELOOP 62 _N"Too many levels of symbolic links")
    
    122
    +(def-unix-error ENAMETOOLONG 63 _N"File name too long")
    
    123
    +;;; 
    
    124
    +(def-unix-error EHOSTDOWN 64 _N"Host is down")
    
    125
    +(def-unix-error EHOSTUNREACH 65 _N"No route to host")
    
    126
    +(def-unix-error ENOTEMPTY 66 _N"Directory not empty")
    
    127
    +;;; 
    
    128
    +;;; quotas & resource 
    
    129
    +(def-unix-error EPROCLIM 67 _N"Too many processes")
    
    130
    +(def-unix-error EUSERS 68 _N"Too many users")
    
    131
    +(def-unix-error EDQUOT 69 _N"Disc quota exceeded")
    
    132
    +;;;
    
    133
    +;;; CMU RFS
    
    134
    +(def-unix-error ELOCAL 126 _N"namei should continue locally")
    
    135
    +(def-unix-error EREMOTE 127 _N"namei was handled remotely")
    
    136
    +;;;
    
    137
    +;;; VICE
    
    138
    +(def-unix-error EVICEERR 70 _N"Remote file system error _N")
    
    139
    +(def-unix-error EVICEOP 71 _N"syscall was handled by Vice")
    
    140
    +)
    
    141
    +#+svr4
    
    142
    +(progn
    
    143
    +(def-unix-error ENOMSG 35 _N"No message of desired type")
    
    144
    +(def-unix-error EIDRM 36 _N"Identifier removed")
    
    145
    +(def-unix-error ECHRNG 37 _N"Channel number out of range")
    
    146
    +(def-unix-error EL2NSYNC 38 _N"Level 2 not synchronized")
    
    147
    +(def-unix-error EL3HLT 39 _N"Level 3 halted")
    
    148
    +(def-unix-error EL3RST 40 _N"Level 3 reset")
    
    149
    +(def-unix-error ELNRNG 41 _N"Link number out of range")
    
    150
    +(def-unix-error EUNATCH 42 _N"Protocol driver not attached")
    
    151
    +(def-unix-error ENOCSI 43 _N"No CSI structure available")
    
    152
    +(def-unix-error EL2HLT 44 _N"Level 2 halted")
    
    153
    +(def-unix-error EDEADLK 45 _N"Deadlock situation detected/avoided")
    
    154
    +(def-unix-error ENOLCK 46 _N"No record locks available")
    
    155
    +(def-unix-error ECANCELED 47 _N"Error 47")
    
    156
    +(def-unix-error ENOTSUP 48 _N"Error 48")
    
    157
    +(def-unix-error EBADE 50 _N"Bad exchange descriptor")
    
    158
    +(def-unix-error EBADR 51 _N"Bad request descriptor")
    
    159
    +(def-unix-error EXFULL 52 _N"Message tables full")
    
    160
    +(def-unix-error ENOANO 53 _N"Anode table overflow")
    
    161
    +(def-unix-error EBADRQC 54 _N"Bad request code")
    
    162
    +(def-unix-error EBADSLT 55 _N"Invalid slot")
    
    163
    +(def-unix-error EDEADLOCK 56 _N"File locking deadlock")
    
    164
    +(def-unix-error EBFONT 57 _N"Bad font file format")
    
    165
    +(def-unix-error ENOSTR 60 _N"Not a stream device")
    
    166
    +(def-unix-error ENODATA 61 _N"No data available")
    
    167
    +(def-unix-error ETIME 62 _N"Timer expired")
    
    168
    +(def-unix-error ENOSR 63 _N"Out of stream resources")
    
    169
    +(def-unix-error ENONET 64 _N"Machine is not on the network")
    
    170
    +(def-unix-error ENOPKG 65 _N"Package not installed")
    
    171
    +(def-unix-error EREMOTE 66 _N"Object is remote")
    
    172
    +(def-unix-error ENOLINK 67 _N"Link has been severed")
    
    173
    +(def-unix-error EADV 68 _N"Advertise error")
    
    174
    +(def-unix-error ESRMNT 69 _N"Srmount error")
    
    175
    +(def-unix-error ECOMM 70 _N"Communication error on send")
    
    176
    +(def-unix-error EPROTO 71 _N"Protocol error")
    
    177
    +(def-unix-error EMULTIHOP 74 _N"Multihop attempted")
    
    178
    +(def-unix-error EBADMSG 77 _N"Not a data message")
    
    179
    +(def-unix-error ENAMETOOLONG 78 _N"File name too long")
    
    180
    +(def-unix-error EOVERFLOW 79 _N"Value too large for defined data type")
    
    181
    +(def-unix-error ENOTUNIQ 80 _N"Name not unique on network")
    
    182
    +(def-unix-error EBADFD 81 _N"File descriptor in bad state")
    
    183
    +(def-unix-error EREMCHG 82 _N"Remote address changed")
    
    184
    +(def-unix-error ELIBACC 83 _N"Can not access a needed shared library")
    
    185
    +(def-unix-error ELIBBAD 84 _N"Accessing a corrupted shared library")
    
    186
    +(def-unix-error ELIBSCN 85 _N".lib section in a.out corrupted")
    
    187
    +(def-unix-error ELIBMAX 86 _N"Attempting to link in more shared libraries than system limit")
    
    188
    +(def-unix-error ELIBEXEC 87 _N"Can not exec a shared library directly")
    
    189
    +(def-unix-error EILSEQ 88 _N"Error 88")
    
    190
    +(def-unix-error ENOSYS 89 _N"Operation not applicable")
    
    191
    +(def-unix-error ELOOP 90 _N"Number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS")
    
    192
    +(def-unix-error ERESTART 91 _N"Error 91")
    
    193
    +(def-unix-error ESTRPIPE 92 _N"Error 92")
    
    194
    +(def-unix-error ENOTEMPTY 93 _N"Directory not empty")
    
    195
    +(def-unix-error EUSERS 94 _N"Too many users")
    
    196
    +(def-unix-error ENOTSOCK 95 _N"Socket operation on non-socket")
    
    197
    +(def-unix-error EDESTADDRREQ 96 _N"Destination address required")
    
    198
    +(def-unix-error EMSGSIZE 97 _N"Message too long")
    
    199
    +(def-unix-error EPROTOTYPE 98 _N"Protocol wrong type for socket")
    
    200
    +(def-unix-error ENOPROTOOPT 99 _N"Option not supported by protocol")
    
    201
    +(def-unix-error EPROTONOSUPPORT 120 _N"Protocol not supported")
    
    202
    +(def-unix-error ESOCKTNOSUPPORT 121 _N"Socket type not supported")
    
    203
    +(def-unix-error EOPNOTSUPP 122 _N"Operation not supported on transport endpoint")
    
    204
    +(def-unix-error EPFNOSUPPORT 123 _N"Protocol family not supported")
    
    205
    +(def-unix-error EAFNOSUPPORT 124 _N"Address family not supported by protocol family")
    
    206
    +(def-unix-error EADDRINUSE 125 _N"Address already in use")
    
    207
    +(def-unix-error EADDRNOTAVAIL 126 _N"Cannot assign requested address")
    
    208
    +(def-unix-error ENETDOWN 127 _N"Network is down")
    
    209
    +(def-unix-error ENETUNREACH 128 _N"Network is unreachable")
    
    210
    +(def-unix-error ENETRESET 129 _N"Network dropped connection because of reset")
    
    211
    +(def-unix-error ECONNABORTED 130 _N"Software caused connection abort")
    
    212
    +(def-unix-error ECONNRESET 131 _N"Connection reset by peer")
    
    213
    +(def-unix-error ENOBUFS 132 _N"No buffer space available")
    
    214
    +(def-unix-error EISCONN 133 _N"Transport endpoint is already connected")
    
    215
    +(def-unix-error ENOTCONN 134 _N"Transport endpoint is not connected")
    
    216
    +(def-unix-error ESHUTDOWN 143 _N"Cannot send after socket shutdown")
    
    217
    +(def-unix-error ETOOMANYREFS 144 _N"Too many references: cannot splice")
    
    218
    +(def-unix-error ETIMEDOUT 145 _N"Connection timed out")
    
    219
    +(def-unix-error ECONNREFUSED 146 _N"Connection refused")
    
    220
    +(def-unix-error EHOSTDOWN 147 _N"Host is down")
    
    221
    +(def-unix-error EHOSTUNREACH 148 _N"No route to host")
    
    222
    +(def-unix-error EWOULDBLOCK 11 _N"Resource temporarily unavailable")
    
    223
    +(def-unix-error EALREADY 149 _N"Operation already in progress")
    
    224
    +(def-unix-error EINPROGRESS 150 _N"Operation now in progress")
    
    225
    +(def-unix-error ESTALE 151 _N"Stale NFS file handle")
    
    226
    +)
    
    227
    +#+linux
    
    228
    +(progn
    
    229
    +(def-unix-error  EDEADLK         35     _N"Resource deadlock would occur")
    
    230
    +(def-unix-error  ENAMETOOLONG    36     _N"File name too long")
    
    231
    +(def-unix-error  ENOLCK          37     _N"No record locks available")
    
    232
    +(def-unix-error  ENOSYS          38     _N"Function not implemented")
    
    233
    +(def-unix-error  ENOTEMPTY       39     _N"Directory not empty")
    
    234
    +(def-unix-error  ELOOP           40     _N"Too many symbolic links encountered")
    
    235
    +(def-unix-error  EWOULDBLOCK     11     _N"Operation would block")
    
    236
    +(def-unix-error  ENOMSG          42     _N"No message of desired type")
    
    237
    +(def-unix-error  EIDRM           43     _N"Identifier removed")
    
    238
    +(def-unix-error  ECHRNG          44     _N"Channel number out of range")
    
    239
    +(def-unix-error  EL2NSYNC        45     _N"Level 2 not synchronized")
    
    240
    +(def-unix-error  EL3HLT          46     _N"Level 3 halted")
    
    241
    +(def-unix-error  EL3RST          47     _N"Level 3 reset")
    
    242
    +(def-unix-error  ELNRNG          48     _N"Link number out of range")
    
    243
    +(def-unix-error  EUNATCH         49     _N"Protocol driver not attached")
    
    244
    +(def-unix-error  ENOCSI          50     _N"No CSI structure available")
    
    245
    +(def-unix-error  EL2HLT          51     _N"Level 2 halted")
    
    246
    +(def-unix-error  EBADE           52     _N"Invalid exchange")
    
    247
    +(def-unix-error  EBADR           53     _N"Invalid request descriptor")
    
    248
    +(def-unix-error  EXFULL          54     _N"Exchange full")
    
    249
    +(def-unix-error  ENOANO          55     _N"No anode")
    
    250
    +(def-unix-error  EBADRQC         56     _N"Invalid request code")
    
    251
    +(def-unix-error  EBADSLT         57     _N"Invalid slot")
    
    252
    +(def-unix-error  EDEADLOCK       EDEADLK     _N"File locking deadlock error")
    
    253
    +(def-unix-error  EBFONT          59     _N"Bad font file format")
    
    254
    +(def-unix-error  ENOSTR          60     _N"Device not a stream")
    
    255
    +(def-unix-error  ENODATA         61     _N"No data available")
    
    256
    +(def-unix-error  ETIME           62     _N"Timer expired")
    
    257
    +(def-unix-error  ENOSR           63     _N"Out of streams resources")
    
    258
    +(def-unix-error  ENONET          64     _N"Machine is not on the network")
    
    259
    +(def-unix-error  ENOPKG          65     _N"Package not installed")
    
    260
    +(def-unix-error  EREMOTE         66     _N"Object is remote")
    
    261
    +(def-unix-error  ENOLINK         67     _N"Link has been severed")
    
    262
    +(def-unix-error  EADV            68     _N"Advertise error")
    
    263
    +(def-unix-error  ESRMNT          69     _N"Srmount error")
    
    264
    +(def-unix-error  ECOMM           70     _N"Communication error on send")
    
    265
    +(def-unix-error  EPROTO          71     _N"Protocol error")
    
    266
    +(def-unix-error  EMULTIHOP       72     _N"Multihop attempted")
    
    267
    +(def-unix-error  EDOTDOT         73     _N"RFS specific error")
    
    268
    +(def-unix-error  EBADMSG         74     _N"Not a data message")
    
    269
    +(def-unix-error  EOVERFLOW       75     _N"Value too large for defined data type")
    
    270
    +(def-unix-error  ENOTUNIQ        76     _N"Name not unique on network")
    
    271
    +(def-unix-error  EBADFD          77     _N"File descriptor in bad state")
    
    272
    +(def-unix-error  EREMCHG         78     _N"Remote address changed")
    
    273
    +(def-unix-error  ELIBACC         79     _N"Can not access a needed shared library")
    
    274
    +(def-unix-error  ELIBBAD         80     _N"Accessing a corrupted shared library")
    
    275
    +(def-unix-error  ELIBSCN         81     _N".lib section in a.out corrupted")
    
    276
    +(def-unix-error  ELIBMAX         82     _N"Attempting to link in too many shared libraries")
    
    277
    +(def-unix-error  ELIBEXEC        83     _N"Cannot exec a shared library directly")
    
    278
    +(def-unix-error  EILSEQ          84     _N"Illegal byte sequence")
    
    279
    +(def-unix-error  ERESTART        85     _N"Interrupted system call should be restarted _N")
    
    280
    +(def-unix-error  ESTRPIPE        86     _N"Streams pipe error")
    
    281
    +(def-unix-error  EUSERS          87     _N"Too many users")
    
    282
    +(def-unix-error  ENOTSOCK        88     _N"Socket operation on non-socket")
    
    283
    +(def-unix-error  EDESTADDRREQ    89     _N"Destination address required")
    
    284
    +(def-unix-error  EMSGSIZE        90     _N"Message too long")
    
    285
    +(def-unix-error  EPROTOTYPE      91     _N"Protocol wrong type for socket")
    
    286
    +(def-unix-error  ENOPROTOOPT     92     _N"Protocol not available")
    
    287
    +(def-unix-error  EPROTONOSUPPORT 93     _N"Protocol not supported")
    
    288
    +(def-unix-error  ESOCKTNOSUPPORT 94     _N"Socket type not supported")
    
    289
    +(def-unix-error  EOPNOTSUPP      95     _N"Operation not supported on transport endpoint")
    
    290
    +(def-unix-error  EPFNOSUPPORT    96     _N"Protocol family not supported")
    
    291
    +(def-unix-error  EAFNOSUPPORT    97     _N"Address family not supported by protocol")
    
    292
    +(def-unix-error  EADDRINUSE      98     _N"Address already in use")
    
    293
    +(def-unix-error  EADDRNOTAVAIL   99     _N"Cannot assign requested address")
    
    294
    +(def-unix-error  ENETDOWN        100    _N"Network is down")
    
    295
    +(def-unix-error  ENETUNREACH     101    _N"Network is unreachable")
    
    296
    +(def-unix-error  ENETRESET       102    _N"Network dropped connection because of reset")
    
    297
    +(def-unix-error  ECONNABORTED    103    _N"Software caused connection abort")
    
    298
    +(def-unix-error  ECONNRESET      104    _N"Connection reset by peer")
    
    299
    +(def-unix-error  ENOBUFS         105    _N"No buffer space available")
    
    300
    +(def-unix-error  EISCONN         106    _N"Transport endpoint is already connected")
    
    301
    +(def-unix-error  ENOTCONN        107    _N"Transport endpoint is not connected")
    
    302
    +(def-unix-error  ESHUTDOWN       108    _N"Cannot send after transport endpoint shutdown")
    
    303
    +(def-unix-error  ETOOMANYREFS    109    _N"Too many references: cannot splice")
    
    304
    +(def-unix-error  ETIMEDOUT       110    _N"Connection timed out")
    
    305
    +(def-unix-error  ECONNREFUSED    111    _N"Connection refused")
    
    306
    +(def-unix-error  EHOSTDOWN       112    _N"Host is down")
    
    307
    +(def-unix-error  EHOSTUNREACH    113    _N"No route to host")
    
    308
    +(def-unix-error  EALREADY        114    _N"Operation already in progress")
    
    309
    +(def-unix-error  EINPROGRESS     115    _N"Operation now in progress")
    
    310
    +(def-unix-error  ESTALE          116    _N"Stale NFS file handle")
    
    311
    +(def-unix-error  EUCLEAN         117    _N"Structure needs cleaning")
    
    312
    +(def-unix-error  ENOTNAM         118    _N"Not a XENIX named type file")
    
    313
    +(def-unix-error  ENAVAIL         119    _N"No XENIX semaphores available")
    
    314
    +(def-unix-error  EISNAM          120    _N"Is a named type file")
    
    315
    +(def-unix-error  EREMOTEIO       121    _N"Remote I/O error")
    
    316
    +(def-unix-error  EDQUOT          122    _N"Quota exceeded")
    
    317
    +)
    
    318
    +
    
    319
    +;;; Auto-generated forms, if any, follow here.
    
    320
    +