]> git.sur5r.net Git - cc65/blobdiff - asminc/errno.inc
Build files in the extra directory.
[cc65] / asminc / errno.inc
index 197a35574317ab37022c12e019ea3a23a539ede7..8f79d94e9e4fdbfd3b65004a4a81c0c0fa1b2248 100644 (file)
@@ -2,23 +2,35 @@
 ; Ullrich von Bassewitz, 16.05.2000
 ;
 
+; Variables and functions
+
+        .global         __errno, __oserror
+        .global         __maperrno, __osmaperrno
+        .global         __seterrno
+        .global         oserrcheck
+        .global         seterrnofromoserror
+
 ; Error codes, must match the values in the C headers
+.enum
+        EOK                     ; No error
+        ENOENT                         ; No such file or directory
+        ENOMEM                         ; Out of memory
+        EACCES                         ; Permission denied
+        ENODEV                         ; No such device
+        EMFILE                         ; Too many open files
+        EBUSY                          ; Device or resource busy
+        EINVAL                         ; Invalid argument
+        ENOSPC                         ; No space left on device
+        EEXIST                         ; File exists
+        EAGAIN                         ; Try again
+        EIO                            ; I/O error
+        EINTR                          ; Interrupted system call
+        ENOSYS                         ; Function not implemented
+        ESPIPE                         ; Illegal seek
+        ERANGE                  ; Range error
+        EUNKNOWN                       ; Unknown OS specific error - must be last!
 
-ENOENT         =       1       ; No such file or directory
-ENOMEM         =       2       ; Out of memory
-EACCES         =       3       ; Permission denied
-ENODEV         =       4       ; No such device
-EMFILE         =       5       ; Too many open files
-EBUSY          =       6       ; Device or resource busy
-EINVAL         =       7       ; Invalid argument
-ENOSPC         =       8       ; No space left on device
-EEXIST         =       9       ; File exists
-EAGAIN         =       10      ; Try again
-EIO            =       11      ; I/O error
-EINTR          =       12      ; Interrupted system call
-ENOSYS         =       13      ; Function not implemented
-ESPIPE         =       14      ; Illegal seek
-EUNKNOWN               =       15      ; Unknown OS specific error - must be last!
+        EMAX    = EUNKNOWN      ; Highest error code
+.endenum
 
-EMAX           =       15      ; Highest error code