summaryrefslogtreecommitdiffstats
path: root/otherlibs/unix/unixsupport.c
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/unix/unixsupport.c')
-rw-r--r--otherlibs/unix/unixsupport.c184
1 files changed, 81 insertions, 103 deletions
diff --git a/otherlibs/unix/unixsupport.c b/otherlibs/unix/unixsupport.c
index 08942454b..50c0b07f4 100644
--- a/otherlibs/unix/unixsupport.c
+++ b/otherlibs/unix/unixsupport.c
@@ -19,108 +19,117 @@
#include "cst2constr.h"
#include <errno.h>
-#ifndef EPERM
-#define EPERM (-1)
-#endif
-#ifndef ENOENT
-#define ENOENT (-1)
-#endif
-#ifndef ESRCH
-#define ESRCH (-1)
-#endif
-#ifndef EINTR
-#define EINTR (-1)
-#endif
-#ifndef EIO
-#define EIO (-1)
-#endif
-#ifndef ENXIO
-#define ENXIO (-1)
-#endif
#ifndef E2BIG
#define E2BIG (-1)
#endif
-#ifndef ENOEXEC
-#define ENOEXEC (-1)
+#ifndef EACCESS
+#define EACCESS (-1)
+#endif
+#ifndef EAGAIN
+#define EAGAIN (-1)
#endif
#ifndef EBADF
#define EBADF (-1)
#endif
+#ifndef EBUSY
+#define EBUSY (-1)
+#endif
#ifndef ECHILD
#define ECHILD (-1)
#endif
-#ifndef EAGAIN
-#define EAGAIN (-1)
+#ifndef EDEADLK
+#define EDEADLK (-1)
#endif
-#ifndef ENOMEM
-#define ENOMEM (-1)
+#ifndef EDOM
+#define EDOM (-1)
#endif
-#ifndef EACCES
-#define EACCES (-1)
+#ifndef EEXIST
+#define EEXIST (-1)
#endif
#ifndef EFAULT
#define EFAULT (-1)
#endif
-#ifndef ENOTBLK
-#define ENOTBLK (-1)
-#endif
-#ifndef EBUSY
-#define EBUSY (-1)
-#endif
-#ifndef EEXIST
-#define EEXIST (-1)
+#ifndef EFBIG
+#define EFBIG (-1)
#endif
-#ifndef EXDEV
-#define EXDEV (-1)
+#ifndef EINTR
+#define EINTR (-1)
#endif
-#ifndef ENODEV
-#define ENODEV (-1)
+#ifndef EINVAL
+#define EINVAL (-1)
#endif
-#ifndef ENOTDIR
-#define ENOTDIR (-1)
+#ifndef EIO
+#define EIO (-1)
#endif
#ifndef EISDIR
#define EISDIR (-1)
#endif
-#ifndef EINVAL
-#define EINVAL (-1)
+#ifndef EMFILE
+#define EMFILE (-1)
+#endif
+#ifndef EMLINK
+#define EMLINK (-1)
+#endif
+#ifndef ENAMETOOLONG
+#define ENAMETOOLONG (-1)
#endif
#ifndef ENFILE
#define ENFILE (-1)
#endif
-#ifndef EMFILE
-#define EMFILE (-1)
+#ifndef ENODEV
+#define ENODEV (-1)
#endif
-#ifndef ENOTTY
-#define ENOTTY (-1)
+#ifndef ENOENT
+#define ENOENT (-1)
#endif
-#ifndef ETXTBSY
-#define ETXTBSY (-1)
+#ifndef ENOEXEC
+#define ENOEXEC (-1)
#endif
-#ifndef EFBIG
-#define EFBIG (-1)
+#ifndef ENOLCK
+#define ENOLCK (-1)
+#endif
+#ifndef ENOMEM
+#define ENOMEM (-1)
#endif
#ifndef ENOSPC
#define ENOSPC (-1)
#endif
-#ifndef ESPIPE
-#define ESPIPE (-1)
+#ifndef ENOSYS
+#define ENOSYS (-1)
#endif
-#ifndef EROFS
-#define EROFS (-1)
+#ifndef ENOTDIR
+#define ENOTDIR (-1)
#endif
-#ifndef EMLINK
-#define EMLINK (-1)
+#ifndef ENOTEMPTY
+#define ENOTEMPTY (-1)
+#endif
+#ifndef ENOTTY
+#define ENOTTY (-1)
+#endif
+#ifndef ENXIO
+#define ENXIO (-1)
+#endif
+#ifndef EPERM
+#define EPERM (-1)
#endif
#ifndef EPIPE
#define EPIPE (-1)
#endif
-#ifndef EDOM
-#define EDOM (-1)
-#endif
#ifndef ERANGE
#define ERANGE (-1)
#endif
+#ifndef EROFS
+#define EROFS (-1)
+#endif
+#ifndef ESPIPE
+#define ESPIPE (-1)
+#endif
+#ifndef ESRCH
+#define ESRCH (-1)
+#endif
+#ifndef EXDEV
+#define EXDEV (-1)
+#endif
#ifndef EWOULDBLOCK
#define EWOULDBLOCK (-1)
#endif
@@ -202,12 +211,6 @@
#ifndef ECONNREFUSED
#define ECONNREFUSED (-1)
#endif
-#ifndef ELOOP
-#define ELOOP (-1)
-#endif
-#ifndef ENAMETOOLONG
-#define ENAMETOOLONG (-1)
-#endif
#ifndef EHOSTDOWN
#define EHOSTDOWN (-1)
#endif
@@ -217,47 +220,22 @@
#ifndef ENOTEMPTY
#define ENOTEMPTY (-1)
#endif
-#ifndef EPROCLIM
-#define EPROCLIM (-1)
-#endif
-#ifndef EUSERS
-#define EUSERS (-1)
-#endif
-#ifndef EDQUOT
-#define EDQUOT (-1)
-#endif
-#ifndef ESTALE
-#define ESTALE (-1)
-#endif
-#ifndef EREMOTE
-#define EREMOTE (-1)
-#endif
-#ifndef EIDRM
-#define EIDRM (-1)
-#endif
-#ifndef EDEADLK
-#define EDEADLK (-1)
-#endif
-#ifndef ENOLCK
-#define ENOLCK (-1)
-#endif
-#ifndef ENOSYS
-#define ENOSYS (-1)
+#ifndef ELOOP
+#define ELOOP (-1)
#endif
int error_table[] = {
- 0, EPERM, ENOENT, ESRCH, EINTR, EIO, ENXIO, E2BIG, ENOEXEC, EBADF,
- ECHILD, EAGAIN, ENOMEM, EACCES, EFAULT, ENOTBLK, EBUSY, EEXIST, EXDEV,
- ENODEV, ENOTDIR, EISDIR, EINVAL, ENFILE, EMFILE, ENOTTY, ETXTBSY,
- EFBIG, ENOSPC, ESPIPE, EROFS, EMLINK, EPIPE, EDOM, ERANGE,
- EWOULDBLOCK, EINPROGRESS, EALREADY, ENOTSOCK, EDESTADDRREQ, EMSGSIZE,
- EPROTOTYPE, ENOPROTOOPT, EPROTONOSUPPORT, ESOCKTNOSUPPORT, EOPNOTSUPP,
- EPFNOSUPPORT, EAFNOSUPPORT, EADDRINUSE, EADDRNOTAVAIL, ENETDOWN,
- ENETUNREACH, ENETRESET, ECONNABORTED, ECONNRESET, ENOBUFS, EISCONN,
- ENOTCONN, ESHUTDOWN, ETOOMANYREFS, ETIMEDOUT, ECONNREFUSED, ELOOP,
- ENAMETOOLONG, EHOSTDOWN, EHOSTUNREACH, ENOTEMPTY, EPROCLIM, EUSERS,
- EDQUOT, ESTALE, EREMOTE, EIDRM, EDEADLK, ENOLCK, ENOSYS
- /*, EUNKNOWNERROR */
+ E2BIG, EACCESS, EAGAIN, EBADF, EBUSY, ECHILD, EDEADLK, EDOM,
+ EEXIST, EFAULT, EFBIG, EINTR, EINVAL, EIO, EISDIR, EMFILE, EMLINK,
+ ENAMETOOLONG, ENFILE, ENODEV, ENOENT, ENOEXEC, ENOLCK, ENOMEM, ENOSPC,
+ ENOSYS, ENOTDIR, ENOTEMPTY, ENOTTY, ENXIO, EPERM, EPIPE, ERANGE,
+ EROFS, ESPIPE, ESRCH, EXDEV, EWOULDBLOCK, EINPROGRESS, EALREADY,
+ ENOTSOCK, EDESTADDRREQ, EMSGSIZE, EPROTOTYPE, ENOPROTOOPT,
+ EPROTONOSUPPORT, ESOCKTNOSUPPORT, EOPNOTSUPP, EPFNOSUPPORT,
+ EAFNOSUPPORT, EADDRINUSE, EADDRNOTAVAIL, ENETDOWN, ENETUNREACH,
+ ENETRESET, ECONNABORTED, ECONNRESET, ENOBUFS, EISCONN, ENOTCONN,
+ ESHUTDOWN, ETOOMANYREFS, ETIMEDOUT, ECONNREFUSED, EHOSTDOWN,
+ EHOSTUNREACH, ELOOP /*, EUNKNOWNERR */
};
static value unix_error_exn;