diff options
author | Jonathan Pryor <jpryor@novell.com> | 2005-09-20 20:04:11 +0400 |
---|---|---|
committer | Jonathan Pryor <jpryor@novell.com> | 2005-09-20 20:04:11 +0400 |
commit | 4a554da58653a9183b3c94717456b9388d0b5a06 (patch) | |
tree | 09c87beb43a97b6252a1d2901889875e64209d20 /support | |
parent | 3000f69cad3bceccb4dd943ab2a20dda60d9917c (diff) |
* Makefile.am (refresh): Use the make-map.exe in Mono.Unix.Native.
* map-icalls.h, map.c, map.h: Update to catch new enums AccessModes, Errno,
and MmapProts. Huge re-ordering because of namespace change in managed
code (not relevant to C API), and make-map.exe now outputs types/members
in alphabetical order (to avoid major code churn in the future).
svn path=/trunk/mono/; revision=50308
Diffstat (limited to 'support')
-rw-r--r-- | support/ChangeLog | 8 | ||||
-rw-r--r-- | support/Makefile.am | 2 | ||||
-rw-r--r-- | support/map-icalls.h | 6 | ||||
-rw-r--r-- | support/map.c | 11314 | ||||
-rw-r--r-- | support/map.h | 1251 |
5 files changed, 7063 insertions, 5518 deletions
diff --git a/support/ChangeLog b/support/ChangeLog index a9087a62a6a..fb6a8886884 100644 --- a/support/ChangeLog +++ b/support/ChangeLog @@ -1,3 +1,11 @@ +2005-09-20 Jonathan Pryor <jonpryor@vt.edu> + + * Makefile.am (refresh): Use the make-map.exe in Mono.Unix.Native. + * map-icalls.h, map.c, map.h: Update to catch new enums AccessModes, Errno, + and MmapProts. Huge re-ordering because of namespace change in managed + code (not relevant to C API), and make-map.exe now outputs types/members + in alphabetical order (to avoid major code churn in the future). + 2005-07-12 Daniel Drake <dsd@gentoo.org> * sys-xattr.c: Use <attr/attr.h> if <sys/xattr.h> does not exist (e.g. for diff --git a/support/Makefile.am b/support/Makefile.am index e798ad7da2d..ee1e2770042 100644 --- a/support/Makefile.am +++ b/support/Makefile.am @@ -87,5 +87,5 @@ libMonoSupportW_la_LIBADD = \ # Use this target to refresh the values in map.[ch] # refresh: - $(top_builddir)/runtime/mono-wrapper $(mcs_topdir)/class/Mono.Posix/Mono.Unix/make-map.exe $(mcs_topdir)/class/lib/default/Mono.Posix.dll map + $(top_builddir)/runtime/mono-wrapper $(mcs_topdir)/class/Mono.Posix/Mono.Unix.Native/make-map.exe $(mcs_topdir)/class/lib/default/Mono.Posix.dll map diff --git a/support/map-icalls.h b/support/map-icalls.h index d7d45b198e7..1112004d649 100644 --- a/support/map-icalls.h +++ b/support/map-icalls.h @@ -30,8 +30,10 @@ struct Mono_Posix_Utimbuf; * Function Declarations */ int Mono_Posix_FromAccessMode (int value, int* rval); +int Mono_Posix_FromAccessModes (int value, int* rval); int Mono_Posix_FromConfStr (int value, int* rval); int Mono_Posix_FromDirectoryNotifyFlags (int value, int* rval); +int Mono_Posix_FromErrno (int value, int* rval); int Mono_Posix_FromError (int value, int* rval); int Mono_Posix_FromFcntlCommand (int value, int* rval); int Mono_Posix_FromFilePermissions (unsigned int value, unsigned int* rval); @@ -40,6 +42,7 @@ int Mono_Posix_FromLockfCommand (int value, int* rval); int Mono_Posix_FromMlockallFlags (int value, int* rval); int Mono_Posix_FromMmapFlags (int value, int* rval); int Mono_Posix_FromMmapProt (int value, int* rval); +int Mono_Posix_FromMmapProts (int value, int* rval); int Mono_Posix_FromMountFlags (guint64 value, guint64* rval); int Mono_Posix_FromMremapFlags (guint64 value, guint64* rval); int Mono_Posix_FromMsyncFlags (int value, int* rval); @@ -188,8 +191,10 @@ int Mono_Posix_Syscall_utime (const char* filename, struct Mono_Posix_Utimbuf* b int Mono_Posix_Syscall_utimes (const char* filename, struct Mono_Posix_Timeval* tvp); gint64 Mono_Posix_Syscall_write (int fd, void* buf, guint64 count); int Mono_Posix_ToAccessMode (int value, int* rval); +int Mono_Posix_ToAccessModes (int value, int* rval); int Mono_Posix_ToConfStr (int value, int* rval); int Mono_Posix_ToDirectoryNotifyFlags (int value, int* rval); +int Mono_Posix_ToErrno (int value, int* rval); int Mono_Posix_ToError (int value, int* rval); int Mono_Posix_ToFcntlCommand (int value, int* rval); int Mono_Posix_ToFilePermissions (unsigned int value, unsigned int* rval); @@ -198,6 +203,7 @@ int Mono_Posix_ToLockfCommand (int value, int* rval); int Mono_Posix_ToMlockallFlags (int value, int* rval); int Mono_Posix_ToMmapFlags (int value, int* rval); int Mono_Posix_ToMmapProt (int value, int* rval); +int Mono_Posix_ToMmapProts (int value, int* rval); int Mono_Posix_ToMountFlags (guint64 value, guint64* rval); int Mono_Posix_ToMremapFlags (guint64 value, guint64* rval); int Mono_Posix_ToMsyncFlags (int value, int* rval); diff --git a/support/map.c b/support/map.c index 4b91eecdbe0..4cc79b31e0a 100644 --- a/support/map.c +++ b/support/map.c @@ -41,275 +41,331 @@ #include <syslog.h> #endif -int Mono_Posix_FromError (int x, int *r) +int Mono_Posix_FromAccessMode (int x, int *r) { *r = 0; if (x == 0) return 0; - if (x == Mono_Posix_Error_EPERM) -#ifdef EPERM - {*r = EPERM; return 0;} -#else /* def EPERM */ - {errno = EINVAL; return -1;} -#endif /* ndef EPERM */ - if (x == Mono_Posix_Error_ENOENT) -#ifdef ENOENT - {*r = ENOENT; return 0;} -#else /* def ENOENT */ - {errno = EINVAL; return -1;} -#endif /* ndef ENOENT */ - if (x == Mono_Posix_Error_ESRCH) -#ifdef ESRCH - {*r = ESRCH; return 0;} -#else /* def ESRCH */ + if ((x & Mono_Posix_AccessMode_F_OK) == Mono_Posix_AccessMode_F_OK) +#ifdef F_OK + *r |= F_OK; +#else /* def F_OK */ {errno = EINVAL; return -1;} -#endif /* ndef ESRCH */ - if (x == Mono_Posix_Error_EINTR) -#ifdef EINTR - {*r = EINTR; return 0;} -#else /* def EINTR */ +#endif /* ndef F_OK */ + if ((x & Mono_Posix_AccessMode_R_OK) == Mono_Posix_AccessMode_R_OK) +#ifdef R_OK + *r |= R_OK; +#else /* def R_OK */ {errno = EINVAL; return -1;} -#endif /* ndef EINTR */ - if (x == Mono_Posix_Error_EIO) -#ifdef EIO - {*r = EIO; return 0;} -#else /* def EIO */ +#endif /* ndef R_OK */ + if ((x & Mono_Posix_AccessMode_W_OK) == Mono_Posix_AccessMode_W_OK) +#ifdef W_OK + *r |= W_OK; +#else /* def W_OK */ {errno = EINVAL; return -1;} -#endif /* ndef EIO */ - if (x == Mono_Posix_Error_ENXIO) -#ifdef ENXIO - {*r = ENXIO; return 0;} -#else /* def ENXIO */ +#endif /* ndef W_OK */ + if ((x & Mono_Posix_AccessMode_X_OK) == Mono_Posix_AccessMode_X_OK) +#ifdef X_OK + *r |= X_OK; +#else /* def X_OK */ {errno = EINVAL; return -1;} -#endif /* ndef ENXIO */ +#endif /* ndef X_OK */ + return 0; +} + +int Mono_Posix_ToAccessMode (int x, int *r) +{ + *r = 0; + if (x == 0) + return 0; +#ifdef F_OK + if ((x & F_OK) == F_OK) + *r |= Mono_Posix_AccessMode_F_OK; +#endif /* ndef F_OK */ +#ifdef R_OK + if ((x & R_OK) == R_OK) + *r |= Mono_Posix_AccessMode_R_OK; +#endif /* ndef R_OK */ +#ifdef W_OK + if ((x & W_OK) == W_OK) + *r |= Mono_Posix_AccessMode_W_OK; +#endif /* ndef W_OK */ +#ifdef X_OK + if ((x & X_OK) == X_OK) + *r |= Mono_Posix_AccessMode_X_OK; +#endif /* ndef X_OK */ + return 0; +} + +int Mono_Posix_FromError (int x, int *r) +{ + *r = 0; + if (x == 0) + return 0; if (x == Mono_Posix_Error_E2BIG) #ifdef E2BIG {*r = E2BIG; return 0;} #else /* def E2BIG */ {errno = EINVAL; return -1;} #endif /* ndef E2BIG */ - if (x == Mono_Posix_Error_ENOEXEC) -#ifdef ENOEXEC - {*r = ENOEXEC; return 0;} -#else /* def ENOEXEC */ + if (x == Mono_Posix_Error_EACCES) +#ifdef EACCES + {*r = EACCES; return 0;} +#else /* def EACCES */ {errno = EINVAL; return -1;} -#endif /* ndef ENOEXEC */ - if (x == Mono_Posix_Error_EBADF) -#ifdef EBADF - {*r = EBADF; return 0;} -#else /* def EBADF */ +#endif /* ndef EACCES */ + if (x == Mono_Posix_Error_EADDRINUSE) +#ifdef EADDRINUSE + {*r = EADDRINUSE; return 0;} +#else /* def EADDRINUSE */ {errno = EINVAL; return -1;} -#endif /* ndef EBADF */ - if (x == Mono_Posix_Error_ECHILD) -#ifdef ECHILD - {*r = ECHILD; return 0;} -#else /* def ECHILD */ +#endif /* ndef EADDRINUSE */ + if (x == Mono_Posix_Error_EADDRNOTAVAIL) +#ifdef EADDRNOTAVAIL + {*r = EADDRNOTAVAIL; return 0;} +#else /* def EADDRNOTAVAIL */ {errno = EINVAL; return -1;} -#endif /* ndef ECHILD */ +#endif /* ndef EADDRNOTAVAIL */ + if (x == Mono_Posix_Error_EADV) +#ifdef EADV + {*r = EADV; return 0;} +#else /* def EADV */ + {errno = EINVAL; return -1;} +#endif /* ndef EADV */ + if (x == Mono_Posix_Error_EAFNOSUPPORT) +#ifdef EAFNOSUPPORT + {*r = EAFNOSUPPORT; return 0;} +#else /* def EAFNOSUPPORT */ + {errno = EINVAL; return -1;} +#endif /* ndef EAFNOSUPPORT */ if (x == Mono_Posix_Error_EAGAIN) #ifdef EAGAIN {*r = EAGAIN; return 0;} #else /* def EAGAIN */ {errno = EINVAL; return -1;} #endif /* ndef EAGAIN */ - if (x == Mono_Posix_Error_ENOMEM) -#ifdef ENOMEM - {*r = ENOMEM; return 0;} -#else /* def ENOMEM */ - {errno = EINVAL; return -1;} -#endif /* ndef ENOMEM */ - if (x == Mono_Posix_Error_EACCES) -#ifdef EACCES - {*r = EACCES; return 0;} -#else /* def EACCES */ - {errno = EINVAL; return -1;} -#endif /* ndef EACCES */ - if (x == Mono_Posix_Error_EFAULT) -#ifdef EFAULT - {*r = EFAULT; return 0;} -#else /* def EFAULT */ + if (x == Mono_Posix_Error_EALREADY) +#ifdef EALREADY + {*r = EALREADY; return 0;} +#else /* def EALREADY */ {errno = EINVAL; return -1;} -#endif /* ndef EFAULT */ - if (x == Mono_Posix_Error_ENOTBLK) -#ifdef ENOTBLK - {*r = ENOTBLK; return 0;} -#else /* def ENOTBLK */ +#endif /* ndef EALREADY */ + if (x == Mono_Posix_Error_EBADE) +#ifdef EBADE + {*r = EBADE; return 0;} +#else /* def EBADE */ {errno = EINVAL; return -1;} -#endif /* ndef ENOTBLK */ - if (x == Mono_Posix_Error_EBUSY) -#ifdef EBUSY - {*r = EBUSY; return 0;} -#else /* def EBUSY */ +#endif /* ndef EBADE */ + if (x == Mono_Posix_Error_EBADF) +#ifdef EBADF + {*r = EBADF; return 0;} +#else /* def EBADF */ {errno = EINVAL; return -1;} -#endif /* ndef EBUSY */ - if (x == Mono_Posix_Error_EEXIST) -#ifdef EEXIST - {*r = EEXIST; return 0;} -#else /* def EEXIST */ +#endif /* ndef EBADF */ + if (x == Mono_Posix_Error_EBADFD) +#ifdef EBADFD + {*r = EBADFD; return 0;} +#else /* def EBADFD */ {errno = EINVAL; return -1;} -#endif /* ndef EEXIST */ - if (x == Mono_Posix_Error_EXDEV) -#ifdef EXDEV - {*r = EXDEV; return 0;} -#else /* def EXDEV */ +#endif /* ndef EBADFD */ + if (x == Mono_Posix_Error_EBADMSG) +#ifdef EBADMSG + {*r = EBADMSG; return 0;} +#else /* def EBADMSG */ {errno = EINVAL; return -1;} -#endif /* ndef EXDEV */ - if (x == Mono_Posix_Error_ENODEV) -#ifdef ENODEV - {*r = ENODEV; return 0;} -#else /* def ENODEV */ +#endif /* ndef EBADMSG */ + if (x == Mono_Posix_Error_EBADR) +#ifdef EBADR + {*r = EBADR; return 0;} +#else /* def EBADR */ {errno = EINVAL; return -1;} -#endif /* ndef ENODEV */ - if (x == Mono_Posix_Error_ENOTDIR) -#ifdef ENOTDIR - {*r = ENOTDIR; return 0;} -#else /* def ENOTDIR */ +#endif /* ndef EBADR */ + if (x == Mono_Posix_Error_EBADRQC) +#ifdef EBADRQC + {*r = EBADRQC; return 0;} +#else /* def EBADRQC */ {errno = EINVAL; return -1;} -#endif /* ndef ENOTDIR */ - if (x == Mono_Posix_Error_EISDIR) -#ifdef EISDIR - {*r = EISDIR; return 0;} -#else /* def EISDIR */ +#endif /* ndef EBADRQC */ + if (x == Mono_Posix_Error_EBADSLT) +#ifdef EBADSLT + {*r = EBADSLT; return 0;} +#else /* def EBADSLT */ {errno = EINVAL; return -1;} -#endif /* ndef EISDIR */ - if (x == Mono_Posix_Error_EINVAL) -#ifdef EINVAL - {*r = EINVAL; return 0;} -#else /* def EINVAL */ +#endif /* ndef EBADSLT */ + if (x == Mono_Posix_Error_EBFONT) +#ifdef EBFONT + {*r = EBFONT; return 0;} +#else /* def EBFONT */ {errno = EINVAL; return -1;} -#endif /* ndef EINVAL */ - if (x == Mono_Posix_Error_ENFILE) -#ifdef ENFILE - {*r = ENFILE; return 0;} -#else /* def ENFILE */ +#endif /* ndef EBFONT */ + if (x == Mono_Posix_Error_EBUSY) +#ifdef EBUSY + {*r = EBUSY; return 0;} +#else /* def EBUSY */ {errno = EINVAL; return -1;} -#endif /* ndef ENFILE */ - if (x == Mono_Posix_Error_EMFILE) -#ifdef EMFILE - {*r = EMFILE; return 0;} -#else /* def EMFILE */ +#endif /* ndef EBUSY */ + if (x == Mono_Posix_Error_ECHILD) +#ifdef ECHILD + {*r = ECHILD; return 0;} +#else /* def ECHILD */ {errno = EINVAL; return -1;} -#endif /* ndef EMFILE */ - if (x == Mono_Posix_Error_ENOTTY) -#ifdef ENOTTY - {*r = ENOTTY; return 0;} -#else /* def ENOTTY */ +#endif /* ndef ECHILD */ + if (x == Mono_Posix_Error_ECHRNG) +#ifdef ECHRNG + {*r = ECHRNG; return 0;} +#else /* def ECHRNG */ {errno = EINVAL; return -1;} -#endif /* ndef ENOTTY */ - if (x == Mono_Posix_Error_ETXTBSY) -#ifdef ETXTBSY - {*r = ETXTBSY; return 0;} -#else /* def ETXTBSY */ +#endif /* ndef ECHRNG */ + if (x == Mono_Posix_Error_ECOMM) +#ifdef ECOMM + {*r = ECOMM; return 0;} +#else /* def ECOMM */ {errno = EINVAL; return -1;} -#endif /* ndef ETXTBSY */ - if (x == Mono_Posix_Error_EFBIG) -#ifdef EFBIG - {*r = EFBIG; return 0;} -#else /* def EFBIG */ +#endif /* ndef ECOMM */ + if (x == Mono_Posix_Error_ECONNABORTED) +#ifdef ECONNABORTED + {*r = ECONNABORTED; return 0;} +#else /* def ECONNABORTED */ {errno = EINVAL; return -1;} -#endif /* ndef EFBIG */ - if (x == Mono_Posix_Error_ENOSPC) -#ifdef ENOSPC - {*r = ENOSPC; return 0;} -#else /* def ENOSPC */ +#endif /* ndef ECONNABORTED */ + if (x == Mono_Posix_Error_ECONNREFUSED) +#ifdef ECONNREFUSED + {*r = ECONNREFUSED; return 0;} +#else /* def ECONNREFUSED */ {errno = EINVAL; return -1;} -#endif /* ndef ENOSPC */ - if (x == Mono_Posix_Error_ESPIPE) -#ifdef ESPIPE - {*r = ESPIPE; return 0;} -#else /* def ESPIPE */ +#endif /* ndef ECONNREFUSED */ + if (x == Mono_Posix_Error_ECONNRESET) +#ifdef ECONNRESET + {*r = ECONNRESET; return 0;} +#else /* def ECONNRESET */ {errno = EINVAL; return -1;} -#endif /* ndef ESPIPE */ - if (x == Mono_Posix_Error_EROFS) -#ifdef EROFS - {*r = EROFS; return 0;} -#else /* def EROFS */ +#endif /* ndef ECONNRESET */ + if (x == Mono_Posix_Error_EDEADLK) +#ifdef EDEADLK + {*r = EDEADLK; return 0;} +#else /* def EDEADLK */ {errno = EINVAL; return -1;} -#endif /* ndef EROFS */ - if (x == Mono_Posix_Error_EMLINK) -#ifdef EMLINK - {*r = EMLINK; return 0;} -#else /* def EMLINK */ +#endif /* ndef EDEADLK */ + if (x == Mono_Posix_Error_EDEADLOCK) +#ifdef EDEADLOCK + {*r = EDEADLOCK; return 0;} +#else /* def EDEADLOCK */ {errno = EINVAL; return -1;} -#endif /* ndef EMLINK */ - if (x == Mono_Posix_Error_EPIPE) -#ifdef EPIPE - {*r = EPIPE; return 0;} -#else /* def EPIPE */ +#endif /* ndef EDEADLOCK */ + if (x == Mono_Posix_Error_EDESTADDRREQ) +#ifdef EDESTADDRREQ + {*r = EDESTADDRREQ; return 0;} +#else /* def EDESTADDRREQ */ {errno = EINVAL; return -1;} -#endif /* ndef EPIPE */ +#endif /* ndef EDESTADDRREQ */ if (x == Mono_Posix_Error_EDOM) #ifdef EDOM {*r = EDOM; return 0;} #else /* def EDOM */ {errno = EINVAL; return -1;} #endif /* ndef EDOM */ - if (x == Mono_Posix_Error_ERANGE) -#ifdef ERANGE - {*r = ERANGE; return 0;} -#else /* def ERANGE */ - {errno = EINVAL; return -1;} -#endif /* ndef ERANGE */ - if (x == Mono_Posix_Error_EDEADLK) -#ifdef EDEADLK - {*r = EDEADLK; return 0;} -#else /* def EDEADLK */ - {errno = EINVAL; return -1;} -#endif /* ndef EDEADLK */ - if (x == Mono_Posix_Error_ENAMETOOLONG) -#ifdef ENAMETOOLONG - {*r = ENAMETOOLONG; return 0;} -#else /* def ENAMETOOLONG */ + if (x == Mono_Posix_Error_EDOTDOT) +#ifdef EDOTDOT + {*r = EDOTDOT; return 0;} +#else /* def EDOTDOT */ {errno = EINVAL; return -1;} -#endif /* ndef ENAMETOOLONG */ - if (x == Mono_Posix_Error_ENOLCK) -#ifdef ENOLCK - {*r = ENOLCK; return 0;} -#else /* def ENOLCK */ +#endif /* ndef EDOTDOT */ + if (x == Mono_Posix_Error_EDQUOT) +#ifdef EDQUOT + {*r = EDQUOT; return 0;} +#else /* def EDQUOT */ {errno = EINVAL; return -1;} -#endif /* ndef ENOLCK */ - if (x == Mono_Posix_Error_ENOSYS) -#ifdef ENOSYS - {*r = ENOSYS; return 0;} -#else /* def ENOSYS */ +#endif /* ndef EDQUOT */ + if (x == Mono_Posix_Error_EEXIST) +#ifdef EEXIST + {*r = EEXIST; return 0;} +#else /* def EEXIST */ {errno = EINVAL; return -1;} -#endif /* ndef ENOSYS */ - if (x == Mono_Posix_Error_ENOTEMPTY) -#ifdef ENOTEMPTY - {*r = ENOTEMPTY; return 0;} -#else /* def ENOTEMPTY */ +#endif /* ndef EEXIST */ + if (x == Mono_Posix_Error_EFAULT) +#ifdef EFAULT + {*r = EFAULT; return 0;} +#else /* def EFAULT */ {errno = EINVAL; return -1;} -#endif /* ndef ENOTEMPTY */ - if (x == Mono_Posix_Error_ELOOP) -#ifdef ELOOP - {*r = ELOOP; return 0;} -#else /* def ELOOP */ +#endif /* ndef EFAULT */ + if (x == Mono_Posix_Error_EFBIG) +#ifdef EFBIG + {*r = EFBIG; return 0;} +#else /* def EFBIG */ {errno = EINVAL; return -1;} -#endif /* ndef ELOOP */ - if (x == Mono_Posix_Error_EWOULDBLOCK) -#ifdef EWOULDBLOCK - {*r = EWOULDBLOCK; return 0;} -#else /* def EWOULDBLOCK */ +#endif /* ndef EFBIG */ + if (x == Mono_Posix_Error_EHOSTDOWN) +#ifdef EHOSTDOWN + {*r = EHOSTDOWN; return 0;} +#else /* def EHOSTDOWN */ {errno = EINVAL; return -1;} -#endif /* ndef EWOULDBLOCK */ - if (x == Mono_Posix_Error_ENOMSG) -#ifdef ENOMSG - {*r = ENOMSG; return 0;} -#else /* def ENOMSG */ +#endif /* ndef EHOSTDOWN */ + if (x == Mono_Posix_Error_EHOSTUNREACH) +#ifdef EHOSTUNREACH + {*r = EHOSTUNREACH; return 0;} +#else /* def EHOSTUNREACH */ {errno = EINVAL; return -1;} -#endif /* ndef ENOMSG */ +#endif /* ndef EHOSTUNREACH */ if (x == Mono_Posix_Error_EIDRM) #ifdef EIDRM {*r = EIDRM; return 0;} #else /* def EIDRM */ {errno = EINVAL; return -1;} #endif /* ndef EIDRM */ - if (x == Mono_Posix_Error_ECHRNG) -#ifdef ECHRNG - {*r = ECHRNG; return 0;} -#else /* def ECHRNG */ + if (x == Mono_Posix_Error_EILSEQ) +#ifdef EILSEQ + {*r = EILSEQ; return 0;} +#else /* def EILSEQ */ {errno = EINVAL; return -1;} -#endif /* ndef ECHRNG */ +#endif /* ndef EILSEQ */ + if (x == Mono_Posix_Error_EINPROGRESS) +#ifdef EINPROGRESS + {*r = EINPROGRESS; return 0;} +#else /* def EINPROGRESS */ + {errno = EINVAL; return -1;} +#endif /* ndef EINPROGRESS */ + if (x == Mono_Posix_Error_EINTR) +#ifdef EINTR + {*r = EINTR; return 0;} +#else /* def EINTR */ + {errno = EINVAL; return -1;} +#endif /* ndef EINTR */ + if (x == Mono_Posix_Error_EINVAL) +#ifdef EINVAL + {*r = EINVAL; return 0;} +#else /* def EINVAL */ + {errno = EINVAL; return -1;} +#endif /* ndef EINVAL */ + if (x == Mono_Posix_Error_EIO) +#ifdef EIO + {*r = EIO; return 0;} +#else /* def EIO */ + {errno = EINVAL; return -1;} +#endif /* ndef EIO */ + if (x == Mono_Posix_Error_EISCONN) +#ifdef EISCONN + {*r = EISCONN; return 0;} +#else /* def EISCONN */ + {errno = EINVAL; return -1;} +#endif /* ndef EISCONN */ + if (x == Mono_Posix_Error_EISDIR) +#ifdef EISDIR + {*r = EISDIR; return 0;} +#else /* def EISDIR */ + {errno = EINVAL; return -1;} +#endif /* ndef EISDIR */ + if (x == Mono_Posix_Error_EISNAM) +#ifdef EISNAM + {*r = EISNAM; return 0;} +#else /* def EISNAM */ + {errno = EINVAL; return -1;} +#endif /* ndef EISNAM */ + if (x == Mono_Posix_Error_EL2HLT) +#ifdef EL2HLT + {*r = EL2HLT; return 0;} +#else /* def EL2HLT */ + {errno = EINVAL; return -1;} +#endif /* ndef EL2HLT */ if (x == Mono_Posix_Error_EL2NSYNC) #ifdef EL2NSYNC {*r = EL2NSYNC; return 0;} @@ -328,468 +384,468 @@ int Mono_Posix_FromError (int x, int *r) #else /* def EL3RST */ {errno = EINVAL; return -1;} #endif /* ndef EL3RST */ + if (x == Mono_Posix_Error_ELIBACC) +#ifdef ELIBACC + {*r = ELIBACC; return 0;} +#else /* def ELIBACC */ + {errno = EINVAL; return -1;} +#endif /* ndef ELIBACC */ + if (x == Mono_Posix_Error_ELIBBAD) +#ifdef ELIBBAD + {*r = ELIBBAD; return 0;} +#else /* def ELIBBAD */ + {errno = EINVAL; return -1;} +#endif /* ndef ELIBBAD */ + if (x == Mono_Posix_Error_ELIBEXEC) +#ifdef ELIBEXEC + {*r = ELIBEXEC; return 0;} +#else /* def ELIBEXEC */ + {errno = EINVAL; return -1;} +#endif /* ndef ELIBEXEC */ + if (x == Mono_Posix_Error_ELIBMAX) +#ifdef ELIBMAX + {*r = ELIBMAX; return 0;} +#else /* def ELIBMAX */ + {errno = EINVAL; return -1;} +#endif /* ndef ELIBMAX */ + if (x == Mono_Posix_Error_ELIBSCN) +#ifdef ELIBSCN + {*r = ELIBSCN; return 0;} +#else /* def ELIBSCN */ + {errno = EINVAL; return -1;} +#endif /* ndef ELIBSCN */ if (x == Mono_Posix_Error_ELNRNG) #ifdef ELNRNG {*r = ELNRNG; return 0;} #else /* def ELNRNG */ {errno = EINVAL; return -1;} #endif /* ndef ELNRNG */ - if (x == Mono_Posix_Error_EUNATCH) -#ifdef EUNATCH - {*r = EUNATCH; return 0;} -#else /* def EUNATCH */ + if (x == Mono_Posix_Error_ELOOP) +#ifdef ELOOP + {*r = ELOOP; return 0;} +#else /* def ELOOP */ {errno = EINVAL; return -1;} -#endif /* ndef EUNATCH */ - if (x == Mono_Posix_Error_ENOCSI) -#ifdef ENOCSI - {*r = ENOCSI; return 0;} -#else /* def ENOCSI */ +#endif /* ndef ELOOP */ + if (x == Mono_Posix_Error_EMEDIUMTYPE) +#ifdef EMEDIUMTYPE + {*r = EMEDIUMTYPE; return 0;} +#else /* def EMEDIUMTYPE */ {errno = EINVAL; return -1;} -#endif /* ndef ENOCSI */ - if (x == Mono_Posix_Error_EL2HLT) -#ifdef EL2HLT - {*r = EL2HLT; return 0;} -#else /* def EL2HLT */ +#endif /* ndef EMEDIUMTYPE */ + if (x == Mono_Posix_Error_EMFILE) +#ifdef EMFILE + {*r = EMFILE; return 0;} +#else /* def EMFILE */ {errno = EINVAL; return -1;} -#endif /* ndef EL2HLT */ - if (x == Mono_Posix_Error_EBADE) -#ifdef EBADE - {*r = EBADE; return 0;} -#else /* def EBADE */ +#endif /* ndef EMFILE */ + if (x == Mono_Posix_Error_EMLINK) +#ifdef EMLINK + {*r = EMLINK; return 0;} +#else /* def EMLINK */ {errno = EINVAL; return -1;} -#endif /* ndef EBADE */ - if (x == Mono_Posix_Error_EBADR) -#ifdef EBADR - {*r = EBADR; return 0;} -#else /* def EBADR */ +#endif /* ndef EMLINK */ + if (x == Mono_Posix_Error_EMSGSIZE) +#ifdef EMSGSIZE + {*r = EMSGSIZE; return 0;} +#else /* def EMSGSIZE */ {errno = EINVAL; return -1;} -#endif /* ndef EBADR */ - if (x == Mono_Posix_Error_EXFULL) -#ifdef EXFULL - {*r = EXFULL; return 0;} -#else /* def EXFULL */ +#endif /* ndef EMSGSIZE */ + if (x == Mono_Posix_Error_EMULTIHOP) +#ifdef EMULTIHOP + {*r = EMULTIHOP; return 0;} +#else /* def EMULTIHOP */ {errno = EINVAL; return -1;} -#endif /* ndef EXFULL */ +#endif /* ndef EMULTIHOP */ + if (x == Mono_Posix_Error_ENAMETOOLONG) +#ifdef ENAMETOOLONG + {*r = ENAMETOOLONG; return 0;} +#else /* def ENAMETOOLONG */ + {errno = EINVAL; return -1;} +#endif /* ndef ENAMETOOLONG */ + if (x == Mono_Posix_Error_ENAVAIL) +#ifdef ENAVAIL + {*r = ENAVAIL; return 0;} +#else /* def ENAVAIL */ + {errno = EINVAL; return -1;} +#endif /* ndef ENAVAIL */ + if (x == Mono_Posix_Error_ENETDOWN) +#ifdef ENETDOWN + {*r = ENETDOWN; return 0;} +#else /* def ENETDOWN */ + {errno = EINVAL; return -1;} +#endif /* ndef ENETDOWN */ + if (x == Mono_Posix_Error_ENETRESET) +#ifdef ENETRESET + {*r = ENETRESET; return 0;} +#else /* def ENETRESET */ + {errno = EINVAL; return -1;} +#endif /* ndef ENETRESET */ + if (x == Mono_Posix_Error_ENETUNREACH) +#ifdef ENETUNREACH + {*r = ENETUNREACH; return 0;} +#else /* def ENETUNREACH */ + {errno = EINVAL; return -1;} +#endif /* ndef ENETUNREACH */ + if (x == Mono_Posix_Error_ENFILE) +#ifdef ENFILE + {*r = ENFILE; return 0;} +#else /* def ENFILE */ + {errno = EINVAL; return -1;} +#endif /* ndef ENFILE */ if (x == Mono_Posix_Error_ENOANO) #ifdef ENOANO {*r = ENOANO; return 0;} #else /* def ENOANO */ {errno = EINVAL; return -1;} #endif /* ndef ENOANO */ - if (x == Mono_Posix_Error_EBADRQC) -#ifdef EBADRQC - {*r = EBADRQC; return 0;} -#else /* def EBADRQC */ - {errno = EINVAL; return -1;} -#endif /* ndef EBADRQC */ - if (x == Mono_Posix_Error_EBADSLT) -#ifdef EBADSLT - {*r = EBADSLT; return 0;} -#else /* def EBADSLT */ - {errno = EINVAL; return -1;} -#endif /* ndef EBADSLT */ - if (x == Mono_Posix_Error_EDEADLOCK) -#ifdef EDEADLOCK - {*r = EDEADLOCK; return 0;} -#else /* def EDEADLOCK */ - {errno = EINVAL; return -1;} -#endif /* ndef EDEADLOCK */ - if (x == Mono_Posix_Error_EBFONT) -#ifdef EBFONT - {*r = EBFONT; return 0;} -#else /* def EBFONT */ + if (x == Mono_Posix_Error_ENOBUFS) +#ifdef ENOBUFS + {*r = ENOBUFS; return 0;} +#else /* def ENOBUFS */ {errno = EINVAL; return -1;} -#endif /* ndef EBFONT */ - if (x == Mono_Posix_Error_ENOSTR) -#ifdef ENOSTR - {*r = ENOSTR; return 0;} -#else /* def ENOSTR */ +#endif /* ndef ENOBUFS */ + if (x == Mono_Posix_Error_ENOCSI) +#ifdef ENOCSI + {*r = ENOCSI; return 0;} +#else /* def ENOCSI */ {errno = EINVAL; return -1;} -#endif /* ndef ENOSTR */ +#endif /* ndef ENOCSI */ if (x == Mono_Posix_Error_ENODATA) #ifdef ENODATA {*r = ENODATA; return 0;} #else /* def ENODATA */ {errno = EINVAL; return -1;} #endif /* ndef ENODATA */ - if (x == Mono_Posix_Error_ETIME) -#ifdef ETIME - {*r = ETIME; return 0;} -#else /* def ETIME */ - {errno = EINVAL; return -1;} -#endif /* ndef ETIME */ - if (x == Mono_Posix_Error_ENOSR) -#ifdef ENOSR - {*r = ENOSR; return 0;} -#else /* def ENOSR */ + if (x == Mono_Posix_Error_ENODEV) +#ifdef ENODEV + {*r = ENODEV; return 0;} +#else /* def ENODEV */ {errno = EINVAL; return -1;} -#endif /* ndef ENOSR */ - if (x == Mono_Posix_Error_ENONET) -#ifdef ENONET - {*r = ENONET; return 0;} -#else /* def ENONET */ +#endif /* ndef ENODEV */ + if (x == Mono_Posix_Error_ENOENT) +#ifdef ENOENT + {*r = ENOENT; return 0;} +#else /* def ENOENT */ {errno = EINVAL; return -1;} -#endif /* ndef ENONET */ - if (x == Mono_Posix_Error_ENOPKG) -#ifdef ENOPKG - {*r = ENOPKG; return 0;} -#else /* def ENOPKG */ +#endif /* ndef ENOENT */ + if (x == Mono_Posix_Error_ENOEXEC) +#ifdef ENOEXEC + {*r = ENOEXEC; return 0;} +#else /* def ENOEXEC */ {errno = EINVAL; return -1;} -#endif /* ndef ENOPKG */ - if (x == Mono_Posix_Error_EREMOTE) -#ifdef EREMOTE - {*r = EREMOTE; return 0;} -#else /* def EREMOTE */ +#endif /* ndef ENOEXEC */ + if (x == Mono_Posix_Error_ENOLCK) +#ifdef ENOLCK + {*r = ENOLCK; return 0;} +#else /* def ENOLCK */ {errno = EINVAL; return -1;} -#endif /* ndef EREMOTE */ +#endif /* ndef ENOLCK */ if (x == Mono_Posix_Error_ENOLINK) #ifdef ENOLINK {*r = ENOLINK; return 0;} #else /* def ENOLINK */ {errno = EINVAL; return -1;} #endif /* ndef ENOLINK */ - if (x == Mono_Posix_Error_EADV) -#ifdef EADV - {*r = EADV; return 0;} -#else /* def EADV */ - {errno = EINVAL; return -1;} -#endif /* ndef EADV */ - if (x == Mono_Posix_Error_ESRMNT) -#ifdef ESRMNT - {*r = ESRMNT; return 0;} -#else /* def ESRMNT */ - {errno = EINVAL; return -1;} -#endif /* ndef ESRMNT */ - if (x == Mono_Posix_Error_ECOMM) -#ifdef ECOMM - {*r = ECOMM; return 0;} -#else /* def ECOMM */ - {errno = EINVAL; return -1;} -#endif /* ndef ECOMM */ - if (x == Mono_Posix_Error_EPROTO) -#ifdef EPROTO - {*r = EPROTO; return 0;} -#else /* def EPROTO */ - {errno = EINVAL; return -1;} -#endif /* ndef EPROTO */ - if (x == Mono_Posix_Error_EMULTIHOP) -#ifdef EMULTIHOP - {*r = EMULTIHOP; return 0;} -#else /* def EMULTIHOP */ - {errno = EINVAL; return -1;} -#endif /* ndef EMULTIHOP */ - if (x == Mono_Posix_Error_EDOTDOT) -#ifdef EDOTDOT - {*r = EDOTDOT; return 0;} -#else /* def EDOTDOT */ + if (x == Mono_Posix_Error_ENOMEDIUM) +#ifdef ENOMEDIUM + {*r = ENOMEDIUM; return 0;} +#else /* def ENOMEDIUM */ {errno = EINVAL; return -1;} -#endif /* ndef EDOTDOT */ - if (x == Mono_Posix_Error_EBADMSG) -#ifdef EBADMSG - {*r = EBADMSG; return 0;} -#else /* def EBADMSG */ +#endif /* ndef ENOMEDIUM */ + if (x == Mono_Posix_Error_ENOMEM) +#ifdef ENOMEM + {*r = ENOMEM; return 0;} +#else /* def ENOMEM */ {errno = EINVAL; return -1;} -#endif /* ndef EBADMSG */ - if (x == Mono_Posix_Error_EOVERFLOW) -#ifdef EOVERFLOW - {*r = EOVERFLOW; return 0;} -#else /* def EOVERFLOW */ +#endif /* ndef ENOMEM */ + if (x == Mono_Posix_Error_ENOMSG) +#ifdef ENOMSG + {*r = ENOMSG; return 0;} +#else /* def ENOMSG */ {errno = EINVAL; return -1;} -#endif /* ndef EOVERFLOW */ - if (x == Mono_Posix_Error_ENOTUNIQ) -#ifdef ENOTUNIQ - {*r = ENOTUNIQ; return 0;} -#else /* def ENOTUNIQ */ +#endif /* ndef ENOMSG */ + if (x == Mono_Posix_Error_ENONET) +#ifdef ENONET + {*r = ENONET; return 0;} +#else /* def ENONET */ {errno = EINVAL; return -1;} -#endif /* ndef ENOTUNIQ */ - if (x == Mono_Posix_Error_EBADFD) -#ifdef EBADFD - {*r = EBADFD; return 0;} -#else /* def EBADFD */ +#endif /* ndef ENONET */ + if (x == Mono_Posix_Error_ENOPKG) +#ifdef ENOPKG + {*r = ENOPKG; return 0;} +#else /* def ENOPKG */ {errno = EINVAL; return -1;} -#endif /* ndef EBADFD */ - if (x == Mono_Posix_Error_EREMCHG) -#ifdef EREMCHG - {*r = EREMCHG; return 0;} -#else /* def EREMCHG */ +#endif /* ndef ENOPKG */ + if (x == Mono_Posix_Error_ENOPROTOOPT) +#ifdef ENOPROTOOPT + {*r = ENOPROTOOPT; return 0;} +#else /* def ENOPROTOOPT */ {errno = EINVAL; return -1;} -#endif /* ndef EREMCHG */ - if (x == Mono_Posix_Error_ELIBACC) -#ifdef ELIBACC - {*r = ELIBACC; return 0;} -#else /* def ELIBACC */ +#endif /* ndef ENOPROTOOPT */ + if (x == Mono_Posix_Error_ENOSPC) +#ifdef ENOSPC + {*r = ENOSPC; return 0;} +#else /* def ENOSPC */ {errno = EINVAL; return -1;} -#endif /* ndef ELIBACC */ - if (x == Mono_Posix_Error_ELIBBAD) -#ifdef ELIBBAD - {*r = ELIBBAD; return 0;} -#else /* def ELIBBAD */ +#endif /* ndef ENOSPC */ + if (x == Mono_Posix_Error_ENOSR) +#ifdef ENOSR + {*r = ENOSR; return 0;} +#else /* def ENOSR */ {errno = EINVAL; return -1;} -#endif /* ndef ELIBBAD */ - if (x == Mono_Posix_Error_ELIBSCN) -#ifdef ELIBSCN - {*r = ELIBSCN; return 0;} -#else /* def ELIBSCN */ +#endif /* ndef ENOSR */ + if (x == Mono_Posix_Error_ENOSTR) +#ifdef ENOSTR + {*r = ENOSTR; return 0;} +#else /* def ENOSTR */ {errno = EINVAL; return -1;} -#endif /* ndef ELIBSCN */ - if (x == Mono_Posix_Error_ELIBMAX) -#ifdef ELIBMAX - {*r = ELIBMAX; return 0;} -#else /* def ELIBMAX */ +#endif /* ndef ENOSTR */ + if (x == Mono_Posix_Error_ENOSYS) +#ifdef ENOSYS + {*r = ENOSYS; return 0;} +#else /* def ENOSYS */ {errno = EINVAL; return -1;} -#endif /* ndef ELIBMAX */ - if (x == Mono_Posix_Error_ELIBEXEC) -#ifdef ELIBEXEC - {*r = ELIBEXEC; return 0;} -#else /* def ELIBEXEC */ +#endif /* ndef ENOSYS */ + if (x == Mono_Posix_Error_ENOTBLK) +#ifdef ENOTBLK + {*r = ENOTBLK; return 0;} +#else /* def ENOTBLK */ {errno = EINVAL; return -1;} -#endif /* ndef ELIBEXEC */ - if (x == Mono_Posix_Error_EILSEQ) -#ifdef EILSEQ - {*r = EILSEQ; return 0;} -#else /* def EILSEQ */ +#endif /* ndef ENOTBLK */ + if (x == Mono_Posix_Error_ENOTCONN) +#ifdef ENOTCONN + {*r = ENOTCONN; return 0;} +#else /* def ENOTCONN */ {errno = EINVAL; return -1;} -#endif /* ndef EILSEQ */ - if (x == Mono_Posix_Error_ERESTART) -#ifdef ERESTART - {*r = ERESTART; return 0;} -#else /* def ERESTART */ +#endif /* ndef ENOTCONN */ + if (x == Mono_Posix_Error_ENOTDIR) +#ifdef ENOTDIR + {*r = ENOTDIR; return 0;} +#else /* def ENOTDIR */ {errno = EINVAL; return -1;} -#endif /* ndef ERESTART */ - if (x == Mono_Posix_Error_ESTRPIPE) -#ifdef ESTRPIPE - {*r = ESTRPIPE; return 0;} -#else /* def ESTRPIPE */ +#endif /* ndef ENOTDIR */ + if (x == Mono_Posix_Error_ENOTEMPTY) +#ifdef ENOTEMPTY + {*r = ENOTEMPTY; return 0;} +#else /* def ENOTEMPTY */ {errno = EINVAL; return -1;} -#endif /* ndef ESTRPIPE */ - if (x == Mono_Posix_Error_EUSERS) -#ifdef EUSERS - {*r = EUSERS; return 0;} -#else /* def EUSERS */ +#endif /* ndef ENOTEMPTY */ + if (x == Mono_Posix_Error_ENOTNAM) +#ifdef ENOTNAM + {*r = ENOTNAM; return 0;} +#else /* def ENOTNAM */ {errno = EINVAL; return -1;} -#endif /* ndef EUSERS */ +#endif /* ndef ENOTNAM */ if (x == Mono_Posix_Error_ENOTSOCK) #ifdef ENOTSOCK {*r = ENOTSOCK; return 0;} #else /* def ENOTSOCK */ {errno = EINVAL; return -1;} #endif /* ndef ENOTSOCK */ - if (x == Mono_Posix_Error_EDESTADDRREQ) -#ifdef EDESTADDRREQ - {*r = EDESTADDRREQ; return 0;} -#else /* def EDESTADDRREQ */ - {errno = EINVAL; return -1;} -#endif /* ndef EDESTADDRREQ */ - if (x == Mono_Posix_Error_EMSGSIZE) -#ifdef EMSGSIZE - {*r = EMSGSIZE; return 0;} -#else /* def EMSGSIZE */ - {errno = EINVAL; return -1;} -#endif /* ndef EMSGSIZE */ - if (x == Mono_Posix_Error_EPROTOTYPE) -#ifdef EPROTOTYPE - {*r = EPROTOTYPE; return 0;} -#else /* def EPROTOTYPE */ - {errno = EINVAL; return -1;} -#endif /* ndef EPROTOTYPE */ - if (x == Mono_Posix_Error_ENOPROTOOPT) -#ifdef ENOPROTOOPT - {*r = ENOPROTOOPT; return 0;} -#else /* def ENOPROTOOPT */ + if (x == Mono_Posix_Error_ENOTTY) +#ifdef ENOTTY + {*r = ENOTTY; return 0;} +#else /* def ENOTTY */ {errno = EINVAL; return -1;} -#endif /* ndef ENOPROTOOPT */ - if (x == Mono_Posix_Error_EPROTONOSUPPORT) -#ifdef EPROTONOSUPPORT - {*r = EPROTONOSUPPORT; return 0;} -#else /* def EPROTONOSUPPORT */ +#endif /* ndef ENOTTY */ + if (x == Mono_Posix_Error_ENOTUNIQ) +#ifdef ENOTUNIQ + {*r = ENOTUNIQ; return 0;} +#else /* def ENOTUNIQ */ {errno = EINVAL; return -1;} -#endif /* ndef EPROTONOSUPPORT */ - if (x == Mono_Posix_Error_ESOCKTNOSUPPORT) -#ifdef ESOCKTNOSUPPORT - {*r = ESOCKTNOSUPPORT; return 0;} -#else /* def ESOCKTNOSUPPORT */ +#endif /* ndef ENOTUNIQ */ + if (x == Mono_Posix_Error_ENXIO) +#ifdef ENXIO + {*r = ENXIO; return 0;} +#else /* def ENXIO */ {errno = EINVAL; return -1;} -#endif /* ndef ESOCKTNOSUPPORT */ +#endif /* ndef ENXIO */ if (x == Mono_Posix_Error_EOPNOTSUPP) #ifdef EOPNOTSUPP {*r = EOPNOTSUPP; return 0;} #else /* def EOPNOTSUPP */ {errno = EINVAL; return -1;} #endif /* ndef EOPNOTSUPP */ + if (x == Mono_Posix_Error_EOVERFLOW) +#ifdef EOVERFLOW + {*r = EOVERFLOW; return 0;} +#else /* def EOVERFLOW */ + {errno = EINVAL; return -1;} +#endif /* ndef EOVERFLOW */ + if (x == Mono_Posix_Error_EPERM) +#ifdef EPERM + {*r = EPERM; return 0;} +#else /* def EPERM */ + {errno = EINVAL; return -1;} +#endif /* ndef EPERM */ if (x == Mono_Posix_Error_EPFNOSUPPORT) #ifdef EPFNOSUPPORT {*r = EPFNOSUPPORT; return 0;} #else /* def EPFNOSUPPORT */ {errno = EINVAL; return -1;} #endif /* ndef EPFNOSUPPORT */ - if (x == Mono_Posix_Error_EAFNOSUPPORT) -#ifdef EAFNOSUPPORT - {*r = EAFNOSUPPORT; return 0;} -#else /* def EAFNOSUPPORT */ - {errno = EINVAL; return -1;} -#endif /* ndef EAFNOSUPPORT */ - if (x == Mono_Posix_Error_EADDRINUSE) -#ifdef EADDRINUSE - {*r = EADDRINUSE; return 0;} -#else /* def EADDRINUSE */ + if (x == Mono_Posix_Error_EPIPE) +#ifdef EPIPE + {*r = EPIPE; return 0;} +#else /* def EPIPE */ {errno = EINVAL; return -1;} -#endif /* ndef EADDRINUSE */ - if (x == Mono_Posix_Error_EADDRNOTAVAIL) -#ifdef EADDRNOTAVAIL - {*r = EADDRNOTAVAIL; return 0;} -#else /* def EADDRNOTAVAIL */ +#endif /* ndef EPIPE */ + if (x == Mono_Posix_Error_EPROTO) +#ifdef EPROTO + {*r = EPROTO; return 0;} +#else /* def EPROTO */ {errno = EINVAL; return -1;} -#endif /* ndef EADDRNOTAVAIL */ - if (x == Mono_Posix_Error_ENETDOWN) -#ifdef ENETDOWN - {*r = ENETDOWN; return 0;} -#else /* def ENETDOWN */ +#endif /* ndef EPROTO */ + if (x == Mono_Posix_Error_EPROTONOSUPPORT) +#ifdef EPROTONOSUPPORT + {*r = EPROTONOSUPPORT; return 0;} +#else /* def EPROTONOSUPPORT */ {errno = EINVAL; return -1;} -#endif /* ndef ENETDOWN */ - if (x == Mono_Posix_Error_ENETUNREACH) -#ifdef ENETUNREACH - {*r = ENETUNREACH; return 0;} -#else /* def ENETUNREACH */ +#endif /* ndef EPROTONOSUPPORT */ + if (x == Mono_Posix_Error_EPROTOTYPE) +#ifdef EPROTOTYPE + {*r = EPROTOTYPE; return 0;} +#else /* def EPROTOTYPE */ {errno = EINVAL; return -1;} -#endif /* ndef ENETUNREACH */ - if (x == Mono_Posix_Error_ENETRESET) -#ifdef ENETRESET - {*r = ENETRESET; return 0;} -#else /* def ENETRESET */ +#endif /* ndef EPROTOTYPE */ + if (x == Mono_Posix_Error_ERANGE) +#ifdef ERANGE + {*r = ERANGE; return 0;} +#else /* def ERANGE */ {errno = EINVAL; return -1;} -#endif /* ndef ENETRESET */ - if (x == Mono_Posix_Error_ECONNABORTED) -#ifdef ECONNABORTED - {*r = ECONNABORTED; return 0;} -#else /* def ECONNABORTED */ +#endif /* ndef ERANGE */ + if (x == Mono_Posix_Error_EREMCHG) +#ifdef EREMCHG + {*r = EREMCHG; return 0;} +#else /* def EREMCHG */ {errno = EINVAL; return -1;} -#endif /* ndef ECONNABORTED */ - if (x == Mono_Posix_Error_ECONNRESET) -#ifdef ECONNRESET - {*r = ECONNRESET; return 0;} -#else /* def ECONNRESET */ +#endif /* ndef EREMCHG */ + if (x == Mono_Posix_Error_EREMOTE) +#ifdef EREMOTE + {*r = EREMOTE; return 0;} +#else /* def EREMOTE */ {errno = EINVAL; return -1;} -#endif /* ndef ECONNRESET */ - if (x == Mono_Posix_Error_ENOBUFS) -#ifdef ENOBUFS - {*r = ENOBUFS; return 0;} -#else /* def ENOBUFS */ +#endif /* ndef EREMOTE */ + if (x == Mono_Posix_Error_EREMOTEIO) +#ifdef EREMOTEIO + {*r = EREMOTEIO; return 0;} +#else /* def EREMOTEIO */ {errno = EINVAL; return -1;} -#endif /* ndef ENOBUFS */ - if (x == Mono_Posix_Error_EISCONN) -#ifdef EISCONN - {*r = EISCONN; return 0;} -#else /* def EISCONN */ +#endif /* ndef EREMOTEIO */ + if (x == Mono_Posix_Error_ERESTART) +#ifdef ERESTART + {*r = ERESTART; return 0;} +#else /* def ERESTART */ {errno = EINVAL; return -1;} -#endif /* ndef EISCONN */ - if (x == Mono_Posix_Error_ENOTCONN) -#ifdef ENOTCONN - {*r = ENOTCONN; return 0;} -#else /* def ENOTCONN */ +#endif /* ndef ERESTART */ + if (x == Mono_Posix_Error_EROFS) +#ifdef EROFS + {*r = EROFS; return 0;} +#else /* def EROFS */ {errno = EINVAL; return -1;} -#endif /* ndef ENOTCONN */ +#endif /* ndef EROFS */ if (x == Mono_Posix_Error_ESHUTDOWN) #ifdef ESHUTDOWN {*r = ESHUTDOWN; return 0;} #else /* def ESHUTDOWN */ {errno = EINVAL; return -1;} #endif /* ndef ESHUTDOWN */ - if (x == Mono_Posix_Error_ETOOMANYREFS) -#ifdef ETOOMANYREFS - {*r = ETOOMANYREFS; return 0;} -#else /* def ETOOMANYREFS */ - {errno = EINVAL; return -1;} -#endif /* ndef ETOOMANYREFS */ - if (x == Mono_Posix_Error_ETIMEDOUT) -#ifdef ETIMEDOUT - {*r = ETIMEDOUT; return 0;} -#else /* def ETIMEDOUT */ - {errno = EINVAL; return -1;} -#endif /* ndef ETIMEDOUT */ - if (x == Mono_Posix_Error_ECONNREFUSED) -#ifdef ECONNREFUSED - {*r = ECONNREFUSED; return 0;} -#else /* def ECONNREFUSED */ - {errno = EINVAL; return -1;} -#endif /* ndef ECONNREFUSED */ - if (x == Mono_Posix_Error_EHOSTDOWN) -#ifdef EHOSTDOWN - {*r = EHOSTDOWN; return 0;} -#else /* def EHOSTDOWN */ + if (x == Mono_Posix_Error_ESOCKTNOSUPPORT) +#ifdef ESOCKTNOSUPPORT + {*r = ESOCKTNOSUPPORT; return 0;} +#else /* def ESOCKTNOSUPPORT */ {errno = EINVAL; return -1;} -#endif /* ndef EHOSTDOWN */ - if (x == Mono_Posix_Error_EHOSTUNREACH) -#ifdef EHOSTUNREACH - {*r = EHOSTUNREACH; return 0;} -#else /* def EHOSTUNREACH */ +#endif /* ndef ESOCKTNOSUPPORT */ + if (x == Mono_Posix_Error_ESPIPE) +#ifdef ESPIPE + {*r = ESPIPE; return 0;} +#else /* def ESPIPE */ {errno = EINVAL; return -1;} -#endif /* ndef EHOSTUNREACH */ - if (x == Mono_Posix_Error_EALREADY) -#ifdef EALREADY - {*r = EALREADY; return 0;} -#else /* def EALREADY */ +#endif /* ndef ESPIPE */ + if (x == Mono_Posix_Error_ESRCH) +#ifdef ESRCH + {*r = ESRCH; return 0;} +#else /* def ESRCH */ {errno = EINVAL; return -1;} -#endif /* ndef EALREADY */ - if (x == Mono_Posix_Error_EINPROGRESS) -#ifdef EINPROGRESS - {*r = EINPROGRESS; return 0;} -#else /* def EINPROGRESS */ +#endif /* ndef ESRCH */ + if (x == Mono_Posix_Error_ESRMNT) +#ifdef ESRMNT + {*r = ESRMNT; return 0;} +#else /* def ESRMNT */ {errno = EINVAL; return -1;} -#endif /* ndef EINPROGRESS */ +#endif /* ndef ESRMNT */ if (x == Mono_Posix_Error_ESTALE) #ifdef ESTALE {*r = ESTALE; return 0;} #else /* def ESTALE */ {errno = EINVAL; return -1;} #endif /* ndef ESTALE */ + if (x == Mono_Posix_Error_ESTRPIPE) +#ifdef ESTRPIPE + {*r = ESTRPIPE; return 0;} +#else /* def ESTRPIPE */ + {errno = EINVAL; return -1;} +#endif /* ndef ESTRPIPE */ + if (x == Mono_Posix_Error_ETIME) +#ifdef ETIME + {*r = ETIME; return 0;} +#else /* def ETIME */ + {errno = EINVAL; return -1;} +#endif /* ndef ETIME */ + if (x == Mono_Posix_Error_ETIMEDOUT) +#ifdef ETIMEDOUT + {*r = ETIMEDOUT; return 0;} +#else /* def ETIMEDOUT */ + {errno = EINVAL; return -1;} +#endif /* ndef ETIMEDOUT */ + if (x == Mono_Posix_Error_ETOOMANYREFS) +#ifdef ETOOMANYREFS + {*r = ETOOMANYREFS; return 0;} +#else /* def ETOOMANYREFS */ + {errno = EINVAL; return -1;} +#endif /* ndef ETOOMANYREFS */ + if (x == Mono_Posix_Error_ETXTBSY) +#ifdef ETXTBSY + {*r = ETXTBSY; return 0;} +#else /* def ETXTBSY */ + {errno = EINVAL; return -1;} +#endif /* ndef ETXTBSY */ if (x == Mono_Posix_Error_EUCLEAN) #ifdef EUCLEAN {*r = EUCLEAN; return 0;} #else /* def EUCLEAN */ {errno = EINVAL; return -1;} #endif /* ndef EUCLEAN */ - if (x == Mono_Posix_Error_ENOTNAM) -#ifdef ENOTNAM - {*r = ENOTNAM; return 0;} -#else /* def ENOTNAM */ - {errno = EINVAL; return -1;} -#endif /* ndef ENOTNAM */ - if (x == Mono_Posix_Error_ENAVAIL) -#ifdef ENAVAIL - {*r = ENAVAIL; return 0;} -#else /* def ENAVAIL */ - {errno = EINVAL; return -1;} -#endif /* ndef ENAVAIL */ - if (x == Mono_Posix_Error_EISNAM) -#ifdef EISNAM - {*r = EISNAM; return 0;} -#else /* def EISNAM */ + if (x == Mono_Posix_Error_EUNATCH) +#ifdef EUNATCH + {*r = EUNATCH; return 0;} +#else /* def EUNATCH */ {errno = EINVAL; return -1;} -#endif /* ndef EISNAM */ - if (x == Mono_Posix_Error_EREMOTEIO) -#ifdef EREMOTEIO - {*r = EREMOTEIO; return 0;} -#else /* def EREMOTEIO */ +#endif /* ndef EUNATCH */ + if (x == Mono_Posix_Error_EUSERS) +#ifdef EUSERS + {*r = EUSERS; return 0;} +#else /* def EUSERS */ {errno = EINVAL; return -1;} -#endif /* ndef EREMOTEIO */ - if (x == Mono_Posix_Error_EDQUOT) -#ifdef EDQUOT - {*r = EDQUOT; return 0;} -#else /* def EDQUOT */ +#endif /* ndef EUSERS */ + if (x == Mono_Posix_Error_EWOULDBLOCK) +#ifdef EWOULDBLOCK + {*r = EWOULDBLOCK; return 0;} +#else /* def EWOULDBLOCK */ {errno = EINVAL; return -1;} -#endif /* ndef EDQUOT */ - if (x == Mono_Posix_Error_ENOMEDIUM) -#ifdef ENOMEDIUM - {*r = ENOMEDIUM; return 0;} -#else /* def ENOMEDIUM */ +#endif /* ndef EWOULDBLOCK */ + if (x == Mono_Posix_Error_EXDEV) +#ifdef EXDEV + {*r = EXDEV; return 0;} +#else /* def EXDEV */ {errno = EINVAL; return -1;} -#endif /* ndef ENOMEDIUM */ - if (x == Mono_Posix_Error_EMEDIUMTYPE) -#ifdef EMEDIUMTYPE - {*r = EMEDIUMTYPE; return 0;} -#else /* def EMEDIUMTYPE */ +#endif /* ndef EXDEV */ + if (x == Mono_Posix_Error_EXFULL) +#ifdef EXFULL + {*r = EXFULL; return 0;} +#else /* def EXFULL */ {errno = EINVAL; return -1;} -#endif /* ndef EMEDIUMTYPE */ +#endif /* ndef EXFULL */ errno = EINVAL; return -1; } @@ -798,226 +854,58 @@ int Mono_Posix_ToError (int x, int *r) *r = 0; if (x == 0) return 0; -#ifdef EPERM - if (x == EPERM) - {*r = Mono_Posix_Error_EPERM; return 0;} -#endif /* ndef EPERM */ -#ifdef ENOENT - if (x == ENOENT) - {*r = Mono_Posix_Error_ENOENT; return 0;} -#endif /* ndef ENOENT */ -#ifdef ESRCH - if (x == ESRCH) - {*r = Mono_Posix_Error_ESRCH; return 0;} -#endif /* ndef ESRCH */ -#ifdef EINTR - if (x == EINTR) - {*r = Mono_Posix_Error_EINTR; return 0;} -#endif /* ndef EINTR */ -#ifdef EIO - if (x == EIO) - {*r = Mono_Posix_Error_EIO; return 0;} -#endif /* ndef EIO */ -#ifdef ENXIO - if (x == ENXIO) - {*r = Mono_Posix_Error_ENXIO; return 0;} -#endif /* ndef ENXIO */ #ifdef E2BIG if (x == E2BIG) {*r = Mono_Posix_Error_E2BIG; return 0;} #endif /* ndef E2BIG */ -#ifdef ENOEXEC - if (x == ENOEXEC) - {*r = Mono_Posix_Error_ENOEXEC; return 0;} -#endif /* ndef ENOEXEC */ -#ifdef EBADF - if (x == EBADF) - {*r = Mono_Posix_Error_EBADF; return 0;} -#endif /* ndef EBADF */ -#ifdef ECHILD - if (x == ECHILD) - {*r = Mono_Posix_Error_ECHILD; return 0;} -#endif /* ndef ECHILD */ -#ifdef EAGAIN - if (x == EAGAIN) - {*r = Mono_Posix_Error_EAGAIN; return 0;} -#endif /* ndef EAGAIN */ -#ifdef ENOMEM - if (x == ENOMEM) - {*r = Mono_Posix_Error_ENOMEM; return 0;} -#endif /* ndef ENOMEM */ #ifdef EACCES if (x == EACCES) {*r = Mono_Posix_Error_EACCES; return 0;} #endif /* ndef EACCES */ -#ifdef EFAULT - if (x == EFAULT) - {*r = Mono_Posix_Error_EFAULT; return 0;} -#endif /* ndef EFAULT */ -#ifdef ENOTBLK - if (x == ENOTBLK) - {*r = Mono_Posix_Error_ENOTBLK; return 0;} -#endif /* ndef ENOTBLK */ -#ifdef EBUSY - if (x == EBUSY) - {*r = Mono_Posix_Error_EBUSY; return 0;} -#endif /* ndef EBUSY */ -#ifdef EEXIST - if (x == EEXIST) - {*r = Mono_Posix_Error_EEXIST; return 0;} -#endif /* ndef EEXIST */ -#ifdef EXDEV - if (x == EXDEV) - {*r = Mono_Posix_Error_EXDEV; return 0;} -#endif /* ndef EXDEV */ -#ifdef ENODEV - if (x == ENODEV) - {*r = Mono_Posix_Error_ENODEV; return 0;} -#endif /* ndef ENODEV */ -#ifdef ENOTDIR - if (x == ENOTDIR) - {*r = Mono_Posix_Error_ENOTDIR; return 0;} -#endif /* ndef ENOTDIR */ -#ifdef EISDIR - if (x == EISDIR) - {*r = Mono_Posix_Error_EISDIR; return 0;} -#endif /* ndef EISDIR */ -#ifdef EINVAL - if (x == EINVAL) - {*r = Mono_Posix_Error_EINVAL; return 0;} -#endif /* ndef EINVAL */ -#ifdef ENFILE - if (x == ENFILE) - {*r = Mono_Posix_Error_ENFILE; return 0;} -#endif /* ndef ENFILE */ -#ifdef EMFILE - if (x == EMFILE) - {*r = Mono_Posix_Error_EMFILE; return 0;} -#endif /* ndef EMFILE */ -#ifdef ENOTTY - if (x == ENOTTY) - {*r = Mono_Posix_Error_ENOTTY; return 0;} -#endif /* ndef ENOTTY */ -#ifdef ETXTBSY - if (x == ETXTBSY) - {*r = Mono_Posix_Error_ETXTBSY; return 0;} -#endif /* ndef ETXTBSY */ -#ifdef EFBIG - if (x == EFBIG) - {*r = Mono_Posix_Error_EFBIG; return 0;} -#endif /* ndef EFBIG */ -#ifdef ENOSPC - if (x == ENOSPC) - {*r = Mono_Posix_Error_ENOSPC; return 0;} -#endif /* ndef ENOSPC */ -#ifdef ESPIPE - if (x == ESPIPE) - {*r = Mono_Posix_Error_ESPIPE; return 0;} -#endif /* ndef ESPIPE */ -#ifdef EROFS - if (x == EROFS) - {*r = Mono_Posix_Error_EROFS; return 0;} -#endif /* ndef EROFS */ -#ifdef EMLINK - if (x == EMLINK) - {*r = Mono_Posix_Error_EMLINK; return 0;} -#endif /* ndef EMLINK */ -#ifdef EPIPE - if (x == EPIPE) - {*r = Mono_Posix_Error_EPIPE; return 0;} -#endif /* ndef EPIPE */ -#ifdef EDOM - if (x == EDOM) - {*r = Mono_Posix_Error_EDOM; return 0;} -#endif /* ndef EDOM */ -#ifdef ERANGE - if (x == ERANGE) - {*r = Mono_Posix_Error_ERANGE; return 0;} -#endif /* ndef ERANGE */ -#ifdef EDEADLK - if (x == EDEADLK) - {*r = Mono_Posix_Error_EDEADLK; return 0;} -#endif /* ndef EDEADLK */ -#ifdef ENAMETOOLONG - if (x == ENAMETOOLONG) - {*r = Mono_Posix_Error_ENAMETOOLONG; return 0;} -#endif /* ndef ENAMETOOLONG */ -#ifdef ENOLCK - if (x == ENOLCK) - {*r = Mono_Posix_Error_ENOLCK; return 0;} -#endif /* ndef ENOLCK */ -#ifdef ENOSYS - if (x == ENOSYS) - {*r = Mono_Posix_Error_ENOSYS; return 0;} -#endif /* ndef ENOSYS */ -#ifdef ENOTEMPTY - if (x == ENOTEMPTY) - {*r = Mono_Posix_Error_ENOTEMPTY; return 0;} -#endif /* ndef ENOTEMPTY */ -#ifdef ELOOP - if (x == ELOOP) - {*r = Mono_Posix_Error_ELOOP; return 0;} -#endif /* ndef ELOOP */ -#ifdef EWOULDBLOCK - if (x == EWOULDBLOCK) - {*r = Mono_Posix_Error_EWOULDBLOCK; return 0;} -#endif /* ndef EWOULDBLOCK */ -#ifdef ENOMSG - if (x == ENOMSG) - {*r = Mono_Posix_Error_ENOMSG; return 0;} -#endif /* ndef ENOMSG */ -#ifdef EIDRM - if (x == EIDRM) - {*r = Mono_Posix_Error_EIDRM; return 0;} -#endif /* ndef EIDRM */ -#ifdef ECHRNG - if (x == ECHRNG) - {*r = Mono_Posix_Error_ECHRNG; return 0;} -#endif /* ndef ECHRNG */ -#ifdef EL2NSYNC - if (x == EL2NSYNC) - {*r = Mono_Posix_Error_EL2NSYNC; return 0;} -#endif /* ndef EL2NSYNC */ -#ifdef EL3HLT - if (x == EL3HLT) - {*r = Mono_Posix_Error_EL3HLT; return 0;} -#endif /* ndef EL3HLT */ -#ifdef EL3RST - if (x == EL3RST) - {*r = Mono_Posix_Error_EL3RST; return 0;} -#endif /* ndef EL3RST */ -#ifdef ELNRNG - if (x == ELNRNG) - {*r = Mono_Posix_Error_ELNRNG; return 0;} -#endif /* ndef ELNRNG */ -#ifdef EUNATCH - if (x == EUNATCH) - {*r = Mono_Posix_Error_EUNATCH; return 0;} -#endif /* ndef EUNATCH */ -#ifdef ENOCSI - if (x == ENOCSI) - {*r = Mono_Posix_Error_ENOCSI; return 0;} -#endif /* ndef ENOCSI */ -#ifdef EL2HLT - if (x == EL2HLT) - {*r = Mono_Posix_Error_EL2HLT; return 0;} -#endif /* ndef EL2HLT */ +#ifdef EADDRINUSE + if (x == EADDRINUSE) + {*r = Mono_Posix_Error_EADDRINUSE; return 0;} +#endif /* ndef EADDRINUSE */ +#ifdef EADDRNOTAVAIL + if (x == EADDRNOTAVAIL) + {*r = Mono_Posix_Error_EADDRNOTAVAIL; return 0;} +#endif /* ndef EADDRNOTAVAIL */ +#ifdef EADV + if (x == EADV) + {*r = Mono_Posix_Error_EADV; return 0;} +#endif /* ndef EADV */ +#ifdef EAFNOSUPPORT + if (x == EAFNOSUPPORT) + {*r = Mono_Posix_Error_EAFNOSUPPORT; return 0;} +#endif /* ndef EAFNOSUPPORT */ +#ifdef EAGAIN + if (x == EAGAIN) + {*r = Mono_Posix_Error_EAGAIN; return 0;} +#endif /* ndef EAGAIN */ +#ifdef EALREADY + if (x == EALREADY) + {*r = Mono_Posix_Error_EALREADY; return 0;} +#endif /* ndef EALREADY */ #ifdef EBADE if (x == EBADE) {*r = Mono_Posix_Error_EBADE; return 0;} #endif /* ndef EBADE */ +#ifdef EBADF + if (x == EBADF) + {*r = Mono_Posix_Error_EBADF; return 0;} +#endif /* ndef EBADF */ +#ifdef EBADFD + if (x == EBADFD) + {*r = Mono_Posix_Error_EBADFD; return 0;} +#endif /* ndef EBADFD */ +#ifdef EBADMSG + if (x == EBADMSG) + {*r = Mono_Posix_Error_EBADMSG; return 0;} +#endif /* ndef EBADMSG */ #ifdef EBADR if (x == EBADR) {*r = Mono_Posix_Error_EBADR; return 0;} #endif /* ndef EBADR */ -#ifdef EXFULL - if (x == EXFULL) - {*r = Mono_Posix_Error_EXFULL; return 0;} -#endif /* ndef EXFULL */ -#ifdef ENOANO - if (x == ENOANO) - {*r = Mono_Posix_Error_ENOANO; return 0;} -#endif /* ndef ENOANO */ #ifdef EBADRQC if (x == EBADRQC) {*r = Mono_Posix_Error_EBADRQC; return 0;} @@ -1026,90 +914,134 @@ int Mono_Posix_ToError (int x, int *r) if (x == EBADSLT) {*r = Mono_Posix_Error_EBADSLT; return 0;} #endif /* ndef EBADSLT */ -#ifdef EDEADLOCK - if (x == EDEADLOCK) - {*r = Mono_Posix_Error_EDEADLOCK; return 0;} -#endif /* ndef EDEADLOCK */ #ifdef EBFONT if (x == EBFONT) {*r = Mono_Posix_Error_EBFONT; return 0;} #endif /* ndef EBFONT */ -#ifdef ENOSTR - if (x == ENOSTR) - {*r = Mono_Posix_Error_ENOSTR; return 0;} -#endif /* ndef ENOSTR */ -#ifdef ENODATA - if (x == ENODATA) - {*r = Mono_Posix_Error_ENODATA; return 0;} -#endif /* ndef ENODATA */ -#ifdef ETIME - if (x == ETIME) - {*r = Mono_Posix_Error_ETIME; return 0;} -#endif /* ndef ETIME */ -#ifdef ENOSR - if (x == ENOSR) - {*r = Mono_Posix_Error_ENOSR; return 0;} -#endif /* ndef ENOSR */ -#ifdef ENONET - if (x == ENONET) - {*r = Mono_Posix_Error_ENONET; return 0;} -#endif /* ndef ENONET */ -#ifdef ENOPKG - if (x == ENOPKG) - {*r = Mono_Posix_Error_ENOPKG; return 0;} -#endif /* ndef ENOPKG */ -#ifdef EREMOTE - if (x == EREMOTE) - {*r = Mono_Posix_Error_EREMOTE; return 0;} -#endif /* ndef EREMOTE */ -#ifdef ENOLINK - if (x == ENOLINK) - {*r = Mono_Posix_Error_ENOLINK; return 0;} -#endif /* ndef ENOLINK */ -#ifdef EADV - if (x == EADV) - {*r = Mono_Posix_Error_EADV; return 0;} -#endif /* ndef EADV */ -#ifdef ESRMNT - if (x == ESRMNT) - {*r = Mono_Posix_Error_ESRMNT; return 0;} -#endif /* ndef ESRMNT */ +#ifdef EBUSY + if (x == EBUSY) + {*r = Mono_Posix_Error_EBUSY; return 0;} +#endif /* ndef EBUSY */ +#ifdef ECHILD + if (x == ECHILD) + {*r = Mono_Posix_Error_ECHILD; return 0;} +#endif /* ndef ECHILD */ +#ifdef ECHRNG + if (x == ECHRNG) + {*r = Mono_Posix_Error_ECHRNG; return 0;} +#endif /* ndef ECHRNG */ #ifdef ECOMM if (x == ECOMM) {*r = Mono_Posix_Error_ECOMM; return 0;} #endif /* ndef ECOMM */ -#ifdef EPROTO - if (x == EPROTO) - {*r = Mono_Posix_Error_EPROTO; return 0;} -#endif /* ndef EPROTO */ -#ifdef EMULTIHOP - if (x == EMULTIHOP) - {*r = Mono_Posix_Error_EMULTIHOP; return 0;} -#endif /* ndef EMULTIHOP */ +#ifdef ECONNABORTED + if (x == ECONNABORTED) + {*r = Mono_Posix_Error_ECONNABORTED; return 0;} +#endif /* ndef ECONNABORTED */ +#ifdef ECONNREFUSED + if (x == ECONNREFUSED) + {*r = Mono_Posix_Error_ECONNREFUSED; return 0;} +#endif /* ndef ECONNREFUSED */ +#ifdef ECONNRESET + if (x == ECONNRESET) + {*r = Mono_Posix_Error_ECONNRESET; return 0;} +#endif /* ndef ECONNRESET */ +#ifdef EDEADLK + if (x == EDEADLK) + {*r = Mono_Posix_Error_EDEADLK; return 0;} +#endif /* ndef EDEADLK */ +#ifdef EDEADLOCK + if (x == EDEADLOCK) + {*r = Mono_Posix_Error_EDEADLOCK; return 0;} +#endif /* ndef EDEADLOCK */ +#ifdef EDESTADDRREQ + if (x == EDESTADDRREQ) + {*r = Mono_Posix_Error_EDESTADDRREQ; return 0;} +#endif /* ndef EDESTADDRREQ */ +#ifdef EDOM + if (x == EDOM) + {*r = Mono_Posix_Error_EDOM; return 0;} +#endif /* ndef EDOM */ #ifdef EDOTDOT if (x == EDOTDOT) {*r = Mono_Posix_Error_EDOTDOT; return 0;} #endif /* ndef EDOTDOT */ -#ifdef EBADMSG - if (x == EBADMSG) - {*r = Mono_Posix_Error_EBADMSG; return 0;} -#endif /* ndef EBADMSG */ -#ifdef EOVERFLOW - if (x == EOVERFLOW) - {*r = Mono_Posix_Error_EOVERFLOW; return 0;} -#endif /* ndef EOVERFLOW */ -#ifdef ENOTUNIQ - if (x == ENOTUNIQ) - {*r = Mono_Posix_Error_ENOTUNIQ; return 0;} -#endif /* ndef ENOTUNIQ */ -#ifdef EBADFD - if (x == EBADFD) - {*r = Mono_Posix_Error_EBADFD; return 0;} -#endif /* ndef EBADFD */ -#ifdef EREMCHG - if (x == EREMCHG) - {*r = Mono_Posix_Error_EREMCHG; return 0;} -#endif /* ndef EREMCHG */ +#ifdef EDQUOT + if (x == EDQUOT) + {*r = Mono_Posix_Error_EDQUOT; return 0;} +#endif /* ndef EDQUOT */ +#ifdef EEXIST + if (x == EEXIST) + {*r = Mono_Posix_Error_EEXIST; return 0;} +#endif /* ndef EEXIST */ +#ifdef EFAULT + if (x == EFAULT) + {*r = Mono_Posix_Error_EFAULT; return 0;} +#endif /* ndef EFAULT */ +#ifdef EFBIG + if (x == EFBIG) + {*r = Mono_Posix_Error_EFBIG; return 0;} +#endif /* ndef EFBIG */ +#ifdef EHOSTDOWN + if (x == EHOSTDOWN) + {*r = Mono_Posix_Error_EHOSTDOWN; return 0;} +#endif /* ndef EHOSTDOWN */ +#ifdef EHOSTUNREACH + if (x == EHOSTUNREACH) + {*r = Mono_Posix_Error_EHOSTUNREACH; return 0;} +#endif /* ndef EHOSTUNREACH */ +#ifdef EIDRM + if (x == EIDRM) + {*r = Mono_Posix_Error_EIDRM; return 0;} +#endif /* ndef EIDRM */ +#ifdef EILSEQ + if (x == EILSEQ) + {*r = Mono_Posix_Error_EILSEQ; return 0;} +#endif /* ndef EILSEQ */ +#ifdef EINPROGRESS + if (x == EINPROGRESS) + {*r = Mono_Posix_Error_EINPROGRESS; return 0;} +#endif /* ndef EINPROGRESS */ +#ifdef EINTR + if (x == EINTR) + {*r = Mono_Posix_Error_EINTR; return 0;} +#endif /* ndef EINTR */ +#ifdef EINVAL + if (x == EINVAL) + {*r = Mono_Posix_Error_EINVAL; return 0;} +#endif /* ndef EINVAL */ +#ifdef EIO + if (x == EIO) + {*r = Mono_Posix_Error_EIO; return 0;} +#endif /* ndef EIO */ +#ifdef EISCONN + if (x == EISCONN) + {*r = Mono_Posix_Error_EISCONN; return 0;} +#endif /* ndef EISCONN */ +#ifdef EISDIR + if (x == EISDIR) + {*r = Mono_Posix_Error_EISDIR; return 0;} +#endif /* ndef EISDIR */ +#ifdef EISNAM + if (x == EISNAM) + {*r = Mono_Posix_Error_EISNAM; return 0;} +#endif /* ndef EISNAM */ +#ifdef EL2HLT + if (x == EL2HLT) + {*r = Mono_Posix_Error_EL2HLT; return 0;} +#endif /* ndef EL2HLT */ +#ifdef EL2NSYNC + if (x == EL2NSYNC) + {*r = Mono_Posix_Error_EL2NSYNC; return 0;} +#endif /* ndef EL2NSYNC */ +#ifdef EL3HLT + if (x == EL3HLT) + {*r = Mono_Posix_Error_EL3HLT; return 0;} +#endif /* ndef EL3HLT */ +#ifdef EL3RST + if (x == EL3RST) + {*r = Mono_Posix_Error_EL3RST; return 0;} +#endif /* ndef EL3RST */ #ifdef ELIBACC if (x == ELIBACC) {*r = Mono_Posix_Error_ELIBACC; return 0;} @@ -1118,1018 +1050,2237 @@ int Mono_Posix_ToError (int x, int *r) if (x == ELIBBAD) {*r = Mono_Posix_Error_ELIBBAD; return 0;} #endif /* ndef ELIBBAD */ -#ifdef ELIBSCN - if (x == ELIBSCN) - {*r = Mono_Posix_Error_ELIBSCN; return 0;} -#endif /* ndef ELIBSCN */ -#ifdef ELIBMAX - if (x == ELIBMAX) - {*r = Mono_Posix_Error_ELIBMAX; return 0;} -#endif /* ndef ELIBMAX */ #ifdef ELIBEXEC if (x == ELIBEXEC) {*r = Mono_Posix_Error_ELIBEXEC; return 0;} #endif /* ndef ELIBEXEC */ -#ifdef EILSEQ - if (x == EILSEQ) - {*r = Mono_Posix_Error_EILSEQ; return 0;} -#endif /* ndef EILSEQ */ -#ifdef ERESTART - if (x == ERESTART) - {*r = Mono_Posix_Error_ERESTART; return 0;} -#endif /* ndef ERESTART */ -#ifdef ESTRPIPE - if (x == ESTRPIPE) - {*r = Mono_Posix_Error_ESTRPIPE; return 0;} -#endif /* ndef ESTRPIPE */ -#ifdef EUSERS - if (x == EUSERS) - {*r = Mono_Posix_Error_EUSERS; return 0;} -#endif /* ndef EUSERS */ -#ifdef ENOTSOCK - if (x == ENOTSOCK) - {*r = Mono_Posix_Error_ENOTSOCK; return 0;} -#endif /* ndef ENOTSOCK */ -#ifdef EDESTADDRREQ - if (x == EDESTADDRREQ) - {*r = Mono_Posix_Error_EDESTADDRREQ; return 0;} -#endif /* ndef EDESTADDRREQ */ +#ifdef ELIBMAX + if (x == ELIBMAX) + {*r = Mono_Posix_Error_ELIBMAX; return 0;} +#endif /* ndef ELIBMAX */ +#ifdef ELIBSCN + if (x == ELIBSCN) + {*r = Mono_Posix_Error_ELIBSCN; return 0;} +#endif /* ndef ELIBSCN */ +#ifdef ELNRNG + if (x == ELNRNG) + {*r = Mono_Posix_Error_ELNRNG; return 0;} +#endif /* ndef ELNRNG */ +#ifdef ELOOP + if (x == ELOOP) + {*r = Mono_Posix_Error_ELOOP; return 0;} +#endif /* ndef ELOOP */ +#ifdef EMEDIUMTYPE + if (x == EMEDIUMTYPE) + {*r = Mono_Posix_Error_EMEDIUMTYPE; return 0;} +#endif /* ndef EMEDIUMTYPE */ +#ifdef EMFILE + if (x == EMFILE) + {*r = Mono_Posix_Error_EMFILE; return 0;} +#endif /* ndef EMFILE */ +#ifdef EMLINK + if (x == EMLINK) + {*r = Mono_Posix_Error_EMLINK; return 0;} +#endif /* ndef EMLINK */ #ifdef EMSGSIZE if (x == EMSGSIZE) {*r = Mono_Posix_Error_EMSGSIZE; return 0;} #endif /* ndef EMSGSIZE */ -#ifdef EPROTOTYPE - if (x == EPROTOTYPE) - {*r = Mono_Posix_Error_EPROTOTYPE; return 0;} -#endif /* ndef EPROTOTYPE */ -#ifdef ENOPROTOOPT - if (x == ENOPROTOOPT) - {*r = Mono_Posix_Error_ENOPROTOOPT; return 0;} -#endif /* ndef ENOPROTOOPT */ -#ifdef EPROTONOSUPPORT - if (x == EPROTONOSUPPORT) - {*r = Mono_Posix_Error_EPROTONOSUPPORT; return 0;} -#endif /* ndef EPROTONOSUPPORT */ -#ifdef ESOCKTNOSUPPORT - if (x == ESOCKTNOSUPPORT) - {*r = Mono_Posix_Error_ESOCKTNOSUPPORT; return 0;} -#endif /* ndef ESOCKTNOSUPPORT */ -#ifdef EOPNOTSUPP - if (x == EOPNOTSUPP) - {*r = Mono_Posix_Error_EOPNOTSUPP; return 0;} -#endif /* ndef EOPNOTSUPP */ -#ifdef EPFNOSUPPORT - if (x == EPFNOSUPPORT) - {*r = Mono_Posix_Error_EPFNOSUPPORT; return 0;} -#endif /* ndef EPFNOSUPPORT */ -#ifdef EAFNOSUPPORT - if (x == EAFNOSUPPORT) - {*r = Mono_Posix_Error_EAFNOSUPPORT; return 0;} -#endif /* ndef EAFNOSUPPORT */ -#ifdef EADDRINUSE - if (x == EADDRINUSE) - {*r = Mono_Posix_Error_EADDRINUSE; return 0;} -#endif /* ndef EADDRINUSE */ -#ifdef EADDRNOTAVAIL - if (x == EADDRNOTAVAIL) - {*r = Mono_Posix_Error_EADDRNOTAVAIL; return 0;} -#endif /* ndef EADDRNOTAVAIL */ +#ifdef EMULTIHOP + if (x == EMULTIHOP) + {*r = Mono_Posix_Error_EMULTIHOP; return 0;} +#endif /* ndef EMULTIHOP */ +#ifdef ENAMETOOLONG + if (x == ENAMETOOLONG) + {*r = Mono_Posix_Error_ENAMETOOLONG; return 0;} +#endif /* ndef ENAMETOOLONG */ +#ifdef ENAVAIL + if (x == ENAVAIL) + {*r = Mono_Posix_Error_ENAVAIL; return 0;} +#endif /* ndef ENAVAIL */ #ifdef ENETDOWN if (x == ENETDOWN) {*r = Mono_Posix_Error_ENETDOWN; return 0;} #endif /* ndef ENETDOWN */ -#ifdef ENETUNREACH - if (x == ENETUNREACH) - {*r = Mono_Posix_Error_ENETUNREACH; return 0;} -#endif /* ndef ENETUNREACH */ #ifdef ENETRESET if (x == ENETRESET) {*r = Mono_Posix_Error_ENETRESET; return 0;} #endif /* ndef ENETRESET */ -#ifdef ECONNABORTED - if (x == ECONNABORTED) - {*r = Mono_Posix_Error_ECONNABORTED; return 0;} -#endif /* ndef ECONNABORTED */ -#ifdef ECONNRESET - if (x == ECONNRESET) - {*r = Mono_Posix_Error_ECONNRESET; return 0;} -#endif /* ndef ECONNRESET */ +#ifdef ENETUNREACH + if (x == ENETUNREACH) + {*r = Mono_Posix_Error_ENETUNREACH; return 0;} +#endif /* ndef ENETUNREACH */ +#ifdef ENFILE + if (x == ENFILE) + {*r = Mono_Posix_Error_ENFILE; return 0;} +#endif /* ndef ENFILE */ +#ifdef ENOANO + if (x == ENOANO) + {*r = Mono_Posix_Error_ENOANO; return 0;} +#endif /* ndef ENOANO */ #ifdef ENOBUFS if (x == ENOBUFS) {*r = Mono_Posix_Error_ENOBUFS; return 0;} #endif /* ndef ENOBUFS */ -#ifdef EISCONN - if (x == EISCONN) - {*r = Mono_Posix_Error_EISCONN; return 0;} -#endif /* ndef EISCONN */ +#ifdef ENOCSI + if (x == ENOCSI) + {*r = Mono_Posix_Error_ENOCSI; return 0;} +#endif /* ndef ENOCSI */ +#ifdef ENODATA + if (x == ENODATA) + {*r = Mono_Posix_Error_ENODATA; return 0;} +#endif /* ndef ENODATA */ +#ifdef ENODEV + if (x == ENODEV) + {*r = Mono_Posix_Error_ENODEV; return 0;} +#endif /* ndef ENODEV */ +#ifdef ENOENT + if (x == ENOENT) + {*r = Mono_Posix_Error_ENOENT; return 0;} +#endif /* ndef ENOENT */ +#ifdef ENOEXEC + if (x == ENOEXEC) + {*r = Mono_Posix_Error_ENOEXEC; return 0;} +#endif /* ndef ENOEXEC */ +#ifdef ENOLCK + if (x == ENOLCK) + {*r = Mono_Posix_Error_ENOLCK; return 0;} +#endif /* ndef ENOLCK */ +#ifdef ENOLINK + if (x == ENOLINK) + {*r = Mono_Posix_Error_ENOLINK; return 0;} +#endif /* ndef ENOLINK */ +#ifdef ENOMEDIUM + if (x == ENOMEDIUM) + {*r = Mono_Posix_Error_ENOMEDIUM; return 0;} +#endif /* ndef ENOMEDIUM */ +#ifdef ENOMEM + if (x == ENOMEM) + {*r = Mono_Posix_Error_ENOMEM; return 0;} +#endif /* ndef ENOMEM */ +#ifdef ENOMSG + if (x == ENOMSG) + {*r = Mono_Posix_Error_ENOMSG; return 0;} +#endif /* ndef ENOMSG */ +#ifdef ENONET + if (x == ENONET) + {*r = Mono_Posix_Error_ENONET; return 0;} +#endif /* ndef ENONET */ +#ifdef ENOPKG + if (x == ENOPKG) + {*r = Mono_Posix_Error_ENOPKG; return 0;} +#endif /* ndef ENOPKG */ +#ifdef ENOPROTOOPT + if (x == ENOPROTOOPT) + {*r = Mono_Posix_Error_ENOPROTOOPT; return 0;} +#endif /* ndef ENOPROTOOPT */ +#ifdef ENOSPC + if (x == ENOSPC) + {*r = Mono_Posix_Error_ENOSPC; return 0;} +#endif /* ndef ENOSPC */ +#ifdef ENOSR + if (x == ENOSR) + {*r = Mono_Posix_Error_ENOSR; return 0;} +#endif /* ndef ENOSR */ +#ifdef ENOSTR + if (x == ENOSTR) + {*r = Mono_Posix_Error_ENOSTR; return 0;} +#endif /* ndef ENOSTR */ +#ifdef ENOSYS + if (x == ENOSYS) + {*r = Mono_Posix_Error_ENOSYS; return 0;} +#endif /* ndef ENOSYS */ +#ifdef ENOTBLK + if (x == ENOTBLK) + {*r = Mono_Posix_Error_ENOTBLK; return 0;} +#endif /* ndef ENOTBLK */ #ifdef ENOTCONN if (x == ENOTCONN) {*r = Mono_Posix_Error_ENOTCONN; return 0;} #endif /* ndef ENOTCONN */ +#ifdef ENOTDIR + if (x == ENOTDIR) + {*r = Mono_Posix_Error_ENOTDIR; return 0;} +#endif /* ndef ENOTDIR */ +#ifdef ENOTEMPTY + if (x == ENOTEMPTY) + {*r = Mono_Posix_Error_ENOTEMPTY; return 0;} +#endif /* ndef ENOTEMPTY */ +#ifdef ENOTNAM + if (x == ENOTNAM) + {*r = Mono_Posix_Error_ENOTNAM; return 0;} +#endif /* ndef ENOTNAM */ +#ifdef ENOTSOCK + if (x == ENOTSOCK) + {*r = Mono_Posix_Error_ENOTSOCK; return 0;} +#endif /* ndef ENOTSOCK */ +#ifdef ENOTTY + if (x == ENOTTY) + {*r = Mono_Posix_Error_ENOTTY; return 0;} +#endif /* ndef ENOTTY */ +#ifdef ENOTUNIQ + if (x == ENOTUNIQ) + {*r = Mono_Posix_Error_ENOTUNIQ; return 0;} +#endif /* ndef ENOTUNIQ */ +#ifdef ENXIO + if (x == ENXIO) + {*r = Mono_Posix_Error_ENXIO; return 0;} +#endif /* ndef ENXIO */ +#ifdef EOPNOTSUPP + if (x == EOPNOTSUPP) + {*r = Mono_Posix_Error_EOPNOTSUPP; return 0;} +#endif /* ndef EOPNOTSUPP */ +#ifdef EOVERFLOW + if (x == EOVERFLOW) + {*r = Mono_Posix_Error_EOVERFLOW; return 0;} +#endif /* ndef EOVERFLOW */ +#ifdef EPERM + if (x == EPERM) + {*r = Mono_Posix_Error_EPERM; return 0;} +#endif /* ndef EPERM */ +#ifdef EPFNOSUPPORT + if (x == EPFNOSUPPORT) + {*r = Mono_Posix_Error_EPFNOSUPPORT; return 0;} +#endif /* ndef EPFNOSUPPORT */ +#ifdef EPIPE + if (x == EPIPE) + {*r = Mono_Posix_Error_EPIPE; return 0;} +#endif /* ndef EPIPE */ +#ifdef EPROTO + if (x == EPROTO) + {*r = Mono_Posix_Error_EPROTO; return 0;} +#endif /* ndef EPROTO */ +#ifdef EPROTONOSUPPORT + if (x == EPROTONOSUPPORT) + {*r = Mono_Posix_Error_EPROTONOSUPPORT; return 0;} +#endif /* ndef EPROTONOSUPPORT */ +#ifdef EPROTOTYPE + if (x == EPROTOTYPE) + {*r = Mono_Posix_Error_EPROTOTYPE; return 0;} +#endif /* ndef EPROTOTYPE */ +#ifdef ERANGE + if (x == ERANGE) + {*r = Mono_Posix_Error_ERANGE; return 0;} +#endif /* ndef ERANGE */ +#ifdef EREMCHG + if (x == EREMCHG) + {*r = Mono_Posix_Error_EREMCHG; return 0;} +#endif /* ndef EREMCHG */ +#ifdef EREMOTE + if (x == EREMOTE) + {*r = Mono_Posix_Error_EREMOTE; return 0;} +#endif /* ndef EREMOTE */ +#ifdef EREMOTEIO + if (x == EREMOTEIO) + {*r = Mono_Posix_Error_EREMOTEIO; return 0;} +#endif /* ndef EREMOTEIO */ +#ifdef ERESTART + if (x == ERESTART) + {*r = Mono_Posix_Error_ERESTART; return 0;} +#endif /* ndef ERESTART */ +#ifdef EROFS + if (x == EROFS) + {*r = Mono_Posix_Error_EROFS; return 0;} +#endif /* ndef EROFS */ #ifdef ESHUTDOWN if (x == ESHUTDOWN) {*r = Mono_Posix_Error_ESHUTDOWN; return 0;} #endif /* ndef ESHUTDOWN */ -#ifdef ETOOMANYREFS - if (x == ETOOMANYREFS) - {*r = Mono_Posix_Error_ETOOMANYREFS; return 0;} -#endif /* ndef ETOOMANYREFS */ -#ifdef ETIMEDOUT - if (x == ETIMEDOUT) - {*r = Mono_Posix_Error_ETIMEDOUT; return 0;} -#endif /* ndef ETIMEDOUT */ -#ifdef ECONNREFUSED - if (x == ECONNREFUSED) - {*r = Mono_Posix_Error_ECONNREFUSED; return 0;} -#endif /* ndef ECONNREFUSED */ -#ifdef EHOSTDOWN - if (x == EHOSTDOWN) - {*r = Mono_Posix_Error_EHOSTDOWN; return 0;} -#endif /* ndef EHOSTDOWN */ -#ifdef EHOSTUNREACH - if (x == EHOSTUNREACH) - {*r = Mono_Posix_Error_EHOSTUNREACH; return 0;} -#endif /* ndef EHOSTUNREACH */ -#ifdef EALREADY - if (x == EALREADY) - {*r = Mono_Posix_Error_EALREADY; return 0;} -#endif /* ndef EALREADY */ -#ifdef EINPROGRESS - if (x == EINPROGRESS) - {*r = Mono_Posix_Error_EINPROGRESS; return 0;} -#endif /* ndef EINPROGRESS */ +#ifdef ESOCKTNOSUPPORT + if (x == ESOCKTNOSUPPORT) + {*r = Mono_Posix_Error_ESOCKTNOSUPPORT; return 0;} +#endif /* ndef ESOCKTNOSUPPORT */ +#ifdef ESPIPE + if (x == ESPIPE) + {*r = Mono_Posix_Error_ESPIPE; return 0;} +#endif /* ndef ESPIPE */ +#ifdef ESRCH + if (x == ESRCH) + {*r = Mono_Posix_Error_ESRCH; return 0;} +#endif /* ndef ESRCH */ +#ifdef ESRMNT + if (x == ESRMNT) + {*r = Mono_Posix_Error_ESRMNT; return 0;} +#endif /* ndef ESRMNT */ #ifdef ESTALE if (x == ESTALE) {*r = Mono_Posix_Error_ESTALE; return 0;} #endif /* ndef ESTALE */ +#ifdef ESTRPIPE + if (x == ESTRPIPE) + {*r = Mono_Posix_Error_ESTRPIPE; return 0;} +#endif /* ndef ESTRPIPE */ +#ifdef ETIME + if (x == ETIME) + {*r = Mono_Posix_Error_ETIME; return 0;} +#endif /* ndef ETIME */ +#ifdef ETIMEDOUT + if (x == ETIMEDOUT) + {*r = Mono_Posix_Error_ETIMEDOUT; return 0;} +#endif /* ndef ETIMEDOUT */ +#ifdef ETOOMANYREFS + if (x == ETOOMANYREFS) + {*r = Mono_Posix_Error_ETOOMANYREFS; return 0;} +#endif /* ndef ETOOMANYREFS */ +#ifdef ETXTBSY + if (x == ETXTBSY) + {*r = Mono_Posix_Error_ETXTBSY; return 0;} +#endif /* ndef ETXTBSY */ #ifdef EUCLEAN if (x == EUCLEAN) {*r = Mono_Posix_Error_EUCLEAN; return 0;} #endif /* ndef EUCLEAN */ -#ifdef ENOTNAM - if (x == ENOTNAM) - {*r = Mono_Posix_Error_ENOTNAM; return 0;} -#endif /* ndef ENOTNAM */ -#ifdef ENAVAIL - if (x == ENAVAIL) - {*r = Mono_Posix_Error_ENAVAIL; return 0;} -#endif /* ndef ENAVAIL */ -#ifdef EISNAM - if (x == EISNAM) - {*r = Mono_Posix_Error_EISNAM; return 0;} -#endif /* ndef EISNAM */ -#ifdef EREMOTEIO - if (x == EREMOTEIO) - {*r = Mono_Posix_Error_EREMOTEIO; return 0;} -#endif /* ndef EREMOTEIO */ -#ifdef EDQUOT - if (x == EDQUOT) - {*r = Mono_Posix_Error_EDQUOT; return 0;} -#endif /* ndef EDQUOT */ -#ifdef ENOMEDIUM - if (x == ENOMEDIUM) - {*r = Mono_Posix_Error_ENOMEDIUM; return 0;} -#endif /* ndef ENOMEDIUM */ -#ifdef EMEDIUMTYPE - if (x == EMEDIUMTYPE) - {*r = Mono_Posix_Error_EMEDIUMTYPE; return 0;} -#endif /* ndef EMEDIUMTYPE */ +#ifdef EUNATCH + if (x == EUNATCH) + {*r = Mono_Posix_Error_EUNATCH; return 0;} +#endif /* ndef EUNATCH */ +#ifdef EUSERS + if (x == EUSERS) + {*r = Mono_Posix_Error_EUSERS; return 0;} +#endif /* ndef EUSERS */ +#ifdef EWOULDBLOCK + if (x == EWOULDBLOCK) + {*r = Mono_Posix_Error_EWOULDBLOCK; return 0;} +#endif /* ndef EWOULDBLOCK */ +#ifdef EXDEV + if (x == EXDEV) + {*r = Mono_Posix_Error_EXDEV; return 0;} +#endif /* ndef EXDEV */ +#ifdef EXFULL + if (x == EXFULL) + {*r = Mono_Posix_Error_EXFULL; return 0;} +#endif /* ndef EXFULL */ errno = EINVAL; return -1; } -int Mono_Posix_FromSyslogOptions (int x, int *r) +int Mono_Posix_FromMmapProt (int x, int *r) { *r = 0; if (x == 0) return 0; - if ((x & Mono_Posix_SyslogOptions_LOG_PID) == Mono_Posix_SyslogOptions_LOG_PID) -#ifdef LOG_PID - *r |= LOG_PID; -#else /* def LOG_PID */ + if ((x & Mono_Posix_MmapProt_PROT_EXEC) == Mono_Posix_MmapProt_PROT_EXEC) +#ifdef PROT_EXEC + *r |= PROT_EXEC; +#else /* def PROT_EXEC */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_PID */ - if ((x & Mono_Posix_SyslogOptions_LOG_CONS) == Mono_Posix_SyslogOptions_LOG_CONS) -#ifdef LOG_CONS - *r |= LOG_CONS; -#else /* def LOG_CONS */ +#endif /* ndef PROT_EXEC */ + if ((x & Mono_Posix_MmapProt_PROT_GROWSDOWN) == Mono_Posix_MmapProt_PROT_GROWSDOWN) +#ifdef PROT_GROWSDOWN + *r |= PROT_GROWSDOWN; +#else /* def PROT_GROWSDOWN */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_CONS */ - if ((x & Mono_Posix_SyslogOptions_LOG_ODELAY) == Mono_Posix_SyslogOptions_LOG_ODELAY) -#ifdef LOG_ODELAY - *r |= LOG_ODELAY; -#else /* def LOG_ODELAY */ +#endif /* ndef PROT_GROWSDOWN */ + if ((x & Mono_Posix_MmapProt_PROT_GROWSUP) == Mono_Posix_MmapProt_PROT_GROWSUP) +#ifdef PROT_GROWSUP + *r |= PROT_GROWSUP; +#else /* def PROT_GROWSUP */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_ODELAY */ - if ((x & Mono_Posix_SyslogOptions_LOG_NDELAY) == Mono_Posix_SyslogOptions_LOG_NDELAY) -#ifdef LOG_NDELAY - *r |= LOG_NDELAY; -#else /* def LOG_NDELAY */ +#endif /* ndef PROT_GROWSUP */ + if ((x & Mono_Posix_MmapProt_PROT_NONE) == Mono_Posix_MmapProt_PROT_NONE) +#ifdef PROT_NONE + *r |= PROT_NONE; +#else /* def PROT_NONE */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_NDELAY */ - if ((x & Mono_Posix_SyslogOptions_LOG_NOWAIT) == Mono_Posix_SyslogOptions_LOG_NOWAIT) -#ifdef LOG_NOWAIT - *r |= LOG_NOWAIT; -#else /* def LOG_NOWAIT */ +#endif /* ndef PROT_NONE */ + if ((x & Mono_Posix_MmapProt_PROT_READ) == Mono_Posix_MmapProt_PROT_READ) +#ifdef PROT_READ + *r |= PROT_READ; +#else /* def PROT_READ */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_NOWAIT */ - if ((x & Mono_Posix_SyslogOptions_LOG_PERROR) == Mono_Posix_SyslogOptions_LOG_PERROR) -#ifdef LOG_PERROR - *r |= LOG_PERROR; -#else /* def LOG_PERROR */ +#endif /* ndef PROT_READ */ + if ((x & Mono_Posix_MmapProt_PROT_WRITE) == Mono_Posix_MmapProt_PROT_WRITE) +#ifdef PROT_WRITE + *r |= PROT_WRITE; +#else /* def PROT_WRITE */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_PERROR */ +#endif /* ndef PROT_WRITE */ return 0; } -int Mono_Posix_ToSyslogOptions (int x, int *r) +int Mono_Posix_ToMmapProt (int x, int *r) { *r = 0; if (x == 0) return 0; -#ifdef LOG_PID - if ((x & LOG_PID) == LOG_PID) - *r |= Mono_Posix_SyslogOptions_LOG_PID; -#endif /* ndef LOG_PID */ -#ifdef LOG_CONS - if ((x & LOG_CONS) == LOG_CONS) - *r |= Mono_Posix_SyslogOptions_LOG_CONS; -#endif /* ndef LOG_CONS */ -#ifdef LOG_ODELAY - if ((x & LOG_ODELAY) == LOG_ODELAY) - *r |= Mono_Posix_SyslogOptions_LOG_ODELAY; -#endif /* ndef LOG_ODELAY */ -#ifdef LOG_NDELAY - if ((x & LOG_NDELAY) == LOG_NDELAY) - *r |= Mono_Posix_SyslogOptions_LOG_NDELAY; -#endif /* ndef LOG_NDELAY */ -#ifdef LOG_NOWAIT - if ((x & LOG_NOWAIT) == LOG_NOWAIT) - *r |= Mono_Posix_SyslogOptions_LOG_NOWAIT; -#endif /* ndef LOG_NOWAIT */ -#ifdef LOG_PERROR - if ((x & LOG_PERROR) == LOG_PERROR) - *r |= Mono_Posix_SyslogOptions_LOG_PERROR; -#endif /* ndef LOG_PERROR */ +#ifdef PROT_EXEC + if ((x & PROT_EXEC) == PROT_EXEC) + *r |= Mono_Posix_MmapProt_PROT_EXEC; +#endif /* ndef PROT_EXEC */ +#ifdef PROT_GROWSDOWN + if ((x & PROT_GROWSDOWN) == PROT_GROWSDOWN) + *r |= Mono_Posix_MmapProt_PROT_GROWSDOWN; +#endif /* ndef PROT_GROWSDOWN */ +#ifdef PROT_GROWSUP + if ((x & PROT_GROWSUP) == PROT_GROWSUP) + *r |= Mono_Posix_MmapProt_PROT_GROWSUP; +#endif /* ndef PROT_GROWSUP */ +#ifdef PROT_NONE + if ((x & PROT_NONE) == PROT_NONE) + *r |= Mono_Posix_MmapProt_PROT_NONE; +#endif /* ndef PROT_NONE */ +#ifdef PROT_READ + if ((x & PROT_READ) == PROT_READ) + *r |= Mono_Posix_MmapProt_PROT_READ; +#endif /* ndef PROT_READ */ +#ifdef PROT_WRITE + if ((x & PROT_WRITE) == PROT_WRITE) + *r |= Mono_Posix_MmapProt_PROT_WRITE; +#endif /* ndef PROT_WRITE */ return 0; } -int Mono_Posix_FromSyslogFacility (int x, int *r) +int Mono_Posix_FromAccessModes (int x, int *r) { *r = 0; if (x == 0) return 0; - if (x == Mono_Posix_SyslogFacility_LOG_KERN) -#ifdef LOG_KERN - {*r = LOG_KERN; return 0;} -#else /* def LOG_KERN */ + if ((x & Mono_Posix_AccessModes_F_OK) == Mono_Posix_AccessModes_F_OK) +#ifdef F_OK + *r |= F_OK; +#else /* def F_OK */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_KERN */ - if (x == Mono_Posix_SyslogFacility_LOG_USER) -#ifdef LOG_USER - {*r = LOG_USER; return 0;} -#else /* def LOG_USER */ +#endif /* ndef F_OK */ + if ((x & Mono_Posix_AccessModes_R_OK) == Mono_Posix_AccessModes_R_OK) +#ifdef R_OK + *r |= R_OK; +#else /* def R_OK */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_USER */ - /* Mono_Posix_SyslogFacility_LOG_USRE is obsolete; ignoring */ - if (x == Mono_Posix_SyslogFacility_LOG_MAIL) -#ifdef LOG_MAIL - {*r = LOG_MAIL; return 0;} -#else /* def LOG_MAIL */ +#endif /* ndef R_OK */ + if ((x & Mono_Posix_AccessModes_W_OK) == Mono_Posix_AccessModes_W_OK) +#ifdef W_OK + *r |= W_OK; +#else /* def W_OK */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_MAIL */ - if (x == Mono_Posix_SyslogFacility_LOG_DAEMON) -#ifdef LOG_DAEMON - {*r = LOG_DAEMON; return 0;} -#else /* def LOG_DAEMON */ +#endif /* ndef W_OK */ + if ((x & Mono_Posix_AccessModes_X_OK) == Mono_Posix_AccessModes_X_OK) +#ifdef X_OK + *r |= X_OK; +#else /* def X_OK */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_DAEMON */ - if (x == Mono_Posix_SyslogFacility_LOG_AUTH) -#ifdef LOG_AUTH - {*r = LOG_AUTH; return 0;} -#else /* def LOG_AUTH */ +#endif /* ndef X_OK */ + return 0; +} + +int Mono_Posix_ToAccessModes (int x, int *r) +{ + *r = 0; + if (x == 0) + return 0; +#ifdef F_OK + if ((x & F_OK) == F_OK) + *r |= Mono_Posix_AccessModes_F_OK; +#endif /* ndef F_OK */ +#ifdef R_OK + if ((x & R_OK) == R_OK) + *r |= Mono_Posix_AccessModes_R_OK; +#endif /* ndef R_OK */ +#ifdef W_OK + if ((x & W_OK) == W_OK) + *r |= Mono_Posix_AccessModes_W_OK; +#endif /* ndef W_OK */ +#ifdef X_OK + if ((x & X_OK) == X_OK) + *r |= Mono_Posix_AccessModes_X_OK; +#endif /* ndef X_OK */ + return 0; +} + +int Mono_Posix_FromConfStr (int x, int *r) +{ + *r = 0; + if (x == 0) + return 0; + if (x == Mono_Posix_ConfStr__CS_GNU_LIBC_VERSION) +#ifdef _CS_GNU_LIBC_VERSION + {*r = _CS_GNU_LIBC_VERSION; return 0;} +#else /* def _CS_GNU_LIBC_VERSION */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_AUTH */ - if (x == Mono_Posix_SyslogFacility_LOG_SYSLOG) -#ifdef LOG_SYSLOG - {*r = LOG_SYSLOG; return 0;} -#else /* def LOG_SYSLOG */ +#endif /* ndef _CS_GNU_LIBC_VERSION */ + if (x == Mono_Posix_ConfStr__CS_GNU_LIBPTHREAD_VERSION) +#ifdef _CS_GNU_LIBPTHREAD_VERSION + {*r = _CS_GNU_LIBPTHREAD_VERSION; return 0;} +#else /* def _CS_GNU_LIBPTHREAD_VERSION */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_SYSLOG */ - if (x == Mono_Posix_SyslogFacility_LOG_LPR) -#ifdef LOG_LPR - {*r = LOG_LPR; return 0;} -#else /* def LOG_LPR */ +#endif /* ndef _CS_GNU_LIBPTHREAD_VERSION */ + if (x == Mono_Posix_ConfStr__CS_LFS64_CFLAGS) +#ifdef _CS_LFS64_CFLAGS + {*r = _CS_LFS64_CFLAGS; return 0;} +#else /* def _CS_LFS64_CFLAGS */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_LPR */ - if (x == Mono_Posix_SyslogFacility_LOG_NEWS) -#ifdef LOG_NEWS - {*r = LOG_NEWS; return 0;} -#else /* def LOG_NEWS */ +#endif /* ndef _CS_LFS64_CFLAGS */ + if (x == Mono_Posix_ConfStr__CS_LFS64_LDFLAGS) +#ifdef _CS_LFS64_LDFLAGS + {*r = _CS_LFS64_LDFLAGS; return 0;} +#else /* def _CS_LFS64_LDFLAGS */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_NEWS */ - if (x == Mono_Posix_SyslogFacility_LOG_UUCP) -#ifdef LOG_UUCP - {*r = LOG_UUCP; return 0;} -#else /* def LOG_UUCP */ +#endif /* ndef _CS_LFS64_LDFLAGS */ + if (x == Mono_Posix_ConfStr__CS_LFS64_LIBS) +#ifdef _CS_LFS64_LIBS + {*r = _CS_LFS64_LIBS; return 0;} +#else /* def _CS_LFS64_LIBS */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_UUCP */ - if (x == Mono_Posix_SyslogFacility_LOG_CRON) -#ifdef LOG_CRON - {*r = LOG_CRON; return 0;} -#else /* def LOG_CRON */ +#endif /* ndef _CS_LFS64_LIBS */ + if (x == Mono_Posix_ConfStr__CS_LFS64_LINTFLAGS) +#ifdef _CS_LFS64_LINTFLAGS + {*r = _CS_LFS64_LINTFLAGS; return 0;} +#else /* def _CS_LFS64_LINTFLAGS */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_CRON */ - if (x == Mono_Posix_SyslogFacility_LOG_AUTHPRIV) -#ifdef LOG_AUTHPRIV - {*r = LOG_AUTHPRIV; return 0;} -#else /* def LOG_AUTHPRIV */ +#endif /* ndef _CS_LFS64_LINTFLAGS */ + if (x == Mono_Posix_ConfStr__CS_LFS_CFLAGS) +#ifdef _CS_LFS_CFLAGS + {*r = _CS_LFS_CFLAGS; return 0;} +#else /* def _CS_LFS_CFLAGS */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_AUTHPRIV */ - if (x == Mono_Posix_SyslogFacility_LOG_FTP) -#ifdef LOG_FTP - {*r = LOG_FTP; return 0;} -#else /* def LOG_FTP */ +#endif /* ndef _CS_LFS_CFLAGS */ + if (x == Mono_Posix_ConfStr__CS_LFS_LDFLAGS) +#ifdef _CS_LFS_LDFLAGS + {*r = _CS_LFS_LDFLAGS; return 0;} +#else /* def _CS_LFS_LDFLAGS */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_FTP */ - if (x == Mono_Posix_SyslogFacility_LOG_LOCAL0) -#ifdef LOG_LOCAL0 - {*r = LOG_LOCAL0; return 0;} -#else /* def LOG_LOCAL0 */ +#endif /* ndef _CS_LFS_LDFLAGS */ + if (x == Mono_Posix_ConfStr__CS_LFS_LIBS) +#ifdef _CS_LFS_LIBS + {*r = _CS_LFS_LIBS; return 0;} +#else /* def _CS_LFS_LIBS */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_LOCAL0 */ - if (x == Mono_Posix_SyslogFacility_LOG_LOCAL1) -#ifdef LOG_LOCAL1 - {*r = LOG_LOCAL1; return 0;} -#else /* def LOG_LOCAL1 */ +#endif /* ndef _CS_LFS_LIBS */ + if (x == Mono_Posix_ConfStr__CS_LFS_LINTFLAGS) +#ifdef _CS_LFS_LINTFLAGS + {*r = _CS_LFS_LINTFLAGS; return 0;} +#else /* def _CS_LFS_LINTFLAGS */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_LOCAL1 */ - if (x == Mono_Posix_SyslogFacility_LOG_LOCAL2) -#ifdef LOG_LOCAL2 - {*r = LOG_LOCAL2; return 0;} -#else /* def LOG_LOCAL2 */ +#endif /* ndef _CS_LFS_LINTFLAGS */ + if (x == Mono_Posix_ConfStr__CS_PATH) +#ifdef _CS_PATH + {*r = _CS_PATH; return 0;} +#else /* def _CS_PATH */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_LOCAL2 */ - if (x == Mono_Posix_SyslogFacility_LOG_LOCAL3) -#ifdef LOG_LOCAL3 - {*r = LOG_LOCAL3; return 0;} -#else /* def LOG_LOCAL3 */ +#endif /* ndef _CS_PATH */ + if (x == Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_CFLAGS) +#ifdef _CS_POSIX_V6_ILP32_OFF32_CFLAGS + {*r = _CS_POSIX_V6_ILP32_OFF32_CFLAGS; return 0;} +#else /* def _CS_POSIX_V6_ILP32_OFF32_CFLAGS */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_LOCAL3 */ - if (x == Mono_Posix_SyslogFacility_LOG_LOCAL4) -#ifdef LOG_LOCAL4 - {*r = LOG_LOCAL4; return 0;} -#else /* def LOG_LOCAL4 */ +#endif /* ndef _CS_POSIX_V6_ILP32_OFF32_CFLAGS */ + if (x == Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LDFLAGS) +#ifdef _CS_POSIX_V6_ILP32_OFF32_LDFLAGS + {*r = _CS_POSIX_V6_ILP32_OFF32_LDFLAGS; return 0;} +#else /* def _CS_POSIX_V6_ILP32_OFF32_LDFLAGS */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_LOCAL4 */ - if (x == Mono_Posix_SyslogFacility_LOG_LOCAL5) -#ifdef LOG_LOCAL5 - {*r = LOG_LOCAL5; return 0;} -#else /* def LOG_LOCAL5 */ +#endif /* ndef _CS_POSIX_V6_ILP32_OFF32_LDFLAGS */ + if (x == Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LIBS) +#ifdef _CS_POSIX_V6_ILP32_OFF32_LIBS + {*r = _CS_POSIX_V6_ILP32_OFF32_LIBS; return 0;} +#else /* def _CS_POSIX_V6_ILP32_OFF32_LIBS */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_LOCAL5 */ - if (x == Mono_Posix_SyslogFacility_LOG_LOCAL6) -#ifdef LOG_LOCAL6 - {*r = LOG_LOCAL6; return 0;} -#else /* def LOG_LOCAL6 */ +#endif /* ndef _CS_POSIX_V6_ILP32_OFF32_LIBS */ + if (x == Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LINTFLAGS) +#ifdef _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS + {*r = _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS; return 0;} +#else /* def _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_LOCAL6 */ - if (x == Mono_Posix_SyslogFacility_LOG_LOCAL7) -#ifdef LOG_LOCAL7 - {*r = LOG_LOCAL7; return 0;} -#else /* def LOG_LOCAL7 */ +#endif /* ndef _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS */ + if (x == Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_CFLAGS) +#ifdef _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS + {*r = _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS; return 0;} +#else /* def _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_LOCAL7 */ +#endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS */ + if (x == Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS) +#ifdef _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS + {*r = _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS; return 0;} +#else /* def _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS */ + if (x == Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LIBS) +#ifdef _CS_POSIX_V6_ILP32_OFFBIG_LIBS + {*r = _CS_POSIX_V6_ILP32_OFFBIG_LIBS; return 0;} +#else /* def _CS_POSIX_V6_ILP32_OFFBIG_LIBS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_LIBS */ + if (x == Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS) +#ifdef _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS + {*r = _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS; return 0;} +#else /* def _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS */ + if (x == Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_CFLAGS) +#ifdef _CS_POSIX_V6_LP64_OFF64_CFLAGS + {*r = _CS_POSIX_V6_LP64_OFF64_CFLAGS; return 0;} +#else /* def _CS_POSIX_V6_LP64_OFF64_CFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_POSIX_V6_LP64_OFF64_CFLAGS */ + if (x == Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LDFLAGS) +#ifdef _CS_POSIX_V6_LP64_OFF64_LDFLAGS + {*r = _CS_POSIX_V6_LP64_OFF64_LDFLAGS; return 0;} +#else /* def _CS_POSIX_V6_LP64_OFF64_LDFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_POSIX_V6_LP64_OFF64_LDFLAGS */ + if (x == Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LIBS) +#ifdef _CS_POSIX_V6_LP64_OFF64_LIBS + {*r = _CS_POSIX_V6_LP64_OFF64_LIBS; return 0;} +#else /* def _CS_POSIX_V6_LP64_OFF64_LIBS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_POSIX_V6_LP64_OFF64_LIBS */ + if (x == Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LINTFLAGS) +#ifdef _CS_POSIX_V6_LP64_OFF64_LINTFLAGS + {*r = _CS_POSIX_V6_LP64_OFF64_LINTFLAGS; return 0;} +#else /* def _CS_POSIX_V6_LP64_OFF64_LINTFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_POSIX_V6_LP64_OFF64_LINTFLAGS */ + if (x == Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS) +#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS + {*r = _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS; return 0;} +#else /* def _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS */ + if (x == Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS) +#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS + {*r = _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS; return 0;} +#else /* def _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS */ + if (x == Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LIBS) +#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LIBS + {*r = _CS_POSIX_V6_LPBIG_OFFBIG_LIBS; return 0;} +#else /* def _CS_POSIX_V6_LPBIG_OFFBIG_LIBS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_LIBS */ + if (x == Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS) +#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS + {*r = _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS; return 0;} +#else /* def _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS */ + if (x == Mono_Posix_ConfStr__CS_V6_WIDTH_RESTRICTED_ENVS) +#ifdef _CS_V6_WIDTH_RESTRICTED_ENVS + {*r = _CS_V6_WIDTH_RESTRICTED_ENVS; return 0;} +#else /* def _CS_V6_WIDTH_RESTRICTED_ENVS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_V6_WIDTH_RESTRICTED_ENVS */ + if (x == Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_CFLAGS) +#ifdef _CS_XBS5_ILP32_OFF32_CFLAGS + {*r = _CS_XBS5_ILP32_OFF32_CFLAGS; return 0;} +#else /* def _CS_XBS5_ILP32_OFF32_CFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_XBS5_ILP32_OFF32_CFLAGS */ + if (x == Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LDFLAGS) +#ifdef _CS_XBS5_ILP32_OFF32_LDFLAGS + {*r = _CS_XBS5_ILP32_OFF32_LDFLAGS; return 0;} +#else /* def _CS_XBS5_ILP32_OFF32_LDFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_XBS5_ILP32_OFF32_LDFLAGS */ + if (x == Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LIBS) +#ifdef _CS_XBS5_ILP32_OFF32_LIBS + {*r = _CS_XBS5_ILP32_OFF32_LIBS; return 0;} +#else /* def _CS_XBS5_ILP32_OFF32_LIBS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_XBS5_ILP32_OFF32_LIBS */ + if (x == Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LINTFLAGS) +#ifdef _CS_XBS5_ILP32_OFF32_LINTFLAGS + {*r = _CS_XBS5_ILP32_OFF32_LINTFLAGS; return 0;} +#else /* def _CS_XBS5_ILP32_OFF32_LINTFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_XBS5_ILP32_OFF32_LINTFLAGS */ + if (x == Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_CFLAGS) +#ifdef _CS_XBS5_ILP32_OFFBIG_CFLAGS + {*r = _CS_XBS5_ILP32_OFFBIG_CFLAGS; return 0;} +#else /* def _CS_XBS5_ILP32_OFFBIG_CFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_XBS5_ILP32_OFFBIG_CFLAGS */ + if (x == Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LDFLAGS) +#ifdef _CS_XBS5_ILP32_OFFBIG_LDFLAGS + {*r = _CS_XBS5_ILP32_OFFBIG_LDFLAGS; return 0;} +#else /* def _CS_XBS5_ILP32_OFFBIG_LDFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_XBS5_ILP32_OFFBIG_LDFLAGS */ + if (x == Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LIBS) +#ifdef _CS_XBS5_ILP32_OFFBIG_LIBS + {*r = _CS_XBS5_ILP32_OFFBIG_LIBS; return 0;} +#else /* def _CS_XBS5_ILP32_OFFBIG_LIBS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_XBS5_ILP32_OFFBIG_LIBS */ + if (x == Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LINTFLAGS) +#ifdef _CS_XBS5_ILP32_OFFBIG_LINTFLAGS + {*r = _CS_XBS5_ILP32_OFFBIG_LINTFLAGS; return 0;} +#else /* def _CS_XBS5_ILP32_OFFBIG_LINTFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_XBS5_ILP32_OFFBIG_LINTFLAGS */ + if (x == Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_CFLAGS) +#ifdef _CS_XBS5_LP64_OFF64_CFLAGS + {*r = _CS_XBS5_LP64_OFF64_CFLAGS; return 0;} +#else /* def _CS_XBS5_LP64_OFF64_CFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_XBS5_LP64_OFF64_CFLAGS */ + if (x == Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LDFLAGS) +#ifdef _CS_XBS5_LP64_OFF64_LDFLAGS + {*r = _CS_XBS5_LP64_OFF64_LDFLAGS; return 0;} +#else /* def _CS_XBS5_LP64_OFF64_LDFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_XBS5_LP64_OFF64_LDFLAGS */ + if (x == Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LIBS) +#ifdef _CS_XBS5_LP64_OFF64_LIBS + {*r = _CS_XBS5_LP64_OFF64_LIBS; return 0;} +#else /* def _CS_XBS5_LP64_OFF64_LIBS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_XBS5_LP64_OFF64_LIBS */ + if (x == Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LINTFLAGS) +#ifdef _CS_XBS5_LP64_OFF64_LINTFLAGS + {*r = _CS_XBS5_LP64_OFF64_LINTFLAGS; return 0;} +#else /* def _CS_XBS5_LP64_OFF64_LINTFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_XBS5_LP64_OFF64_LINTFLAGS */ + if (x == Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_CFLAGS) +#ifdef _CS_XBS5_LPBIG_OFFBIG_CFLAGS + {*r = _CS_XBS5_LPBIG_OFFBIG_CFLAGS; return 0;} +#else /* def _CS_XBS5_LPBIG_OFFBIG_CFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_XBS5_LPBIG_OFFBIG_CFLAGS */ + if (x == Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LDFLAGS) +#ifdef _CS_XBS5_LPBIG_OFFBIG_LDFLAGS + {*r = _CS_XBS5_LPBIG_OFFBIG_LDFLAGS; return 0;} +#else /* def _CS_XBS5_LPBIG_OFFBIG_LDFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_XBS5_LPBIG_OFFBIG_LDFLAGS */ + if (x == Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LIBS) +#ifdef _CS_XBS5_LPBIG_OFFBIG_LIBS + {*r = _CS_XBS5_LPBIG_OFFBIG_LIBS; return 0;} +#else /* def _CS_XBS5_LPBIG_OFFBIG_LIBS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_XBS5_LPBIG_OFFBIG_LIBS */ + if (x == Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LINTFLAGS) +#ifdef _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS + {*r = _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS; return 0;} +#else /* def _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS */ + {errno = EINVAL; return -1;} +#endif /* ndef _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS */ errno = EINVAL; return -1; } -int Mono_Posix_ToSyslogFacility (int x, int *r) +int Mono_Posix_ToConfStr (int x, int *r) { *r = 0; if (x == 0) return 0; -#ifdef LOG_KERN - if (x == LOG_KERN) - {*r = Mono_Posix_SyslogFacility_LOG_KERN; return 0;} -#endif /* ndef LOG_KERN */ -#ifdef LOG_USER - if (x == LOG_USER) - {*r = Mono_Posix_SyslogFacility_LOG_USER; return 0;} -#endif /* ndef LOG_USER */ -#ifdef LOG_USRE - if (x == LOG_USRE) - {*r = Mono_Posix_SyslogFacility_LOG_USRE; return 0;} -#endif /* ndef LOG_USRE */ -#ifdef LOG_MAIL - if (x == LOG_MAIL) - {*r = Mono_Posix_SyslogFacility_LOG_MAIL; return 0;} -#endif /* ndef LOG_MAIL */ -#ifdef LOG_DAEMON - if (x == LOG_DAEMON) - {*r = Mono_Posix_SyslogFacility_LOG_DAEMON; return 0;} -#endif /* ndef LOG_DAEMON */ -#ifdef LOG_AUTH - if (x == LOG_AUTH) - {*r = Mono_Posix_SyslogFacility_LOG_AUTH; return 0;} -#endif /* ndef LOG_AUTH */ -#ifdef LOG_SYSLOG - if (x == LOG_SYSLOG) - {*r = Mono_Posix_SyslogFacility_LOG_SYSLOG; return 0;} -#endif /* ndef LOG_SYSLOG */ -#ifdef LOG_LPR - if (x == LOG_LPR) - {*r = Mono_Posix_SyslogFacility_LOG_LPR; return 0;} -#endif /* ndef LOG_LPR */ -#ifdef LOG_NEWS - if (x == LOG_NEWS) - {*r = Mono_Posix_SyslogFacility_LOG_NEWS; return 0;} -#endif /* ndef LOG_NEWS */ -#ifdef LOG_UUCP - if (x == LOG_UUCP) - {*r = Mono_Posix_SyslogFacility_LOG_UUCP; return 0;} -#endif /* ndef LOG_UUCP */ -#ifdef LOG_CRON - if (x == LOG_CRON) - {*r = Mono_Posix_SyslogFacility_LOG_CRON; return 0;} -#endif /* ndef LOG_CRON */ -#ifdef LOG_AUTHPRIV - if (x == LOG_AUTHPRIV) - {*r = Mono_Posix_SyslogFacility_LOG_AUTHPRIV; return 0;} -#endif /* ndef LOG_AUTHPRIV */ -#ifdef LOG_FTP - if (x == LOG_FTP) - {*r = Mono_Posix_SyslogFacility_LOG_FTP; return 0;} -#endif /* ndef LOG_FTP */ -#ifdef LOG_LOCAL0 - if (x == LOG_LOCAL0) - {*r = Mono_Posix_SyslogFacility_LOG_LOCAL0; return 0;} -#endif /* ndef LOG_LOCAL0 */ -#ifdef LOG_LOCAL1 - if (x == LOG_LOCAL1) - {*r = Mono_Posix_SyslogFacility_LOG_LOCAL1; return 0;} -#endif /* ndef LOG_LOCAL1 */ -#ifdef LOG_LOCAL2 - if (x == LOG_LOCAL2) - {*r = Mono_Posix_SyslogFacility_LOG_LOCAL2; return 0;} -#endif /* ndef LOG_LOCAL2 */ -#ifdef LOG_LOCAL3 - if (x == LOG_LOCAL3) - {*r = Mono_Posix_SyslogFacility_LOG_LOCAL3; return 0;} -#endif /* ndef LOG_LOCAL3 */ -#ifdef LOG_LOCAL4 - if (x == LOG_LOCAL4) - {*r = Mono_Posix_SyslogFacility_LOG_LOCAL4; return 0;} -#endif /* ndef LOG_LOCAL4 */ -#ifdef LOG_LOCAL5 - if (x == LOG_LOCAL5) - {*r = Mono_Posix_SyslogFacility_LOG_LOCAL5; return 0;} -#endif /* ndef LOG_LOCAL5 */ -#ifdef LOG_LOCAL6 - if (x == LOG_LOCAL6) - {*r = Mono_Posix_SyslogFacility_LOG_LOCAL6; return 0;} -#endif /* ndef LOG_LOCAL6 */ -#ifdef LOG_LOCAL7 - if (x == LOG_LOCAL7) - {*r = Mono_Posix_SyslogFacility_LOG_LOCAL7; return 0;} -#endif /* ndef LOG_LOCAL7 */ +#ifdef _CS_GNU_LIBC_VERSION + if (x == _CS_GNU_LIBC_VERSION) + {*r = Mono_Posix_ConfStr__CS_GNU_LIBC_VERSION; return 0;} +#endif /* ndef _CS_GNU_LIBC_VERSION */ +#ifdef _CS_GNU_LIBPTHREAD_VERSION + if (x == _CS_GNU_LIBPTHREAD_VERSION) + {*r = Mono_Posix_ConfStr__CS_GNU_LIBPTHREAD_VERSION; return 0;} +#endif /* ndef _CS_GNU_LIBPTHREAD_VERSION */ +#ifdef _CS_LFS64_CFLAGS + if (x == _CS_LFS64_CFLAGS) + {*r = Mono_Posix_ConfStr__CS_LFS64_CFLAGS; return 0;} +#endif /* ndef _CS_LFS64_CFLAGS */ +#ifdef _CS_LFS64_LDFLAGS + if (x == _CS_LFS64_LDFLAGS) + {*r = Mono_Posix_ConfStr__CS_LFS64_LDFLAGS; return 0;} +#endif /* ndef _CS_LFS64_LDFLAGS */ +#ifdef _CS_LFS64_LIBS + if (x == _CS_LFS64_LIBS) + {*r = Mono_Posix_ConfStr__CS_LFS64_LIBS; return 0;} +#endif /* ndef _CS_LFS64_LIBS */ +#ifdef _CS_LFS64_LINTFLAGS + if (x == _CS_LFS64_LINTFLAGS) + {*r = Mono_Posix_ConfStr__CS_LFS64_LINTFLAGS; return 0;} +#endif /* ndef _CS_LFS64_LINTFLAGS */ +#ifdef _CS_LFS_CFLAGS + if (x == _CS_LFS_CFLAGS) + {*r = Mono_Posix_ConfStr__CS_LFS_CFLAGS; return 0;} +#endif /* ndef _CS_LFS_CFLAGS */ +#ifdef _CS_LFS_LDFLAGS + if (x == _CS_LFS_LDFLAGS) + {*r = Mono_Posix_ConfStr__CS_LFS_LDFLAGS; return 0;} +#endif /* ndef _CS_LFS_LDFLAGS */ +#ifdef _CS_LFS_LIBS + if (x == _CS_LFS_LIBS) + {*r = Mono_Posix_ConfStr__CS_LFS_LIBS; return 0;} +#endif /* ndef _CS_LFS_LIBS */ +#ifdef _CS_LFS_LINTFLAGS + if (x == _CS_LFS_LINTFLAGS) + {*r = Mono_Posix_ConfStr__CS_LFS_LINTFLAGS; return 0;} +#endif /* ndef _CS_LFS_LINTFLAGS */ +#ifdef _CS_PATH + if (x == _CS_PATH) + {*r = Mono_Posix_ConfStr__CS_PATH; return 0;} +#endif /* ndef _CS_PATH */ +#ifdef _CS_POSIX_V6_ILP32_OFF32_CFLAGS + if (x == _CS_POSIX_V6_ILP32_OFF32_CFLAGS) + {*r = Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_CFLAGS; return 0;} +#endif /* ndef _CS_POSIX_V6_ILP32_OFF32_CFLAGS */ +#ifdef _CS_POSIX_V6_ILP32_OFF32_LDFLAGS + if (x == _CS_POSIX_V6_ILP32_OFF32_LDFLAGS) + {*r = Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LDFLAGS; return 0;} +#endif /* ndef _CS_POSIX_V6_ILP32_OFF32_LDFLAGS */ +#ifdef _CS_POSIX_V6_ILP32_OFF32_LIBS + if (x == _CS_POSIX_V6_ILP32_OFF32_LIBS) + {*r = Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LIBS; return 0;} +#endif /* ndef _CS_POSIX_V6_ILP32_OFF32_LIBS */ +#ifdef _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS + if (x == _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS) + {*r = Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LINTFLAGS; return 0;} +#endif /* ndef _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS */ +#ifdef _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS + if (x == _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS) + {*r = Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_CFLAGS; return 0;} +#endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS */ +#ifdef _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS + if (x == _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS) + {*r = Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS; return 0;} +#endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS */ +#ifdef _CS_POSIX_V6_ILP32_OFFBIG_LIBS + if (x == _CS_POSIX_V6_ILP32_OFFBIG_LIBS) + {*r = Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LIBS; return 0;} +#endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_LIBS */ +#ifdef _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS + if (x == _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS) + {*r = Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS; return 0;} +#endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS */ +#ifdef _CS_POSIX_V6_LP64_OFF64_CFLAGS + if (x == _CS_POSIX_V6_LP64_OFF64_CFLAGS) + {*r = Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_CFLAGS; return 0;} +#endif /* ndef _CS_POSIX_V6_LP64_OFF64_CFLAGS */ +#ifdef _CS_POSIX_V6_LP64_OFF64_LDFLAGS + if (x == _CS_POSIX_V6_LP64_OFF64_LDFLAGS) + {*r = Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LDFLAGS; return 0;} +#endif /* ndef _CS_POSIX_V6_LP64_OFF64_LDFLAGS */ +#ifdef _CS_POSIX_V6_LP64_OFF64_LIBS + if (x == _CS_POSIX_V6_LP64_OFF64_LIBS) + {*r = Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LIBS; return 0;} +#endif /* ndef _CS_POSIX_V6_LP64_OFF64_LIBS */ +#ifdef _CS_POSIX_V6_LP64_OFF64_LINTFLAGS + if (x == _CS_POSIX_V6_LP64_OFF64_LINTFLAGS) + {*r = Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LINTFLAGS; return 0;} +#endif /* ndef _CS_POSIX_V6_LP64_OFF64_LINTFLAGS */ +#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS + if (x == _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS) + {*r = Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS; return 0;} +#endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS */ +#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS + if (x == _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS) + {*r = Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS; return 0;} +#endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS */ +#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LIBS + if (x == _CS_POSIX_V6_LPBIG_OFFBIG_LIBS) + {*r = Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LIBS; return 0;} +#endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_LIBS */ +#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS + if (x == _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS) + {*r = Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS; return 0;} +#endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS */ +#ifdef _CS_V6_WIDTH_RESTRICTED_ENVS + if (x == _CS_V6_WIDTH_RESTRICTED_ENVS) + {*r = Mono_Posix_ConfStr__CS_V6_WIDTH_RESTRICTED_ENVS; return 0;} +#endif /* ndef _CS_V6_WIDTH_RESTRICTED_ENVS */ +#ifdef _CS_XBS5_ILP32_OFF32_CFLAGS + if (x == _CS_XBS5_ILP32_OFF32_CFLAGS) + {*r = Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_CFLAGS; return 0;} +#endif /* ndef _CS_XBS5_ILP32_OFF32_CFLAGS */ +#ifdef _CS_XBS5_ILP32_OFF32_LDFLAGS + if (x == _CS_XBS5_ILP32_OFF32_LDFLAGS) + {*r = Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LDFLAGS; return 0;} +#endif /* ndef _CS_XBS5_ILP32_OFF32_LDFLAGS */ +#ifdef _CS_XBS5_ILP32_OFF32_LIBS + if (x == _CS_XBS5_ILP32_OFF32_LIBS) + {*r = Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LIBS; return 0;} +#endif /* ndef _CS_XBS5_ILP32_OFF32_LIBS */ +#ifdef _CS_XBS5_ILP32_OFF32_LINTFLAGS + if (x == _CS_XBS5_ILP32_OFF32_LINTFLAGS) + {*r = Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LINTFLAGS; return 0;} +#endif /* ndef _CS_XBS5_ILP32_OFF32_LINTFLAGS */ +#ifdef _CS_XBS5_ILP32_OFFBIG_CFLAGS + if (x == _CS_XBS5_ILP32_OFFBIG_CFLAGS) + {*r = Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_CFLAGS; return 0;} +#endif /* ndef _CS_XBS5_ILP32_OFFBIG_CFLAGS */ +#ifdef _CS_XBS5_ILP32_OFFBIG_LDFLAGS + if (x == _CS_XBS5_ILP32_OFFBIG_LDFLAGS) + {*r = Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LDFLAGS; return 0;} +#endif /* ndef _CS_XBS5_ILP32_OFFBIG_LDFLAGS */ +#ifdef _CS_XBS5_ILP32_OFFBIG_LIBS + if (x == _CS_XBS5_ILP32_OFFBIG_LIBS) + {*r = Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LIBS; return 0;} +#endif /* ndef _CS_XBS5_ILP32_OFFBIG_LIBS */ +#ifdef _CS_XBS5_ILP32_OFFBIG_LINTFLAGS + if (x == _CS_XBS5_ILP32_OFFBIG_LINTFLAGS) + {*r = Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LINTFLAGS; return 0;} +#endif /* ndef _CS_XBS5_ILP32_OFFBIG_LINTFLAGS */ +#ifdef _CS_XBS5_LP64_OFF64_CFLAGS + if (x == _CS_XBS5_LP64_OFF64_CFLAGS) + {*r = Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_CFLAGS; return 0;} +#endif /* ndef _CS_XBS5_LP64_OFF64_CFLAGS */ +#ifdef _CS_XBS5_LP64_OFF64_LDFLAGS + if (x == _CS_XBS5_LP64_OFF64_LDFLAGS) + {*r = Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LDFLAGS; return 0;} +#endif /* ndef _CS_XBS5_LP64_OFF64_LDFLAGS */ +#ifdef _CS_XBS5_LP64_OFF64_LIBS + if (x == _CS_XBS5_LP64_OFF64_LIBS) + {*r = Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LIBS; return 0;} +#endif /* ndef _CS_XBS5_LP64_OFF64_LIBS */ +#ifdef _CS_XBS5_LP64_OFF64_LINTFLAGS + if (x == _CS_XBS5_LP64_OFF64_LINTFLAGS) + {*r = Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LINTFLAGS; return 0;} +#endif /* ndef _CS_XBS5_LP64_OFF64_LINTFLAGS */ +#ifdef _CS_XBS5_LPBIG_OFFBIG_CFLAGS + if (x == _CS_XBS5_LPBIG_OFFBIG_CFLAGS) + {*r = Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_CFLAGS; return 0;} +#endif /* ndef _CS_XBS5_LPBIG_OFFBIG_CFLAGS */ +#ifdef _CS_XBS5_LPBIG_OFFBIG_LDFLAGS + if (x == _CS_XBS5_LPBIG_OFFBIG_LDFLAGS) + {*r = Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LDFLAGS; return 0;} +#endif /* ndef _CS_XBS5_LPBIG_OFFBIG_LDFLAGS */ +#ifdef _CS_XBS5_LPBIG_OFFBIG_LIBS + if (x == _CS_XBS5_LPBIG_OFFBIG_LIBS) + {*r = Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LIBS; return 0;} +#endif /* ndef _CS_XBS5_LPBIG_OFFBIG_LIBS */ +#ifdef _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS + if (x == _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS) + {*r = Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LINTFLAGS; return 0;} +#endif /* ndef _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS */ errno = EINVAL; return -1; } -int Mono_Posix_FromSyslogLevel (int x, int *r) +int Mono_Posix_FromDirectoryNotifyFlags (int x, int *r) { *r = 0; if (x == 0) return 0; - if (x == Mono_Posix_SyslogLevel_LOG_EMERG) -#ifdef LOG_EMERG - {*r = LOG_EMERG; return 0;} -#else /* def LOG_EMERG */ - {errno = EINVAL; return -1;} -#endif /* ndef LOG_EMERG */ - if (x == Mono_Posix_SyslogLevel_LOG_ALERT) -#ifdef LOG_ALERT - {*r = LOG_ALERT; return 0;} -#else /* def LOG_ALERT */ + if ((x & Mono_Posix_DirectoryNotifyFlags_DN_ACCESS) == Mono_Posix_DirectoryNotifyFlags_DN_ACCESS) +#ifdef DN_ACCESS + *r |= DN_ACCESS; +#else /* def DN_ACCESS */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_ALERT */ - if (x == Mono_Posix_SyslogLevel_LOG_CRIT) -#ifdef LOG_CRIT - {*r = LOG_CRIT; return 0;} -#else /* def LOG_CRIT */ +#endif /* ndef DN_ACCESS */ + if ((x & Mono_Posix_DirectoryNotifyFlags_DN_ATTRIB) == Mono_Posix_DirectoryNotifyFlags_DN_ATTRIB) +#ifdef DN_ATTRIB + *r |= DN_ATTRIB; +#else /* def DN_ATTRIB */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_CRIT */ - if (x == Mono_Posix_SyslogLevel_LOG_ERR) -#ifdef LOG_ERR - {*r = LOG_ERR; return 0;} -#else /* def LOG_ERR */ +#endif /* ndef DN_ATTRIB */ + if ((x & Mono_Posix_DirectoryNotifyFlags_DN_CREATE) == Mono_Posix_DirectoryNotifyFlags_DN_CREATE) +#ifdef DN_CREATE + *r |= DN_CREATE; +#else /* def DN_CREATE */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_ERR */ - if (x == Mono_Posix_SyslogLevel_LOG_WARNING) -#ifdef LOG_WARNING - {*r = LOG_WARNING; return 0;} -#else /* def LOG_WARNING */ +#endif /* ndef DN_CREATE */ + if ((x & Mono_Posix_DirectoryNotifyFlags_DN_DELETE) == Mono_Posix_DirectoryNotifyFlags_DN_DELETE) +#ifdef DN_DELETE + *r |= DN_DELETE; +#else /* def DN_DELETE */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_WARNING */ - if (x == Mono_Posix_SyslogLevel_LOG_NOTICE) -#ifdef LOG_NOTICE - {*r = LOG_NOTICE; return 0;} -#else /* def LOG_NOTICE */ +#endif /* ndef DN_DELETE */ + if ((x & Mono_Posix_DirectoryNotifyFlags_DN_MODIFY) == Mono_Posix_DirectoryNotifyFlags_DN_MODIFY) +#ifdef DN_MODIFY + *r |= DN_MODIFY; +#else /* def DN_MODIFY */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_NOTICE */ - if (x == Mono_Posix_SyslogLevel_LOG_INFO) -#ifdef LOG_INFO - {*r = LOG_INFO; return 0;} -#else /* def LOG_INFO */ +#endif /* ndef DN_MODIFY */ + if ((x & Mono_Posix_DirectoryNotifyFlags_DN_MULTISHOT) == Mono_Posix_DirectoryNotifyFlags_DN_MULTISHOT) +#ifdef DN_MULTISHOT + *r |= DN_MULTISHOT; +#else /* def DN_MULTISHOT */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_INFO */ - if (x == Mono_Posix_SyslogLevel_LOG_DEBUG) -#ifdef LOG_DEBUG - {*r = LOG_DEBUG; return 0;} -#else /* def LOG_DEBUG */ +#endif /* ndef DN_MULTISHOT */ + if ((x & Mono_Posix_DirectoryNotifyFlags_DN_RENAME) == Mono_Posix_DirectoryNotifyFlags_DN_RENAME) +#ifdef DN_RENAME + *r |= DN_RENAME; +#else /* def DN_RENAME */ {errno = EINVAL; return -1;} -#endif /* ndef LOG_DEBUG */ - errno = EINVAL; return -1; +#endif /* ndef DN_RENAME */ + return 0; } -int Mono_Posix_ToSyslogLevel (int x, int *r) +int Mono_Posix_ToDirectoryNotifyFlags (int x, int *r) { *r = 0; if (x == 0) return 0; -#ifdef LOG_EMERG - if (x == LOG_EMERG) - {*r = Mono_Posix_SyslogLevel_LOG_EMERG; return 0;} -#endif /* ndef LOG_EMERG */ -#ifdef LOG_ALERT - if (x == LOG_ALERT) - {*r = Mono_Posix_SyslogLevel_LOG_ALERT; return 0;} -#endif /* ndef LOG_ALERT */ -#ifdef LOG_CRIT - if (x == LOG_CRIT) - {*r = Mono_Posix_SyslogLevel_LOG_CRIT; return 0;} -#endif /* ndef LOG_CRIT */ -#ifdef LOG_ERR - if (x == LOG_ERR) - {*r = Mono_Posix_SyslogLevel_LOG_ERR; return 0;} -#endif /* ndef LOG_ERR */ -#ifdef LOG_WARNING - if (x == LOG_WARNING) - {*r = Mono_Posix_SyslogLevel_LOG_WARNING; return 0;} -#endif /* ndef LOG_WARNING */ -#ifdef LOG_NOTICE - if (x == LOG_NOTICE) - {*r = Mono_Posix_SyslogLevel_LOG_NOTICE; return 0;} -#endif /* ndef LOG_NOTICE */ -#ifdef LOG_INFO - if (x == LOG_INFO) - {*r = Mono_Posix_SyslogLevel_LOG_INFO; return 0;} -#endif /* ndef LOG_INFO */ -#ifdef LOG_DEBUG - if (x == LOG_DEBUG) - {*r = Mono_Posix_SyslogLevel_LOG_DEBUG; return 0;} -#endif /* ndef LOG_DEBUG */ - errno = EINVAL; return -1; +#ifdef DN_ACCESS + if ((x & DN_ACCESS) == DN_ACCESS) + *r |= Mono_Posix_DirectoryNotifyFlags_DN_ACCESS; +#endif /* ndef DN_ACCESS */ +#ifdef DN_ATTRIB + if ((x & DN_ATTRIB) == DN_ATTRIB) + *r |= Mono_Posix_DirectoryNotifyFlags_DN_ATTRIB; +#endif /* ndef DN_ATTRIB */ +#ifdef DN_CREATE + if ((x & DN_CREATE) == DN_CREATE) + *r |= Mono_Posix_DirectoryNotifyFlags_DN_CREATE; +#endif /* ndef DN_CREATE */ +#ifdef DN_DELETE + if ((x & DN_DELETE) == DN_DELETE) + *r |= Mono_Posix_DirectoryNotifyFlags_DN_DELETE; +#endif /* ndef DN_DELETE */ +#ifdef DN_MODIFY + if ((x & DN_MODIFY) == DN_MODIFY) + *r |= Mono_Posix_DirectoryNotifyFlags_DN_MODIFY; +#endif /* ndef DN_MODIFY */ +#ifdef DN_MULTISHOT + if ((x & DN_MULTISHOT) == DN_MULTISHOT) + *r |= Mono_Posix_DirectoryNotifyFlags_DN_MULTISHOT; +#endif /* ndef DN_MULTISHOT */ +#ifdef DN_RENAME + if ((x & DN_RENAME) == DN_RENAME) + *r |= Mono_Posix_DirectoryNotifyFlags_DN_RENAME; +#endif /* ndef DN_RENAME */ + return 0; } -int Mono_Posix_FromOpenFlags (int x, int *r) +int Mono_Posix_FromErrno (int x, int *r) { *r = 0; if (x == 0) return 0; - if ((x & Mono_Posix_OpenFlags_O_RDONLY) == Mono_Posix_OpenFlags_O_RDONLY) -#ifdef O_RDONLY - *r |= O_RDONLY; -#else /* def O_RDONLY */ + if (x == Mono_Posix_Errno_E2BIG) +#ifdef E2BIG + {*r = E2BIG; return 0;} +#else /* def E2BIG */ {errno = EINVAL; return -1;} -#endif /* ndef O_RDONLY */ - if ((x & Mono_Posix_OpenFlags_O_WRONLY) == Mono_Posix_OpenFlags_O_WRONLY) -#ifdef O_WRONLY - *r |= O_WRONLY; -#else /* def O_WRONLY */ +#endif /* ndef E2BIG */ + if (x == Mono_Posix_Errno_EACCES) +#ifdef EACCES + {*r = EACCES; return 0;} +#else /* def EACCES */ {errno = EINVAL; return -1;} -#endif /* ndef O_WRONLY */ - if ((x & Mono_Posix_OpenFlags_O_RDWR) == Mono_Posix_OpenFlags_O_RDWR) -#ifdef O_RDWR - *r |= O_RDWR; -#else /* def O_RDWR */ +#endif /* ndef EACCES */ + if (x == Mono_Posix_Errno_EADDRINUSE) +#ifdef EADDRINUSE + {*r = EADDRINUSE; return 0;} +#else /* def EADDRINUSE */ {errno = EINVAL; return -1;} -#endif /* ndef O_RDWR */ - if ((x & Mono_Posix_OpenFlags_O_CREAT) == Mono_Posix_OpenFlags_O_CREAT) -#ifdef O_CREAT - *r |= O_CREAT; -#else /* def O_CREAT */ +#endif /* ndef EADDRINUSE */ + if (x == Mono_Posix_Errno_EADDRNOTAVAIL) +#ifdef EADDRNOTAVAIL + {*r = EADDRNOTAVAIL; return 0;} +#else /* def EADDRNOTAVAIL */ {errno = EINVAL; return -1;} -#endif /* ndef O_CREAT */ - if ((x & Mono_Posix_OpenFlags_O_EXCL) == Mono_Posix_OpenFlags_O_EXCL) -#ifdef O_EXCL - *r |= O_EXCL; -#else /* def O_EXCL */ +#endif /* ndef EADDRNOTAVAIL */ + if (x == Mono_Posix_Errno_EADV) +#ifdef EADV + {*r = EADV; return 0;} +#else /* def EADV */ {errno = EINVAL; return -1;} -#endif /* ndef O_EXCL */ - if ((x & Mono_Posix_OpenFlags_O_NOCTTY) == Mono_Posix_OpenFlags_O_NOCTTY) -#ifdef O_NOCTTY - *r |= O_NOCTTY; -#else /* def O_NOCTTY */ +#endif /* ndef EADV */ + if (x == Mono_Posix_Errno_EAFNOSUPPORT) +#ifdef EAFNOSUPPORT + {*r = EAFNOSUPPORT; return 0;} +#else /* def EAFNOSUPPORT */ {errno = EINVAL; return -1;} -#endif /* ndef O_NOCTTY */ - if ((x & Mono_Posix_OpenFlags_O_TRUNC) == Mono_Posix_OpenFlags_O_TRUNC) -#ifdef O_TRUNC - *r |= O_TRUNC; -#else /* def O_TRUNC */ +#endif /* ndef EAFNOSUPPORT */ + if (x == Mono_Posix_Errno_EAGAIN) +#ifdef EAGAIN + {*r = EAGAIN; return 0;} +#else /* def EAGAIN */ {errno = EINVAL; return -1;} -#endif /* ndef O_TRUNC */ - if ((x & Mono_Posix_OpenFlags_O_APPEND) == Mono_Posix_OpenFlags_O_APPEND) -#ifdef O_APPEND - *r |= O_APPEND; -#else /* def O_APPEND */ +#endif /* ndef EAGAIN */ + if (x == Mono_Posix_Errno_EALREADY) +#ifdef EALREADY + {*r = EALREADY; return 0;} +#else /* def EALREADY */ {errno = EINVAL; return -1;} -#endif /* ndef O_APPEND */ - if ((x & Mono_Posix_OpenFlags_O_NONBLOCK) == Mono_Posix_OpenFlags_O_NONBLOCK) -#ifdef O_NONBLOCK - *r |= O_NONBLOCK; -#else /* def O_NONBLOCK */ +#endif /* ndef EALREADY */ + if (x == Mono_Posix_Errno_EBADE) +#ifdef EBADE + {*r = EBADE; return 0;} +#else /* def EBADE */ {errno = EINVAL; return -1;} -#endif /* ndef O_NONBLOCK */ - if ((x & Mono_Posix_OpenFlags_O_SYNC) == Mono_Posix_OpenFlags_O_SYNC) -#ifdef O_SYNC - *r |= O_SYNC; -#else /* def O_SYNC */ +#endif /* ndef EBADE */ + if (x == Mono_Posix_Errno_EBADF) +#ifdef EBADF + {*r = EBADF; return 0;} +#else /* def EBADF */ {errno = EINVAL; return -1;} -#endif /* ndef O_SYNC */ - if ((x & Mono_Posix_OpenFlags_O_NOFOLLOW) == Mono_Posix_OpenFlags_O_NOFOLLOW) -#ifdef O_NOFOLLOW - *r |= O_NOFOLLOW; -#else /* def O_NOFOLLOW */ +#endif /* ndef EBADF */ + if (x == Mono_Posix_Errno_EBADFD) +#ifdef EBADFD + {*r = EBADFD; return 0;} +#else /* def EBADFD */ {errno = EINVAL; return -1;} -#endif /* ndef O_NOFOLLOW */ - if ((x & Mono_Posix_OpenFlags_O_DIRECTORY) == Mono_Posix_OpenFlags_O_DIRECTORY) -#ifdef O_DIRECTORY - *r |= O_DIRECTORY; -#else /* def O_DIRECTORY */ +#endif /* ndef EBADFD */ + if (x == Mono_Posix_Errno_EBADMSG) +#ifdef EBADMSG + {*r = EBADMSG; return 0;} +#else /* def EBADMSG */ {errno = EINVAL; return -1;} -#endif /* ndef O_DIRECTORY */ - if ((x & Mono_Posix_OpenFlags_O_DIRECT) == Mono_Posix_OpenFlags_O_DIRECT) -#ifdef O_DIRECT - *r |= O_DIRECT; -#else /* def O_DIRECT */ +#endif /* ndef EBADMSG */ + if (x == Mono_Posix_Errno_EBADR) +#ifdef EBADR + {*r = EBADR; return 0;} +#else /* def EBADR */ {errno = EINVAL; return -1;} -#endif /* ndef O_DIRECT */ - if ((x & Mono_Posix_OpenFlags_O_ASYNC) == Mono_Posix_OpenFlags_O_ASYNC) -#ifdef O_ASYNC - *r |= O_ASYNC; -#else /* def O_ASYNC */ +#endif /* ndef EBADR */ + if (x == Mono_Posix_Errno_EBADRQC) +#ifdef EBADRQC + {*r = EBADRQC; return 0;} +#else /* def EBADRQC */ {errno = EINVAL; return -1;} -#endif /* ndef O_ASYNC */ - if ((x & Mono_Posix_OpenFlags_O_LARGEFILE) == Mono_Posix_OpenFlags_O_LARGEFILE) -#ifdef O_LARGEFILE - *r |= O_LARGEFILE; -#else /* def O_LARGEFILE */ +#endif /* ndef EBADRQC */ + if (x == Mono_Posix_Errno_EBADSLT) +#ifdef EBADSLT + {*r = EBADSLT; return 0;} +#else /* def EBADSLT */ {errno = EINVAL; return -1;} -#endif /* ndef O_LARGEFILE */ - return 0; -} - -int Mono_Posix_ToOpenFlags (int x, int *r) -{ - *r = 0; - if (x == 0) - return 0; -#ifdef O_RDONLY - if ((x & O_RDONLY) == O_RDONLY) - *r |= Mono_Posix_OpenFlags_O_RDONLY; -#endif /* ndef O_RDONLY */ -#ifdef O_WRONLY - if ((x & O_WRONLY) == O_WRONLY) - *r |= Mono_Posix_OpenFlags_O_WRONLY; -#endif /* ndef O_WRONLY */ -#ifdef O_RDWR - if ((x & O_RDWR) == O_RDWR) - *r |= Mono_Posix_OpenFlags_O_RDWR; -#endif /* ndef O_RDWR */ -#ifdef O_CREAT - if ((x & O_CREAT) == O_CREAT) - *r |= Mono_Posix_OpenFlags_O_CREAT; -#endif /* ndef O_CREAT */ -#ifdef O_EXCL - if ((x & O_EXCL) == O_EXCL) - *r |= Mono_Posix_OpenFlags_O_EXCL; -#endif /* ndef O_EXCL */ -#ifdef O_NOCTTY - if ((x & O_NOCTTY) == O_NOCTTY) - *r |= Mono_Posix_OpenFlags_O_NOCTTY; -#endif /* ndef O_NOCTTY */ -#ifdef O_TRUNC - if ((x & O_TRUNC) == O_TRUNC) - *r |= Mono_Posix_OpenFlags_O_TRUNC; -#endif /* ndef O_TRUNC */ -#ifdef O_APPEND - if ((x & O_APPEND) == O_APPEND) - *r |= Mono_Posix_OpenFlags_O_APPEND; -#endif /* ndef O_APPEND */ -#ifdef O_NONBLOCK - if ((x & O_NONBLOCK) == O_NONBLOCK) - *r |= Mono_Posix_OpenFlags_O_NONBLOCK; -#endif /* ndef O_NONBLOCK */ -#ifdef O_SYNC - if ((x & O_SYNC) == O_SYNC) - *r |= Mono_Posix_OpenFlags_O_SYNC; -#endif /* ndef O_SYNC */ -#ifdef O_NOFOLLOW - if ((x & O_NOFOLLOW) == O_NOFOLLOW) - *r |= Mono_Posix_OpenFlags_O_NOFOLLOW; -#endif /* ndef O_NOFOLLOW */ -#ifdef O_DIRECTORY - if ((x & O_DIRECTORY) == O_DIRECTORY) - *r |= Mono_Posix_OpenFlags_O_DIRECTORY; -#endif /* ndef O_DIRECTORY */ -#ifdef O_DIRECT - if ((x & O_DIRECT) == O_DIRECT) - *r |= Mono_Posix_OpenFlags_O_DIRECT; -#endif /* ndef O_DIRECT */ -#ifdef O_ASYNC - if ((x & O_ASYNC) == O_ASYNC) - *r |= Mono_Posix_OpenFlags_O_ASYNC; -#endif /* ndef O_ASYNC */ -#ifdef O_LARGEFILE - if ((x & O_LARGEFILE) == O_LARGEFILE) - *r |= Mono_Posix_OpenFlags_O_LARGEFILE; -#endif /* ndef O_LARGEFILE */ - return 0; -} - -int Mono_Posix_FromFilePermissions (unsigned int x, unsigned int *r) -{ - *r = 0; - if (x == 0) - return 0; - if ((x & Mono_Posix_FilePermissions_S_ISUID) == Mono_Posix_FilePermissions_S_ISUID) -#ifdef S_ISUID - *r |= S_ISUID; -#else /* def S_ISUID */ +#endif /* ndef EBADSLT */ + if (x == Mono_Posix_Errno_EBFONT) +#ifdef EBFONT + {*r = EBFONT; return 0;} +#else /* def EBFONT */ {errno = EINVAL; return -1;} -#endif /* ndef S_ISUID */ - if ((x & Mono_Posix_FilePermissions_S_ISGID) == Mono_Posix_FilePermissions_S_ISGID) -#ifdef S_ISGID - *r |= S_ISGID; -#else /* def S_ISGID */ +#endif /* ndef EBFONT */ + if (x == Mono_Posix_Errno_EBUSY) +#ifdef EBUSY + {*r = EBUSY; return 0;} +#else /* def EBUSY */ {errno = EINVAL; return -1;} -#endif /* ndef S_ISGID */ - if ((x & Mono_Posix_FilePermissions_S_ISVTX) == Mono_Posix_FilePermissions_S_ISVTX) -#ifdef S_ISVTX - *r |= S_ISVTX; -#else /* def S_ISVTX */ +#endif /* ndef EBUSY */ + if (x == Mono_Posix_Errno_ECHILD) +#ifdef ECHILD + {*r = ECHILD; return 0;} +#else /* def ECHILD */ {errno = EINVAL; return -1;} -#endif /* ndef S_ISVTX */ - if ((x & Mono_Posix_FilePermissions_S_IRUSR) == Mono_Posix_FilePermissions_S_IRUSR) -#ifdef S_IRUSR - *r |= S_IRUSR; -#else /* def S_IRUSR */ +#endif /* ndef ECHILD */ + if (x == Mono_Posix_Errno_ECHRNG) +#ifdef ECHRNG + {*r = ECHRNG; return 0;} +#else /* def ECHRNG */ {errno = EINVAL; return -1;} -#endif /* ndef S_IRUSR */ - if ((x & Mono_Posix_FilePermissions_S_IWUSR) == Mono_Posix_FilePermissions_S_IWUSR) -#ifdef S_IWUSR - *r |= S_IWUSR; -#else /* def S_IWUSR */ +#endif /* ndef ECHRNG */ + if (x == Mono_Posix_Errno_ECOMM) +#ifdef ECOMM + {*r = ECOMM; return 0;} +#else /* def ECOMM */ {errno = EINVAL; return -1;} -#endif /* ndef S_IWUSR */ - if ((x & Mono_Posix_FilePermissions_S_IXUSR) == Mono_Posix_FilePermissions_S_IXUSR) -#ifdef S_IXUSR - *r |= S_IXUSR; -#else /* def S_IXUSR */ +#endif /* ndef ECOMM */ + if (x == Mono_Posix_Errno_ECONNABORTED) +#ifdef ECONNABORTED + {*r = ECONNABORTED; return 0;} +#else /* def ECONNABORTED */ {errno = EINVAL; return -1;} -#endif /* ndef S_IXUSR */ - if ((x & Mono_Posix_FilePermissions_S_IRGRP) == Mono_Posix_FilePermissions_S_IRGRP) -#ifdef S_IRGRP - *r |= S_IRGRP; -#else /* def S_IRGRP */ +#endif /* ndef ECONNABORTED */ + if (x == Mono_Posix_Errno_ECONNREFUSED) +#ifdef ECONNREFUSED + {*r = ECONNREFUSED; return 0;} +#else /* def ECONNREFUSED */ {errno = EINVAL; return -1;} -#endif /* ndef S_IRGRP */ - if ((x & Mono_Posix_FilePermissions_S_IWGRP) == Mono_Posix_FilePermissions_S_IWGRP) -#ifdef S_IWGRP - *r |= S_IWGRP; -#else /* def S_IWGRP */ +#endif /* ndef ECONNREFUSED */ + if (x == Mono_Posix_Errno_ECONNRESET) +#ifdef ECONNRESET + {*r = ECONNRESET; return 0;} +#else /* def ECONNRESET */ {errno = EINVAL; return -1;} -#endif /* ndef S_IWGRP */ - if ((x & Mono_Posix_FilePermissions_S_IXGRP) == Mono_Posix_FilePermissions_S_IXGRP) -#ifdef S_IXGRP - *r |= S_IXGRP; -#else /* def S_IXGRP */ +#endif /* ndef ECONNRESET */ + if (x == Mono_Posix_Errno_EDEADLK) +#ifdef EDEADLK + {*r = EDEADLK; return 0;} +#else /* def EDEADLK */ {errno = EINVAL; return -1;} -#endif /* ndef S_IXGRP */ - if ((x & Mono_Posix_FilePermissions_S_IROTH) == Mono_Posix_FilePermissions_S_IROTH) -#ifdef S_IROTH - *r |= S_IROTH; -#else /* def S_IROTH */ +#endif /* ndef EDEADLK */ + if (x == Mono_Posix_Errno_EDEADLOCK) +#ifdef EDEADLOCK + {*r = EDEADLOCK; return 0;} +#else /* def EDEADLOCK */ {errno = EINVAL; return -1;} -#endif /* ndef S_IROTH */ - if ((x & Mono_Posix_FilePermissions_S_IWOTH) == Mono_Posix_FilePermissions_S_IWOTH) -#ifdef S_IWOTH - *r |= S_IWOTH; -#else /* def S_IWOTH */ +#endif /* ndef EDEADLOCK */ + if (x == Mono_Posix_Errno_EDESTADDRREQ) +#ifdef EDESTADDRREQ + {*r = EDESTADDRREQ; return 0;} +#else /* def EDESTADDRREQ */ {errno = EINVAL; return -1;} -#endif /* ndef S_IWOTH */ - if ((x & Mono_Posix_FilePermissions_S_IXOTH) == Mono_Posix_FilePermissions_S_IXOTH) -#ifdef S_IXOTH - *r |= S_IXOTH; -#else /* def S_IXOTH */ +#endif /* ndef EDESTADDRREQ */ + if (x == Mono_Posix_Errno_EDOM) +#ifdef EDOM + {*r = EDOM; return 0;} +#else /* def EDOM */ {errno = EINVAL; return -1;} -#endif /* ndef S_IXOTH */ - if ((x & Mono_Posix_FilePermissions_S_IRWXG) == Mono_Posix_FilePermissions_S_IRWXG) -#ifdef S_IRWXG - *r |= S_IRWXG; -#else /* def S_IRWXG */ +#endif /* ndef EDOM */ + if (x == Mono_Posix_Errno_EDOTDOT) +#ifdef EDOTDOT + {*r = EDOTDOT; return 0;} +#else /* def EDOTDOT */ {errno = EINVAL; return -1;} -#endif /* ndef S_IRWXG */ - if ((x & Mono_Posix_FilePermissions_S_IRWXU) == Mono_Posix_FilePermissions_S_IRWXU) -#ifdef S_IRWXU - *r |= S_IRWXU; -#else /* def S_IRWXU */ +#endif /* ndef EDOTDOT */ + if (x == Mono_Posix_Errno_EDQUOT) +#ifdef EDQUOT + {*r = EDQUOT; return 0;} +#else /* def EDQUOT */ {errno = EINVAL; return -1;} -#endif /* ndef S_IRWXU */ - if ((x & Mono_Posix_FilePermissions_S_IRWXO) == Mono_Posix_FilePermissions_S_IRWXO) -#ifdef S_IRWXO - *r |= S_IRWXO; -#else /* def S_IRWXO */ +#endif /* ndef EDQUOT */ + if (x == Mono_Posix_Errno_EEXIST) +#ifdef EEXIST + {*r = EEXIST; return 0;} +#else /* def EEXIST */ {errno = EINVAL; return -1;} -#endif /* ndef S_IRWXO */ - if ((x & Mono_Posix_FilePermissions_ACCESSPERMS) == Mono_Posix_FilePermissions_ACCESSPERMS) -#ifdef ACCESSPERMS - *r |= ACCESSPERMS; -#else /* def ACCESSPERMS */ +#endif /* ndef EEXIST */ + if (x == Mono_Posix_Errno_EFAULT) +#ifdef EFAULT + {*r = EFAULT; return 0;} +#else /* def EFAULT */ {errno = EINVAL; return -1;} -#endif /* ndef ACCESSPERMS */ - if ((x & Mono_Posix_FilePermissions_ALLPERMS) == Mono_Posix_FilePermissions_ALLPERMS) -#ifdef ALLPERMS - *r |= ALLPERMS; -#else /* def ALLPERMS */ +#endif /* ndef EFAULT */ + if (x == Mono_Posix_Errno_EFBIG) +#ifdef EFBIG + {*r = EFBIG; return 0;} +#else /* def EFBIG */ {errno = EINVAL; return -1;} -#endif /* ndef ALLPERMS */ - if ((x & Mono_Posix_FilePermissions_DEFFILEMODE) == Mono_Posix_FilePermissions_DEFFILEMODE) -#ifdef DEFFILEMODE - *r |= DEFFILEMODE; -#else /* def DEFFILEMODE */ +#endif /* ndef EFBIG */ + if (x == Mono_Posix_Errno_EHOSTDOWN) +#ifdef EHOSTDOWN + {*r = EHOSTDOWN; return 0;} +#else /* def EHOSTDOWN */ {errno = EINVAL; return -1;} -#endif /* ndef DEFFILEMODE */ - if ((x & Mono_Posix_FilePermissions_S_IFMT) == Mono_Posix_FilePermissions_S_IFMT) -#ifdef S_IFMT - *r |= S_IFMT; -#else /* def S_IFMT */ +#endif /* ndef EHOSTDOWN */ + if (x == Mono_Posix_Errno_EHOSTUNREACH) +#ifdef EHOSTUNREACH + {*r = EHOSTUNREACH; return 0;} +#else /* def EHOSTUNREACH */ {errno = EINVAL; return -1;} -#endif /* ndef S_IFMT */ - if ((x & Mono_Posix_FilePermissions_S_IFDIR) == Mono_Posix_FilePermissions_S_IFDIR) -#ifdef S_IFDIR - *r |= S_IFDIR; -#else /* def S_IFDIR */ +#endif /* ndef EHOSTUNREACH */ + if (x == Mono_Posix_Errno_EIDRM) +#ifdef EIDRM + {*r = EIDRM; return 0;} +#else /* def EIDRM */ {errno = EINVAL; return -1;} -#endif /* ndef S_IFDIR */ - if ((x & Mono_Posix_FilePermissions_S_IFCHR) == Mono_Posix_FilePermissions_S_IFCHR) -#ifdef S_IFCHR - *r |= S_IFCHR; -#else /* def S_IFCHR */ +#endif /* ndef EIDRM */ + if (x == Mono_Posix_Errno_EILSEQ) +#ifdef EILSEQ + {*r = EILSEQ; return 0;} +#else /* def EILSEQ */ {errno = EINVAL; return -1;} -#endif /* ndef S_IFCHR */ - if ((x & Mono_Posix_FilePermissions_S_IFBLK) == Mono_Posix_FilePermissions_S_IFBLK) -#ifdef S_IFBLK - *r |= S_IFBLK; -#else /* def S_IFBLK */ +#endif /* ndef EILSEQ */ + if (x == Mono_Posix_Errno_EINPROGRESS) +#ifdef EINPROGRESS + {*r = EINPROGRESS; return 0;} +#else /* def EINPROGRESS */ {errno = EINVAL; return -1;} -#endif /* ndef S_IFBLK */ - if ((x & Mono_Posix_FilePermissions_S_IFREG) == Mono_Posix_FilePermissions_S_IFREG) -#ifdef S_IFREG - *r |= S_IFREG; -#else /* def S_IFREG */ +#endif /* ndef EINPROGRESS */ + if (x == Mono_Posix_Errno_EINTR) +#ifdef EINTR + {*r = EINTR; return 0;} +#else /* def EINTR */ {errno = EINVAL; return -1;} -#endif /* ndef S_IFREG */ - if ((x & Mono_Posix_FilePermissions_S_IFIFO) == Mono_Posix_FilePermissions_S_IFIFO) -#ifdef S_IFIFO - *r |= S_IFIFO; -#else /* def S_IFIFO */ +#endif /* ndef EINTR */ + if (x == Mono_Posix_Errno_EINVAL) +#ifdef EINVAL + {*r = EINVAL; return 0;} +#else /* def EINVAL */ {errno = EINVAL; return -1;} -#endif /* ndef S_IFIFO */ - if ((x & Mono_Posix_FilePermissions_S_IFLNK) == Mono_Posix_FilePermissions_S_IFLNK) -#ifdef S_IFLNK - *r |= S_IFLNK; -#else /* def S_IFLNK */ +#endif /* ndef EINVAL */ + if (x == Mono_Posix_Errno_EIO) +#ifdef EIO + {*r = EIO; return 0;} +#else /* def EIO */ {errno = EINVAL; return -1;} -#endif /* ndef S_IFLNK */ - if ((x & Mono_Posix_FilePermissions_S_IFSOCK) == Mono_Posix_FilePermissions_S_IFSOCK) -#ifdef S_IFSOCK - *r |= S_IFSOCK; -#else /* def S_IFSOCK */ +#endif /* ndef EIO */ + if (x == Mono_Posix_Errno_EISCONN) +#ifdef EISCONN + {*r = EISCONN; return 0;} +#else /* def EISCONN */ {errno = EINVAL; return -1;} -#endif /* ndef S_IFSOCK */ - return 0; +#endif /* ndef EISCONN */ + if (x == Mono_Posix_Errno_EISDIR) +#ifdef EISDIR + {*r = EISDIR; return 0;} +#else /* def EISDIR */ + {errno = EINVAL; return -1;} +#endif /* ndef EISDIR */ + if (x == Mono_Posix_Errno_EISNAM) +#ifdef EISNAM + {*r = EISNAM; return 0;} +#else /* def EISNAM */ + {errno = EINVAL; return -1;} +#endif /* ndef EISNAM */ + if (x == Mono_Posix_Errno_EL2HLT) +#ifdef EL2HLT + {*r = EL2HLT; return 0;} +#else /* def EL2HLT */ + {errno = EINVAL; return -1;} +#endif /* ndef EL2HLT */ + if (x == Mono_Posix_Errno_EL2NSYNC) +#ifdef EL2NSYNC + {*r = EL2NSYNC; return 0;} +#else /* def EL2NSYNC */ + {errno = EINVAL; return -1;} +#endif /* ndef EL2NSYNC */ + if (x == Mono_Posix_Errno_EL3HLT) +#ifdef EL3HLT + {*r = EL3HLT; return 0;} +#else /* def EL3HLT */ + {errno = EINVAL; return -1;} +#endif /* ndef EL3HLT */ + if (x == Mono_Posix_Errno_EL3RST) +#ifdef EL3RST + {*r = EL3RST; return 0;} +#else /* def EL3RST */ + {errno = EINVAL; return -1;} +#endif /* ndef EL3RST */ + if (x == Mono_Posix_Errno_ELIBACC) +#ifdef ELIBACC + {*r = ELIBACC; return 0;} +#else /* def ELIBACC */ + {errno = EINVAL; return -1;} +#endif /* ndef ELIBACC */ + if (x == Mono_Posix_Errno_ELIBBAD) +#ifdef ELIBBAD + {*r = ELIBBAD; return 0;} +#else /* def ELIBBAD */ + {errno = EINVAL; return -1;} +#endif /* ndef ELIBBAD */ + if (x == Mono_Posix_Errno_ELIBEXEC) +#ifdef ELIBEXEC + {*r = ELIBEXEC; return 0;} +#else /* def ELIBEXEC */ + {errno = EINVAL; return -1;} +#endif /* ndef ELIBEXEC */ + if (x == Mono_Posix_Errno_ELIBMAX) +#ifdef ELIBMAX + {*r = ELIBMAX; return 0;} +#else /* def ELIBMAX */ + {errno = EINVAL; return -1;} +#endif /* ndef ELIBMAX */ + if (x == Mono_Posix_Errno_ELIBSCN) +#ifdef ELIBSCN + {*r = ELIBSCN; return 0;} +#else /* def ELIBSCN */ + {errno = EINVAL; return -1;} +#endif /* ndef ELIBSCN */ + if (x == Mono_Posix_Errno_ELNRNG) +#ifdef ELNRNG + {*r = ELNRNG; return 0;} +#else /* def ELNRNG */ + {errno = EINVAL; return -1;} +#endif /* ndef ELNRNG */ + if (x == Mono_Posix_Errno_ELOOP) +#ifdef ELOOP + {*r = ELOOP; return 0;} +#else /* def ELOOP */ + {errno = EINVAL; return -1;} +#endif /* ndef ELOOP */ + if (x == Mono_Posix_Errno_EMEDIUMTYPE) +#ifdef EMEDIUMTYPE + {*r = EMEDIUMTYPE; return 0;} +#else /* def EMEDIUMTYPE */ + {errno = EINVAL; return -1;} +#endif /* ndef EMEDIUMTYPE */ + if (x == Mono_Posix_Errno_EMFILE) +#ifdef EMFILE + {*r = EMFILE; return 0;} +#else /* def EMFILE */ + {errno = EINVAL; return -1;} +#endif /* ndef EMFILE */ + if (x == Mono_Posix_Errno_EMLINK) +#ifdef EMLINK + {*r = EMLINK; return 0;} +#else /* def EMLINK */ + {errno = EINVAL; return -1;} +#endif /* ndef EMLINK */ + if (x == Mono_Posix_Errno_EMSGSIZE) +#ifdef EMSGSIZE + {*r = EMSGSIZE; return 0;} +#else /* def EMSGSIZE */ + {errno = EINVAL; return -1;} +#endif /* ndef EMSGSIZE */ + if (x == Mono_Posix_Errno_EMULTIHOP) +#ifdef EMULTIHOP + {*r = EMULTIHOP; return 0;} +#else /* def EMULTIHOP */ + {errno = EINVAL; return -1;} +#endif /* ndef EMULTIHOP */ + if (x == Mono_Posix_Errno_ENAMETOOLONG) +#ifdef ENAMETOOLONG + {*r = ENAMETOOLONG; return 0;} +#else /* def ENAMETOOLONG */ + {errno = EINVAL; return -1;} +#endif /* ndef ENAMETOOLONG */ + if (x == Mono_Posix_Errno_ENAVAIL) +#ifdef ENAVAIL + {*r = ENAVAIL; return 0;} +#else /* def ENAVAIL */ + {errno = EINVAL; return -1;} +#endif /* ndef ENAVAIL */ + if (x == Mono_Posix_Errno_ENETDOWN) +#ifdef ENETDOWN + {*r = ENETDOWN; return 0;} +#else /* def ENETDOWN */ + {errno = EINVAL; return -1;} +#endif /* ndef ENETDOWN */ + if (x == Mono_Posix_Errno_ENETRESET) +#ifdef ENETRESET + {*r = ENETRESET; return 0;} +#else /* def ENETRESET */ + {errno = EINVAL; return -1;} +#endif /* ndef ENETRESET */ + if (x == Mono_Posix_Errno_ENETUNREACH) +#ifdef ENETUNREACH + {*r = ENETUNREACH; return 0;} +#else /* def ENETUNREACH */ + {errno = EINVAL; return -1;} +#endif /* ndef ENETUNREACH */ + if (x == Mono_Posix_Errno_ENFILE) +#ifdef ENFILE + {*r = ENFILE; return 0;} +#else /* def ENFILE */ + {errno = EINVAL; return -1;} +#endif /* ndef ENFILE */ + if (x == Mono_Posix_Errno_ENOANO) +#ifdef ENOANO + {*r = ENOANO; return 0;} +#else /* def ENOANO */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOANO */ + if (x == Mono_Posix_Errno_ENOBUFS) +#ifdef ENOBUFS + {*r = ENOBUFS; return 0;} +#else /* def ENOBUFS */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOBUFS */ + if (x == Mono_Posix_Errno_ENOCSI) +#ifdef ENOCSI + {*r = ENOCSI; return 0;} +#else /* def ENOCSI */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOCSI */ + if (x == Mono_Posix_Errno_ENODATA) +#ifdef ENODATA + {*r = ENODATA; return 0;} +#else /* def ENODATA */ + {errno = EINVAL; return -1;} +#endif /* ndef ENODATA */ + if (x == Mono_Posix_Errno_ENODEV) +#ifdef ENODEV + {*r = ENODEV; return 0;} +#else /* def ENODEV */ + {errno = EINVAL; return -1;} +#endif /* ndef ENODEV */ + if (x == Mono_Posix_Errno_ENOENT) +#ifdef ENOENT + {*r = ENOENT; return 0;} +#else /* def ENOENT */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOENT */ + if (x == Mono_Posix_Errno_ENOEXEC) +#ifdef ENOEXEC + {*r = ENOEXEC; return 0;} +#else /* def ENOEXEC */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOEXEC */ + if (x == Mono_Posix_Errno_ENOLCK) +#ifdef ENOLCK + {*r = ENOLCK; return 0;} +#else /* def ENOLCK */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOLCK */ + if (x == Mono_Posix_Errno_ENOLINK) +#ifdef ENOLINK + {*r = ENOLINK; return 0;} +#else /* def ENOLINK */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOLINK */ + if (x == Mono_Posix_Errno_ENOMEDIUM) +#ifdef ENOMEDIUM + {*r = ENOMEDIUM; return 0;} +#else /* def ENOMEDIUM */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOMEDIUM */ + if (x == Mono_Posix_Errno_ENOMEM) +#ifdef ENOMEM + {*r = ENOMEM; return 0;} +#else /* def ENOMEM */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOMEM */ + if (x == Mono_Posix_Errno_ENOMSG) +#ifdef ENOMSG + {*r = ENOMSG; return 0;} +#else /* def ENOMSG */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOMSG */ + if (x == Mono_Posix_Errno_ENONET) +#ifdef ENONET + {*r = ENONET; return 0;} +#else /* def ENONET */ + {errno = EINVAL; return -1;} +#endif /* ndef ENONET */ + if (x == Mono_Posix_Errno_ENOPKG) +#ifdef ENOPKG + {*r = ENOPKG; return 0;} +#else /* def ENOPKG */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOPKG */ + if (x == Mono_Posix_Errno_ENOPROTOOPT) +#ifdef ENOPROTOOPT + {*r = ENOPROTOOPT; return 0;} +#else /* def ENOPROTOOPT */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOPROTOOPT */ + if (x == Mono_Posix_Errno_ENOSPC) +#ifdef ENOSPC + {*r = ENOSPC; return 0;} +#else /* def ENOSPC */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOSPC */ + if (x == Mono_Posix_Errno_ENOSR) +#ifdef ENOSR + {*r = ENOSR; return 0;} +#else /* def ENOSR */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOSR */ + if (x == Mono_Posix_Errno_ENOSTR) +#ifdef ENOSTR + {*r = ENOSTR; return 0;} +#else /* def ENOSTR */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOSTR */ + if (x == Mono_Posix_Errno_ENOSYS) +#ifdef ENOSYS + {*r = ENOSYS; return 0;} +#else /* def ENOSYS */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOSYS */ + if (x == Mono_Posix_Errno_ENOTBLK) +#ifdef ENOTBLK + {*r = ENOTBLK; return 0;} +#else /* def ENOTBLK */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOTBLK */ + if (x == Mono_Posix_Errno_ENOTCONN) +#ifdef ENOTCONN + {*r = ENOTCONN; return 0;} +#else /* def ENOTCONN */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOTCONN */ + if (x == Mono_Posix_Errno_ENOTDIR) +#ifdef ENOTDIR + {*r = ENOTDIR; return 0;} +#else /* def ENOTDIR */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOTDIR */ + if (x == Mono_Posix_Errno_ENOTEMPTY) +#ifdef ENOTEMPTY + {*r = ENOTEMPTY; return 0;} +#else /* def ENOTEMPTY */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOTEMPTY */ + if (x == Mono_Posix_Errno_ENOTNAM) +#ifdef ENOTNAM + {*r = ENOTNAM; return 0;} +#else /* def ENOTNAM */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOTNAM */ + if (x == Mono_Posix_Errno_ENOTSOCK) +#ifdef ENOTSOCK + {*r = ENOTSOCK; return 0;} +#else /* def ENOTSOCK */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOTSOCK */ + if (x == Mono_Posix_Errno_ENOTTY) +#ifdef ENOTTY + {*r = ENOTTY; return 0;} +#else /* def ENOTTY */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOTTY */ + if (x == Mono_Posix_Errno_ENOTUNIQ) +#ifdef ENOTUNIQ + {*r = ENOTUNIQ; return 0;} +#else /* def ENOTUNIQ */ + {errno = EINVAL; return -1;} +#endif /* ndef ENOTUNIQ */ + if (x == Mono_Posix_Errno_ENXIO) +#ifdef ENXIO + {*r = ENXIO; return 0;} +#else /* def ENXIO */ + {errno = EINVAL; return -1;} +#endif /* ndef ENXIO */ + if (x == Mono_Posix_Errno_EOPNOTSUPP) +#ifdef EOPNOTSUPP + {*r = EOPNOTSUPP; return 0;} +#else /* def EOPNOTSUPP */ + {errno = EINVAL; return -1;} +#endif /* ndef EOPNOTSUPP */ + if (x == Mono_Posix_Errno_EOVERFLOW) +#ifdef EOVERFLOW + {*r = EOVERFLOW; return 0;} +#else /* def EOVERFLOW */ + {errno = EINVAL; return -1;} +#endif /* ndef EOVERFLOW */ + if (x == Mono_Posix_Errno_EPERM) +#ifdef EPERM + {*r = EPERM; return 0;} +#else /* def EPERM */ + {errno = EINVAL; return -1;} +#endif /* ndef EPERM */ + if (x == Mono_Posix_Errno_EPFNOSUPPORT) +#ifdef EPFNOSUPPORT + {*r = EPFNOSUPPORT; return 0;} +#else /* def EPFNOSUPPORT */ + {errno = EINVAL; return -1;} +#endif /* ndef EPFNOSUPPORT */ + if (x == Mono_Posix_Errno_EPIPE) +#ifdef EPIPE + {*r = EPIPE; return 0;} +#else /* def EPIPE */ + {errno = EINVAL; return -1;} +#endif /* ndef EPIPE */ + if (x == Mono_Posix_Errno_EPROTO) +#ifdef EPROTO + {*r = EPROTO; return 0;} +#else /* def EPROTO */ + {errno = EINVAL; return -1;} +#endif /* ndef EPROTO */ + if (x == Mono_Posix_Errno_EPROTONOSUPPORT) +#ifdef EPROTONOSUPPORT + {*r = EPROTONOSUPPORT; return 0;} +#else /* def EPROTONOSUPPORT */ + {errno = EINVAL; return -1;} +#endif /* ndef EPROTONOSUPPORT */ + if (x == Mono_Posix_Errno_EPROTOTYPE) +#ifdef EPROTOTYPE + {*r = EPROTOTYPE; return 0;} +#else /* def EPROTOTYPE */ + {errno = EINVAL; return -1;} +#endif /* ndef EPROTOTYPE */ + if (x == Mono_Posix_Errno_ERANGE) +#ifdef ERANGE + {*r = ERANGE; return 0;} +#else /* def ERANGE */ + {errno = EINVAL; return -1;} +#endif /* ndef ERANGE */ + if (x == Mono_Posix_Errno_EREMCHG) +#ifdef EREMCHG + {*r = EREMCHG; return 0;} +#else /* def EREMCHG */ + {errno = EINVAL; return -1;} +#endif /* ndef EREMCHG */ + if (x == Mono_Posix_Errno_EREMOTE) +#ifdef EREMOTE + {*r = EREMOTE; return 0;} +#else /* def EREMOTE */ + {errno = EINVAL; return -1;} +#endif /* ndef EREMOTE */ + if (x == Mono_Posix_Errno_EREMOTEIO) +#ifdef EREMOTEIO + {*r = EREMOTEIO; return 0;} +#else /* def EREMOTEIO */ + {errno = EINVAL; return -1;} +#endif /* ndef EREMOTEIO */ + if (x == Mono_Posix_Errno_ERESTART) +#ifdef ERESTART + {*r = ERESTART; return 0;} +#else /* def ERESTART */ + {errno = EINVAL; return -1;} +#endif /* ndef ERESTART */ + if (x == Mono_Posix_Errno_EROFS) +#ifdef EROFS + {*r = EROFS; return 0;} +#else /* def EROFS */ + {errno = EINVAL; return -1;} +#endif /* ndef EROFS */ + if (x == Mono_Posix_Errno_ESHUTDOWN) +#ifdef ESHUTDOWN + {*r = ESHUTDOWN; return 0;} +#else /* def ESHUTDOWN */ + {errno = EINVAL; return -1;} +#endif /* ndef ESHUTDOWN */ + if (x == Mono_Posix_Errno_ESOCKTNOSUPPORT) +#ifdef ESOCKTNOSUPPORT + {*r = ESOCKTNOSUPPORT; return 0;} +#else /* def ESOCKTNOSUPPORT */ + {errno = EINVAL; return -1;} +#endif /* ndef ESOCKTNOSUPPORT */ + if (x == Mono_Posix_Errno_ESPIPE) +#ifdef ESPIPE + {*r = ESPIPE; return 0;} +#else /* def ESPIPE */ + {errno = EINVAL; return -1;} +#endif /* ndef ESPIPE */ + if (x == Mono_Posix_Errno_ESRCH) +#ifdef ESRCH + {*r = ESRCH; return 0;} +#else /* def ESRCH */ + {errno = EINVAL; return -1;} +#endif /* ndef ESRCH */ + if (x == Mono_Posix_Errno_ESRMNT) +#ifdef ESRMNT + {*r = ESRMNT; return 0;} +#else /* def ESRMNT */ + {errno = EINVAL; return -1;} +#endif /* ndef ESRMNT */ + if (x == Mono_Posix_Errno_ESTALE) +#ifdef ESTALE + {*r = ESTALE; return 0;} +#else /* def ESTALE */ + {errno = EINVAL; return -1;} +#endif /* ndef ESTALE */ + if (x == Mono_Posix_Errno_ESTRPIPE) +#ifdef ESTRPIPE + {*r = ESTRPIPE; return 0;} +#else /* def ESTRPIPE */ + {errno = EINVAL; return -1;} +#endif /* ndef ESTRPIPE */ + if (x == Mono_Posix_Errno_ETIME) +#ifdef ETIME + {*r = ETIME; return 0;} +#else /* def ETIME */ + {errno = EINVAL; return -1;} +#endif /* ndef ETIME */ + if (x == Mono_Posix_Errno_ETIMEDOUT) +#ifdef ETIMEDOUT + {*r = ETIMEDOUT; return 0;} +#else /* def ETIMEDOUT */ + {errno = EINVAL; return -1;} +#endif /* ndef ETIMEDOUT */ + if (x == Mono_Posix_Errno_ETOOMANYREFS) +#ifdef ETOOMANYREFS + {*r = ETOOMANYREFS; return 0;} +#else /* def ETOOMANYREFS */ + {errno = EINVAL; return -1;} +#endif /* ndef ETOOMANYREFS */ + if (x == Mono_Posix_Errno_ETXTBSY) +#ifdef ETXTBSY + {*r = ETXTBSY; return 0;} +#else /* def ETXTBSY */ + {errno = EINVAL; return -1;} +#endif /* ndef ETXTBSY */ + if (x == Mono_Posix_Errno_EUCLEAN) +#ifdef EUCLEAN + {*r = EUCLEAN; return 0;} +#else /* def EUCLEAN */ + {errno = EINVAL; return -1;} +#endif /* ndef EUCLEAN */ + if (x == Mono_Posix_Errno_EUNATCH) +#ifdef EUNATCH + {*r = EUNATCH; return 0;} +#else /* def EUNATCH */ + {errno = EINVAL; return -1;} +#endif /* ndef EUNATCH */ + if (x == Mono_Posix_Errno_EUSERS) +#ifdef EUSERS + {*r = EUSERS; return 0;} +#else /* def EUSERS */ + {errno = EINVAL; return -1;} +#endif /* ndef EUSERS */ + if (x == Mono_Posix_Errno_EWOULDBLOCK) +#ifdef EWOULDBLOCK + {*r = EWOULDBLOCK; return 0;} +#else /* def EWOULDBLOCK */ + {errno = EINVAL; return -1;} +#endif /* ndef EWOULDBLOCK */ + if (x == Mono_Posix_Errno_EXDEV) +#ifdef EXDEV + {*r = EXDEV; return 0;} +#else /* def EXDEV */ + {errno = EINVAL; return -1;} +#endif /* ndef EXDEV */ + if (x == Mono_Posix_Errno_EXFULL) +#ifdef EXFULL + {*r = EXFULL; return 0;} +#else /* def EXFULL */ + {errno = EINVAL; return -1;} +#endif /* ndef EXFULL */ + errno = EINVAL; return -1; } -int Mono_Posix_ToFilePermissions (unsigned int x, unsigned int *r) +int Mono_Posix_ToErrno (int x, int *r) { *r = 0; if (x == 0) return 0; -#ifdef S_ISUID - if ((x & S_ISUID) == S_ISUID) - *r |= Mono_Posix_FilePermissions_S_ISUID; -#endif /* ndef S_ISUID */ -#ifdef S_ISGID - if ((x & S_ISGID) == S_ISGID) - *r |= Mono_Posix_FilePermissions_S_ISGID; -#endif /* ndef S_ISGID */ -#ifdef S_ISVTX - if ((x & S_ISVTX) == S_ISVTX) - *r |= Mono_Posix_FilePermissions_S_ISVTX; -#endif /* ndef S_ISVTX */ -#ifdef S_IRUSR - if ((x & S_IRUSR) == S_IRUSR) - *r |= Mono_Posix_FilePermissions_S_IRUSR; -#endif /* ndef S_IRUSR */ -#ifdef S_IWUSR - if ((x & S_IWUSR) == S_IWUSR) - *r |= Mono_Posix_FilePermissions_S_IWUSR; -#endif /* ndef S_IWUSR */ -#ifdef S_IXUSR - if ((x & S_IXUSR) == S_IXUSR) - *r |= Mono_Posix_FilePermissions_S_IXUSR; -#endif /* ndef S_IXUSR */ -#ifdef S_IRGRP - if ((x & S_IRGRP) == S_IRGRP) - *r |= Mono_Posix_FilePermissions_S_IRGRP; -#endif /* ndef S_IRGRP */ -#ifdef S_IWGRP - if ((x & S_IWGRP) == S_IWGRP) - *r |= Mono_Posix_FilePermissions_S_IWGRP; -#endif /* ndef S_IWGRP */ -#ifdef S_IXGRP - if ((x & S_IXGRP) == S_IXGRP) - *r |= Mono_Posix_FilePermissions_S_IXGRP; -#endif /* ndef S_IXGRP */ -#ifdef S_IROTH - if ((x & S_IROTH) == S_IROTH) - *r |= Mono_Posix_FilePermissions_S_IROTH; -#endif /* ndef S_IROTH */ -#ifdef S_IWOTH - if ((x & S_IWOTH) == S_IWOTH) - *r |= Mono_Posix_FilePermissions_S_IWOTH; -#endif /* ndef S_IWOTH */ -#ifdef S_IXOTH - if ((x & S_IXOTH) == S_IXOTH) - *r |= Mono_Posix_FilePermissions_S_IXOTH; -#endif /* ndef S_IXOTH */ -#ifdef S_IRWXG - if ((x & S_IRWXG) == S_IRWXG) - *r |= Mono_Posix_FilePermissions_S_IRWXG; -#endif /* ndef S_IRWXG */ -#ifdef S_IRWXU - if ((x & S_IRWXU) == S_IRWXU) - *r |= Mono_Posix_FilePermissions_S_IRWXU; -#endif /* ndef S_IRWXU */ -#ifdef S_IRWXO - if ((x & S_IRWXO) == S_IRWXO) - *r |= Mono_Posix_FilePermissions_S_IRWXO; -#endif /* ndef S_IRWXO */ -#ifdef ACCESSPERMS - if ((x & ACCESSPERMS) == ACCESSPERMS) - *r |= Mono_Posix_FilePermissions_ACCESSPERMS; -#endif /* ndef ACCESSPERMS */ -#ifdef ALLPERMS - if ((x & ALLPERMS) == ALLPERMS) - *r |= Mono_Posix_FilePermissions_ALLPERMS; -#endif /* ndef ALLPERMS */ -#ifdef DEFFILEMODE - if ((x & DEFFILEMODE) == DEFFILEMODE) - *r |= Mono_Posix_FilePermissions_DEFFILEMODE; -#endif /* ndef DEFFILEMODE */ -#ifdef S_IFMT - if ((x & S_IFMT) == S_IFMT) - *r |= Mono_Posix_FilePermissions_S_IFMT; -#endif /* ndef S_IFMT */ -#ifdef S_IFDIR - if ((x & S_IFDIR) == S_IFDIR) - *r |= Mono_Posix_FilePermissions_S_IFDIR; -#endif /* ndef S_IFDIR */ -#ifdef S_IFCHR - if ((x & S_IFCHR) == S_IFCHR) - *r |= Mono_Posix_FilePermissions_S_IFCHR; -#endif /* ndef S_IFCHR */ -#ifdef S_IFBLK - if ((x & S_IFBLK) == S_IFBLK) - *r |= Mono_Posix_FilePermissions_S_IFBLK; -#endif /* ndef S_IFBLK */ -#ifdef S_IFREG - if ((x & S_IFREG) == S_IFREG) - *r |= Mono_Posix_FilePermissions_S_IFREG; -#endif /* ndef S_IFREG */ -#ifdef S_IFIFO - if ((x & S_IFIFO) == S_IFIFO) - *r |= Mono_Posix_FilePermissions_S_IFIFO; -#endif /* ndef S_IFIFO */ -#ifdef S_IFLNK - if ((x & S_IFLNK) == S_IFLNK) - *r |= Mono_Posix_FilePermissions_S_IFLNK; -#endif /* ndef S_IFLNK */ -#ifdef S_IFSOCK - if ((x & S_IFSOCK) == S_IFSOCK) - *r |= Mono_Posix_FilePermissions_S_IFSOCK; -#endif /* ndef S_IFSOCK */ - return 0; +#ifdef E2BIG + if (x == E2BIG) + {*r = Mono_Posix_Errno_E2BIG; return 0;} +#endif /* ndef E2BIG */ +#ifdef EACCES + if (x == EACCES) + {*r = Mono_Posix_Errno_EACCES; return 0;} +#endif /* ndef EACCES */ +#ifdef EADDRINUSE + if (x == EADDRINUSE) + {*r = Mono_Posix_Errno_EADDRINUSE; return 0;} +#endif /* ndef EADDRINUSE */ +#ifdef EADDRNOTAVAIL + if (x == EADDRNOTAVAIL) + {*r = Mono_Posix_Errno_EADDRNOTAVAIL; return 0;} +#endif /* ndef EADDRNOTAVAIL */ +#ifdef EADV + if (x == EADV) + {*r = Mono_Posix_Errno_EADV; return 0;} +#endif /* ndef EADV */ +#ifdef EAFNOSUPPORT + if (x == EAFNOSUPPORT) + {*r = Mono_Posix_Errno_EAFNOSUPPORT; return 0;} +#endif /* ndef EAFNOSUPPORT */ +#ifdef EAGAIN + if (x == EAGAIN) + {*r = Mono_Posix_Errno_EAGAIN; return 0;} +#endif /* ndef EAGAIN */ +#ifdef EALREADY + if (x == EALREADY) + {*r = Mono_Posix_Errno_EALREADY; return 0;} +#endif /* ndef EALREADY */ +#ifdef EBADE + if (x == EBADE) + {*r = Mono_Posix_Errno_EBADE; return 0;} +#endif /* ndef EBADE */ +#ifdef EBADF + if (x == EBADF) + {*r = Mono_Posix_Errno_EBADF; return 0;} +#endif /* ndef EBADF */ +#ifdef EBADFD + if (x == EBADFD) + {*r = Mono_Posix_Errno_EBADFD; return 0;} +#endif /* ndef EBADFD */ +#ifdef EBADMSG + if (x == EBADMSG) + {*r = Mono_Posix_Errno_EBADMSG; return 0;} +#endif /* ndef EBADMSG */ +#ifdef EBADR + if (x == EBADR) + {*r = Mono_Posix_Errno_EBADR; return 0;} +#endif /* ndef EBADR */ +#ifdef EBADRQC + if (x == EBADRQC) + {*r = Mono_Posix_Errno_EBADRQC; return 0;} +#endif /* ndef EBADRQC */ +#ifdef EBADSLT + if (x == EBADSLT) + {*r = Mono_Posix_Errno_EBADSLT; return 0;} +#endif /* ndef EBADSLT */ +#ifdef EBFONT + if (x == EBFONT) + {*r = Mono_Posix_Errno_EBFONT; return 0;} +#endif /* ndef EBFONT */ +#ifdef EBUSY + if (x == EBUSY) + {*r = Mono_Posix_Errno_EBUSY; return 0;} +#endif /* ndef EBUSY */ +#ifdef ECHILD + if (x == ECHILD) + {*r = Mono_Posix_Errno_ECHILD; return 0;} +#endif /* ndef ECHILD */ +#ifdef ECHRNG + if (x == ECHRNG) + {*r = Mono_Posix_Errno_ECHRNG; return 0;} +#endif /* ndef ECHRNG */ +#ifdef ECOMM + if (x == ECOMM) + {*r = Mono_Posix_Errno_ECOMM; return 0;} +#endif /* ndef ECOMM */ +#ifdef ECONNABORTED + if (x == ECONNABORTED) + {*r = Mono_Posix_Errno_ECONNABORTED; return 0;} +#endif /* ndef ECONNABORTED */ +#ifdef ECONNREFUSED + if (x == ECONNREFUSED) + {*r = Mono_Posix_Errno_ECONNREFUSED; return 0;} +#endif /* ndef ECONNREFUSED */ +#ifdef ECONNRESET + if (x == ECONNRESET) + {*r = Mono_Posix_Errno_ECONNRESET; return 0;} +#endif /* ndef ECONNRESET */ +#ifdef EDEADLK + if (x == EDEADLK) + {*r = Mono_Posix_Errno_EDEADLK; return 0;} +#endif /* ndef EDEADLK */ +#ifdef EDEADLOCK + if (x == EDEADLOCK) + {*r = Mono_Posix_Errno_EDEADLOCK; return 0;} +#endif /* ndef EDEADLOCK */ +#ifdef EDESTADDRREQ + if (x == EDESTADDRREQ) + {*r = Mono_Posix_Errno_EDESTADDRREQ; return 0;} +#endif /* ndef EDESTADDRREQ */ +#ifdef EDOM + if (x == EDOM) + {*r = Mono_Posix_Errno_EDOM; return 0;} +#endif /* ndef EDOM */ +#ifdef EDOTDOT + if (x == EDOTDOT) + {*r = Mono_Posix_Errno_EDOTDOT; return 0;} +#endif /* ndef EDOTDOT */ +#ifdef EDQUOT + if (x == EDQUOT) + {*r = Mono_Posix_Errno_EDQUOT; return 0;} +#endif /* ndef EDQUOT */ +#ifdef EEXIST + if (x == EEXIST) + {*r = Mono_Posix_Errno_EEXIST; return 0;} +#endif /* ndef EEXIST */ +#ifdef EFAULT + if (x == EFAULT) + {*r = Mono_Posix_Errno_EFAULT; return 0;} +#endif /* ndef EFAULT */ +#ifdef EFBIG + if (x == EFBIG) + {*r = Mono_Posix_Errno_EFBIG; return 0;} +#endif /* ndef EFBIG */ +#ifdef EHOSTDOWN + if (x == EHOSTDOWN) + {*r = Mono_Posix_Errno_EHOSTDOWN; return 0;} +#endif /* ndef EHOSTDOWN */ +#ifdef EHOSTUNREACH + if (x == EHOSTUNREACH) + {*r = Mono_Posix_Errno_EHOSTUNREACH; return 0;} +#endif /* ndef EHOSTUNREACH */ +#ifdef EIDRM + if (x == EIDRM) + {*r = Mono_Posix_Errno_EIDRM; return 0;} +#endif /* ndef EIDRM */ +#ifdef EILSEQ + if (x == EILSEQ) + {*r = Mono_Posix_Errno_EILSEQ; return 0;} +#endif /* ndef EILSEQ */ +#ifdef EINPROGRESS + if (x == EINPROGRESS) + {*r = Mono_Posix_Errno_EINPROGRESS; return 0;} +#endif /* ndef EINPROGRESS */ +#ifdef EINTR + if (x == EINTR) + {*r = Mono_Posix_Errno_EINTR; return 0;} +#endif /* ndef EINTR */ +#ifdef EINVAL + if (x == EINVAL) + {*r = Mono_Posix_Errno_EINVAL; return 0;} +#endif /* ndef EINVAL */ +#ifdef EIO + if (x == EIO) + {*r = Mono_Posix_Errno_EIO; return 0;} +#endif /* ndef EIO */ +#ifdef EISCONN + if (x == EISCONN) + {*r = Mono_Posix_Errno_EISCONN; return 0;} +#endif /* ndef EISCONN */ +#ifdef EISDIR + if (x == EISDIR) + {*r = Mono_Posix_Errno_EISDIR; return 0;} +#endif /* ndef EISDIR */ +#ifdef EISNAM + if (x == EISNAM) + {*r = Mono_Posix_Errno_EISNAM; return 0;} +#endif /* ndef EISNAM */ +#ifdef EL2HLT + if (x == EL2HLT) + {*r = Mono_Posix_Errno_EL2HLT; return 0;} +#endif /* ndef EL2HLT */ +#ifdef EL2NSYNC + if (x == EL2NSYNC) + {*r = Mono_Posix_Errno_EL2NSYNC; return 0;} +#endif /* ndef EL2NSYNC */ +#ifdef EL3HLT + if (x == EL3HLT) + {*r = Mono_Posix_Errno_EL3HLT; return 0;} +#endif /* ndef EL3HLT */ +#ifdef EL3RST + if (x == EL3RST) + {*r = Mono_Posix_Errno_EL3RST; return 0;} +#endif /* ndef EL3RST */ +#ifdef ELIBACC + if (x == ELIBACC) + {*r = Mono_Posix_Errno_ELIBACC; return 0;} +#endif /* ndef ELIBACC */ +#ifdef ELIBBAD + if (x == ELIBBAD) + {*r = Mono_Posix_Errno_ELIBBAD; return 0;} +#endif /* ndef ELIBBAD */ +#ifdef ELIBEXEC + if (x == ELIBEXEC) + {*r = Mono_Posix_Errno_ELIBEXEC; return 0;} +#endif /* ndef ELIBEXEC */ +#ifdef ELIBMAX + if (x == ELIBMAX) + {*r = Mono_Posix_Errno_ELIBMAX; return 0;} +#endif /* ndef ELIBMAX */ +#ifdef ELIBSCN + if (x == ELIBSCN) + {*r = Mono_Posix_Errno_ELIBSCN; return 0;} +#endif /* ndef ELIBSCN */ +#ifdef ELNRNG + if (x == ELNRNG) + {*r = Mono_Posix_Errno_ELNRNG; return 0;} +#endif /* ndef ELNRNG */ +#ifdef ELOOP + if (x == ELOOP) + {*r = Mono_Posix_Errno_ELOOP; return 0;} +#endif /* ndef ELOOP */ +#ifdef EMEDIUMTYPE + if (x == EMEDIUMTYPE) + {*r = Mono_Posix_Errno_EMEDIUMTYPE; return 0;} +#endif /* ndef EMEDIUMTYPE */ +#ifdef EMFILE + if (x == EMFILE) + {*r = Mono_Posix_Errno_EMFILE; return 0;} +#endif /* ndef EMFILE */ +#ifdef EMLINK + if (x == EMLINK) + {*r = Mono_Posix_Errno_EMLINK; return 0;} +#endif /* ndef EMLINK */ +#ifdef EMSGSIZE + if (x == EMSGSIZE) + {*r = Mono_Posix_Errno_EMSGSIZE; return 0;} +#endif /* ndef EMSGSIZE */ +#ifdef EMULTIHOP + if (x == EMULTIHOP) + {*r = Mono_Posix_Errno_EMULTIHOP; return 0;} +#endif /* ndef EMULTIHOP */ +#ifdef ENAMETOOLONG + if (x == ENAMETOOLONG) + {*r = Mono_Posix_Errno_ENAMETOOLONG; return 0;} +#endif /* ndef ENAMETOOLONG */ +#ifdef ENAVAIL + if (x == ENAVAIL) + {*r = Mono_Posix_Errno_ENAVAIL; return 0;} +#endif /* ndef ENAVAIL */ +#ifdef ENETDOWN + if (x == ENETDOWN) + {*r = Mono_Posix_Errno_ENETDOWN; return 0;} +#endif /* ndef ENETDOWN */ +#ifdef ENETRESET + if (x == ENETRESET) + {*r = Mono_Posix_Errno_ENETRESET; return 0;} +#endif /* ndef ENETRESET */ +#ifdef ENETUNREACH + if (x == ENETUNREACH) + {*r = Mono_Posix_Errno_ENETUNREACH; return 0;} +#endif /* ndef ENETUNREACH */ +#ifdef ENFILE + if (x == ENFILE) + {*r = Mono_Posix_Errno_ENFILE; return 0;} +#endif /* ndef ENFILE */ +#ifdef ENOANO + if (x == ENOANO) + {*r = Mono_Posix_Errno_ENOANO; return 0;} +#endif /* ndef ENOANO */ +#ifdef ENOBUFS + if (x == ENOBUFS) + {*r = Mono_Posix_Errno_ENOBUFS; return 0;} +#endif /* ndef ENOBUFS */ +#ifdef ENOCSI + if (x == ENOCSI) + {*r = Mono_Posix_Errno_ENOCSI; return 0;} +#endif /* ndef ENOCSI */ +#ifdef ENODATA + if (x == ENODATA) + {*r = Mono_Posix_Errno_ENODATA; return 0;} +#endif /* ndef ENODATA */ +#ifdef ENODEV + if (x == ENODEV) + {*r = Mono_Posix_Errno_ENODEV; return 0;} +#endif /* ndef ENODEV */ +#ifdef ENOENT + if (x == ENOENT) + {*r = Mono_Posix_Errno_ENOENT; return 0;} +#endif /* ndef ENOENT */ +#ifdef ENOEXEC + if (x == ENOEXEC) + {*r = Mono_Posix_Errno_ENOEXEC; return 0;} +#endif /* ndef ENOEXEC */ +#ifdef ENOLCK + if (x == ENOLCK) + {*r = Mono_Posix_Errno_ENOLCK; return 0;} +#endif /* ndef ENOLCK */ +#ifdef ENOLINK + if (x == ENOLINK) + {*r = Mono_Posix_Errno_ENOLINK; return 0;} +#endif /* ndef ENOLINK */ +#ifdef ENOMEDIUM + if (x == ENOMEDIUM) + {*r = Mono_Posix_Errno_ENOMEDIUM; return 0;} +#endif /* ndef ENOMEDIUM */ +#ifdef ENOMEM + if (x == ENOMEM) + {*r = Mono_Posix_Errno_ENOMEM; return 0;} +#endif /* ndef ENOMEM */ +#ifdef ENOMSG + if (x == ENOMSG) + {*r = Mono_Posix_Errno_ENOMSG; return 0;} +#endif /* ndef ENOMSG */ +#ifdef ENONET + if (x == ENONET) + {*r = Mono_Posix_Errno_ENONET; return 0;} +#endif /* ndef ENONET */ +#ifdef ENOPKG + if (x == ENOPKG) + {*r = Mono_Posix_Errno_ENOPKG; return 0;} +#endif /* ndef ENOPKG */ +#ifdef ENOPROTOOPT + if (x == ENOPROTOOPT) + {*r = Mono_Posix_Errno_ENOPROTOOPT; return 0;} +#endif /* ndef ENOPROTOOPT */ +#ifdef ENOSPC + if (x == ENOSPC) + {*r = Mono_Posix_Errno_ENOSPC; return 0;} +#endif /* ndef ENOSPC */ +#ifdef ENOSR + if (x == ENOSR) + {*r = Mono_Posix_Errno_ENOSR; return 0;} +#endif /* ndef ENOSR */ +#ifdef ENOSTR + if (x == ENOSTR) + {*r = Mono_Posix_Errno_ENOSTR; return 0;} +#endif /* ndef ENOSTR */ +#ifdef ENOSYS + if (x == ENOSYS) + {*r = Mono_Posix_Errno_ENOSYS; return 0;} +#endif /* ndef ENOSYS */ +#ifdef ENOTBLK + if (x == ENOTBLK) + {*r = Mono_Posix_Errno_ENOTBLK; return 0;} +#endif /* ndef ENOTBLK */ +#ifdef ENOTCONN + if (x == ENOTCONN) + {*r = Mono_Posix_Errno_ENOTCONN; return 0;} +#endif /* ndef ENOTCONN */ +#ifdef ENOTDIR + if (x == ENOTDIR) + {*r = Mono_Posix_Errno_ENOTDIR; return 0;} +#endif /* ndef ENOTDIR */ +#ifdef ENOTEMPTY + if (x == ENOTEMPTY) + {*r = Mono_Posix_Errno_ENOTEMPTY; return 0;} +#endif /* ndef ENOTEMPTY */ +#ifdef ENOTNAM + if (x == ENOTNAM) + {*r = Mono_Posix_Errno_ENOTNAM; return 0;} +#endif /* ndef ENOTNAM */ +#ifdef ENOTSOCK + if (x == ENOTSOCK) + {*r = Mono_Posix_Errno_ENOTSOCK; return 0;} +#endif /* ndef ENOTSOCK */ +#ifdef ENOTTY + if (x == ENOTTY) + {*r = Mono_Posix_Errno_ENOTTY; return 0;} +#endif /* ndef ENOTTY */ +#ifdef ENOTUNIQ + if (x == ENOTUNIQ) + {*r = Mono_Posix_Errno_ENOTUNIQ; return 0;} +#endif /* ndef ENOTUNIQ */ +#ifdef ENXIO + if (x == ENXIO) + {*r = Mono_Posix_Errno_ENXIO; return 0;} +#endif /* ndef ENXIO */ +#ifdef EOPNOTSUPP + if (x == EOPNOTSUPP) + {*r = Mono_Posix_Errno_EOPNOTSUPP; return 0;} +#endif /* ndef EOPNOTSUPP */ +#ifdef EOVERFLOW + if (x == EOVERFLOW) + {*r = Mono_Posix_Errno_EOVERFLOW; return 0;} +#endif /* ndef EOVERFLOW */ +#ifdef EPERM + if (x == EPERM) + {*r = Mono_Posix_Errno_EPERM; return 0;} +#endif /* ndef EPERM */ +#ifdef EPFNOSUPPORT + if (x == EPFNOSUPPORT) + {*r = Mono_Posix_Errno_EPFNOSUPPORT; return 0;} +#endif /* ndef EPFNOSUPPORT */ +#ifdef EPIPE + if (x == EPIPE) + {*r = Mono_Posix_Errno_EPIPE; return 0;} +#endif /* ndef EPIPE */ +#ifdef EPROTO + if (x == EPROTO) + {*r = Mono_Posix_Errno_EPROTO; return 0;} +#endif /* ndef EPROTO */ +#ifdef EPROTONOSUPPORT + if (x == EPROTONOSUPPORT) + {*r = Mono_Posix_Errno_EPROTONOSUPPORT; return 0;} +#endif /* ndef EPROTONOSUPPORT */ +#ifdef EPROTOTYPE + if (x == EPROTOTYPE) + {*r = Mono_Posix_Errno_EPROTOTYPE; return 0;} +#endif /* ndef EPROTOTYPE */ +#ifdef ERANGE + if (x == ERANGE) + {*r = Mono_Posix_Errno_ERANGE; return 0;} +#endif /* ndef ERANGE */ +#ifdef EREMCHG + if (x == EREMCHG) + {*r = Mono_Posix_Errno_EREMCHG; return 0;} +#endif /* ndef EREMCHG */ +#ifdef EREMOTE + if (x == EREMOTE) + {*r = Mono_Posix_Errno_EREMOTE; return 0;} +#endif /* ndef EREMOTE */ +#ifdef EREMOTEIO + if (x == EREMOTEIO) + {*r = Mono_Posix_Errno_EREMOTEIO; return 0;} +#endif /* ndef EREMOTEIO */ +#ifdef ERESTART + if (x == ERESTART) + {*r = Mono_Posix_Errno_ERESTART; return 0;} +#endif /* ndef ERESTART */ +#ifdef EROFS + if (x == EROFS) + {*r = Mono_Posix_Errno_EROFS; return 0;} +#endif /* ndef EROFS */ +#ifdef ESHUTDOWN + if (x == ESHUTDOWN) + {*r = Mono_Posix_Errno_ESHUTDOWN; return 0;} +#endif /* ndef ESHUTDOWN */ +#ifdef ESOCKTNOSUPPORT + if (x == ESOCKTNOSUPPORT) + {*r = Mono_Posix_Errno_ESOCKTNOSUPPORT; return 0;} +#endif /* ndef ESOCKTNOSUPPORT */ +#ifdef ESPIPE + if (x == ESPIPE) + {*r = Mono_Posix_Errno_ESPIPE; return 0;} +#endif /* ndef ESPIPE */ +#ifdef ESRCH + if (x == ESRCH) + {*r = Mono_Posix_Errno_ESRCH; return 0;} +#endif /* ndef ESRCH */ +#ifdef ESRMNT + if (x == ESRMNT) + {*r = Mono_Posix_Errno_ESRMNT; return 0;} +#endif /* ndef ESRMNT */ +#ifdef ESTALE + if (x == ESTALE) + {*r = Mono_Posix_Errno_ESTALE; return 0;} +#endif /* ndef ESTALE */ +#ifdef ESTRPIPE + if (x == ESTRPIPE) + {*r = Mono_Posix_Errno_ESTRPIPE; return 0;} +#endif /* ndef ESTRPIPE */ +#ifdef ETIME + if (x == ETIME) + {*r = Mono_Posix_Errno_ETIME; return 0;} +#endif /* ndef ETIME */ +#ifdef ETIMEDOUT + if (x == ETIMEDOUT) + {*r = Mono_Posix_Errno_ETIMEDOUT; return 0;} +#endif /* ndef ETIMEDOUT */ +#ifdef ETOOMANYREFS + if (x == ETOOMANYREFS) + {*r = Mono_Posix_Errno_ETOOMANYREFS; return 0;} +#endif /* ndef ETOOMANYREFS */ +#ifdef ETXTBSY + if (x == ETXTBSY) + {*r = Mono_Posix_Errno_ETXTBSY; return 0;} +#endif /* ndef ETXTBSY */ +#ifdef EUCLEAN + if (x == EUCLEAN) + {*r = Mono_Posix_Errno_EUCLEAN; return 0;} +#endif /* ndef EUCLEAN */ +#ifdef EUNATCH + if (x == EUNATCH) + {*r = Mono_Posix_Errno_EUNATCH; return 0;} +#endif /* ndef EUNATCH */ +#ifdef EUSERS + if (x == EUSERS) + {*r = Mono_Posix_Errno_EUSERS; return 0;} +#endif /* ndef EUSERS */ +#ifdef EWOULDBLOCK + if (x == EWOULDBLOCK) + {*r = Mono_Posix_Errno_EWOULDBLOCK; return 0;} +#endif /* ndef EWOULDBLOCK */ +#ifdef EXDEV + if (x == EXDEV) + {*r = Mono_Posix_Errno_EXDEV; return 0;} +#endif /* ndef EXDEV */ +#ifdef EXFULL + if (x == EXFULL) + {*r = Mono_Posix_Errno_EXFULL; return 0;} +#endif /* ndef EXFULL */ + errno = EINVAL; return -1; } int Mono_Posix_FromFcntlCommand (int x, int *r) @@ -2149,30 +3300,60 @@ int Mono_Posix_FromFcntlCommand (int x, int *r) #else /* def F_GETFD */ {errno = EINVAL; return -1;} #endif /* ndef F_GETFD */ - if (x == Mono_Posix_FcntlCommand_F_SETFD) -#ifdef F_SETFD - {*r = F_SETFD; return 0;} -#else /* def F_SETFD */ - {errno = EINVAL; return -1;} -#endif /* ndef F_SETFD */ if (x == Mono_Posix_FcntlCommand_F_GETFL) #ifdef F_GETFL {*r = F_GETFL; return 0;} #else /* def F_GETFL */ {errno = EINVAL; return -1;} #endif /* ndef F_GETFL */ - if (x == Mono_Posix_FcntlCommand_F_SETFL) -#ifdef F_SETFL - {*r = F_SETFL; return 0;} -#else /* def F_SETFL */ + if (x == Mono_Posix_FcntlCommand_F_GETLEASE) +#ifdef F_GETLEASE + {*r = F_GETLEASE; return 0;} +#else /* def F_GETLEASE */ {errno = EINVAL; return -1;} -#endif /* ndef F_SETFL */ +#endif /* ndef F_GETLEASE */ if (x == Mono_Posix_FcntlCommand_F_GETLK) #ifdef F_GETLK {*r = F_GETLK; return 0;} #else /* def F_GETLK */ {errno = EINVAL; return -1;} #endif /* ndef F_GETLK */ + if (x == Mono_Posix_FcntlCommand_F_GETOWN) +#ifdef F_GETOWN + {*r = F_GETOWN; return 0;} +#else /* def F_GETOWN */ + {errno = EINVAL; return -1;} +#endif /* ndef F_GETOWN */ + if (x == Mono_Posix_FcntlCommand_F_GETSIG) +#ifdef F_GETSIG + {*r = F_GETSIG; return 0;} +#else /* def F_GETSIG */ + {errno = EINVAL; return -1;} +#endif /* ndef F_GETSIG */ + if (x == Mono_Posix_FcntlCommand_F_NOTIFY) +#ifdef F_NOTIFY + {*r = F_NOTIFY; return 0;} +#else /* def F_NOTIFY */ + {errno = EINVAL; return -1;} +#endif /* ndef F_NOTIFY */ + if (x == Mono_Posix_FcntlCommand_F_SETFD) +#ifdef F_SETFD + {*r = F_SETFD; return 0;} +#else /* def F_SETFD */ + {errno = EINVAL; return -1;} +#endif /* ndef F_SETFD */ + if (x == Mono_Posix_FcntlCommand_F_SETFL) +#ifdef F_SETFL + {*r = F_SETFL; return 0;} +#else /* def F_SETFL */ + {errno = EINVAL; return -1;} +#endif /* ndef F_SETFL */ + if (x == Mono_Posix_FcntlCommand_F_SETLEASE) +#ifdef F_SETLEASE + {*r = F_SETLEASE; return 0;} +#else /* def F_SETLEASE */ + {errno = EINVAL; return -1;} +#endif /* ndef F_SETLEASE */ if (x == Mono_Posix_FcntlCommand_F_SETLK) #ifdef F_SETLK {*r = F_SETLK; return 0;} @@ -2191,42 +3372,12 @@ int Mono_Posix_FromFcntlCommand (int x, int *r) #else /* def F_SETOWN */ {errno = EINVAL; return -1;} #endif /* ndef F_SETOWN */ - if (x == Mono_Posix_FcntlCommand_F_GETOWN) -#ifdef F_GETOWN - {*r = F_GETOWN; return 0;} -#else /* def F_GETOWN */ - {errno = EINVAL; return -1;} -#endif /* ndef F_GETOWN */ if (x == Mono_Posix_FcntlCommand_F_SETSIG) #ifdef F_SETSIG {*r = F_SETSIG; return 0;} #else /* def F_SETSIG */ {errno = EINVAL; return -1;} #endif /* ndef F_SETSIG */ - if (x == Mono_Posix_FcntlCommand_F_GETSIG) -#ifdef F_GETSIG - {*r = F_GETSIG; return 0;} -#else /* def F_GETSIG */ - {errno = EINVAL; return -1;} -#endif /* ndef F_GETSIG */ - if (x == Mono_Posix_FcntlCommand_F_SETLEASE) -#ifdef F_SETLEASE - {*r = F_SETLEASE; return 0;} -#else /* def F_SETLEASE */ - {errno = EINVAL; return -1;} -#endif /* ndef F_SETLEASE */ - if (x == Mono_Posix_FcntlCommand_F_GETLEASE) -#ifdef F_GETLEASE - {*r = F_GETLEASE; return 0;} -#else /* def F_GETLEASE */ - {errno = EINVAL; return -1;} -#endif /* ndef F_GETLEASE */ - if (x == Mono_Posix_FcntlCommand_F_NOTIFY) -#ifdef F_NOTIFY - {*r = F_NOTIFY; return 0;} -#else /* def F_NOTIFY */ - {errno = EINVAL; return -1;} -#endif /* ndef F_NOTIFY */ errno = EINVAL; return -1; } @@ -2243,22 +3394,42 @@ int Mono_Posix_ToFcntlCommand (int x, int *r) if (x == F_GETFD) {*r = Mono_Posix_FcntlCommand_F_GETFD; return 0;} #endif /* ndef F_GETFD */ -#ifdef F_SETFD - if (x == F_SETFD) - {*r = Mono_Posix_FcntlCommand_F_SETFD; return 0;} -#endif /* ndef F_SETFD */ #ifdef F_GETFL if (x == F_GETFL) {*r = Mono_Posix_FcntlCommand_F_GETFL; return 0;} #endif /* ndef F_GETFL */ -#ifdef F_SETFL - if (x == F_SETFL) - {*r = Mono_Posix_FcntlCommand_F_SETFL; return 0;} -#endif /* ndef F_SETFL */ +#ifdef F_GETLEASE + if (x == F_GETLEASE) + {*r = Mono_Posix_FcntlCommand_F_GETLEASE; return 0;} +#endif /* ndef F_GETLEASE */ #ifdef F_GETLK if (x == F_GETLK) {*r = Mono_Posix_FcntlCommand_F_GETLK; return 0;} #endif /* ndef F_GETLK */ +#ifdef F_GETOWN + if (x == F_GETOWN) + {*r = Mono_Posix_FcntlCommand_F_GETOWN; return 0;} +#endif /* ndef F_GETOWN */ +#ifdef F_GETSIG + if (x == F_GETSIG) + {*r = Mono_Posix_FcntlCommand_F_GETSIG; return 0;} +#endif /* ndef F_GETSIG */ +#ifdef F_NOTIFY + if (x == F_NOTIFY) + {*r = Mono_Posix_FcntlCommand_F_NOTIFY; return 0;} +#endif /* ndef F_NOTIFY */ +#ifdef F_SETFD + if (x == F_SETFD) + {*r = Mono_Posix_FcntlCommand_F_SETFD; return 0;} +#endif /* ndef F_SETFD */ +#ifdef F_SETFL + if (x == F_SETFL) + {*r = Mono_Posix_FcntlCommand_F_SETFL; return 0;} +#endif /* ndef F_SETFL */ +#ifdef F_SETLEASE + if (x == F_SETLEASE) + {*r = Mono_Posix_FcntlCommand_F_SETLEASE; return 0;} +#endif /* ndef F_SETLEASE */ #ifdef F_SETLK if (x == F_SETLK) {*r = Mono_Posix_FcntlCommand_F_SETLK; return 0;} @@ -2271,33 +3442,289 @@ int Mono_Posix_ToFcntlCommand (int x, int *r) if (x == F_SETOWN) {*r = Mono_Posix_FcntlCommand_F_SETOWN; return 0;} #endif /* ndef F_SETOWN */ -#ifdef F_GETOWN - if (x == F_GETOWN) - {*r = Mono_Posix_FcntlCommand_F_GETOWN; return 0;} -#endif /* ndef F_GETOWN */ #ifdef F_SETSIG if (x == F_SETSIG) {*r = Mono_Posix_FcntlCommand_F_SETSIG; return 0;} #endif /* ndef F_SETSIG */ -#ifdef F_GETSIG - if (x == F_GETSIG) - {*r = Mono_Posix_FcntlCommand_F_GETSIG; return 0;} -#endif /* ndef F_GETSIG */ -#ifdef F_SETLEASE - if (x == F_SETLEASE) - {*r = Mono_Posix_FcntlCommand_F_SETLEASE; return 0;} -#endif /* ndef F_SETLEASE */ -#ifdef F_GETLEASE - if (x == F_GETLEASE) - {*r = Mono_Posix_FcntlCommand_F_GETLEASE; return 0;} -#endif /* ndef F_GETLEASE */ -#ifdef F_NOTIFY - if (x == F_NOTIFY) - {*r = Mono_Posix_FcntlCommand_F_NOTIFY; return 0;} -#endif /* ndef F_NOTIFY */ errno = EINVAL; return -1; } +int Mono_Posix_FromFilePermissions (unsigned int x, unsigned int *r) +{ + *r = 0; + if (x == 0) + return 0; + if ((x & Mono_Posix_FilePermissions_ACCESSPERMS) == Mono_Posix_FilePermissions_ACCESSPERMS) +#ifdef ACCESSPERMS + *r |= ACCESSPERMS; +#else /* def ACCESSPERMS */ + {errno = EINVAL; return -1;} +#endif /* ndef ACCESSPERMS */ + if ((x & Mono_Posix_FilePermissions_ALLPERMS) == Mono_Posix_FilePermissions_ALLPERMS) +#ifdef ALLPERMS + *r |= ALLPERMS; +#else /* def ALLPERMS */ + {errno = EINVAL; return -1;} +#endif /* ndef ALLPERMS */ + if ((x & Mono_Posix_FilePermissions_DEFFILEMODE) == Mono_Posix_FilePermissions_DEFFILEMODE) +#ifdef DEFFILEMODE + *r |= DEFFILEMODE; +#else /* def DEFFILEMODE */ + {errno = EINVAL; return -1;} +#endif /* ndef DEFFILEMODE */ + if ((x & Mono_Posix_FilePermissions_S_IFBLK) == Mono_Posix_FilePermissions_S_IFBLK) +#ifdef S_IFBLK + *r |= S_IFBLK; +#else /* def S_IFBLK */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IFBLK */ + if ((x & Mono_Posix_FilePermissions_S_IFCHR) == Mono_Posix_FilePermissions_S_IFCHR) +#ifdef S_IFCHR + *r |= S_IFCHR; +#else /* def S_IFCHR */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IFCHR */ + if ((x & Mono_Posix_FilePermissions_S_IFDIR) == Mono_Posix_FilePermissions_S_IFDIR) +#ifdef S_IFDIR + *r |= S_IFDIR; +#else /* def S_IFDIR */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IFDIR */ + if ((x & Mono_Posix_FilePermissions_S_IFIFO) == Mono_Posix_FilePermissions_S_IFIFO) +#ifdef S_IFIFO + *r |= S_IFIFO; +#else /* def S_IFIFO */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IFIFO */ + if ((x & Mono_Posix_FilePermissions_S_IFLNK) == Mono_Posix_FilePermissions_S_IFLNK) +#ifdef S_IFLNK + *r |= S_IFLNK; +#else /* def S_IFLNK */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IFLNK */ + if ((x & Mono_Posix_FilePermissions_S_IFMT) == Mono_Posix_FilePermissions_S_IFMT) +#ifdef S_IFMT + *r |= S_IFMT; +#else /* def S_IFMT */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IFMT */ + if ((x & Mono_Posix_FilePermissions_S_IFREG) == Mono_Posix_FilePermissions_S_IFREG) +#ifdef S_IFREG + *r |= S_IFREG; +#else /* def S_IFREG */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IFREG */ + if ((x & Mono_Posix_FilePermissions_S_IFSOCK) == Mono_Posix_FilePermissions_S_IFSOCK) +#ifdef S_IFSOCK + *r |= S_IFSOCK; +#else /* def S_IFSOCK */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IFSOCK */ + if ((x & Mono_Posix_FilePermissions_S_IRGRP) == Mono_Posix_FilePermissions_S_IRGRP) +#ifdef S_IRGRP + *r |= S_IRGRP; +#else /* def S_IRGRP */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IRGRP */ + if ((x & Mono_Posix_FilePermissions_S_IROTH) == Mono_Posix_FilePermissions_S_IROTH) +#ifdef S_IROTH + *r |= S_IROTH; +#else /* def S_IROTH */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IROTH */ + if ((x & Mono_Posix_FilePermissions_S_IRUSR) == Mono_Posix_FilePermissions_S_IRUSR) +#ifdef S_IRUSR + *r |= S_IRUSR; +#else /* def S_IRUSR */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IRUSR */ + if ((x & Mono_Posix_FilePermissions_S_IRWXG) == Mono_Posix_FilePermissions_S_IRWXG) +#ifdef S_IRWXG + *r |= S_IRWXG; +#else /* def S_IRWXG */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IRWXG */ + if ((x & Mono_Posix_FilePermissions_S_IRWXO) == Mono_Posix_FilePermissions_S_IRWXO) +#ifdef S_IRWXO + *r |= S_IRWXO; +#else /* def S_IRWXO */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IRWXO */ + if ((x & Mono_Posix_FilePermissions_S_IRWXU) == Mono_Posix_FilePermissions_S_IRWXU) +#ifdef S_IRWXU + *r |= S_IRWXU; +#else /* def S_IRWXU */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IRWXU */ + if ((x & Mono_Posix_FilePermissions_S_ISGID) == Mono_Posix_FilePermissions_S_ISGID) +#ifdef S_ISGID + *r |= S_ISGID; +#else /* def S_ISGID */ + {errno = EINVAL; return -1;} +#endif /* ndef S_ISGID */ + if ((x & Mono_Posix_FilePermissions_S_ISUID) == Mono_Posix_FilePermissions_S_ISUID) +#ifdef S_ISUID + *r |= S_ISUID; +#else /* def S_ISUID */ + {errno = EINVAL; return -1;} +#endif /* ndef S_ISUID */ + if ((x & Mono_Posix_FilePermissions_S_ISVTX) == Mono_Posix_FilePermissions_S_ISVTX) +#ifdef S_ISVTX + *r |= S_ISVTX; +#else /* def S_ISVTX */ + {errno = EINVAL; return -1;} +#endif /* ndef S_ISVTX */ + if ((x & Mono_Posix_FilePermissions_S_IWGRP) == Mono_Posix_FilePermissions_S_IWGRP) +#ifdef S_IWGRP + *r |= S_IWGRP; +#else /* def S_IWGRP */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IWGRP */ + if ((x & Mono_Posix_FilePermissions_S_IWOTH) == Mono_Posix_FilePermissions_S_IWOTH) +#ifdef S_IWOTH + *r |= S_IWOTH; +#else /* def S_IWOTH */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IWOTH */ + if ((x & Mono_Posix_FilePermissions_S_IWUSR) == Mono_Posix_FilePermissions_S_IWUSR) +#ifdef S_IWUSR + *r |= S_IWUSR; +#else /* def S_IWUSR */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IWUSR */ + if ((x & Mono_Posix_FilePermissions_S_IXGRP) == Mono_Posix_FilePermissions_S_IXGRP) +#ifdef S_IXGRP + *r |= S_IXGRP; +#else /* def S_IXGRP */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IXGRP */ + if ((x & Mono_Posix_FilePermissions_S_IXOTH) == Mono_Posix_FilePermissions_S_IXOTH) +#ifdef S_IXOTH + *r |= S_IXOTH; +#else /* def S_IXOTH */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IXOTH */ + if ((x & Mono_Posix_FilePermissions_S_IXUSR) == Mono_Posix_FilePermissions_S_IXUSR) +#ifdef S_IXUSR + *r |= S_IXUSR; +#else /* def S_IXUSR */ + {errno = EINVAL; return -1;} +#endif /* ndef S_IXUSR */ + return 0; +} + +int Mono_Posix_ToFilePermissions (unsigned int x, unsigned int *r) +{ + *r = 0; + if (x == 0) + return 0; +#ifdef ACCESSPERMS + if ((x & ACCESSPERMS) == ACCESSPERMS) + *r |= Mono_Posix_FilePermissions_ACCESSPERMS; +#endif /* ndef ACCESSPERMS */ +#ifdef ALLPERMS + if ((x & ALLPERMS) == ALLPERMS) + *r |= Mono_Posix_FilePermissions_ALLPERMS; +#endif /* ndef ALLPERMS */ +#ifdef DEFFILEMODE + if ((x & DEFFILEMODE) == DEFFILEMODE) + *r |= Mono_Posix_FilePermissions_DEFFILEMODE; +#endif /* ndef DEFFILEMODE */ +#ifdef S_IFBLK + if ((x & S_IFBLK) == S_IFBLK) + *r |= Mono_Posix_FilePermissions_S_IFBLK; +#endif /* ndef S_IFBLK */ +#ifdef S_IFCHR + if ((x & S_IFCHR) == S_IFCHR) + *r |= Mono_Posix_FilePermissions_S_IFCHR; +#endif /* ndef S_IFCHR */ +#ifdef S_IFDIR + if ((x & S_IFDIR) == S_IFDIR) + *r |= Mono_Posix_FilePermissions_S_IFDIR; +#endif /* ndef S_IFDIR */ +#ifdef S_IFIFO + if ((x & S_IFIFO) == S_IFIFO) + *r |= Mono_Posix_FilePermissions_S_IFIFO; +#endif /* ndef S_IFIFO */ +#ifdef S_IFLNK + if ((x & S_IFLNK) == S_IFLNK) + *r |= Mono_Posix_FilePermissions_S_IFLNK; +#endif /* ndef S_IFLNK */ +#ifdef S_IFMT + if ((x & S_IFMT) == S_IFMT) + *r |= Mono_Posix_FilePermissions_S_IFMT; +#endif /* ndef S_IFMT */ +#ifdef S_IFREG + if ((x & S_IFREG) == S_IFREG) + *r |= Mono_Posix_FilePermissions_S_IFREG; +#endif /* ndef S_IFREG */ +#ifdef S_IFSOCK + if ((x & S_IFSOCK) == S_IFSOCK) + *r |= Mono_Posix_FilePermissions_S_IFSOCK; +#endif /* ndef S_IFSOCK */ +#ifdef S_IRGRP + if ((x & S_IRGRP) == S_IRGRP) + *r |= Mono_Posix_FilePermissions_S_IRGRP; +#endif /* ndef S_IRGRP */ +#ifdef S_IROTH + if ((x & S_IROTH) == S_IROTH) + *r |= Mono_Posix_FilePermissions_S_IROTH; +#endif /* ndef S_IROTH */ +#ifdef S_IRUSR + if ((x & S_IRUSR) == S_IRUSR) + *r |= Mono_Posix_FilePermissions_S_IRUSR; +#endif /* ndef S_IRUSR */ +#ifdef S_IRWXG + if ((x & S_IRWXG) == S_IRWXG) + *r |= Mono_Posix_FilePermissions_S_IRWXG; +#endif /* ndef S_IRWXG */ +#ifdef S_IRWXO + if ((x & S_IRWXO) == S_IRWXO) + *r |= Mono_Posix_FilePermissions_S_IRWXO; +#endif /* ndef S_IRWXO */ +#ifdef S_IRWXU + if ((x & S_IRWXU) == S_IRWXU) + *r |= Mono_Posix_FilePermissions_S_IRWXU; +#endif /* ndef S_IRWXU */ +#ifdef S_ISGID + if ((x & S_ISGID) == S_ISGID) + *r |= Mono_Posix_FilePermissions_S_ISGID; +#endif /* ndef S_ISGID */ +#ifdef S_ISUID + if ((x & S_ISUID) == S_ISUID) + *r |= Mono_Posix_FilePermissions_S_ISUID; +#endif /* ndef S_ISUID */ +#ifdef S_ISVTX + if ((x & S_ISVTX) == S_ISVTX) + *r |= Mono_Posix_FilePermissions_S_ISVTX; +#endif /* ndef S_ISVTX */ +#ifdef S_IWGRP + if ((x & S_IWGRP) == S_IWGRP) + *r |= Mono_Posix_FilePermissions_S_IWGRP; +#endif /* ndef S_IWGRP */ +#ifdef S_IWOTH + if ((x & S_IWOTH) == S_IWOTH) + *r |= Mono_Posix_FilePermissions_S_IWOTH; +#endif /* ndef S_IWOTH */ +#ifdef S_IWUSR + if ((x & S_IWUSR) == S_IWUSR) + *r |= Mono_Posix_FilePermissions_S_IWUSR; +#endif /* ndef S_IWUSR */ +#ifdef S_IXGRP + if ((x & S_IXGRP) == S_IXGRP) + *r |= Mono_Posix_FilePermissions_S_IXGRP; +#endif /* ndef S_IXGRP */ +#ifdef S_IXOTH + if ((x & S_IXOTH) == S_IXOTH) + *r |= Mono_Posix_FilePermissions_S_IXOTH; +#endif /* ndef S_IXOTH */ +#ifdef S_IXUSR + if ((x & S_IXUSR) == S_IXUSR) + *r |= Mono_Posix_FilePermissions_S_IXUSR; +#endif /* ndef S_IXUSR */ + return 0; +} + int Mono_Posix_FromLockType (short x, short *r) { *r = 0; @@ -2309,18 +3736,18 @@ int Mono_Posix_FromLockType (short x, short *r) #else /* def F_RDLCK */ {errno = EINVAL; return -1;} #endif /* ndef F_RDLCK */ - if (x == Mono_Posix_LockType_F_WRLCK) -#ifdef F_WRLCK - {*r = F_WRLCK; return 0;} -#else /* def F_WRLCK */ - {errno = EINVAL; return -1;} -#endif /* ndef F_WRLCK */ if (x == Mono_Posix_LockType_F_UNLCK) #ifdef F_UNLCK {*r = F_UNLCK; return 0;} #else /* def F_UNLCK */ {errno = EINVAL; return -1;} #endif /* ndef F_UNLCK */ + if (x == Mono_Posix_LockType_F_WRLCK) +#ifdef F_WRLCK + {*r = F_WRLCK; return 0;} +#else /* def F_WRLCK */ + {errno = EINVAL; return -1;} +#endif /* ndef F_WRLCK */ errno = EINVAL; return -1; } @@ -2333,176 +3760,1034 @@ int Mono_Posix_ToLockType (short x, short *r) if (x == F_RDLCK) {*r = Mono_Posix_LockType_F_RDLCK; return 0;} #endif /* ndef F_RDLCK */ -#ifdef F_WRLCK - if (x == F_WRLCK) - {*r = Mono_Posix_LockType_F_WRLCK; return 0;} -#endif /* ndef F_WRLCK */ #ifdef F_UNLCK if (x == F_UNLCK) {*r = Mono_Posix_LockType_F_UNLCK; return 0;} #endif /* ndef F_UNLCK */ +#ifdef F_WRLCK + if (x == F_WRLCK) + {*r = Mono_Posix_LockType_F_WRLCK; return 0;} +#endif /* ndef F_WRLCK */ errno = EINVAL; return -1; } -int Mono_Posix_FromSeekFlags (short x, short *r) +int Mono_Posix_FromLockfCommand (int x, int *r) { *r = 0; if (x == 0) return 0; - if (x == Mono_Posix_SeekFlags_SEEK_SET) -#ifdef SEEK_SET - {*r = SEEK_SET; return 0;} -#else /* def SEEK_SET */ + if (x == Mono_Posix_LockfCommand_F_LOCK) +#ifdef F_LOCK + {*r = F_LOCK; return 0;} +#else /* def F_LOCK */ {errno = EINVAL; return -1;} -#endif /* ndef SEEK_SET */ - if (x == Mono_Posix_SeekFlags_SEEK_CUR) -#ifdef SEEK_CUR - {*r = SEEK_CUR; return 0;} -#else /* def SEEK_CUR */ +#endif /* ndef F_LOCK */ + if (x == Mono_Posix_LockfCommand_F_TEST) +#ifdef F_TEST + {*r = F_TEST; return 0;} +#else /* def F_TEST */ {errno = EINVAL; return -1;} -#endif /* ndef SEEK_CUR */ - if (x == Mono_Posix_SeekFlags_SEEK_END) -#ifdef SEEK_END - {*r = SEEK_END; return 0;} -#else /* def SEEK_END */ +#endif /* ndef F_TEST */ + if (x == Mono_Posix_LockfCommand_F_TLOCK) +#ifdef F_TLOCK + {*r = F_TLOCK; return 0;} +#else /* def F_TLOCK */ {errno = EINVAL; return -1;} -#endif /* ndef SEEK_END */ - if (x == Mono_Posix_SeekFlags_L_SET) -#ifdef L_SET - {*r = L_SET; return 0;} -#else /* def L_SET */ +#endif /* ndef F_TLOCK */ + if (x == Mono_Posix_LockfCommand_F_ULOCK) +#ifdef F_ULOCK + {*r = F_ULOCK; return 0;} +#else /* def F_ULOCK */ {errno = EINVAL; return -1;} -#endif /* ndef L_SET */ - if (x == Mono_Posix_SeekFlags_L_INCR) -#ifdef L_INCR - {*r = L_INCR; return 0;} -#else /* def L_INCR */ +#endif /* ndef F_ULOCK */ + errno = EINVAL; return -1; +} + +int Mono_Posix_ToLockfCommand (int x, int *r) +{ + *r = 0; + if (x == 0) + return 0; +#ifdef F_LOCK + if (x == F_LOCK) + {*r = Mono_Posix_LockfCommand_F_LOCK; return 0;} +#endif /* ndef F_LOCK */ +#ifdef F_TEST + if (x == F_TEST) + {*r = Mono_Posix_LockfCommand_F_TEST; return 0;} +#endif /* ndef F_TEST */ +#ifdef F_TLOCK + if (x == F_TLOCK) + {*r = Mono_Posix_LockfCommand_F_TLOCK; return 0;} +#endif /* ndef F_TLOCK */ +#ifdef F_ULOCK + if (x == F_ULOCK) + {*r = Mono_Posix_LockfCommand_F_ULOCK; return 0;} +#endif /* ndef F_ULOCK */ + errno = EINVAL; return -1; +} + +int Mono_Posix_FromMlockallFlags (int x, int *r) +{ + *r = 0; + if (x == 0) + return 0; + if ((x & Mono_Posix_MlockallFlags_MCL_CURRENT) == Mono_Posix_MlockallFlags_MCL_CURRENT) +#ifdef MCL_CURRENT + *r |= MCL_CURRENT; +#else /* def MCL_CURRENT */ {errno = EINVAL; return -1;} -#endif /* ndef L_INCR */ - if (x == Mono_Posix_SeekFlags_L_XTND) -#ifdef L_XTND - {*r = L_XTND; return 0;} -#else /* def L_XTND */ +#endif /* ndef MCL_CURRENT */ + if ((x & Mono_Posix_MlockallFlags_MCL_FUTURE) == Mono_Posix_MlockallFlags_MCL_FUTURE) +#ifdef MCL_FUTURE + *r |= MCL_FUTURE; +#else /* def MCL_FUTURE */ {errno = EINVAL; return -1;} -#endif /* ndef L_XTND */ +#endif /* ndef MCL_FUTURE */ + return 0; +} + +int Mono_Posix_ToMlockallFlags (int x, int *r) +{ + *r = 0; + if (x == 0) + return 0; +#ifdef MCL_CURRENT + if ((x & MCL_CURRENT) == MCL_CURRENT) + *r |= Mono_Posix_MlockallFlags_MCL_CURRENT; +#endif /* ndef MCL_CURRENT */ +#ifdef MCL_FUTURE + if ((x & MCL_FUTURE) == MCL_FUTURE) + *r |= Mono_Posix_MlockallFlags_MCL_FUTURE; +#endif /* ndef MCL_FUTURE */ + return 0; +} + +int Mono_Posix_FromMmapFlags (int x, int *r) +{ + *r = 0; + if (x == 0) + return 0; + if ((x & Mono_Posix_MmapFlags_MAP_ANON) == Mono_Posix_MmapFlags_MAP_ANON) +#ifdef MAP_ANON + *r |= MAP_ANON; +#else /* def MAP_ANON */ + {errno = EINVAL; return -1;} +#endif /* ndef MAP_ANON */ + if ((x & Mono_Posix_MmapFlags_MAP_ANONYMOUS) == Mono_Posix_MmapFlags_MAP_ANONYMOUS) +#ifdef MAP_ANONYMOUS + *r |= MAP_ANONYMOUS; +#else /* def MAP_ANONYMOUS */ + {errno = EINVAL; return -1;} +#endif /* ndef MAP_ANONYMOUS */ + if ((x & Mono_Posix_MmapFlags_MAP_DENYWRITE) == Mono_Posix_MmapFlags_MAP_DENYWRITE) +#ifdef MAP_DENYWRITE + *r |= MAP_DENYWRITE; +#else /* def MAP_DENYWRITE */ + {errno = EINVAL; return -1;} +#endif /* ndef MAP_DENYWRITE */ + if ((x & Mono_Posix_MmapFlags_MAP_EXECUTABLE) == Mono_Posix_MmapFlags_MAP_EXECUTABLE) +#ifdef MAP_EXECUTABLE + *r |= MAP_EXECUTABLE; +#else /* def MAP_EXECUTABLE */ + {errno = EINVAL; return -1;} +#endif /* ndef MAP_EXECUTABLE */ + if ((x & Mono_Posix_MmapFlags_MAP_FILE) == Mono_Posix_MmapFlags_MAP_FILE) +#ifdef MAP_FILE + *r |= MAP_FILE; +#else /* def MAP_FILE */ + {errno = EINVAL; return -1;} +#endif /* ndef MAP_FILE */ + if ((x & Mono_Posix_MmapFlags_MAP_FIXED) == Mono_Posix_MmapFlags_MAP_FIXED) +#ifdef MAP_FIXED + *r |= MAP_FIXED; +#else /* def MAP_FIXED */ + {errno = EINVAL; return -1;} +#endif /* ndef MAP_FIXED */ + if ((x & Mono_Posix_MmapFlags_MAP_GROWSDOWN) == Mono_Posix_MmapFlags_MAP_GROWSDOWN) +#ifdef MAP_GROWSDOWN + *r |= MAP_GROWSDOWN; +#else /* def MAP_GROWSDOWN */ + {errno = EINVAL; return -1;} +#endif /* ndef MAP_GROWSDOWN */ + if ((x & Mono_Posix_MmapFlags_MAP_LOCKED) == Mono_Posix_MmapFlags_MAP_LOCKED) +#ifdef MAP_LOCKED + *r |= MAP_LOCKED; +#else /* def MAP_LOCKED */ + {errno = EINVAL; return -1;} +#endif /* ndef MAP_LOCKED */ + if ((x & Mono_Posix_MmapFlags_MAP_NONBLOCK) == Mono_Posix_MmapFlags_MAP_NONBLOCK) +#ifdef MAP_NONBLOCK + *r |= MAP_NONBLOCK; +#else /* def MAP_NONBLOCK */ + {errno = EINVAL; return -1;} +#endif /* ndef MAP_NONBLOCK */ + if ((x & Mono_Posix_MmapFlags_MAP_NORESERVE) == Mono_Posix_MmapFlags_MAP_NORESERVE) +#ifdef MAP_NORESERVE + *r |= MAP_NORESERVE; +#else /* def MAP_NORESERVE */ + {errno = EINVAL; return -1;} +#endif /* ndef MAP_NORESERVE */ + if ((x & Mono_Posix_MmapFlags_MAP_POPULATE) == Mono_Posix_MmapFlags_MAP_POPULATE) +#ifdef MAP_POPULATE + *r |= MAP_POPULATE; +#else /* def MAP_POPULATE */ + {errno = EINVAL; return -1;} +#endif /* ndef MAP_POPULATE */ + if ((x & Mono_Posix_MmapFlags_MAP_PRIVATE) == Mono_Posix_MmapFlags_MAP_PRIVATE) +#ifdef MAP_PRIVATE + *r |= MAP_PRIVATE; +#else /* def MAP_PRIVATE */ + {errno = EINVAL; return -1;} +#endif /* ndef MAP_PRIVATE */ + if ((x & Mono_Posix_MmapFlags_MAP_SHARED) == Mono_Posix_MmapFlags_MAP_SHARED) +#ifdef MAP_SHARED + *r |= MAP_SHARED; +#else /* def MAP_SHARED */ + {errno = EINVAL; return -1;} +#endif /* ndef MAP_SHARED */ + if ((x & Mono_Posix_MmapFlags_MAP_TYPE) == Mono_Posix_MmapFlags_MAP_TYPE) +#ifdef MAP_TYPE + *r |= MAP_TYPE; +#else /* def MAP_TYPE */ + {errno = EINVAL; return -1;} +#endif /* ndef MAP_TYPE */ + return 0; +} + +int Mono_Posix_ToMmapFlags (int x, int *r) +{ + *r = 0; + if (x == 0) + return 0; +#ifdef MAP_ANON + if ((x & MAP_ANON) == MAP_ANON) + *r |= Mono_Posix_MmapFlags_MAP_ANON; +#endif /* ndef MAP_ANON */ +#ifdef MAP_ANONYMOUS + if ((x & MAP_ANONYMOUS) == MAP_ANONYMOUS) + *r |= Mono_Posix_MmapFlags_MAP_ANONYMOUS; +#endif /* ndef MAP_ANONYMOUS */ +#ifdef MAP_DENYWRITE + if ((x & MAP_DENYWRITE) == MAP_DENYWRITE) + *r |= Mono_Posix_MmapFlags_MAP_DENYWRITE; +#endif /* ndef MAP_DENYWRITE */ +#ifdef MAP_EXECUTABLE + if ((x & MAP_EXECUTABLE) == MAP_EXECUTABLE) + *r |= Mono_Posix_MmapFlags_MAP_EXECUTABLE; +#endif /* ndef MAP_EXECUTABLE */ +#ifdef MAP_FILE + if ((x & MAP_FILE) == MAP_FILE) + *r |= Mono_Posix_MmapFlags_MAP_FILE; +#endif /* ndef MAP_FILE */ +#ifdef MAP_FIXED + if ((x & MAP_FIXED) == MAP_FIXED) + *r |= Mono_Posix_MmapFlags_MAP_FIXED; +#endif /* ndef MAP_FIXED */ +#ifdef MAP_GROWSDOWN + if ((x & MAP_GROWSDOWN) == MAP_GROWSDOWN) + *r |= Mono_Posix_MmapFlags_MAP_GROWSDOWN; +#endif /* ndef MAP_GROWSDOWN */ +#ifdef MAP_LOCKED + if ((x & MAP_LOCKED) == MAP_LOCKED) + *r |= Mono_Posix_MmapFlags_MAP_LOCKED; +#endif /* ndef MAP_LOCKED */ +#ifdef MAP_NONBLOCK + if ((x & MAP_NONBLOCK) == MAP_NONBLOCK) + *r |= Mono_Posix_MmapFlags_MAP_NONBLOCK; +#endif /* ndef MAP_NONBLOCK */ +#ifdef MAP_NORESERVE + if ((x & MAP_NORESERVE) == MAP_NORESERVE) + *r |= Mono_Posix_MmapFlags_MAP_NORESERVE; +#endif /* ndef MAP_NORESERVE */ +#ifdef MAP_POPULATE + if ((x & MAP_POPULATE) == MAP_POPULATE) + *r |= Mono_Posix_MmapFlags_MAP_POPULATE; +#endif /* ndef MAP_POPULATE */ +#ifdef MAP_PRIVATE + if ((x & MAP_PRIVATE) == MAP_PRIVATE) + *r |= Mono_Posix_MmapFlags_MAP_PRIVATE; +#endif /* ndef MAP_PRIVATE */ +#ifdef MAP_SHARED + if ((x & MAP_SHARED) == MAP_SHARED) + *r |= Mono_Posix_MmapFlags_MAP_SHARED; +#endif /* ndef MAP_SHARED */ +#ifdef MAP_TYPE + if ((x & MAP_TYPE) == MAP_TYPE) + *r |= Mono_Posix_MmapFlags_MAP_TYPE; +#endif /* ndef MAP_TYPE */ + return 0; +} + +int Mono_Posix_FromMmapProts (int x, int *r) +{ + *r = 0; + if (x == 0) + return 0; + if ((x & Mono_Posix_MmapProts_PROT_EXEC) == Mono_Posix_MmapProts_PROT_EXEC) +#ifdef PROT_EXEC + *r |= PROT_EXEC; +#else /* def PROT_EXEC */ + {errno = EINVAL; return -1;} +#endif /* ndef PROT_EXEC */ + if ((x & Mono_Posix_MmapProts_PROT_GROWSDOWN) == Mono_Posix_MmapProts_PROT_GROWSDOWN) +#ifdef PROT_GROWSDOWN + *r |= PROT_GROWSDOWN; +#else /* def PROT_GROWSDOWN */ + {errno = EINVAL; return -1;} +#endif /* ndef PROT_GROWSDOWN */ + if ((x & Mono_Posix_MmapProts_PROT_GROWSUP) == Mono_Posix_MmapProts_PROT_GROWSUP) +#ifdef PROT_GROWSUP + *r |= PROT_GROWSUP; +#else /* def PROT_GROWSUP */ + {errno = EINVAL; return -1;} +#endif /* ndef PROT_GROWSUP */ + if ((x & Mono_Posix_MmapProts_PROT_NONE) == Mono_Posix_MmapProts_PROT_NONE) +#ifdef PROT_NONE + *r |= PROT_NONE; +#else /* def PROT_NONE */ + {errno = EINVAL; return -1;} +#endif /* ndef PROT_NONE */ + if ((x & Mono_Posix_MmapProts_PROT_READ) == Mono_Posix_MmapProts_PROT_READ) +#ifdef PROT_READ + *r |= PROT_READ; +#else /* def PROT_READ */ + {errno = EINVAL; return -1;} +#endif /* ndef PROT_READ */ + if ((x & Mono_Posix_MmapProts_PROT_WRITE) == Mono_Posix_MmapProts_PROT_WRITE) +#ifdef PROT_WRITE + *r |= PROT_WRITE; +#else /* def PROT_WRITE */ + {errno = EINVAL; return -1;} +#endif /* ndef PROT_WRITE */ + return 0; +} + +int Mono_Posix_ToMmapProts (int x, int *r) +{ + *r = 0; + if (x == 0) + return 0; +#ifdef PROT_EXEC + if ((x & PROT_EXEC) == PROT_EXEC) + *r |= Mono_Posix_MmapProts_PROT_EXEC; +#endif /* ndef PROT_EXEC */ +#ifdef PROT_GROWSDOWN + if ((x & PROT_GROWSDOWN) == PROT_GROWSDOWN) + *r |= Mono_Posix_MmapProts_PROT_GROWSDOWN; +#endif /* ndef PROT_GROWSDOWN */ +#ifdef PROT_GROWSUP + if ((x & PROT_GROWSUP) == PROT_GROWSUP) + *r |= Mono_Posix_MmapProts_PROT_GROWSUP; +#endif /* ndef PROT_GROWSUP */ +#ifdef PROT_NONE + if ((x & PROT_NONE) == PROT_NONE) + *r |= Mono_Posix_MmapProts_PROT_NONE; +#endif /* ndef PROT_NONE */ +#ifdef PROT_READ + if ((x & PROT_READ) == PROT_READ) + *r |= Mono_Posix_MmapProts_PROT_READ; +#endif /* ndef PROT_READ */ +#ifdef PROT_WRITE + if ((x & PROT_WRITE) == PROT_WRITE) + *r |= Mono_Posix_MmapProts_PROT_WRITE; +#endif /* ndef PROT_WRITE */ + return 0; +} + +int Mono_Posix_FromMountFlags (guint64 x, guint64 *r) +{ + *r = 0; + if (x == 0) + return 0; + if ((x & Mono_Posix_MountFlags_ST_APPEND) == Mono_Posix_MountFlags_ST_APPEND) +#ifdef ST_APPEND + *r |= ST_APPEND; +#else /* def ST_APPEND */ + {errno = EINVAL; return -1;} +#endif /* ndef ST_APPEND */ + if ((x & Mono_Posix_MountFlags_ST_IMMUTABLE) == Mono_Posix_MountFlags_ST_IMMUTABLE) +#ifdef ST_IMMUTABLE + *r |= ST_IMMUTABLE; +#else /* def ST_IMMUTABLE */ + {errno = EINVAL; return -1;} +#endif /* ndef ST_IMMUTABLE */ + if ((x & Mono_Posix_MountFlags_ST_MANDLOCK) == Mono_Posix_MountFlags_ST_MANDLOCK) +#ifdef ST_MANDLOCK + *r |= ST_MANDLOCK; +#else /* def ST_MANDLOCK */ + {errno = EINVAL; return -1;} +#endif /* ndef ST_MANDLOCK */ + if ((x & Mono_Posix_MountFlags_ST_NOATIME) == Mono_Posix_MountFlags_ST_NOATIME) +#ifdef ST_NOATIME + *r |= ST_NOATIME; +#else /* def ST_NOATIME */ + {errno = EINVAL; return -1;} +#endif /* ndef ST_NOATIME */ + if ((x & Mono_Posix_MountFlags_ST_NODEV) == Mono_Posix_MountFlags_ST_NODEV) +#ifdef ST_NODEV + *r |= ST_NODEV; +#else /* def ST_NODEV */ + {errno = EINVAL; return -1;} +#endif /* ndef ST_NODEV */ + if ((x & Mono_Posix_MountFlags_ST_NODIRATIME) == Mono_Posix_MountFlags_ST_NODIRATIME) +#ifdef ST_NODIRATIME + *r |= ST_NODIRATIME; +#else /* def ST_NODIRATIME */ + {errno = EINVAL; return -1;} +#endif /* ndef ST_NODIRATIME */ + if ((x & Mono_Posix_MountFlags_ST_NOSUID) == Mono_Posix_MountFlags_ST_NOSUID) +#ifdef ST_NOSUID + *r |= ST_NOSUID; +#else /* def ST_NOSUID */ + {errno = EINVAL; return -1;} +#endif /* ndef ST_NOSUID */ + if ((x & Mono_Posix_MountFlags_ST_RDONLY) == Mono_Posix_MountFlags_ST_RDONLY) +#ifdef ST_RDONLY + *r |= ST_RDONLY; +#else /* def ST_RDONLY */ + {errno = EINVAL; return -1;} +#endif /* ndef ST_RDONLY */ + if ((x & Mono_Posix_MountFlags_ST_SYNCHRONOUS) == Mono_Posix_MountFlags_ST_SYNCHRONOUS) +#ifdef ST_SYNCHRONOUS + *r |= ST_SYNCHRONOUS; +#else /* def ST_SYNCHRONOUS */ + {errno = EINVAL; return -1;} +#endif /* ndef ST_SYNCHRONOUS */ + if ((x & Mono_Posix_MountFlags_ST_WRITE) == Mono_Posix_MountFlags_ST_WRITE) +#ifdef ST_WRITE + *r |= ST_WRITE; +#else /* def ST_WRITE */ + {errno = EINVAL; return -1;} +#endif /* ndef ST_WRITE */ + return 0; +} + +int Mono_Posix_ToMountFlags (guint64 x, guint64 *r) +{ + *r = 0; + if (x == 0) + return 0; +#ifdef ST_APPEND + if ((x & ST_APPEND) == ST_APPEND) + *r |= Mono_Posix_MountFlags_ST_APPEND; +#endif /* ndef ST_APPEND */ +#ifdef ST_IMMUTABLE + if ((x & ST_IMMUTABLE) == ST_IMMUTABLE) + *r |= Mono_Posix_MountFlags_ST_IMMUTABLE; +#endif /* ndef ST_IMMUTABLE */ +#ifdef ST_MANDLOCK + if ((x & ST_MANDLOCK) == ST_MANDLOCK) + *r |= Mono_Posix_MountFlags_ST_MANDLOCK; +#endif /* ndef ST_MANDLOCK */ +#ifdef ST_NOATIME + if ((x & ST_NOATIME) == ST_NOATIME) + *r |= Mono_Posix_MountFlags_ST_NOATIME; +#endif /* ndef ST_NOATIME */ +#ifdef ST_NODEV + if ((x & ST_NODEV) == ST_NODEV) + *r |= Mono_Posix_MountFlags_ST_NODEV; +#endif /* ndef ST_NODEV */ +#ifdef ST_NODIRATIME + if ((x & ST_NODIRATIME) == ST_NODIRATIME) + *r |= Mono_Posix_MountFlags_ST_NODIRATIME; +#endif /* ndef ST_NODIRATIME */ +#ifdef ST_NOSUID + if ((x & ST_NOSUID) == ST_NOSUID) + *r |= Mono_Posix_MountFlags_ST_NOSUID; +#endif /* ndef ST_NOSUID */ +#ifdef ST_RDONLY + if ((x & ST_RDONLY) == ST_RDONLY) + *r |= Mono_Posix_MountFlags_ST_RDONLY; +#endif /* ndef ST_RDONLY */ +#ifdef ST_SYNCHRONOUS + if ((x & ST_SYNCHRONOUS) == ST_SYNCHRONOUS) + *r |= Mono_Posix_MountFlags_ST_SYNCHRONOUS; +#endif /* ndef ST_SYNCHRONOUS */ +#ifdef ST_WRITE + if ((x & ST_WRITE) == ST_WRITE) + *r |= Mono_Posix_MountFlags_ST_WRITE; +#endif /* ndef ST_WRITE */ + return 0; +} + +int Mono_Posix_FromMremapFlags (guint64 x, guint64 *r) +{ + *r = 0; + if (x == 0) + return 0; + if ((x & Mono_Posix_MremapFlags_MREMAP_MAYMOVE) == Mono_Posix_MremapFlags_MREMAP_MAYMOVE) +#ifdef MREMAP_MAYMOVE + *r |= MREMAP_MAYMOVE; +#else /* def MREMAP_MAYMOVE */ + {errno = EINVAL; return -1;} +#endif /* ndef MREMAP_MAYMOVE */ + return 0; +} + +int Mono_Posix_ToMremapFlags (guint64 x, guint64 *r) +{ + *r = 0; + if (x == 0) + return 0; +#ifdef MREMAP_MAYMOVE + if ((x & MREMAP_MAYMOVE) == MREMAP_MAYMOVE) + *r |= Mono_Posix_MremapFlags_MREMAP_MAYMOVE; +#endif /* ndef MREMAP_MAYMOVE */ + return 0; +} + +int Mono_Posix_FromMsyncFlags (int x, int *r) +{ + *r = 0; + if (x == 0) + return 0; + if ((x & Mono_Posix_MsyncFlags_MS_ASYNC) == Mono_Posix_MsyncFlags_MS_ASYNC) +#ifdef MS_ASYNC + *r |= MS_ASYNC; +#else /* def MS_ASYNC */ + {errno = EINVAL; return -1;} +#endif /* ndef MS_ASYNC */ + if ((x & Mono_Posix_MsyncFlags_MS_INVALIDATE) == Mono_Posix_MsyncFlags_MS_INVALIDATE) +#ifdef MS_INVALIDATE + *r |= MS_INVALIDATE; +#else /* def MS_INVALIDATE */ + {errno = EINVAL; return -1;} +#endif /* ndef MS_INVALIDATE */ + if ((x & Mono_Posix_MsyncFlags_MS_SYNC) == Mono_Posix_MsyncFlags_MS_SYNC) +#ifdef MS_SYNC + *r |= MS_SYNC; +#else /* def MS_SYNC */ + {errno = EINVAL; return -1;} +#endif /* ndef MS_SYNC */ + return 0; +} + +int Mono_Posix_ToMsyncFlags (int x, int *r) +{ + *r = 0; + if (x == 0) + return 0; +#ifdef MS_ASYNC + if ((x & MS_ASYNC) == MS_ASYNC) + *r |= Mono_Posix_MsyncFlags_MS_ASYNC; +#endif /* ndef MS_ASYNC */ +#ifdef MS_INVALIDATE + if ((x & MS_INVALIDATE) == MS_INVALIDATE) + *r |= Mono_Posix_MsyncFlags_MS_INVALIDATE; +#endif /* ndef MS_INVALIDATE */ +#ifdef MS_SYNC + if ((x & MS_SYNC) == MS_SYNC) + *r |= Mono_Posix_MsyncFlags_MS_SYNC; +#endif /* ndef MS_SYNC */ + return 0; +} + +int Mono_Posix_FromOpenFlags (int x, int *r) +{ + *r = 0; + if (x == 0) + return 0; + if ((x & Mono_Posix_OpenFlags_O_APPEND) == Mono_Posix_OpenFlags_O_APPEND) +#ifdef O_APPEND + *r |= O_APPEND; +#else /* def O_APPEND */ + {errno = EINVAL; return -1;} +#endif /* ndef O_APPEND */ + if ((x & Mono_Posix_OpenFlags_O_ASYNC) == Mono_Posix_OpenFlags_O_ASYNC) +#ifdef O_ASYNC + *r |= O_ASYNC; +#else /* def O_ASYNC */ + {errno = EINVAL; return -1;} +#endif /* ndef O_ASYNC */ + if ((x & Mono_Posix_OpenFlags_O_CREAT) == Mono_Posix_OpenFlags_O_CREAT) +#ifdef O_CREAT + *r |= O_CREAT; +#else /* def O_CREAT */ + {errno = EINVAL; return -1;} +#endif /* ndef O_CREAT */ + if ((x & Mono_Posix_OpenFlags_O_DIRECT) == Mono_Posix_OpenFlags_O_DIRECT) +#ifdef O_DIRECT + *r |= O_DIRECT; +#else /* def O_DIRECT */ + {errno = EINVAL; return -1;} +#endif /* ndef O_DIRECT */ + if ((x & Mono_Posix_OpenFlags_O_DIRECTORY) == Mono_Posix_OpenFlags_O_DIRECTORY) +#ifdef O_DIRECTORY + *r |= O_DIRECTORY; +#else /* def O_DIRECTORY */ + {errno = EINVAL; return -1;} +#endif /* ndef O_DIRECTORY */ + if ((x & Mono_Posix_OpenFlags_O_EXCL) == Mono_Posix_OpenFlags_O_EXCL) +#ifdef O_EXCL + *r |= O_EXCL; +#else /* def O_EXCL */ + {errno = EINVAL; return -1;} +#endif /* ndef O_EXCL */ + if ((x & Mono_Posix_OpenFlags_O_LARGEFILE) == Mono_Posix_OpenFlags_O_LARGEFILE) +#ifdef O_LARGEFILE + *r |= O_LARGEFILE; +#else /* def O_LARGEFILE */ + {errno = EINVAL; return -1;} +#endif /* ndef O_LARGEFILE */ + if ((x & Mono_Posix_OpenFlags_O_NOCTTY) == Mono_Posix_OpenFlags_O_NOCTTY) +#ifdef O_NOCTTY + *r |= O_NOCTTY; +#else /* def O_NOCTTY */ + {errno = EINVAL; return -1;} +#endif /* ndef O_NOCTTY */ + if ((x & Mono_Posix_OpenFlags_O_NOFOLLOW) == Mono_Posix_OpenFlags_O_NOFOLLOW) +#ifdef O_NOFOLLOW + *r |= O_NOFOLLOW; +#else /* def O_NOFOLLOW */ + {errno = EINVAL; return -1;} +#endif /* ndef O_NOFOLLOW */ + if ((x & Mono_Posix_OpenFlags_O_NONBLOCK) == Mono_Posix_OpenFlags_O_NONBLOCK) +#ifdef O_NONBLOCK + *r |= O_NONBLOCK; +#else /* def O_NONBLOCK */ + {errno = EINVAL; return -1;} +#endif /* ndef O_NONBLOCK */ + if ((x & Mono_Posix_OpenFlags_O_RDONLY) == Mono_Posix_OpenFlags_O_RDONLY) +#ifdef O_RDONLY + *r |= O_RDONLY; +#else /* def O_RDONLY */ + {errno = EINVAL; return -1;} +#endif /* ndef O_RDONLY */ + if ((x & Mono_Posix_OpenFlags_O_RDWR) == Mono_Posix_OpenFlags_O_RDWR) +#ifdef O_RDWR + *r |= O_RDWR; +#else /* def O_RDWR */ + {errno = EINVAL; return -1;} +#endif /* ndef O_RDWR */ + if ((x & Mono_Posix_OpenFlags_O_SYNC) == Mono_Posix_OpenFlags_O_SYNC) +#ifdef O_SYNC + *r |= O_SYNC; +#else /* def O_SYNC */ + {errno = EINVAL; return -1;} +#endif /* ndef O_SYNC */ + if ((x & Mono_Posix_OpenFlags_O_TRUNC) == Mono_Posix_OpenFlags_O_TRUNC) +#ifdef O_TRUNC + *r |= O_TRUNC; +#else /* def O_TRUNC */ + {errno = EINVAL; return -1;} +#endif /* ndef O_TRUNC */ + if ((x & Mono_Posix_OpenFlags_O_WRONLY) == Mono_Posix_OpenFlags_O_WRONLY) +#ifdef O_WRONLY + *r |= O_WRONLY; +#else /* def O_WRONLY */ + {errno = EINVAL; return -1;} +#endif /* ndef O_WRONLY */ + return 0; +} + +int Mono_Posix_ToOpenFlags (int x, int *r) +{ + *r = 0; + if (x == 0) + return 0; +#ifdef O_APPEND + if ((x & O_APPEND) == O_APPEND) + *r |= Mono_Posix_OpenFlags_O_APPEND; +#endif /* ndef O_APPEND */ +#ifdef O_ASYNC + if ((x & O_ASYNC) == O_ASYNC) + *r |= Mono_Posix_OpenFlags_O_ASYNC; +#endif /* ndef O_ASYNC */ +#ifdef O_CREAT + if ((x & O_CREAT) == O_CREAT) + *r |= Mono_Posix_OpenFlags_O_CREAT; +#endif /* ndef O_CREAT */ +#ifdef O_DIRECT + if ((x & O_DIRECT) == O_DIRECT) + *r |= Mono_Posix_OpenFlags_O_DIRECT; +#endif /* ndef O_DIRECT */ +#ifdef O_DIRECTORY + if ((x & O_DIRECTORY) == O_DIRECTORY) + *r |= Mono_Posix_OpenFlags_O_DIRECTORY; +#endif /* ndef O_DIRECTORY */ +#ifdef O_EXCL + if ((x & O_EXCL) == O_EXCL) + *r |= Mono_Posix_OpenFlags_O_EXCL; +#endif /* ndef O_EXCL */ +#ifdef O_LARGEFILE + if ((x & O_LARGEFILE) == O_LARGEFILE) + *r |= Mono_Posix_OpenFlags_O_LARGEFILE; +#endif /* ndef O_LARGEFILE */ +#ifdef O_NOCTTY + if ((x & O_NOCTTY) == O_NOCTTY) + *r |= Mono_Posix_OpenFlags_O_NOCTTY; +#endif /* ndef O_NOCTTY */ +#ifdef O_NOFOLLOW + if ((x & O_NOFOLLOW) == O_NOFOLLOW) + *r |= Mono_Posix_OpenFlags_O_NOFOLLOW; +#endif /* ndef O_NOFOLLOW */ +#ifdef O_NONBLOCK + if ((x & O_NONBLOCK) == O_NONBLOCK) + *r |= Mono_Posix_OpenFlags_O_NONBLOCK; +#endif /* ndef O_NONBLOCK */ +#ifdef O_RDONLY + if ((x & O_RDONLY) == O_RDONLY) + *r |= Mono_Posix_OpenFlags_O_RDONLY; +#endif /* ndef O_RDONLY */ +#ifdef O_RDWR + if ((x & O_RDWR) == O_RDWR) + *r |= Mono_Posix_OpenFlags_O_RDWR; +#endif /* ndef O_RDWR */ +#ifdef O_SYNC + if ((x & O_SYNC) == O_SYNC) + *r |= Mono_Posix_OpenFlags_O_SYNC; +#endif /* ndef O_SYNC */ +#ifdef O_TRUNC + if ((x & O_TRUNC) == O_TRUNC) + *r |= Mono_Posix_OpenFlags_O_TRUNC; +#endif /* ndef O_TRUNC */ +#ifdef O_WRONLY + if ((x & O_WRONLY) == O_WRONLY) + *r |= Mono_Posix_OpenFlags_O_WRONLY; +#endif /* ndef O_WRONLY */ + return 0; +} + +int Mono_Posix_FromPathConf (int x, int *r) +{ + *r = 0; + if (x == 0) + return 0; + if (x == Mono_Posix_PathConf__PC_2_SYMLINKS) +#ifdef _PC_2_SYMLINKS + {*r = _PC_2_SYMLINKS; return 0;} +#else /* def _PC_2_SYMLINKS */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_2_SYMLINKS */ + if (x == Mono_Posix_PathConf__PC_ALLOC_SIZE_MIN) +#ifdef _PC_ALLOC_SIZE_MIN + {*r = _PC_ALLOC_SIZE_MIN; return 0;} +#else /* def _PC_ALLOC_SIZE_MIN */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_ALLOC_SIZE_MIN */ + if (x == Mono_Posix_PathConf__PC_ASYNC_IO) +#ifdef _PC_ASYNC_IO + {*r = _PC_ASYNC_IO; return 0;} +#else /* def _PC_ASYNC_IO */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_ASYNC_IO */ + if (x == Mono_Posix_PathConf__PC_CHOWN_RESTRICTED) +#ifdef _PC_CHOWN_RESTRICTED + {*r = _PC_CHOWN_RESTRICTED; return 0;} +#else /* def _PC_CHOWN_RESTRICTED */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_CHOWN_RESTRICTED */ + if (x == Mono_Posix_PathConf__PC_FILESIZEBITS) +#ifdef _PC_FILESIZEBITS + {*r = _PC_FILESIZEBITS; return 0;} +#else /* def _PC_FILESIZEBITS */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_FILESIZEBITS */ + if (x == Mono_Posix_PathConf__PC_LINK_MAX) +#ifdef _PC_LINK_MAX + {*r = _PC_LINK_MAX; return 0;} +#else /* def _PC_LINK_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_LINK_MAX */ + if (x == Mono_Posix_PathConf__PC_MAX_CANON) +#ifdef _PC_MAX_CANON + {*r = _PC_MAX_CANON; return 0;} +#else /* def _PC_MAX_CANON */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_MAX_CANON */ + if (x == Mono_Posix_PathConf__PC_MAX_INPUT) +#ifdef _PC_MAX_INPUT + {*r = _PC_MAX_INPUT; return 0;} +#else /* def _PC_MAX_INPUT */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_MAX_INPUT */ + if (x == Mono_Posix_PathConf__PC_NAME_MAX) +#ifdef _PC_NAME_MAX + {*r = _PC_NAME_MAX; return 0;} +#else /* def _PC_NAME_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_NAME_MAX */ + if (x == Mono_Posix_PathConf__PC_NO_TRUNC) +#ifdef _PC_NO_TRUNC + {*r = _PC_NO_TRUNC; return 0;} +#else /* def _PC_NO_TRUNC */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_NO_TRUNC */ + if (x == Mono_Posix_PathConf__PC_PATH_MAX) +#ifdef _PC_PATH_MAX + {*r = _PC_PATH_MAX; return 0;} +#else /* def _PC_PATH_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_PATH_MAX */ + if (x == Mono_Posix_PathConf__PC_PIPE_BUF) +#ifdef _PC_PIPE_BUF + {*r = _PC_PIPE_BUF; return 0;} +#else /* def _PC_PIPE_BUF */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_PIPE_BUF */ + if (x == Mono_Posix_PathConf__PC_PRIO_IO) +#ifdef _PC_PRIO_IO + {*r = _PC_PRIO_IO; return 0;} +#else /* def _PC_PRIO_IO */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_PRIO_IO */ + if (x == Mono_Posix_PathConf__PC_REC_INCR_XFER_SIZE) +#ifdef _PC_REC_INCR_XFER_SIZE + {*r = _PC_REC_INCR_XFER_SIZE; return 0;} +#else /* def _PC_REC_INCR_XFER_SIZE */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_REC_INCR_XFER_SIZE */ + if (x == Mono_Posix_PathConf__PC_REC_MAX_XFER_SIZE) +#ifdef _PC_REC_MAX_XFER_SIZE + {*r = _PC_REC_MAX_XFER_SIZE; return 0;} +#else /* def _PC_REC_MAX_XFER_SIZE */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_REC_MAX_XFER_SIZE */ + if (x == Mono_Posix_PathConf__PC_REC_MIN_XFER_SIZE) +#ifdef _PC_REC_MIN_XFER_SIZE + {*r = _PC_REC_MIN_XFER_SIZE; return 0;} +#else /* def _PC_REC_MIN_XFER_SIZE */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_REC_MIN_XFER_SIZE */ + if (x == Mono_Posix_PathConf__PC_REC_XFER_ALIGN) +#ifdef _PC_REC_XFER_ALIGN + {*r = _PC_REC_XFER_ALIGN; return 0;} +#else /* def _PC_REC_XFER_ALIGN */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_REC_XFER_ALIGN */ + if (x == Mono_Posix_PathConf__PC_SOCK_MAXBUF) +#ifdef _PC_SOCK_MAXBUF + {*r = _PC_SOCK_MAXBUF; return 0;} +#else /* def _PC_SOCK_MAXBUF */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_SOCK_MAXBUF */ + if (x == Mono_Posix_PathConf__PC_SYMLINK_MAX) +#ifdef _PC_SYMLINK_MAX + {*r = _PC_SYMLINK_MAX; return 0;} +#else /* def _PC_SYMLINK_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_SYMLINK_MAX */ + if (x == Mono_Posix_PathConf__PC_SYNC_IO) +#ifdef _PC_SYNC_IO + {*r = _PC_SYNC_IO; return 0;} +#else /* def _PC_SYNC_IO */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_SYNC_IO */ + if (x == Mono_Posix_PathConf__PC_VDISABLE) +#ifdef _PC_VDISABLE + {*r = _PC_VDISABLE; return 0;} +#else /* def _PC_VDISABLE */ + {errno = EINVAL; return -1;} +#endif /* ndef _PC_VDISABLE */ errno = EINVAL; return -1; } -int Mono_Posix_ToSeekFlags (short x, short *r) +int Mono_Posix_ToPathConf (int x, int *r) { *r = 0; if (x == 0) return 0; -#ifdef SEEK_SET - if (x == SEEK_SET) - {*r = Mono_Posix_SeekFlags_SEEK_SET; return 0;} -#endif /* ndef SEEK_SET */ -#ifdef SEEK_CUR - if (x == SEEK_CUR) - {*r = Mono_Posix_SeekFlags_SEEK_CUR; return 0;} -#endif /* ndef SEEK_CUR */ -#ifdef SEEK_END - if (x == SEEK_END) - {*r = Mono_Posix_SeekFlags_SEEK_END; return 0;} -#endif /* ndef SEEK_END */ -#ifdef L_SET - if (x == L_SET) - {*r = Mono_Posix_SeekFlags_L_SET; return 0;} -#endif /* ndef L_SET */ -#ifdef L_INCR - if (x == L_INCR) - {*r = Mono_Posix_SeekFlags_L_INCR; return 0;} -#endif /* ndef L_INCR */ -#ifdef L_XTND - if (x == L_XTND) - {*r = Mono_Posix_SeekFlags_L_XTND; return 0;} -#endif /* ndef L_XTND */ +#ifdef _PC_2_SYMLINKS + if (x == _PC_2_SYMLINKS) + {*r = Mono_Posix_PathConf__PC_2_SYMLINKS; return 0;} +#endif /* ndef _PC_2_SYMLINKS */ +#ifdef _PC_ALLOC_SIZE_MIN + if (x == _PC_ALLOC_SIZE_MIN) + {*r = Mono_Posix_PathConf__PC_ALLOC_SIZE_MIN; return 0;} +#endif /* ndef _PC_ALLOC_SIZE_MIN */ +#ifdef _PC_ASYNC_IO + if (x == _PC_ASYNC_IO) + {*r = Mono_Posix_PathConf__PC_ASYNC_IO; return 0;} +#endif /* ndef _PC_ASYNC_IO */ +#ifdef _PC_CHOWN_RESTRICTED + if (x == _PC_CHOWN_RESTRICTED) + {*r = Mono_Posix_PathConf__PC_CHOWN_RESTRICTED; return 0;} +#endif /* ndef _PC_CHOWN_RESTRICTED */ +#ifdef _PC_FILESIZEBITS + if (x == _PC_FILESIZEBITS) + {*r = Mono_Posix_PathConf__PC_FILESIZEBITS; return 0;} +#endif /* ndef _PC_FILESIZEBITS */ +#ifdef _PC_LINK_MAX + if (x == _PC_LINK_MAX) + {*r = Mono_Posix_PathConf__PC_LINK_MAX; return 0;} +#endif /* ndef _PC_LINK_MAX */ +#ifdef _PC_MAX_CANON + if (x == _PC_MAX_CANON) + {*r = Mono_Posix_PathConf__PC_MAX_CANON; return 0;} +#endif /* ndef _PC_MAX_CANON */ +#ifdef _PC_MAX_INPUT + if (x == _PC_MAX_INPUT) + {*r = Mono_Posix_PathConf__PC_MAX_INPUT; return 0;} +#endif /* ndef _PC_MAX_INPUT */ +#ifdef _PC_NAME_MAX + if (x == _PC_NAME_MAX) + {*r = Mono_Posix_PathConf__PC_NAME_MAX; return 0;} +#endif /* ndef _PC_NAME_MAX */ +#ifdef _PC_NO_TRUNC + if (x == _PC_NO_TRUNC) + {*r = Mono_Posix_PathConf__PC_NO_TRUNC; return 0;} +#endif /* ndef _PC_NO_TRUNC */ +#ifdef _PC_PATH_MAX + if (x == _PC_PATH_MAX) + {*r = Mono_Posix_PathConf__PC_PATH_MAX; return 0;} +#endif /* ndef _PC_PATH_MAX */ +#ifdef _PC_PIPE_BUF + if (x == _PC_PIPE_BUF) + {*r = Mono_Posix_PathConf__PC_PIPE_BUF; return 0;} +#endif /* ndef _PC_PIPE_BUF */ +#ifdef _PC_PRIO_IO + if (x == _PC_PRIO_IO) + {*r = Mono_Posix_PathConf__PC_PRIO_IO; return 0;} +#endif /* ndef _PC_PRIO_IO */ +#ifdef _PC_REC_INCR_XFER_SIZE + if (x == _PC_REC_INCR_XFER_SIZE) + {*r = Mono_Posix_PathConf__PC_REC_INCR_XFER_SIZE; return 0;} +#endif /* ndef _PC_REC_INCR_XFER_SIZE */ +#ifdef _PC_REC_MAX_XFER_SIZE + if (x == _PC_REC_MAX_XFER_SIZE) + {*r = Mono_Posix_PathConf__PC_REC_MAX_XFER_SIZE; return 0;} +#endif /* ndef _PC_REC_MAX_XFER_SIZE */ +#ifdef _PC_REC_MIN_XFER_SIZE + if (x == _PC_REC_MIN_XFER_SIZE) + {*r = Mono_Posix_PathConf__PC_REC_MIN_XFER_SIZE; return 0;} +#endif /* ndef _PC_REC_MIN_XFER_SIZE */ +#ifdef _PC_REC_XFER_ALIGN + if (x == _PC_REC_XFER_ALIGN) + {*r = Mono_Posix_PathConf__PC_REC_XFER_ALIGN; return 0;} +#endif /* ndef _PC_REC_XFER_ALIGN */ +#ifdef _PC_SOCK_MAXBUF + if (x == _PC_SOCK_MAXBUF) + {*r = Mono_Posix_PathConf__PC_SOCK_MAXBUF; return 0;} +#endif /* ndef _PC_SOCK_MAXBUF */ +#ifdef _PC_SYMLINK_MAX + if (x == _PC_SYMLINK_MAX) + {*r = Mono_Posix_PathConf__PC_SYMLINK_MAX; return 0;} +#endif /* ndef _PC_SYMLINK_MAX */ +#ifdef _PC_SYNC_IO + if (x == _PC_SYNC_IO) + {*r = Mono_Posix_PathConf__PC_SYNC_IO; return 0;} +#endif /* ndef _PC_SYNC_IO */ +#ifdef _PC_VDISABLE + if (x == _PC_VDISABLE) + {*r = Mono_Posix_PathConf__PC_VDISABLE; return 0;} +#endif /* ndef _PC_VDISABLE */ errno = EINVAL; return -1; } -int Mono_Posix_FromDirectoryNotifyFlags (int x, int *r) +int Mono_Posix_FromPollEvents (short x, short *r) { *r = 0; if (x == 0) return 0; - if ((x & Mono_Posix_DirectoryNotifyFlags_DN_ACCESS) == Mono_Posix_DirectoryNotifyFlags_DN_ACCESS) -#ifdef DN_ACCESS - *r |= DN_ACCESS; -#else /* def DN_ACCESS */ + if ((x & Mono_Posix_PollEvents_POLLERR) == Mono_Posix_PollEvents_POLLERR) +#ifdef POLLERR + *r |= POLLERR; +#else /* def POLLERR */ {errno = EINVAL; return -1;} -#endif /* ndef DN_ACCESS */ - if ((x & Mono_Posix_DirectoryNotifyFlags_DN_MODIFY) == Mono_Posix_DirectoryNotifyFlags_DN_MODIFY) -#ifdef DN_MODIFY - *r |= DN_MODIFY; -#else /* def DN_MODIFY */ +#endif /* ndef POLLERR */ + if ((x & Mono_Posix_PollEvents_POLLHUP) == Mono_Posix_PollEvents_POLLHUP) +#ifdef POLLHUP + *r |= POLLHUP; +#else /* def POLLHUP */ {errno = EINVAL; return -1;} -#endif /* ndef DN_MODIFY */ - if ((x & Mono_Posix_DirectoryNotifyFlags_DN_CREATE) == Mono_Posix_DirectoryNotifyFlags_DN_CREATE) -#ifdef DN_CREATE - *r |= DN_CREATE; -#else /* def DN_CREATE */ +#endif /* ndef POLLHUP */ + if ((x & Mono_Posix_PollEvents_POLLIN) == Mono_Posix_PollEvents_POLLIN) +#ifdef POLLIN + *r |= POLLIN; +#else /* def POLLIN */ {errno = EINVAL; return -1;} -#endif /* ndef DN_CREATE */ - if ((x & Mono_Posix_DirectoryNotifyFlags_DN_DELETE) == Mono_Posix_DirectoryNotifyFlags_DN_DELETE) -#ifdef DN_DELETE - *r |= DN_DELETE; -#else /* def DN_DELETE */ +#endif /* ndef POLLIN */ + if ((x & Mono_Posix_PollEvents_POLLNVAL) == Mono_Posix_PollEvents_POLLNVAL) +#ifdef POLLNVAL + *r |= POLLNVAL; +#else /* def POLLNVAL */ {errno = EINVAL; return -1;} -#endif /* ndef DN_DELETE */ - if ((x & Mono_Posix_DirectoryNotifyFlags_DN_RENAME) == Mono_Posix_DirectoryNotifyFlags_DN_RENAME) -#ifdef DN_RENAME - *r |= DN_RENAME; -#else /* def DN_RENAME */ +#endif /* ndef POLLNVAL */ + if ((x & Mono_Posix_PollEvents_POLLOUT) == Mono_Posix_PollEvents_POLLOUT) +#ifdef POLLOUT + *r |= POLLOUT; +#else /* def POLLOUT */ {errno = EINVAL; return -1;} -#endif /* ndef DN_RENAME */ - if ((x & Mono_Posix_DirectoryNotifyFlags_DN_ATTRIB) == Mono_Posix_DirectoryNotifyFlags_DN_ATTRIB) -#ifdef DN_ATTRIB - *r |= DN_ATTRIB; -#else /* def DN_ATTRIB */ +#endif /* ndef POLLOUT */ + if ((x & Mono_Posix_PollEvents_POLLPRI) == Mono_Posix_PollEvents_POLLPRI) +#ifdef POLLPRI + *r |= POLLPRI; +#else /* def POLLPRI */ {errno = EINVAL; return -1;} -#endif /* ndef DN_ATTRIB */ - if ((x & Mono_Posix_DirectoryNotifyFlags_DN_MULTISHOT) == Mono_Posix_DirectoryNotifyFlags_DN_MULTISHOT) -#ifdef DN_MULTISHOT - *r |= DN_MULTISHOT; -#else /* def DN_MULTISHOT */ +#endif /* ndef POLLPRI */ + if ((x & Mono_Posix_PollEvents_POLLRDBAND) == Mono_Posix_PollEvents_POLLRDBAND) +#ifdef POLLRDBAND + *r |= POLLRDBAND; +#else /* def POLLRDBAND */ {errno = EINVAL; return -1;} -#endif /* ndef DN_MULTISHOT */ +#endif /* ndef POLLRDBAND */ + if ((x & Mono_Posix_PollEvents_POLLRDNORM) == Mono_Posix_PollEvents_POLLRDNORM) +#ifdef POLLRDNORM + *r |= POLLRDNORM; +#else /* def POLLRDNORM */ + {errno = EINVAL; return -1;} +#endif /* ndef POLLRDNORM */ + if ((x & Mono_Posix_PollEvents_POLLWRBAND) == Mono_Posix_PollEvents_POLLWRBAND) +#ifdef POLLWRBAND + *r |= POLLWRBAND; +#else /* def POLLWRBAND */ + {errno = EINVAL; return -1;} +#endif /* ndef POLLWRBAND */ + if ((x & Mono_Posix_PollEvents_POLLWRNORM) == Mono_Posix_PollEvents_POLLWRNORM) +#ifdef POLLWRNORM + *r |= POLLWRNORM; +#else /* def POLLWRNORM */ + {errno = EINVAL; return -1;} +#endif /* ndef POLLWRNORM */ return 0; } -int Mono_Posix_ToDirectoryNotifyFlags (int x, int *r) +int Mono_Posix_ToPollEvents (short x, short *r) { *r = 0; if (x == 0) return 0; -#ifdef DN_ACCESS - if ((x & DN_ACCESS) == DN_ACCESS) - *r |= Mono_Posix_DirectoryNotifyFlags_DN_ACCESS; -#endif /* ndef DN_ACCESS */ -#ifdef DN_MODIFY - if ((x & DN_MODIFY) == DN_MODIFY) - *r |= Mono_Posix_DirectoryNotifyFlags_DN_MODIFY; -#endif /* ndef DN_MODIFY */ -#ifdef DN_CREATE - if ((x & DN_CREATE) == DN_CREATE) - *r |= Mono_Posix_DirectoryNotifyFlags_DN_CREATE; -#endif /* ndef DN_CREATE */ -#ifdef DN_DELETE - if ((x & DN_DELETE) == DN_DELETE) - *r |= Mono_Posix_DirectoryNotifyFlags_DN_DELETE; -#endif /* ndef DN_DELETE */ -#ifdef DN_RENAME - if ((x & DN_RENAME) == DN_RENAME) - *r |= Mono_Posix_DirectoryNotifyFlags_DN_RENAME; -#endif /* ndef DN_RENAME */ -#ifdef DN_ATTRIB - if ((x & DN_ATTRIB) == DN_ATTRIB) - *r |= Mono_Posix_DirectoryNotifyFlags_DN_ATTRIB; -#endif /* ndef DN_ATTRIB */ -#ifdef DN_MULTISHOT - if ((x & DN_MULTISHOT) == DN_MULTISHOT) - *r |= Mono_Posix_DirectoryNotifyFlags_DN_MULTISHOT; -#endif /* ndef DN_MULTISHOT */ +#ifdef POLLERR + if ((x & POLLERR) == POLLERR) + *r |= Mono_Posix_PollEvents_POLLERR; +#endif /* ndef POLLERR */ +#ifdef POLLHUP + if ((x & POLLHUP) == POLLHUP) + *r |= Mono_Posix_PollEvents_POLLHUP; +#endif /* ndef POLLHUP */ +#ifdef POLLIN + if ((x & POLLIN) == POLLIN) + *r |= Mono_Posix_PollEvents_POLLIN; +#endif /* ndef POLLIN */ +#ifdef POLLNVAL + if ((x & POLLNVAL) == POLLNVAL) + *r |= Mono_Posix_PollEvents_POLLNVAL; +#endif /* ndef POLLNVAL */ +#ifdef POLLOUT + if ((x & POLLOUT) == POLLOUT) + *r |= Mono_Posix_PollEvents_POLLOUT; +#endif /* ndef POLLOUT */ +#ifdef POLLPRI + if ((x & POLLPRI) == POLLPRI) + *r |= Mono_Posix_PollEvents_POLLPRI; +#endif /* ndef POLLPRI */ +#ifdef POLLRDBAND + if ((x & POLLRDBAND) == POLLRDBAND) + *r |= Mono_Posix_PollEvents_POLLRDBAND; +#endif /* ndef POLLRDBAND */ +#ifdef POLLRDNORM + if ((x & POLLRDNORM) == POLLRDNORM) + *r |= Mono_Posix_PollEvents_POLLRDNORM; +#endif /* ndef POLLRDNORM */ +#ifdef POLLWRBAND + if ((x & POLLWRBAND) == POLLWRBAND) + *r |= Mono_Posix_PollEvents_POLLWRBAND; +#endif /* ndef POLLWRBAND */ +#ifdef POLLWRNORM + if ((x & POLLWRNORM) == POLLWRNORM) + *r |= Mono_Posix_PollEvents_POLLWRNORM; +#endif /* ndef POLLWRNORM */ return 0; } @@ -2511,6 +4796,18 @@ int Mono_Posix_FromPosixFadviseAdvice (int x, int *r) *r = 0; if (x == 0) return 0; + if (x == Mono_Posix_PosixFadviseAdvice_POSIX_FADV_DONTNEED) +#ifdef POSIX_FADV_DONTNEED + {*r = POSIX_FADV_DONTNEED; return 0;} +#else /* def POSIX_FADV_DONTNEED */ + {errno = EINVAL; return -1;} +#endif /* ndef POSIX_FADV_DONTNEED */ + if (x == Mono_Posix_PosixFadviseAdvice_POSIX_FADV_NOREUSE) +#ifdef POSIX_FADV_NOREUSE + {*r = POSIX_FADV_NOREUSE; return 0;} +#else /* def POSIX_FADV_NOREUSE */ + {errno = EINVAL; return -1;} +#endif /* ndef POSIX_FADV_NOREUSE */ if (x == Mono_Posix_PosixFadviseAdvice_POSIX_FADV_NORMAL) #ifdef POSIX_FADV_NORMAL {*r = POSIX_FADV_NORMAL; return 0;} @@ -2535,18 +4832,6 @@ int Mono_Posix_FromPosixFadviseAdvice (int x, int *r) #else /* def POSIX_FADV_WILLNEED */ {errno = EINVAL; return -1;} #endif /* ndef POSIX_FADV_WILLNEED */ - if (x == Mono_Posix_PosixFadviseAdvice_POSIX_FADV_DONTNEED) -#ifdef POSIX_FADV_DONTNEED - {*r = POSIX_FADV_DONTNEED; return 0;} -#else /* def POSIX_FADV_DONTNEED */ - {errno = EINVAL; return -1;} -#endif /* ndef POSIX_FADV_DONTNEED */ - if (x == Mono_Posix_PosixFadviseAdvice_POSIX_FADV_NOREUSE) -#ifdef POSIX_FADV_NOREUSE - {*r = POSIX_FADV_NOREUSE; return 0;} -#else /* def POSIX_FADV_NOREUSE */ - {errno = EINVAL; return -1;} -#endif /* ndef POSIX_FADV_NOREUSE */ errno = EINVAL; return -1; } @@ -2555,6 +4840,14 @@ int Mono_Posix_ToPosixFadviseAdvice (int x, int *r) *r = 0; if (x == 0) return 0; +#ifdef POSIX_FADV_DONTNEED + if (x == POSIX_FADV_DONTNEED) + {*r = Mono_Posix_PosixFadviseAdvice_POSIX_FADV_DONTNEED; return 0;} +#endif /* ndef POSIX_FADV_DONTNEED */ +#ifdef POSIX_FADV_NOREUSE + if (x == POSIX_FADV_NOREUSE) + {*r = Mono_Posix_PosixFadviseAdvice_POSIX_FADV_NOREUSE; return 0;} +#endif /* ndef POSIX_FADV_NOREUSE */ #ifdef POSIX_FADV_NORMAL if (x == POSIX_FADV_NORMAL) {*r = Mono_Posix_PosixFadviseAdvice_POSIX_FADV_NORMAL; return 0;} @@ -2571,14 +4864,6 @@ int Mono_Posix_ToPosixFadviseAdvice (int x, int *r) if (x == POSIX_FADV_WILLNEED) {*r = Mono_Posix_PosixFadviseAdvice_POSIX_FADV_WILLNEED; return 0;} #endif /* ndef POSIX_FADV_WILLNEED */ -#ifdef POSIX_FADV_DONTNEED - if (x == POSIX_FADV_DONTNEED) - {*r = Mono_Posix_PosixFadviseAdvice_POSIX_FADV_DONTNEED; return 0;} -#endif /* ndef POSIX_FADV_DONTNEED */ -#ifdef POSIX_FADV_NOREUSE - if (x == POSIX_FADV_NOREUSE) - {*r = Mono_Posix_PosixFadviseAdvice_POSIX_FADV_NOREUSE; return 0;} -#endif /* ndef POSIX_FADV_NOREUSE */ errno = EINVAL; return -1; } @@ -2587,6 +4872,12 @@ int Mono_Posix_FromPosixMadviseAdvice (int x, int *r) *r = 0; if (x == 0) return 0; + if (x == Mono_Posix_PosixMadviseAdvice_POSIX_MADV_DONTNEED) +#ifdef POSIX_MADV_DONTNEED + {*r = POSIX_MADV_DONTNEED; return 0;} +#else /* def POSIX_MADV_DONTNEED */ + {errno = EINVAL; return -1;} +#endif /* ndef POSIX_MADV_DONTNEED */ if (x == Mono_Posix_PosixMadviseAdvice_POSIX_MADV_NORMAL) #ifdef POSIX_MADV_NORMAL {*r = POSIX_MADV_NORMAL; return 0;} @@ -2611,12 +4902,6 @@ int Mono_Posix_FromPosixMadviseAdvice (int x, int *r) #else /* def POSIX_MADV_WILLNEED */ {errno = EINVAL; return -1;} #endif /* ndef POSIX_MADV_WILLNEED */ - if (x == Mono_Posix_PosixMadviseAdvice_POSIX_MADV_DONTNEED) -#ifdef POSIX_MADV_DONTNEED - {*r = POSIX_MADV_DONTNEED; return 0;} -#else /* def POSIX_MADV_DONTNEED */ - {errno = EINVAL; return -1;} -#endif /* ndef POSIX_MADV_DONTNEED */ errno = EINVAL; return -1; } @@ -2625,6 +4910,10 @@ int Mono_Posix_ToPosixMadviseAdvice (int x, int *r) *r = 0; if (x == 0) return 0; +#ifdef POSIX_MADV_DONTNEED + if (x == POSIX_MADV_DONTNEED) + {*r = Mono_Posix_PosixMadviseAdvice_POSIX_MADV_DONTNEED; return 0;} +#endif /* ndef POSIX_MADV_DONTNEED */ #ifdef POSIX_MADV_NORMAL if (x == POSIX_MADV_NORMAL) {*r = Mono_Posix_PosixMadviseAdvice_POSIX_MADV_NORMAL; return 0;} @@ -2641,144 +4930,234 @@ int Mono_Posix_ToPosixMadviseAdvice (int x, int *r) if (x == POSIX_MADV_WILLNEED) {*r = Mono_Posix_PosixMadviseAdvice_POSIX_MADV_WILLNEED; return 0;} #endif /* ndef POSIX_MADV_WILLNEED */ -#ifdef POSIX_MADV_DONTNEED - if (x == POSIX_MADV_DONTNEED) - {*r = Mono_Posix_PosixMadviseAdvice_POSIX_MADV_DONTNEED; return 0;} -#endif /* ndef POSIX_MADV_DONTNEED */ errno = EINVAL; return -1; } -int Mono_Posix_FromSignum (int x, int *r) +int Mono_Posix_FromSeekFlags (short x, short *r) { *r = 0; if (x == 0) return 0; - if (x == Mono_Posix_Signum_SIGHUP) -#ifdef SIGHUP - {*r = SIGHUP; return 0;} -#else /* def SIGHUP */ + if (x == Mono_Posix_SeekFlags_L_INCR) +#ifdef L_INCR + {*r = L_INCR; return 0;} +#else /* def L_INCR */ {errno = EINVAL; return -1;} -#endif /* ndef SIGHUP */ - if (x == Mono_Posix_Signum_SIGINT) -#ifdef SIGINT - {*r = SIGINT; return 0;} -#else /* def SIGINT */ +#endif /* ndef L_INCR */ + if (x == Mono_Posix_SeekFlags_L_SET) +#ifdef L_SET + {*r = L_SET; return 0;} +#else /* def L_SET */ {errno = EINVAL; return -1;} -#endif /* ndef SIGINT */ - if (x == Mono_Posix_Signum_SIGQUIT) -#ifdef SIGQUIT - {*r = SIGQUIT; return 0;} -#else /* def SIGQUIT */ +#endif /* ndef L_SET */ + if (x == Mono_Posix_SeekFlags_L_XTND) +#ifdef L_XTND + {*r = L_XTND; return 0;} +#else /* def L_XTND */ {errno = EINVAL; return -1;} -#endif /* ndef SIGQUIT */ - if (x == Mono_Posix_Signum_SIGILL) -#ifdef SIGILL - {*r = SIGILL; return 0;} -#else /* def SIGILL */ +#endif /* ndef L_XTND */ + if (x == Mono_Posix_SeekFlags_SEEK_CUR) +#ifdef SEEK_CUR + {*r = SEEK_CUR; return 0;} +#else /* def SEEK_CUR */ {errno = EINVAL; return -1;} -#endif /* ndef SIGILL */ - if (x == Mono_Posix_Signum_SIGTRAP) -#ifdef SIGTRAP - {*r = SIGTRAP; return 0;} -#else /* def SIGTRAP */ +#endif /* ndef SEEK_CUR */ + if (x == Mono_Posix_SeekFlags_SEEK_END) +#ifdef SEEK_END + {*r = SEEK_END; return 0;} +#else /* def SEEK_END */ {errno = EINVAL; return -1;} -#endif /* ndef SIGTRAP */ +#endif /* ndef SEEK_END */ + if (x == Mono_Posix_SeekFlags_SEEK_SET) +#ifdef SEEK_SET + {*r = SEEK_SET; return 0;} +#else /* def SEEK_SET */ + {errno = EINVAL; return -1;} +#endif /* ndef SEEK_SET */ + errno = EINVAL; return -1; +} + +int Mono_Posix_ToSeekFlags (short x, short *r) +{ + *r = 0; + if (x == 0) + return 0; +#ifdef L_INCR + if (x == L_INCR) + {*r = Mono_Posix_SeekFlags_L_INCR; return 0;} +#endif /* ndef L_INCR */ +#ifdef L_SET + if (x == L_SET) + {*r = Mono_Posix_SeekFlags_L_SET; return 0;} +#endif /* ndef L_SET */ +#ifdef L_XTND + if (x == L_XTND) + {*r = Mono_Posix_SeekFlags_L_XTND; return 0;} +#endif /* ndef L_XTND */ +#ifdef SEEK_CUR + if (x == SEEK_CUR) + {*r = Mono_Posix_SeekFlags_SEEK_CUR; return 0;} +#endif /* ndef SEEK_CUR */ +#ifdef SEEK_END + if (x == SEEK_END) + {*r = Mono_Posix_SeekFlags_SEEK_END; return 0;} +#endif /* ndef SEEK_END */ +#ifdef SEEK_SET + if (x == SEEK_SET) + {*r = Mono_Posix_SeekFlags_SEEK_SET; return 0;} +#endif /* ndef SEEK_SET */ + errno = EINVAL; return -1; +} + +int Mono_Posix_FromSignum (int x, int *r) +{ + *r = 0; + if (x == 0) + return 0; if (x == Mono_Posix_Signum_SIGABRT) #ifdef SIGABRT {*r = SIGABRT; return 0;} #else /* def SIGABRT */ {errno = EINVAL; return -1;} #endif /* ndef SIGABRT */ - if (x == Mono_Posix_Signum_SIGIOT) -#ifdef SIGIOT - {*r = SIGIOT; return 0;} -#else /* def SIGIOT */ + if (x == Mono_Posix_Signum_SIGALRM) +#ifdef SIGALRM + {*r = SIGALRM; return 0;} +#else /* def SIGALRM */ {errno = EINVAL; return -1;} -#endif /* ndef SIGIOT */ +#endif /* ndef SIGALRM */ if (x == Mono_Posix_Signum_SIGBUS) #ifdef SIGBUS {*r = SIGBUS; return 0;} #else /* def SIGBUS */ {errno = EINVAL; return -1;} #endif /* ndef SIGBUS */ + if (x == Mono_Posix_Signum_SIGCHLD) +#ifdef SIGCHLD + {*r = SIGCHLD; return 0;} +#else /* def SIGCHLD */ + {errno = EINVAL; return -1;} +#endif /* ndef SIGCHLD */ + if (x == Mono_Posix_Signum_SIGCLD) +#ifdef SIGCLD + {*r = SIGCLD; return 0;} +#else /* def SIGCLD */ + {errno = EINVAL; return -1;} +#endif /* ndef SIGCLD */ + if (x == Mono_Posix_Signum_SIGCONT) +#ifdef SIGCONT + {*r = SIGCONT; return 0;} +#else /* def SIGCONT */ + {errno = EINVAL; return -1;} +#endif /* ndef SIGCONT */ if (x == Mono_Posix_Signum_SIGFPE) #ifdef SIGFPE {*r = SIGFPE; return 0;} #else /* def SIGFPE */ {errno = EINVAL; return -1;} #endif /* ndef SIGFPE */ + if (x == Mono_Posix_Signum_SIGHUP) +#ifdef SIGHUP + {*r = SIGHUP; return 0;} +#else /* def SIGHUP */ + {errno = EINVAL; return -1;} +#endif /* ndef SIGHUP */ + if (x == Mono_Posix_Signum_SIGILL) +#ifdef SIGILL + {*r = SIGILL; return 0;} +#else /* def SIGILL */ + {errno = EINVAL; return -1;} +#endif /* ndef SIGILL */ + if (x == Mono_Posix_Signum_SIGINT) +#ifdef SIGINT + {*r = SIGINT; return 0;} +#else /* def SIGINT */ + {errno = EINVAL; return -1;} +#endif /* ndef SIGINT */ + if (x == Mono_Posix_Signum_SIGIO) +#ifdef SIGIO + {*r = SIGIO; return 0;} +#else /* def SIGIO */ + {errno = EINVAL; return -1;} +#endif /* ndef SIGIO */ + if (x == Mono_Posix_Signum_SIGIOT) +#ifdef SIGIOT + {*r = SIGIOT; return 0;} +#else /* def SIGIOT */ + {errno = EINVAL; return -1;} +#endif /* ndef SIGIOT */ if (x == Mono_Posix_Signum_SIGKILL) #ifdef SIGKILL {*r = SIGKILL; return 0;} #else /* def SIGKILL */ {errno = EINVAL; return -1;} #endif /* ndef SIGKILL */ - if (x == Mono_Posix_Signum_SIGUSR1) -#ifdef SIGUSR1 - {*r = SIGUSR1; return 0;} -#else /* def SIGUSR1 */ - {errno = EINVAL; return -1;} -#endif /* ndef SIGUSR1 */ - if (x == Mono_Posix_Signum_SIGSEGV) -#ifdef SIGSEGV - {*r = SIGSEGV; return 0;} -#else /* def SIGSEGV */ - {errno = EINVAL; return -1;} -#endif /* ndef SIGSEGV */ - if (x == Mono_Posix_Signum_SIGUSR2) -#ifdef SIGUSR2 - {*r = SIGUSR2; return 0;} -#else /* def SIGUSR2 */ - {errno = EINVAL; return -1;} -#endif /* ndef SIGUSR2 */ if (x == Mono_Posix_Signum_SIGPIPE) #ifdef SIGPIPE {*r = SIGPIPE; return 0;} #else /* def SIGPIPE */ {errno = EINVAL; return -1;} #endif /* ndef SIGPIPE */ - if (x == Mono_Posix_Signum_SIGALRM) -#ifdef SIGALRM - {*r = SIGALRM; return 0;} -#else /* def SIGALRM */ + if (x == Mono_Posix_Signum_SIGPOLL) +#ifdef SIGPOLL + {*r = SIGPOLL; return 0;} +#else /* def SIGPOLL */ {errno = EINVAL; return -1;} -#endif /* ndef SIGALRM */ - if (x == Mono_Posix_Signum_SIGTERM) -#ifdef SIGTERM - {*r = SIGTERM; return 0;} -#else /* def SIGTERM */ +#endif /* ndef SIGPOLL */ + if (x == Mono_Posix_Signum_SIGPROF) +#ifdef SIGPROF + {*r = SIGPROF; return 0;} +#else /* def SIGPROF */ {errno = EINVAL; return -1;} -#endif /* ndef SIGTERM */ +#endif /* ndef SIGPROF */ + if (x == Mono_Posix_Signum_SIGPWR) +#ifdef SIGPWR + {*r = SIGPWR; return 0;} +#else /* def SIGPWR */ + {errno = EINVAL; return -1;} +#endif /* ndef SIGPWR */ + if (x == Mono_Posix_Signum_SIGQUIT) +#ifdef SIGQUIT + {*r = SIGQUIT; return 0;} +#else /* def SIGQUIT */ + {errno = EINVAL; return -1;} +#endif /* ndef SIGQUIT */ + if (x == Mono_Posix_Signum_SIGSEGV) +#ifdef SIGSEGV + {*r = SIGSEGV; return 0;} +#else /* def SIGSEGV */ + {errno = EINVAL; return -1;} +#endif /* ndef SIGSEGV */ if (x == Mono_Posix_Signum_SIGSTKFLT) #ifdef SIGSTKFLT {*r = SIGSTKFLT; return 0;} #else /* def SIGSTKFLT */ {errno = EINVAL; return -1;} #endif /* ndef SIGSTKFLT */ - if (x == Mono_Posix_Signum_SIGCHLD) -#ifdef SIGCHLD - {*r = SIGCHLD; return 0;} -#else /* def SIGCHLD */ - {errno = EINVAL; return -1;} -#endif /* ndef SIGCHLD */ - if (x == Mono_Posix_Signum_SIGCLD) -#ifdef SIGCLD - {*r = SIGCLD; return 0;} -#else /* def SIGCLD */ - {errno = EINVAL; return -1;} -#endif /* ndef SIGCLD */ - if (x == Mono_Posix_Signum_SIGCONT) -#ifdef SIGCONT - {*r = SIGCONT; return 0;} -#else /* def SIGCONT */ - {errno = EINVAL; return -1;} -#endif /* ndef SIGCONT */ if (x == Mono_Posix_Signum_SIGSTOP) #ifdef SIGSTOP {*r = SIGSTOP; return 0;} #else /* def SIGSTOP */ {errno = EINVAL; return -1;} #endif /* ndef SIGSTOP */ + if (x == Mono_Posix_Signum_SIGSYS) +#ifdef SIGSYS + {*r = SIGSYS; return 0;} +#else /* def SIGSYS */ + {errno = EINVAL; return -1;} +#endif /* ndef SIGSYS */ + if (x == Mono_Posix_Signum_SIGTERM) +#ifdef SIGTERM + {*r = SIGTERM; return 0;} +#else /* def SIGTERM */ + {errno = EINVAL; return -1;} +#endif /* ndef SIGTERM */ + if (x == Mono_Posix_Signum_SIGTRAP) +#ifdef SIGTRAP + {*r = SIGTRAP; return 0;} +#else /* def SIGTRAP */ + {errno = EINVAL; return -1;} +#endif /* ndef SIGTRAP */ if (x == Mono_Posix_Signum_SIGTSTP) #ifdef SIGTSTP {*r = SIGTSTP; return 0;} @@ -2797,72 +5176,54 @@ int Mono_Posix_FromSignum (int x, int *r) #else /* def SIGTTOU */ {errno = EINVAL; return -1;} #endif /* ndef SIGTTOU */ + if (x == Mono_Posix_Signum_SIGUNUSED) +#ifdef SIGUNUSED + {*r = SIGUNUSED; return 0;} +#else /* def SIGUNUSED */ + {errno = EINVAL; return -1;} +#endif /* ndef SIGUNUSED */ if (x == Mono_Posix_Signum_SIGURG) #ifdef SIGURG {*r = SIGURG; return 0;} #else /* def SIGURG */ {errno = EINVAL; return -1;} #endif /* ndef SIGURG */ - if (x == Mono_Posix_Signum_SIGXCPU) -#ifdef SIGXCPU - {*r = SIGXCPU; return 0;} -#else /* def SIGXCPU */ + if (x == Mono_Posix_Signum_SIGUSR1) +#ifdef SIGUSR1 + {*r = SIGUSR1; return 0;} +#else /* def SIGUSR1 */ {errno = EINVAL; return -1;} -#endif /* ndef SIGXCPU */ - if (x == Mono_Posix_Signum_SIGXFSZ) -#ifdef SIGXFSZ - {*r = SIGXFSZ; return 0;} -#else /* def SIGXFSZ */ +#endif /* ndef SIGUSR1 */ + if (x == Mono_Posix_Signum_SIGUSR2) +#ifdef SIGUSR2 + {*r = SIGUSR2; return 0;} +#else /* def SIGUSR2 */ {errno = EINVAL; return -1;} -#endif /* ndef SIGXFSZ */ +#endif /* ndef SIGUSR2 */ if (x == Mono_Posix_Signum_SIGVTALRM) #ifdef SIGVTALRM {*r = SIGVTALRM; return 0;} #else /* def SIGVTALRM */ {errno = EINVAL; return -1;} #endif /* ndef SIGVTALRM */ - if (x == Mono_Posix_Signum_SIGPROF) -#ifdef SIGPROF - {*r = SIGPROF; return 0;} -#else /* def SIGPROF */ - {errno = EINVAL; return -1;} -#endif /* ndef SIGPROF */ if (x == Mono_Posix_Signum_SIGWINCH) #ifdef SIGWINCH {*r = SIGWINCH; return 0;} #else /* def SIGWINCH */ {errno = EINVAL; return -1;} #endif /* ndef SIGWINCH */ - if (x == Mono_Posix_Signum_SIGIO) -#ifdef SIGIO - {*r = SIGIO; return 0;} -#else /* def SIGIO */ - {errno = EINVAL; return -1;} -#endif /* ndef SIGIO */ - if (x == Mono_Posix_Signum_SIGPOLL) -#ifdef SIGPOLL - {*r = SIGPOLL; return 0;} -#else /* def SIGPOLL */ - {errno = EINVAL; return -1;} -#endif /* ndef SIGPOLL */ - if (x == Mono_Posix_Signum_SIGPWR) -#ifdef SIGPWR - {*r = SIGPWR; return 0;} -#else /* def SIGPWR */ - {errno = EINVAL; return -1;} -#endif /* ndef SIGPWR */ - if (x == Mono_Posix_Signum_SIGSYS) -#ifdef SIGSYS - {*r = SIGSYS; return 0;} -#else /* def SIGSYS */ + if (x == Mono_Posix_Signum_SIGXCPU) +#ifdef SIGXCPU + {*r = SIGXCPU; return 0;} +#else /* def SIGXCPU */ {errno = EINVAL; return -1;} -#endif /* ndef SIGSYS */ - if (x == Mono_Posix_Signum_SIGUNUSED) -#ifdef SIGUNUSED - {*r = SIGUNUSED; return 0;} -#else /* def SIGUNUSED */ +#endif /* ndef SIGXCPU */ + if (x == Mono_Posix_Signum_SIGXFSZ) +#ifdef SIGXFSZ + {*r = SIGXFSZ; return 0;} +#else /* def SIGXFSZ */ {errno = EINVAL; return -1;} -#endif /* ndef SIGUNUSED */ +#endif /* ndef SIGXFSZ */ errno = EINVAL; return -1; } @@ -2871,90 +5232,102 @@ int Mono_Posix_ToSignum (int x, int *r) *r = 0; if (x == 0) return 0; -#ifdef SIGHUP - if (x == SIGHUP) - {*r = Mono_Posix_Signum_SIGHUP; return 0;} -#endif /* ndef SIGHUP */ -#ifdef SIGINT - if (x == SIGINT) - {*r = Mono_Posix_Signum_SIGINT; return 0;} -#endif /* ndef SIGINT */ -#ifdef SIGQUIT - if (x == SIGQUIT) - {*r = Mono_Posix_Signum_SIGQUIT; return 0;} -#endif /* ndef SIGQUIT */ -#ifdef SIGILL - if (x == SIGILL) - {*r = Mono_Posix_Signum_SIGILL; return 0;} -#endif /* ndef SIGILL */ -#ifdef SIGTRAP - if (x == SIGTRAP) - {*r = Mono_Posix_Signum_SIGTRAP; return 0;} -#endif /* ndef SIGTRAP */ #ifdef SIGABRT if (x == SIGABRT) {*r = Mono_Posix_Signum_SIGABRT; return 0;} #endif /* ndef SIGABRT */ -#ifdef SIGIOT - if (x == SIGIOT) - {*r = Mono_Posix_Signum_SIGIOT; return 0;} -#endif /* ndef SIGIOT */ +#ifdef SIGALRM + if (x == SIGALRM) + {*r = Mono_Posix_Signum_SIGALRM; return 0;} +#endif /* ndef SIGALRM */ #ifdef SIGBUS if (x == SIGBUS) {*r = Mono_Posix_Signum_SIGBUS; return 0;} #endif /* ndef SIGBUS */ +#ifdef SIGCHLD + if (x == SIGCHLD) + {*r = Mono_Posix_Signum_SIGCHLD; return 0;} +#endif /* ndef SIGCHLD */ +#ifdef SIGCLD + if (x == SIGCLD) + {*r = Mono_Posix_Signum_SIGCLD; return 0;} +#endif /* ndef SIGCLD */ +#ifdef SIGCONT + if (x == SIGCONT) + {*r = Mono_Posix_Signum_SIGCONT; return 0;} +#endif /* ndef SIGCONT */ #ifdef SIGFPE if (x == SIGFPE) {*r = Mono_Posix_Signum_SIGFPE; return 0;} #endif /* ndef SIGFPE */ +#ifdef SIGHUP + if (x == SIGHUP) + {*r = Mono_Posix_Signum_SIGHUP; return 0;} +#endif /* ndef SIGHUP */ +#ifdef SIGILL + if (x == SIGILL) + {*r = Mono_Posix_Signum_SIGILL; return 0;} +#endif /* ndef SIGILL */ +#ifdef SIGINT + if (x == SIGINT) + {*r = Mono_Posix_Signum_SIGINT; return 0;} +#endif /* ndef SIGINT */ +#ifdef SIGIO + if (x == SIGIO) + {*r = Mono_Posix_Signum_SIGIO; return 0;} +#endif /* ndef SIGIO */ +#ifdef SIGIOT + if (x == SIGIOT) + {*r = Mono_Posix_Signum_SIGIOT; return 0;} +#endif /* ndef SIGIOT */ #ifdef SIGKILL if (x == SIGKILL) {*r = Mono_Posix_Signum_SIGKILL; return 0;} #endif /* ndef SIGKILL */ -#ifdef SIGUSR1 - if (x == SIGUSR1) - {*r = Mono_Posix_Signum_SIGUSR1; return 0;} -#endif /* ndef SIGUSR1 */ -#ifdef SIGSEGV - if (x == SIGSEGV) - {*r = Mono_Posix_Signum_SIGSEGV; return 0;} -#endif /* ndef SIGSEGV */ -#ifdef SIGUSR2 - if (x == SIGUSR2) - {*r = Mono_Posix_Signum_SIGUSR2; return 0;} -#endif /* ndef SIGUSR2 */ #ifdef SIGPIPE if (x == SIGPIPE) {*r = Mono_Posix_Signum_SIGPIPE; return 0;} #endif /* ndef SIGPIPE */ -#ifdef SIGALRM - if (x == SIGALRM) - {*r = Mono_Posix_Signum_SIGALRM; return 0;} -#endif /* ndef SIGALRM */ -#ifdef SIGTERM - if (x == SIGTERM) - {*r = Mono_Posix_Signum_SIGTERM; return 0;} -#endif /* ndef SIGTERM */ +#ifdef SIGPOLL + if (x == SIGPOLL) + {*r = Mono_Posix_Signum_SIGPOLL; return 0;} +#endif /* ndef SIGPOLL */ +#ifdef SIGPROF + if (x == SIGPROF) + {*r = Mono_Posix_Signum_SIGPROF; return 0;} +#endif /* ndef SIGPROF */ +#ifdef SIGPWR + if (x == SIGPWR) + {*r = Mono_Posix_Signum_SIGPWR; return 0;} +#endif /* ndef SIGPWR */ +#ifdef SIGQUIT + if (x == SIGQUIT) + {*r = Mono_Posix_Signum_SIGQUIT; return 0;} +#endif /* ndef SIGQUIT */ +#ifdef SIGSEGV + if (x == SIGSEGV) + {*r = Mono_Posix_Signum_SIGSEGV; return 0;} +#endif /* ndef SIGSEGV */ #ifdef SIGSTKFLT if (x == SIGSTKFLT) {*r = Mono_Posix_Signum_SIGSTKFLT; return 0;} #endif /* ndef SIGSTKFLT */ -#ifdef SIGCHLD - if (x == SIGCHLD) - {*r = Mono_Posix_Signum_SIGCHLD; return 0;} -#endif /* ndef SIGCHLD */ -#ifdef SIGCLD - if (x == SIGCLD) - {*r = Mono_Posix_Signum_SIGCLD; return 0;} -#endif /* ndef SIGCLD */ -#ifdef SIGCONT - if (x == SIGCONT) - {*r = Mono_Posix_Signum_SIGCONT; return 0;} -#endif /* ndef SIGCONT */ #ifdef SIGSTOP if (x == SIGSTOP) {*r = Mono_Posix_Signum_SIGSTOP; return 0;} #endif /* ndef SIGSTOP */ +#ifdef SIGSYS + if (x == SIGSYS) + {*r = Mono_Posix_Signum_SIGSYS; return 0;} +#endif /* ndef SIGSYS */ +#ifdef SIGTERM + if (x == SIGTERM) + {*r = Mono_Posix_Signum_SIGTERM; return 0;} +#endif /* ndef SIGTERM */ +#ifdef SIGTRAP + if (x == SIGTRAP) + {*r = Mono_Posix_Signum_SIGTRAP; return 0;} +#endif /* ndef SIGTRAP */ #ifdef SIGTSTP if (x == SIGTSTP) {*r = Mono_Posix_Signum_SIGTSTP; return 0;} @@ -2967,368 +5340,38 @@ int Mono_Posix_ToSignum (int x, int *r) if (x == SIGTTOU) {*r = Mono_Posix_Signum_SIGTTOU; return 0;} #endif /* ndef SIGTTOU */ +#ifdef SIGUNUSED + if (x == SIGUNUSED) + {*r = Mono_Posix_Signum_SIGUNUSED; return 0;} +#endif /* ndef SIGUNUSED */ #ifdef SIGURG if (x == SIGURG) {*r = Mono_Posix_Signum_SIGURG; return 0;} #endif /* ndef SIGURG */ -#ifdef SIGXCPU - if (x == SIGXCPU) - {*r = Mono_Posix_Signum_SIGXCPU; return 0;} -#endif /* ndef SIGXCPU */ -#ifdef SIGXFSZ - if (x == SIGXFSZ) - {*r = Mono_Posix_Signum_SIGXFSZ; return 0;} -#endif /* ndef SIGXFSZ */ +#ifdef SIGUSR1 + if (x == SIGUSR1) + {*r = Mono_Posix_Signum_SIGUSR1; return 0;} +#endif /* ndef SIGUSR1 */ +#ifdef SIGUSR2 + if (x == SIGUSR2) + {*r = Mono_Posix_Signum_SIGUSR2; return 0;} +#endif /* ndef SIGUSR2 */ #ifdef SIGVTALRM if (x == SIGVTALRM) {*r = Mono_Posix_Signum_SIGVTALRM; return 0;} #endif /* ndef SIGVTALRM */ -#ifdef SIGPROF - if (x == SIGPROF) - {*r = Mono_Posix_Signum_SIGPROF; return 0;} -#endif /* ndef SIGPROF */ #ifdef SIGWINCH if (x == SIGWINCH) {*r = Mono_Posix_Signum_SIGWINCH; return 0;} #endif /* ndef SIGWINCH */ -#ifdef SIGIO - if (x == SIGIO) - {*r = Mono_Posix_Signum_SIGIO; return 0;} -#endif /* ndef SIGIO */ -#ifdef SIGPOLL - if (x == SIGPOLL) - {*r = Mono_Posix_Signum_SIGPOLL; return 0;} -#endif /* ndef SIGPOLL */ -#ifdef SIGPWR - if (x == SIGPWR) - {*r = Mono_Posix_Signum_SIGPWR; return 0;} -#endif /* ndef SIGPWR */ -#ifdef SIGSYS - if (x == SIGSYS) - {*r = Mono_Posix_Signum_SIGSYS; return 0;} -#endif /* ndef SIGSYS */ -#ifdef SIGUNUSED - if (x == SIGUNUSED) - {*r = Mono_Posix_Signum_SIGUNUSED; return 0;} -#endif /* ndef SIGUNUSED */ - errno = EINVAL; return -1; -} - -int Mono_Posix_FromWaitOptions (int x, int *r) -{ - *r = 0; - if (x == 0) - return 0; - if ((x & Mono_Posix_WaitOptions_WNOHANG) == Mono_Posix_WaitOptions_WNOHANG) -#ifdef WNOHANG - *r |= WNOHANG; -#else /* def WNOHANG */ - {errno = EINVAL; return -1;} -#endif /* ndef WNOHANG */ - if ((x & Mono_Posix_WaitOptions_WUNTRACED) == Mono_Posix_WaitOptions_WUNTRACED) -#ifdef WUNTRACED - *r |= WUNTRACED; -#else /* def WUNTRACED */ - {errno = EINVAL; return -1;} -#endif /* ndef WUNTRACED */ - return 0; -} - -int Mono_Posix_ToWaitOptions (int x, int *r) -{ - *r = 0; - if (x == 0) - return 0; -#ifdef WNOHANG - if ((x & WNOHANG) == WNOHANG) - *r |= Mono_Posix_WaitOptions_WNOHANG; -#endif /* ndef WNOHANG */ -#ifdef WUNTRACED - if ((x & WUNTRACED) == WUNTRACED) - *r |= Mono_Posix_WaitOptions_WUNTRACED; -#endif /* ndef WUNTRACED */ - return 0; -} - -int Mono_Posix_FromAccessMode (int x, int *r) -{ - *r = 0; - if (x == 0) - return 0; - if ((x & Mono_Posix_AccessMode_R_OK) == Mono_Posix_AccessMode_R_OK) -#ifdef R_OK - *r |= R_OK; -#else /* def R_OK */ - {errno = EINVAL; return -1;} -#endif /* ndef R_OK */ - if ((x & Mono_Posix_AccessMode_W_OK) == Mono_Posix_AccessMode_W_OK) -#ifdef W_OK - *r |= W_OK; -#else /* def W_OK */ - {errno = EINVAL; return -1;} -#endif /* ndef W_OK */ - if ((x & Mono_Posix_AccessMode_X_OK) == Mono_Posix_AccessMode_X_OK) -#ifdef X_OK - *r |= X_OK; -#else /* def X_OK */ - {errno = EINVAL; return -1;} -#endif /* ndef X_OK */ - if ((x & Mono_Posix_AccessMode_F_OK) == Mono_Posix_AccessMode_F_OK) -#ifdef F_OK - *r |= F_OK; -#else /* def F_OK */ - {errno = EINVAL; return -1;} -#endif /* ndef F_OK */ - return 0; -} - -int Mono_Posix_ToAccessMode (int x, int *r) -{ - *r = 0; - if (x == 0) - return 0; -#ifdef R_OK - if ((x & R_OK) == R_OK) - *r |= Mono_Posix_AccessMode_R_OK; -#endif /* ndef R_OK */ -#ifdef W_OK - if ((x & W_OK) == W_OK) - *r |= Mono_Posix_AccessMode_W_OK; -#endif /* ndef W_OK */ -#ifdef X_OK - if ((x & X_OK) == X_OK) - *r |= Mono_Posix_AccessMode_X_OK; -#endif /* ndef X_OK */ -#ifdef F_OK - if ((x & F_OK) == F_OK) - *r |= Mono_Posix_AccessMode_F_OK; -#endif /* ndef F_OK */ - return 0; -} - -int Mono_Posix_FromPathConf (int x, int *r) -{ - *r = 0; - if (x == 0) - return 0; - if (x == Mono_Posix_PathConf__PC_LINK_MAX) -#ifdef _PC_LINK_MAX - {*r = _PC_LINK_MAX; return 0;} -#else /* def _PC_LINK_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_LINK_MAX */ - if (x == Mono_Posix_PathConf__PC_MAX_CANON) -#ifdef _PC_MAX_CANON - {*r = _PC_MAX_CANON; return 0;} -#else /* def _PC_MAX_CANON */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_MAX_CANON */ - if (x == Mono_Posix_PathConf__PC_MAX_INPUT) -#ifdef _PC_MAX_INPUT - {*r = _PC_MAX_INPUT; return 0;} -#else /* def _PC_MAX_INPUT */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_MAX_INPUT */ - if (x == Mono_Posix_PathConf__PC_NAME_MAX) -#ifdef _PC_NAME_MAX - {*r = _PC_NAME_MAX; return 0;} -#else /* def _PC_NAME_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_NAME_MAX */ - if (x == Mono_Posix_PathConf__PC_PATH_MAX) -#ifdef _PC_PATH_MAX - {*r = _PC_PATH_MAX; return 0;} -#else /* def _PC_PATH_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_PATH_MAX */ - if (x == Mono_Posix_PathConf__PC_PIPE_BUF) -#ifdef _PC_PIPE_BUF - {*r = _PC_PIPE_BUF; return 0;} -#else /* def _PC_PIPE_BUF */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_PIPE_BUF */ - if (x == Mono_Posix_PathConf__PC_CHOWN_RESTRICTED) -#ifdef _PC_CHOWN_RESTRICTED - {*r = _PC_CHOWN_RESTRICTED; return 0;} -#else /* def _PC_CHOWN_RESTRICTED */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_CHOWN_RESTRICTED */ - if (x == Mono_Posix_PathConf__PC_NO_TRUNC) -#ifdef _PC_NO_TRUNC - {*r = _PC_NO_TRUNC; return 0;} -#else /* def _PC_NO_TRUNC */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_NO_TRUNC */ - if (x == Mono_Posix_PathConf__PC_VDISABLE) -#ifdef _PC_VDISABLE - {*r = _PC_VDISABLE; return 0;} -#else /* def _PC_VDISABLE */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_VDISABLE */ - if (x == Mono_Posix_PathConf__PC_SYNC_IO) -#ifdef _PC_SYNC_IO - {*r = _PC_SYNC_IO; return 0;} -#else /* def _PC_SYNC_IO */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_SYNC_IO */ - if (x == Mono_Posix_PathConf__PC_ASYNC_IO) -#ifdef _PC_ASYNC_IO - {*r = _PC_ASYNC_IO; return 0;} -#else /* def _PC_ASYNC_IO */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_ASYNC_IO */ - if (x == Mono_Posix_PathConf__PC_PRIO_IO) -#ifdef _PC_PRIO_IO - {*r = _PC_PRIO_IO; return 0;} -#else /* def _PC_PRIO_IO */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_PRIO_IO */ - if (x == Mono_Posix_PathConf__PC_SOCK_MAXBUF) -#ifdef _PC_SOCK_MAXBUF - {*r = _PC_SOCK_MAXBUF; return 0;} -#else /* def _PC_SOCK_MAXBUF */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_SOCK_MAXBUF */ - if (x == Mono_Posix_PathConf__PC_FILESIZEBITS) -#ifdef _PC_FILESIZEBITS - {*r = _PC_FILESIZEBITS; return 0;} -#else /* def _PC_FILESIZEBITS */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_FILESIZEBITS */ - if (x == Mono_Posix_PathConf__PC_REC_INCR_XFER_SIZE) -#ifdef _PC_REC_INCR_XFER_SIZE - {*r = _PC_REC_INCR_XFER_SIZE; return 0;} -#else /* def _PC_REC_INCR_XFER_SIZE */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_REC_INCR_XFER_SIZE */ - if (x == Mono_Posix_PathConf__PC_REC_MAX_XFER_SIZE) -#ifdef _PC_REC_MAX_XFER_SIZE - {*r = _PC_REC_MAX_XFER_SIZE; return 0;} -#else /* def _PC_REC_MAX_XFER_SIZE */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_REC_MAX_XFER_SIZE */ - if (x == Mono_Posix_PathConf__PC_REC_MIN_XFER_SIZE) -#ifdef _PC_REC_MIN_XFER_SIZE - {*r = _PC_REC_MIN_XFER_SIZE; return 0;} -#else /* def _PC_REC_MIN_XFER_SIZE */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_REC_MIN_XFER_SIZE */ - if (x == Mono_Posix_PathConf__PC_REC_XFER_ALIGN) -#ifdef _PC_REC_XFER_ALIGN - {*r = _PC_REC_XFER_ALIGN; return 0;} -#else /* def _PC_REC_XFER_ALIGN */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_REC_XFER_ALIGN */ - if (x == Mono_Posix_PathConf__PC_ALLOC_SIZE_MIN) -#ifdef _PC_ALLOC_SIZE_MIN - {*r = _PC_ALLOC_SIZE_MIN; return 0;} -#else /* def _PC_ALLOC_SIZE_MIN */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_ALLOC_SIZE_MIN */ - if (x == Mono_Posix_PathConf__PC_SYMLINK_MAX) -#ifdef _PC_SYMLINK_MAX - {*r = _PC_SYMLINK_MAX; return 0;} -#else /* def _PC_SYMLINK_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_SYMLINK_MAX */ - if (x == Mono_Posix_PathConf__PC_2_SYMLINKS) -#ifdef _PC_2_SYMLINKS - {*r = _PC_2_SYMLINKS; return 0;} -#else /* def _PC_2_SYMLINKS */ - {errno = EINVAL; return -1;} -#endif /* ndef _PC_2_SYMLINKS */ - errno = EINVAL; return -1; -} - -int Mono_Posix_ToPathConf (int x, int *r) -{ - *r = 0; - if (x == 0) - return 0; -#ifdef _PC_LINK_MAX - if (x == _PC_LINK_MAX) - {*r = Mono_Posix_PathConf__PC_LINK_MAX; return 0;} -#endif /* ndef _PC_LINK_MAX */ -#ifdef _PC_MAX_CANON - if (x == _PC_MAX_CANON) - {*r = Mono_Posix_PathConf__PC_MAX_CANON; return 0;} -#endif /* ndef _PC_MAX_CANON */ -#ifdef _PC_MAX_INPUT - if (x == _PC_MAX_INPUT) - {*r = Mono_Posix_PathConf__PC_MAX_INPUT; return 0;} -#endif /* ndef _PC_MAX_INPUT */ -#ifdef _PC_NAME_MAX - if (x == _PC_NAME_MAX) - {*r = Mono_Posix_PathConf__PC_NAME_MAX; return 0;} -#endif /* ndef _PC_NAME_MAX */ -#ifdef _PC_PATH_MAX - if (x == _PC_PATH_MAX) - {*r = Mono_Posix_PathConf__PC_PATH_MAX; return 0;} -#endif /* ndef _PC_PATH_MAX */ -#ifdef _PC_PIPE_BUF - if (x == _PC_PIPE_BUF) - {*r = Mono_Posix_PathConf__PC_PIPE_BUF; return 0;} -#endif /* ndef _PC_PIPE_BUF */ -#ifdef _PC_CHOWN_RESTRICTED - if (x == _PC_CHOWN_RESTRICTED) - {*r = Mono_Posix_PathConf__PC_CHOWN_RESTRICTED; return 0;} -#endif /* ndef _PC_CHOWN_RESTRICTED */ -#ifdef _PC_NO_TRUNC - if (x == _PC_NO_TRUNC) - {*r = Mono_Posix_PathConf__PC_NO_TRUNC; return 0;} -#endif /* ndef _PC_NO_TRUNC */ -#ifdef _PC_VDISABLE - if (x == _PC_VDISABLE) - {*r = Mono_Posix_PathConf__PC_VDISABLE; return 0;} -#endif /* ndef _PC_VDISABLE */ -#ifdef _PC_SYNC_IO - if (x == _PC_SYNC_IO) - {*r = Mono_Posix_PathConf__PC_SYNC_IO; return 0;} -#endif /* ndef _PC_SYNC_IO */ -#ifdef _PC_ASYNC_IO - if (x == _PC_ASYNC_IO) - {*r = Mono_Posix_PathConf__PC_ASYNC_IO; return 0;} -#endif /* ndef _PC_ASYNC_IO */ -#ifdef _PC_PRIO_IO - if (x == _PC_PRIO_IO) - {*r = Mono_Posix_PathConf__PC_PRIO_IO; return 0;} -#endif /* ndef _PC_PRIO_IO */ -#ifdef _PC_SOCK_MAXBUF - if (x == _PC_SOCK_MAXBUF) - {*r = Mono_Posix_PathConf__PC_SOCK_MAXBUF; return 0;} -#endif /* ndef _PC_SOCK_MAXBUF */ -#ifdef _PC_FILESIZEBITS - if (x == _PC_FILESIZEBITS) - {*r = Mono_Posix_PathConf__PC_FILESIZEBITS; return 0;} -#endif /* ndef _PC_FILESIZEBITS */ -#ifdef _PC_REC_INCR_XFER_SIZE - if (x == _PC_REC_INCR_XFER_SIZE) - {*r = Mono_Posix_PathConf__PC_REC_INCR_XFER_SIZE; return 0;} -#endif /* ndef _PC_REC_INCR_XFER_SIZE */ -#ifdef _PC_REC_MAX_XFER_SIZE - if (x == _PC_REC_MAX_XFER_SIZE) - {*r = Mono_Posix_PathConf__PC_REC_MAX_XFER_SIZE; return 0;} -#endif /* ndef _PC_REC_MAX_XFER_SIZE */ -#ifdef _PC_REC_MIN_XFER_SIZE - if (x == _PC_REC_MIN_XFER_SIZE) - {*r = Mono_Posix_PathConf__PC_REC_MIN_XFER_SIZE; return 0;} -#endif /* ndef _PC_REC_MIN_XFER_SIZE */ -#ifdef _PC_REC_XFER_ALIGN - if (x == _PC_REC_XFER_ALIGN) - {*r = Mono_Posix_PathConf__PC_REC_XFER_ALIGN; return 0;} -#endif /* ndef _PC_REC_XFER_ALIGN */ -#ifdef _PC_ALLOC_SIZE_MIN - if (x == _PC_ALLOC_SIZE_MIN) - {*r = Mono_Posix_PathConf__PC_ALLOC_SIZE_MIN; return 0;} -#endif /* ndef _PC_ALLOC_SIZE_MIN */ -#ifdef _PC_SYMLINK_MAX - if (x == _PC_SYMLINK_MAX) - {*r = Mono_Posix_PathConf__PC_SYMLINK_MAX; return 0;} -#endif /* ndef _PC_SYMLINK_MAX */ -#ifdef _PC_2_SYMLINKS - if (x == _PC_2_SYMLINKS) - {*r = Mono_Posix_PathConf__PC_2_SYMLINKS; return 0;} -#endif /* ndef _PC_2_SYMLINKS */ +#ifdef SIGXCPU + if (x == SIGXCPU) + {*r = Mono_Posix_Signum_SIGXCPU; return 0;} +#endif /* ndef SIGXCPU */ +#ifdef SIGXFSZ + if (x == SIGXFSZ) + {*r = Mono_Posix_Signum_SIGXFSZ; return 0;} +#endif /* ndef SIGXFSZ */ errno = EINVAL; return -1; } @@ -3337,144 +5380,108 @@ int Mono_Posix_FromSysConf (int x, int *r) *r = 0; if (x == 0) return 0; - if (x == Mono_Posix_SysConf__SC_ARG_MAX) -#ifdef _SC_ARG_MAX - {*r = _SC_ARG_MAX; return 0;} -#else /* def _SC_ARG_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_ARG_MAX */ - if (x == Mono_Posix_SysConf__SC_CHILD_MAX) -#ifdef _SC_CHILD_MAX - {*r = _SC_CHILD_MAX; return 0;} -#else /* def _SC_CHILD_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_CHILD_MAX */ - if (x == Mono_Posix_SysConf__SC_CLK_TCK) -#ifdef _SC_CLK_TCK - {*r = _SC_CLK_TCK; return 0;} -#else /* def _SC_CLK_TCK */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_CLK_TCK */ - if (x == Mono_Posix_SysConf__SC_NGROUPS_MAX) -#ifdef _SC_NGROUPS_MAX - {*r = _SC_NGROUPS_MAX; return 0;} -#else /* def _SC_NGROUPS_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_NGROUPS_MAX */ - if (x == Mono_Posix_SysConf__SC_OPEN_MAX) -#ifdef _SC_OPEN_MAX - {*r = _SC_OPEN_MAX; return 0;} -#else /* def _SC_OPEN_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_OPEN_MAX */ - if (x == Mono_Posix_SysConf__SC_STREAM_MAX) -#ifdef _SC_STREAM_MAX - {*r = _SC_STREAM_MAX; return 0;} -#else /* def _SC_STREAM_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_STREAM_MAX */ - if (x == Mono_Posix_SysConf__SC_TZNAME_MAX) -#ifdef _SC_TZNAME_MAX - {*r = _SC_TZNAME_MAX; return 0;} -#else /* def _SC_TZNAME_MAX */ + if (x == Mono_Posix_SysConf__SC_2_CHAR_TERM) +#ifdef _SC_2_CHAR_TERM + {*r = _SC_2_CHAR_TERM; return 0;} +#else /* def _SC_2_CHAR_TERM */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_TZNAME_MAX */ - if (x == Mono_Posix_SysConf__SC_JOB_CONTROL) -#ifdef _SC_JOB_CONTROL - {*r = _SC_JOB_CONTROL; return 0;} -#else /* def _SC_JOB_CONTROL */ +#endif /* ndef _SC_2_CHAR_TERM */ + if (x == Mono_Posix_SysConf__SC_2_C_BIND) +#ifdef _SC_2_C_BIND + {*r = _SC_2_C_BIND; return 0;} +#else /* def _SC_2_C_BIND */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_JOB_CONTROL */ - if (x == Mono_Posix_SysConf__SC_SAVED_IDS) -#ifdef _SC_SAVED_IDS - {*r = _SC_SAVED_IDS; return 0;} -#else /* def _SC_SAVED_IDS */ +#endif /* ndef _SC_2_C_BIND */ + if (x == Mono_Posix_SysConf__SC_2_C_DEV) +#ifdef _SC_2_C_DEV + {*r = _SC_2_C_DEV; return 0;} +#else /* def _SC_2_C_DEV */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_SAVED_IDS */ - if (x == Mono_Posix_SysConf__SC_REALTIME_SIGNALS) -#ifdef _SC_REALTIME_SIGNALS - {*r = _SC_REALTIME_SIGNALS; return 0;} -#else /* def _SC_REALTIME_SIGNALS */ +#endif /* ndef _SC_2_C_DEV */ + if (x == Mono_Posix_SysConf__SC_2_C_VERSION) +#ifdef _SC_2_C_VERSION + {*r = _SC_2_C_VERSION; return 0;} +#else /* def _SC_2_C_VERSION */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_REALTIME_SIGNALS */ - if (x == Mono_Posix_SysConf__SC_PRIORITY_SCHEDULING) -#ifdef _SC_PRIORITY_SCHEDULING - {*r = _SC_PRIORITY_SCHEDULING; return 0;} -#else /* def _SC_PRIORITY_SCHEDULING */ +#endif /* ndef _SC_2_C_VERSION */ + if (x == Mono_Posix_SysConf__SC_2_FORT_DEV) +#ifdef _SC_2_FORT_DEV + {*r = _SC_2_FORT_DEV; return 0;} +#else /* def _SC_2_FORT_DEV */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_PRIORITY_SCHEDULING */ - if (x == Mono_Posix_SysConf__SC_TIMERS) -#ifdef _SC_TIMERS - {*r = _SC_TIMERS; return 0;} -#else /* def _SC_TIMERS */ +#endif /* ndef _SC_2_FORT_DEV */ + if (x == Mono_Posix_SysConf__SC_2_FORT_RUN) +#ifdef _SC_2_FORT_RUN + {*r = _SC_2_FORT_RUN; return 0;} +#else /* def _SC_2_FORT_RUN */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_TIMERS */ - if (x == Mono_Posix_SysConf__SC_ASYNCHRONOUS_IO) -#ifdef _SC_ASYNCHRONOUS_IO - {*r = _SC_ASYNCHRONOUS_IO; return 0;} -#else /* def _SC_ASYNCHRONOUS_IO */ +#endif /* ndef _SC_2_FORT_RUN */ + if (x == Mono_Posix_SysConf__SC_2_LOCALEDEF) +#ifdef _SC_2_LOCALEDEF + {*r = _SC_2_LOCALEDEF; return 0;} +#else /* def _SC_2_LOCALEDEF */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_ASYNCHRONOUS_IO */ - if (x == Mono_Posix_SysConf__SC_PRIORITIZED_IO) -#ifdef _SC_PRIORITIZED_IO - {*r = _SC_PRIORITIZED_IO; return 0;} -#else /* def _SC_PRIORITIZED_IO */ +#endif /* ndef _SC_2_LOCALEDEF */ + if (x == Mono_Posix_SysConf__SC_2_PBS) +#ifdef _SC_2_PBS + {*r = _SC_2_PBS; return 0;} +#else /* def _SC_2_PBS */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_PRIORITIZED_IO */ - if (x == Mono_Posix_SysConf__SC_SYNCHRONIZED_IO) -#ifdef _SC_SYNCHRONIZED_IO - {*r = _SC_SYNCHRONIZED_IO; return 0;} -#else /* def _SC_SYNCHRONIZED_IO */ +#endif /* ndef _SC_2_PBS */ + if (x == Mono_Posix_SysConf__SC_2_PBS_ACCOUNTING) +#ifdef _SC_2_PBS_ACCOUNTING + {*r = _SC_2_PBS_ACCOUNTING; return 0;} +#else /* def _SC_2_PBS_ACCOUNTING */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_SYNCHRONIZED_IO */ - if (x == Mono_Posix_SysConf__SC_FSYNC) -#ifdef _SC_FSYNC - {*r = _SC_FSYNC; return 0;} -#else /* def _SC_FSYNC */ +#endif /* ndef _SC_2_PBS_ACCOUNTING */ + if (x == Mono_Posix_SysConf__SC_2_PBS_CHECKPOINT) +#ifdef _SC_2_PBS_CHECKPOINT + {*r = _SC_2_PBS_CHECKPOINT; return 0;} +#else /* def _SC_2_PBS_CHECKPOINT */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_FSYNC */ - if (x == Mono_Posix_SysConf__SC_MAPPED_FILES) -#ifdef _SC_MAPPED_FILES - {*r = _SC_MAPPED_FILES; return 0;} -#else /* def _SC_MAPPED_FILES */ +#endif /* ndef _SC_2_PBS_CHECKPOINT */ + if (x == Mono_Posix_SysConf__SC_2_PBS_LOCATE) +#ifdef _SC_2_PBS_LOCATE + {*r = _SC_2_PBS_LOCATE; return 0;} +#else /* def _SC_2_PBS_LOCATE */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_MAPPED_FILES */ - if (x == Mono_Posix_SysConf__SC_MEMLOCK) -#ifdef _SC_MEMLOCK - {*r = _SC_MEMLOCK; return 0;} -#else /* def _SC_MEMLOCK */ +#endif /* ndef _SC_2_PBS_LOCATE */ + if (x == Mono_Posix_SysConf__SC_2_PBS_MESSAGE) +#ifdef _SC_2_PBS_MESSAGE + {*r = _SC_2_PBS_MESSAGE; return 0;} +#else /* def _SC_2_PBS_MESSAGE */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_MEMLOCK */ - if (x == Mono_Posix_SysConf__SC_MEMLOCK_RANGE) -#ifdef _SC_MEMLOCK_RANGE - {*r = _SC_MEMLOCK_RANGE; return 0;} -#else /* def _SC_MEMLOCK_RANGE */ +#endif /* ndef _SC_2_PBS_MESSAGE */ + if (x == Mono_Posix_SysConf__SC_2_PBS_TRACK) +#ifdef _SC_2_PBS_TRACK + {*r = _SC_2_PBS_TRACK; return 0;} +#else /* def _SC_2_PBS_TRACK */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_MEMLOCK_RANGE */ - if (x == Mono_Posix_SysConf__SC_MEMORY_PROTECTION) -#ifdef _SC_MEMORY_PROTECTION - {*r = _SC_MEMORY_PROTECTION; return 0;} -#else /* def _SC_MEMORY_PROTECTION */ +#endif /* ndef _SC_2_PBS_TRACK */ + if (x == Mono_Posix_SysConf__SC_2_SW_DEV) +#ifdef _SC_2_SW_DEV + {*r = _SC_2_SW_DEV; return 0;} +#else /* def _SC_2_SW_DEV */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_MEMORY_PROTECTION */ - if (x == Mono_Posix_SysConf__SC_MESSAGE_PASSING) -#ifdef _SC_MESSAGE_PASSING - {*r = _SC_MESSAGE_PASSING; return 0;} -#else /* def _SC_MESSAGE_PASSING */ +#endif /* ndef _SC_2_SW_DEV */ + if (x == Mono_Posix_SysConf__SC_2_UPE) +#ifdef _SC_2_UPE + {*r = _SC_2_UPE; return 0;} +#else /* def _SC_2_UPE */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_MESSAGE_PASSING */ - if (x == Mono_Posix_SysConf__SC_SEMAPHORES) -#ifdef _SC_SEMAPHORES - {*r = _SC_SEMAPHORES; return 0;} -#else /* def _SC_SEMAPHORES */ +#endif /* ndef _SC_2_UPE */ + if (x == Mono_Posix_SysConf__SC_2_VERSION) +#ifdef _SC_2_VERSION + {*r = _SC_2_VERSION; return 0;} +#else /* def _SC_2_VERSION */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_SEMAPHORES */ - if (x == Mono_Posix_SysConf__SC_SHARED_MEMORY_OBJECTS) -#ifdef _SC_SHARED_MEMORY_OBJECTS - {*r = _SC_SHARED_MEMORY_OBJECTS; return 0;} -#else /* def _SC_SHARED_MEMORY_OBJECTS */ +#endif /* ndef _SC_2_VERSION */ + if (x == Mono_Posix_SysConf__SC_ADVISORY_INFO) +#ifdef _SC_ADVISORY_INFO + {*r = _SC_ADVISORY_INFO; return 0;} +#else /* def _SC_ADVISORY_INFO */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_SHARED_MEMORY_OBJECTS */ +#endif /* ndef _SC_ADVISORY_INFO */ if (x == Mono_Posix_SysConf__SC_AIO_LISTIO_MAX) #ifdef _SC_AIO_LISTIO_MAX {*r = _SC_AIO_LISTIO_MAX; return 0;} @@ -3493,66 +5500,42 @@ int Mono_Posix_FromSysConf (int x, int *r) #else /* def _SC_AIO_PRIO_DELTA_MAX */ {errno = EINVAL; return -1;} #endif /* ndef _SC_AIO_PRIO_DELTA_MAX */ - if (x == Mono_Posix_SysConf__SC_DELAYTIMER_MAX) -#ifdef _SC_DELAYTIMER_MAX - {*r = _SC_DELAYTIMER_MAX; return 0;} -#else /* def _SC_DELAYTIMER_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_DELAYTIMER_MAX */ - if (x == Mono_Posix_SysConf__SC_MQ_OPEN_MAX) -#ifdef _SC_MQ_OPEN_MAX - {*r = _SC_MQ_OPEN_MAX; return 0;} -#else /* def _SC_MQ_OPEN_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_MQ_OPEN_MAX */ - if (x == Mono_Posix_SysConf__SC_MQ_PRIO_MAX) -#ifdef _SC_MQ_PRIO_MAX - {*r = _SC_MQ_PRIO_MAX; return 0;} -#else /* def _SC_MQ_PRIO_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_MQ_PRIO_MAX */ - if (x == Mono_Posix_SysConf__SC_VERSION) -#ifdef _SC_VERSION - {*r = _SC_VERSION; return 0;} -#else /* def _SC_VERSION */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_VERSION */ - if (x == Mono_Posix_SysConf__SC_PAGESIZE) -#ifdef _SC_PAGESIZE - {*r = _SC_PAGESIZE; return 0;} -#else /* def _SC_PAGESIZE */ + if (x == Mono_Posix_SysConf__SC_ARG_MAX) +#ifdef _SC_ARG_MAX + {*r = _SC_ARG_MAX; return 0;} +#else /* def _SC_ARG_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_PAGESIZE */ - if (x == Mono_Posix_SysConf__SC_RTSIG_MAX) -#ifdef _SC_RTSIG_MAX - {*r = _SC_RTSIG_MAX; return 0;} -#else /* def _SC_RTSIG_MAX */ +#endif /* ndef _SC_ARG_MAX */ + if (x == Mono_Posix_SysConf__SC_ASYNCHRONOUS_IO) +#ifdef _SC_ASYNCHRONOUS_IO + {*r = _SC_ASYNCHRONOUS_IO; return 0;} +#else /* def _SC_ASYNCHRONOUS_IO */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_RTSIG_MAX */ - if (x == Mono_Posix_SysConf__SC_SEM_NSEMS_MAX) -#ifdef _SC_SEM_NSEMS_MAX - {*r = _SC_SEM_NSEMS_MAX; return 0;} -#else /* def _SC_SEM_NSEMS_MAX */ +#endif /* ndef _SC_ASYNCHRONOUS_IO */ + if (x == Mono_Posix_SysConf__SC_ATEXIT_MAX) +#ifdef _SC_ATEXIT_MAX + {*r = _SC_ATEXIT_MAX; return 0;} +#else /* def _SC_ATEXIT_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_SEM_NSEMS_MAX */ - if (x == Mono_Posix_SysConf__SC_SEM_VALUE_MAX) -#ifdef _SC_SEM_VALUE_MAX - {*r = _SC_SEM_VALUE_MAX; return 0;} -#else /* def _SC_SEM_VALUE_MAX */ +#endif /* ndef _SC_ATEXIT_MAX */ + if (x == Mono_Posix_SysConf__SC_AVPHYS_PAGES) +#ifdef _SC_AVPHYS_PAGES + {*r = _SC_AVPHYS_PAGES; return 0;} +#else /* def _SC_AVPHYS_PAGES */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_SEM_VALUE_MAX */ - if (x == Mono_Posix_SysConf__SC_SIGQUEUE_MAX) -#ifdef _SC_SIGQUEUE_MAX - {*r = _SC_SIGQUEUE_MAX; return 0;} -#else /* def _SC_SIGQUEUE_MAX */ +#endif /* ndef _SC_AVPHYS_PAGES */ + if (x == Mono_Posix_SysConf__SC_BARRIERS) +#ifdef _SC_BARRIERS + {*r = _SC_BARRIERS; return 0;} +#else /* def _SC_BARRIERS */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_SIGQUEUE_MAX */ - if (x == Mono_Posix_SysConf__SC_TIMER_MAX) -#ifdef _SC_TIMER_MAX - {*r = _SC_TIMER_MAX; return 0;} -#else /* def _SC_TIMER_MAX */ +#endif /* ndef _SC_BARRIERS */ + if (x == Mono_Posix_SysConf__SC_BASE) +#ifdef _SC_BASE + {*r = _SC_BASE; return 0;} +#else /* def _SC_BASE */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_TIMER_MAX */ +#endif /* ndef _SC_BASE */ if (x == Mono_Posix_SysConf__SC_BC_BASE_MAX) #ifdef _SC_BC_BASE_MAX {*r = _SC_BC_BASE_MAX; return 0;} @@ -3577,186 +5560,144 @@ int Mono_Posix_FromSysConf (int x, int *r) #else /* def _SC_BC_STRING_MAX */ {errno = EINVAL; return -1;} #endif /* ndef _SC_BC_STRING_MAX */ - if (x == Mono_Posix_SysConf__SC_COLL_WEIGHTS_MAX) -#ifdef _SC_COLL_WEIGHTS_MAX - {*r = _SC_COLL_WEIGHTS_MAX; return 0;} -#else /* def _SC_COLL_WEIGHTS_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_COLL_WEIGHTS_MAX */ - if (x == Mono_Posix_SysConf__SC_EQUIV_CLASS_MAX) -#ifdef _SC_EQUIV_CLASS_MAX - {*r = _SC_EQUIV_CLASS_MAX; return 0;} -#else /* def _SC_EQUIV_CLASS_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_EQUIV_CLASS_MAX */ - if (x == Mono_Posix_SysConf__SC_EXPR_NEST_MAX) -#ifdef _SC_EXPR_NEST_MAX - {*r = _SC_EXPR_NEST_MAX; return 0;} -#else /* def _SC_EXPR_NEST_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_EXPR_NEST_MAX */ - if (x == Mono_Posix_SysConf__SC_LINE_MAX) -#ifdef _SC_LINE_MAX - {*r = _SC_LINE_MAX; return 0;} -#else /* def _SC_LINE_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_LINE_MAX */ - if (x == Mono_Posix_SysConf__SC_RE_DUP_MAX) -#ifdef _SC_RE_DUP_MAX - {*r = _SC_RE_DUP_MAX; return 0;} -#else /* def _SC_RE_DUP_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_RE_DUP_MAX */ if (x == Mono_Posix_SysConf__SC_CHARCLASS_NAME_MAX) #ifdef _SC_CHARCLASS_NAME_MAX {*r = _SC_CHARCLASS_NAME_MAX; return 0;} #else /* def _SC_CHARCLASS_NAME_MAX */ {errno = EINVAL; return -1;} #endif /* ndef _SC_CHARCLASS_NAME_MAX */ - if (x == Mono_Posix_SysConf__SC_2_VERSION) -#ifdef _SC_2_VERSION - {*r = _SC_2_VERSION; return 0;} -#else /* def _SC_2_VERSION */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_2_VERSION */ - if (x == Mono_Posix_SysConf__SC_2_C_BIND) -#ifdef _SC_2_C_BIND - {*r = _SC_2_C_BIND; return 0;} -#else /* def _SC_2_C_BIND */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_2_C_BIND */ - if (x == Mono_Posix_SysConf__SC_2_C_DEV) -#ifdef _SC_2_C_DEV - {*r = _SC_2_C_DEV; return 0;} -#else /* def _SC_2_C_DEV */ + if (x == Mono_Posix_SysConf__SC_CHAR_BIT) +#ifdef _SC_CHAR_BIT + {*r = _SC_CHAR_BIT; return 0;} +#else /* def _SC_CHAR_BIT */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_2_C_DEV */ - if (x == Mono_Posix_SysConf__SC_2_FORT_DEV) -#ifdef _SC_2_FORT_DEV - {*r = _SC_2_FORT_DEV; return 0;} -#else /* def _SC_2_FORT_DEV */ +#endif /* ndef _SC_CHAR_BIT */ + if (x == Mono_Posix_SysConf__SC_CHAR_MAX) +#ifdef _SC_CHAR_MAX + {*r = _SC_CHAR_MAX; return 0;} +#else /* def _SC_CHAR_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_2_FORT_DEV */ - if (x == Mono_Posix_SysConf__SC_2_FORT_RUN) -#ifdef _SC_2_FORT_RUN - {*r = _SC_2_FORT_RUN; return 0;} -#else /* def _SC_2_FORT_RUN */ +#endif /* ndef _SC_CHAR_MAX */ + if (x == Mono_Posix_SysConf__SC_CHAR_MIN) +#ifdef _SC_CHAR_MIN + {*r = _SC_CHAR_MIN; return 0;} +#else /* def _SC_CHAR_MIN */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_2_FORT_RUN */ - if (x == Mono_Posix_SysConf__SC_2_SW_DEV) -#ifdef _SC_2_SW_DEV - {*r = _SC_2_SW_DEV; return 0;} -#else /* def _SC_2_SW_DEV */ +#endif /* ndef _SC_CHAR_MIN */ + if (x == Mono_Posix_SysConf__SC_CHILD_MAX) +#ifdef _SC_CHILD_MAX + {*r = _SC_CHILD_MAX; return 0;} +#else /* def _SC_CHILD_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_2_SW_DEV */ - if (x == Mono_Posix_SysConf__SC_2_LOCALEDEF) -#ifdef _SC_2_LOCALEDEF - {*r = _SC_2_LOCALEDEF; return 0;} -#else /* def _SC_2_LOCALEDEF */ +#endif /* ndef _SC_CHILD_MAX */ + if (x == Mono_Posix_SysConf__SC_CLK_TCK) +#ifdef _SC_CLK_TCK + {*r = _SC_CLK_TCK; return 0;} +#else /* def _SC_CLK_TCK */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_2_LOCALEDEF */ - if (x == Mono_Posix_SysConf__SC_PII) -#ifdef _SC_PII - {*r = _SC_PII; return 0;} -#else /* def _SC_PII */ +#endif /* ndef _SC_CLK_TCK */ + if (x == Mono_Posix_SysConf__SC_CLOCK_SELECTION) +#ifdef _SC_CLOCK_SELECTION + {*r = _SC_CLOCK_SELECTION; return 0;} +#else /* def _SC_CLOCK_SELECTION */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_PII */ - if (x == Mono_Posix_SysConf__SC_PII_XTI) -#ifdef _SC_PII_XTI - {*r = _SC_PII_XTI; return 0;} -#else /* def _SC_PII_XTI */ +#endif /* ndef _SC_CLOCK_SELECTION */ + if (x == Mono_Posix_SysConf__SC_COLL_WEIGHTS_MAX) +#ifdef _SC_COLL_WEIGHTS_MAX + {*r = _SC_COLL_WEIGHTS_MAX; return 0;} +#else /* def _SC_COLL_WEIGHTS_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_PII_XTI */ - if (x == Mono_Posix_SysConf__SC_PII_SOCKET) -#ifdef _SC_PII_SOCKET - {*r = _SC_PII_SOCKET; return 0;} -#else /* def _SC_PII_SOCKET */ +#endif /* ndef _SC_COLL_WEIGHTS_MAX */ + if (x == Mono_Posix_SysConf__SC_CPUTIME) +#ifdef _SC_CPUTIME + {*r = _SC_CPUTIME; return 0;} +#else /* def _SC_CPUTIME */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_PII_SOCKET */ - if (x == Mono_Posix_SysConf__SC_PII_INTERNET) -#ifdef _SC_PII_INTERNET - {*r = _SC_PII_INTERNET; return 0;} -#else /* def _SC_PII_INTERNET */ +#endif /* ndef _SC_CPUTIME */ + if (x == Mono_Posix_SysConf__SC_C_LANG_SUPPORT) +#ifdef _SC_C_LANG_SUPPORT + {*r = _SC_C_LANG_SUPPORT; return 0;} +#else /* def _SC_C_LANG_SUPPORT */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_PII_INTERNET */ - if (x == Mono_Posix_SysConf__SC_PII_OSI) -#ifdef _SC_PII_OSI - {*r = _SC_PII_OSI; return 0;} -#else /* def _SC_PII_OSI */ +#endif /* ndef _SC_C_LANG_SUPPORT */ + if (x == Mono_Posix_SysConf__SC_C_LANG_SUPPORT_R) +#ifdef _SC_C_LANG_SUPPORT_R + {*r = _SC_C_LANG_SUPPORT_R; return 0;} +#else /* def _SC_C_LANG_SUPPORT_R */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_PII_OSI */ - if (x == Mono_Posix_SysConf__SC_POLL) -#ifdef _SC_POLL - {*r = _SC_POLL; return 0;} -#else /* def _SC_POLL */ +#endif /* ndef _SC_C_LANG_SUPPORT_R */ + if (x == Mono_Posix_SysConf__SC_DELAYTIMER_MAX) +#ifdef _SC_DELAYTIMER_MAX + {*r = _SC_DELAYTIMER_MAX; return 0;} +#else /* def _SC_DELAYTIMER_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_POLL */ - if (x == Mono_Posix_SysConf__SC_SELECT) -#ifdef _SC_SELECT - {*r = _SC_SELECT; return 0;} -#else /* def _SC_SELECT */ +#endif /* ndef _SC_DELAYTIMER_MAX */ + if (x == Mono_Posix_SysConf__SC_DEVICE_IO) +#ifdef _SC_DEVICE_IO + {*r = _SC_DEVICE_IO; return 0;} +#else /* def _SC_DEVICE_IO */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_SELECT */ - if (x == Mono_Posix_SysConf__SC_UIO_MAXIOV) -#ifdef _SC_UIO_MAXIOV - {*r = _SC_UIO_MAXIOV; return 0;} -#else /* def _SC_UIO_MAXIOV */ +#endif /* ndef _SC_DEVICE_IO */ + if (x == Mono_Posix_SysConf__SC_DEVICE_SPECIFIC) +#ifdef _SC_DEVICE_SPECIFIC + {*r = _SC_DEVICE_SPECIFIC; return 0;} +#else /* def _SC_DEVICE_SPECIFIC */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_UIO_MAXIOV */ - if (x == Mono_Posix_SysConf__SC_IOV_MAX) -#ifdef _SC_IOV_MAX - {*r = _SC_IOV_MAX; return 0;} -#else /* def _SC_IOV_MAX */ +#endif /* ndef _SC_DEVICE_SPECIFIC */ + if (x == Mono_Posix_SysConf__SC_DEVICE_SPECIFIC_R) +#ifdef _SC_DEVICE_SPECIFIC_R + {*r = _SC_DEVICE_SPECIFIC_R; return 0;} +#else /* def _SC_DEVICE_SPECIFIC_R */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_IOV_MAX */ - if (x == Mono_Posix_SysConf__SC_PII_INTERNET_STREAM) -#ifdef _SC_PII_INTERNET_STREAM - {*r = _SC_PII_INTERNET_STREAM; return 0;} -#else /* def _SC_PII_INTERNET_STREAM */ +#endif /* ndef _SC_DEVICE_SPECIFIC_R */ + if (x == Mono_Posix_SysConf__SC_EQUIV_CLASS_MAX) +#ifdef _SC_EQUIV_CLASS_MAX + {*r = _SC_EQUIV_CLASS_MAX; return 0;} +#else /* def _SC_EQUIV_CLASS_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_PII_INTERNET_STREAM */ - if (x == Mono_Posix_SysConf__SC_PII_INTERNET_DGRAM) -#ifdef _SC_PII_INTERNET_DGRAM - {*r = _SC_PII_INTERNET_DGRAM; return 0;} -#else /* def _SC_PII_INTERNET_DGRAM */ +#endif /* ndef _SC_EQUIV_CLASS_MAX */ + if (x == Mono_Posix_SysConf__SC_EXPR_NEST_MAX) +#ifdef _SC_EXPR_NEST_MAX + {*r = _SC_EXPR_NEST_MAX; return 0;} +#else /* def _SC_EXPR_NEST_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_PII_INTERNET_DGRAM */ - if (x == Mono_Posix_SysConf__SC_PII_OSI_COTS) -#ifdef _SC_PII_OSI_COTS - {*r = _SC_PII_OSI_COTS; return 0;} -#else /* def _SC_PII_OSI_COTS */ +#endif /* ndef _SC_EXPR_NEST_MAX */ + if (x == Mono_Posix_SysConf__SC_FD_MGMT) +#ifdef _SC_FD_MGMT + {*r = _SC_FD_MGMT; return 0;} +#else /* def _SC_FD_MGMT */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_PII_OSI_COTS */ - if (x == Mono_Posix_SysConf__SC_PII_OSI_CLTS) -#ifdef _SC_PII_OSI_CLTS - {*r = _SC_PII_OSI_CLTS; return 0;} -#else /* def _SC_PII_OSI_CLTS */ +#endif /* ndef _SC_FD_MGMT */ + if (x == Mono_Posix_SysConf__SC_FIFO) +#ifdef _SC_FIFO + {*r = _SC_FIFO; return 0;} +#else /* def _SC_FIFO */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_PII_OSI_CLTS */ - if (x == Mono_Posix_SysConf__SC_PII_OSI_M) -#ifdef _SC_PII_OSI_M - {*r = _SC_PII_OSI_M; return 0;} -#else /* def _SC_PII_OSI_M */ +#endif /* ndef _SC_FIFO */ + if (x == Mono_Posix_SysConf__SC_FILE_ATTRIBUTES) +#ifdef _SC_FILE_ATTRIBUTES + {*r = _SC_FILE_ATTRIBUTES; return 0;} +#else /* def _SC_FILE_ATTRIBUTES */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_PII_OSI_M */ - if (x == Mono_Posix_SysConf__SC_T_IOV_MAX) -#ifdef _SC_T_IOV_MAX - {*r = _SC_T_IOV_MAX; return 0;} -#else /* def _SC_T_IOV_MAX */ +#endif /* ndef _SC_FILE_ATTRIBUTES */ + if (x == Mono_Posix_SysConf__SC_FILE_LOCKING) +#ifdef _SC_FILE_LOCKING + {*r = _SC_FILE_LOCKING; return 0;} +#else /* def _SC_FILE_LOCKING */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_T_IOV_MAX */ - if (x == Mono_Posix_SysConf__SC_THREADS) -#ifdef _SC_THREADS - {*r = _SC_THREADS; return 0;} -#else /* def _SC_THREADS */ +#endif /* ndef _SC_FILE_LOCKING */ + if (x == Mono_Posix_SysConf__SC_FILE_SYSTEM) +#ifdef _SC_FILE_SYSTEM + {*r = _SC_FILE_SYSTEM; return 0;} +#else /* def _SC_FILE_SYSTEM */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_THREADS */ - if (x == Mono_Posix_SysConf__SC_THREAD_SAFE_FUNCTIONS) -#ifdef _SC_THREAD_SAFE_FUNCTIONS - {*r = _SC_THREAD_SAFE_FUNCTIONS; return 0;} -#else /* def _SC_THREAD_SAFE_FUNCTIONS */ +#endif /* ndef _SC_FILE_SYSTEM */ + if (x == Mono_Posix_SysConf__SC_FSYNC) +#ifdef _SC_FSYNC + {*r = _SC_FSYNC; return 0;} +#else /* def _SC_FSYNC */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_THREAD_SAFE_FUNCTIONS */ +#endif /* ndef _SC_FSYNC */ if (x == Mono_Posix_SysConf__SC_GETGR_R_SIZE_MAX) #ifdef _SC_GETGR_R_SIZE_MAX {*r = _SC_GETGR_R_SIZE_MAX; return 0;} @@ -3769,294 +5710,216 @@ int Mono_Posix_FromSysConf (int x, int *r) #else /* def _SC_GETPW_R_SIZE_MAX */ {errno = EINVAL; return -1;} #endif /* ndef _SC_GETPW_R_SIZE_MAX */ - if (x == Mono_Posix_SysConf__SC_LOGIN_NAME_MAX) -#ifdef _SC_LOGIN_NAME_MAX - {*r = _SC_LOGIN_NAME_MAX; return 0;} -#else /* def _SC_LOGIN_NAME_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_LOGIN_NAME_MAX */ - if (x == Mono_Posix_SysConf__SC_TTY_NAME_MAX) -#ifdef _SC_TTY_NAME_MAX - {*r = _SC_TTY_NAME_MAX; return 0;} -#else /* def _SC_TTY_NAME_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_TTY_NAME_MAX */ - if (x == Mono_Posix_SysConf__SC_THREAD_DESTRUCTOR_ITERATIONS) -#ifdef _SC_THREAD_DESTRUCTOR_ITERATIONS - {*r = _SC_THREAD_DESTRUCTOR_ITERATIONS; return 0;} -#else /* def _SC_THREAD_DESTRUCTOR_ITERATIONS */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_THREAD_DESTRUCTOR_ITERATIONS */ - if (x == Mono_Posix_SysConf__SC_THREAD_KEYS_MAX) -#ifdef _SC_THREAD_KEYS_MAX - {*r = _SC_THREAD_KEYS_MAX; return 0;} -#else /* def _SC_THREAD_KEYS_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_THREAD_KEYS_MAX */ - if (x == Mono_Posix_SysConf__SC_THREAD_STACK_MIN) -#ifdef _SC_THREAD_STACK_MIN - {*r = _SC_THREAD_STACK_MIN; return 0;} -#else /* def _SC_THREAD_STACK_MIN */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_THREAD_STACK_MIN */ - if (x == Mono_Posix_SysConf__SC_THREAD_THREADS_MAX) -#ifdef _SC_THREAD_THREADS_MAX - {*r = _SC_THREAD_THREADS_MAX; return 0;} -#else /* def _SC_THREAD_THREADS_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_THREAD_THREADS_MAX */ - if (x == Mono_Posix_SysConf__SC_THREAD_ATTR_STACKADDR) -#ifdef _SC_THREAD_ATTR_STACKADDR - {*r = _SC_THREAD_ATTR_STACKADDR; return 0;} -#else /* def _SC_THREAD_ATTR_STACKADDR */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_THREAD_ATTR_STACKADDR */ - if (x == Mono_Posix_SysConf__SC_THREAD_ATTR_STACKSIZE) -#ifdef _SC_THREAD_ATTR_STACKSIZE - {*r = _SC_THREAD_ATTR_STACKSIZE; return 0;} -#else /* def _SC_THREAD_ATTR_STACKSIZE */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_THREAD_ATTR_STACKSIZE */ - if (x == Mono_Posix_SysConf__SC_THREAD_PRIORITY_SCHEDULING) -#ifdef _SC_THREAD_PRIORITY_SCHEDULING - {*r = _SC_THREAD_PRIORITY_SCHEDULING; return 0;} -#else /* def _SC_THREAD_PRIORITY_SCHEDULING */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_THREAD_PRIORITY_SCHEDULING */ - if (x == Mono_Posix_SysConf__SC_THREAD_PRIO_INHERIT) -#ifdef _SC_THREAD_PRIO_INHERIT - {*r = _SC_THREAD_PRIO_INHERIT; return 0;} -#else /* def _SC_THREAD_PRIO_INHERIT */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_THREAD_PRIO_INHERIT */ - if (x == Mono_Posix_SysConf__SC_THREAD_PRIO_PROTECT) -#ifdef _SC_THREAD_PRIO_PROTECT - {*r = _SC_THREAD_PRIO_PROTECT; return 0;} -#else /* def _SC_THREAD_PRIO_PROTECT */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_THREAD_PRIO_PROTECT */ - if (x == Mono_Posix_SysConf__SC_THREAD_PROCESS_SHARED) -#ifdef _SC_THREAD_PROCESS_SHARED - {*r = _SC_THREAD_PROCESS_SHARED; return 0;} -#else /* def _SC_THREAD_PROCESS_SHARED */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_THREAD_PROCESS_SHARED */ - if (x == Mono_Posix_SysConf__SC_NPROCESSORS_CONF) -#ifdef _SC_NPROCESSORS_CONF - {*r = _SC_NPROCESSORS_CONF; return 0;} -#else /* def _SC_NPROCESSORS_CONF */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_NPROCESSORS_CONF */ - if (x == Mono_Posix_SysConf__SC_NPROCESSORS_ONLN) -#ifdef _SC_NPROCESSORS_ONLN - {*r = _SC_NPROCESSORS_ONLN; return 0;} -#else /* def _SC_NPROCESSORS_ONLN */ + if (x == Mono_Posix_SysConf__SC_HOST_NAME_MAX) +#ifdef _SC_HOST_NAME_MAX + {*r = _SC_HOST_NAME_MAX; return 0;} +#else /* def _SC_HOST_NAME_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_NPROCESSORS_ONLN */ - if (x == Mono_Posix_SysConf__SC_PHYS_PAGES) -#ifdef _SC_PHYS_PAGES - {*r = _SC_PHYS_PAGES; return 0;} -#else /* def _SC_PHYS_PAGES */ +#endif /* ndef _SC_HOST_NAME_MAX */ + if (x == Mono_Posix_SysConf__SC_INT_MAX) +#ifdef _SC_INT_MAX + {*r = _SC_INT_MAX; return 0;} +#else /* def _SC_INT_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_PHYS_PAGES */ - if (x == Mono_Posix_SysConf__SC_AVPHYS_PAGES) -#ifdef _SC_AVPHYS_PAGES - {*r = _SC_AVPHYS_PAGES; return 0;} -#else /* def _SC_AVPHYS_PAGES */ +#endif /* ndef _SC_INT_MAX */ + if (x == Mono_Posix_SysConf__SC_INT_MIN) +#ifdef _SC_INT_MIN + {*r = _SC_INT_MIN; return 0;} +#else /* def _SC_INT_MIN */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_AVPHYS_PAGES */ - if (x == Mono_Posix_SysConf__SC_ATEXIT_MAX) -#ifdef _SC_ATEXIT_MAX - {*r = _SC_ATEXIT_MAX; return 0;} -#else /* def _SC_ATEXIT_MAX */ +#endif /* ndef _SC_INT_MIN */ + if (x == Mono_Posix_SysConf__SC_IOV_MAX) +#ifdef _SC_IOV_MAX + {*r = _SC_IOV_MAX; return 0;} +#else /* def _SC_IOV_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_ATEXIT_MAX */ - if (x == Mono_Posix_SysConf__SC_PASS_MAX) -#ifdef _SC_PASS_MAX - {*r = _SC_PASS_MAX; return 0;} -#else /* def _SC_PASS_MAX */ +#endif /* ndef _SC_IOV_MAX */ + if (x == Mono_Posix_SysConf__SC_JOB_CONTROL) +#ifdef _SC_JOB_CONTROL + {*r = _SC_JOB_CONTROL; return 0;} +#else /* def _SC_JOB_CONTROL */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_PASS_MAX */ - if (x == Mono_Posix_SysConf__SC_XOPEN_VERSION) -#ifdef _SC_XOPEN_VERSION - {*r = _SC_XOPEN_VERSION; return 0;} -#else /* def _SC_XOPEN_VERSION */ +#endif /* ndef _SC_JOB_CONTROL */ + if (x == Mono_Posix_SysConf__SC_LEVEL1_DCACHE_ASSOC) +#ifdef _SC_LEVEL1_DCACHE_ASSOC + {*r = _SC_LEVEL1_DCACHE_ASSOC; return 0;} +#else /* def _SC_LEVEL1_DCACHE_ASSOC */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_XOPEN_VERSION */ - if (x == Mono_Posix_SysConf__SC_XOPEN_XCU_VERSION) -#ifdef _SC_XOPEN_XCU_VERSION - {*r = _SC_XOPEN_XCU_VERSION; return 0;} -#else /* def _SC_XOPEN_XCU_VERSION */ +#endif /* ndef _SC_LEVEL1_DCACHE_ASSOC */ + if (x == Mono_Posix_SysConf__SC_LEVEL1_DCACHE_LINESIZE) +#ifdef _SC_LEVEL1_DCACHE_LINESIZE + {*r = _SC_LEVEL1_DCACHE_LINESIZE; return 0;} +#else /* def _SC_LEVEL1_DCACHE_LINESIZE */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_XOPEN_XCU_VERSION */ - if (x == Mono_Posix_SysConf__SC_XOPEN_UNIX) -#ifdef _SC_XOPEN_UNIX - {*r = _SC_XOPEN_UNIX; return 0;} -#else /* def _SC_XOPEN_UNIX */ +#endif /* ndef _SC_LEVEL1_DCACHE_LINESIZE */ + if (x == Mono_Posix_SysConf__SC_LEVEL1_DCACHE_SIZE) +#ifdef _SC_LEVEL1_DCACHE_SIZE + {*r = _SC_LEVEL1_DCACHE_SIZE; return 0;} +#else /* def _SC_LEVEL1_DCACHE_SIZE */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_XOPEN_UNIX */ - if (x == Mono_Posix_SysConf__SC_XOPEN_CRYPT) -#ifdef _SC_XOPEN_CRYPT - {*r = _SC_XOPEN_CRYPT; return 0;} -#else /* def _SC_XOPEN_CRYPT */ +#endif /* ndef _SC_LEVEL1_DCACHE_SIZE */ + if (x == Mono_Posix_SysConf__SC_LEVEL1_ICACHE_ASSOC) +#ifdef _SC_LEVEL1_ICACHE_ASSOC + {*r = _SC_LEVEL1_ICACHE_ASSOC; return 0;} +#else /* def _SC_LEVEL1_ICACHE_ASSOC */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_XOPEN_CRYPT */ - if (x == Mono_Posix_SysConf__SC_XOPEN_ENH_I18N) -#ifdef _SC_XOPEN_ENH_I18N - {*r = _SC_XOPEN_ENH_I18N; return 0;} -#else /* def _SC_XOPEN_ENH_I18N */ +#endif /* ndef _SC_LEVEL1_ICACHE_ASSOC */ + if (x == Mono_Posix_SysConf__SC_LEVEL1_ICACHE_LINESIZE) +#ifdef _SC_LEVEL1_ICACHE_LINESIZE + {*r = _SC_LEVEL1_ICACHE_LINESIZE; return 0;} +#else /* def _SC_LEVEL1_ICACHE_LINESIZE */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_XOPEN_ENH_I18N */ - if (x == Mono_Posix_SysConf__SC_XOPEN_SHM) -#ifdef _SC_XOPEN_SHM - {*r = _SC_XOPEN_SHM; return 0;} -#else /* def _SC_XOPEN_SHM */ +#endif /* ndef _SC_LEVEL1_ICACHE_LINESIZE */ + if (x == Mono_Posix_SysConf__SC_LEVEL1_ICACHE_SIZE) +#ifdef _SC_LEVEL1_ICACHE_SIZE + {*r = _SC_LEVEL1_ICACHE_SIZE; return 0;} +#else /* def _SC_LEVEL1_ICACHE_SIZE */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_XOPEN_SHM */ - if (x == Mono_Posix_SysConf__SC_2_CHAR_TERM) -#ifdef _SC_2_CHAR_TERM - {*r = _SC_2_CHAR_TERM; return 0;} -#else /* def _SC_2_CHAR_TERM */ +#endif /* ndef _SC_LEVEL1_ICACHE_SIZE */ + if (x == Mono_Posix_SysConf__SC_LEVEL2_CACHE_ASSOC) +#ifdef _SC_LEVEL2_CACHE_ASSOC + {*r = _SC_LEVEL2_CACHE_ASSOC; return 0;} +#else /* def _SC_LEVEL2_CACHE_ASSOC */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_2_CHAR_TERM */ - if (x == Mono_Posix_SysConf__SC_2_C_VERSION) -#ifdef _SC_2_C_VERSION - {*r = _SC_2_C_VERSION; return 0;} -#else /* def _SC_2_C_VERSION */ +#endif /* ndef _SC_LEVEL2_CACHE_ASSOC */ + if (x == Mono_Posix_SysConf__SC_LEVEL2_CACHE_LINESIZE) +#ifdef _SC_LEVEL2_CACHE_LINESIZE + {*r = _SC_LEVEL2_CACHE_LINESIZE; return 0;} +#else /* def _SC_LEVEL2_CACHE_LINESIZE */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_2_C_VERSION */ - if (x == Mono_Posix_SysConf__SC_2_UPE) -#ifdef _SC_2_UPE - {*r = _SC_2_UPE; return 0;} -#else /* def _SC_2_UPE */ +#endif /* ndef _SC_LEVEL2_CACHE_LINESIZE */ + if (x == Mono_Posix_SysConf__SC_LEVEL2_CACHE_SIZE) +#ifdef _SC_LEVEL2_CACHE_SIZE + {*r = _SC_LEVEL2_CACHE_SIZE; return 0;} +#else /* def _SC_LEVEL2_CACHE_SIZE */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_2_UPE */ - if (x == Mono_Posix_SysConf__SC_XOPEN_XPG2) -#ifdef _SC_XOPEN_XPG2 - {*r = _SC_XOPEN_XPG2; return 0;} -#else /* def _SC_XOPEN_XPG2 */ +#endif /* ndef _SC_LEVEL2_CACHE_SIZE */ + if (x == Mono_Posix_SysConf__SC_LEVEL3_CACHE_ASSOC) +#ifdef _SC_LEVEL3_CACHE_ASSOC + {*r = _SC_LEVEL3_CACHE_ASSOC; return 0;} +#else /* def _SC_LEVEL3_CACHE_ASSOC */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_XOPEN_XPG2 */ - if (x == Mono_Posix_SysConf__SC_XOPEN_XPG3) -#ifdef _SC_XOPEN_XPG3 - {*r = _SC_XOPEN_XPG3; return 0;} -#else /* def _SC_XOPEN_XPG3 */ +#endif /* ndef _SC_LEVEL3_CACHE_ASSOC */ + if (x == Mono_Posix_SysConf__SC_LEVEL3_CACHE_LINESIZE) +#ifdef _SC_LEVEL3_CACHE_LINESIZE + {*r = _SC_LEVEL3_CACHE_LINESIZE; return 0;} +#else /* def _SC_LEVEL3_CACHE_LINESIZE */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_XOPEN_XPG3 */ - if (x == Mono_Posix_SysConf__SC_XOPEN_XPG4) -#ifdef _SC_XOPEN_XPG4 - {*r = _SC_XOPEN_XPG4; return 0;} -#else /* def _SC_XOPEN_XPG4 */ +#endif /* ndef _SC_LEVEL3_CACHE_LINESIZE */ + if (x == Mono_Posix_SysConf__SC_LEVEL3_CACHE_SIZE) +#ifdef _SC_LEVEL3_CACHE_SIZE + {*r = _SC_LEVEL3_CACHE_SIZE; return 0;} +#else /* def _SC_LEVEL3_CACHE_SIZE */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_XOPEN_XPG4 */ - if (x == Mono_Posix_SysConf__SC_CHAR_BIT) -#ifdef _SC_CHAR_BIT - {*r = _SC_CHAR_BIT; return 0;} -#else /* def _SC_CHAR_BIT */ +#endif /* ndef _SC_LEVEL3_CACHE_SIZE */ + if (x == Mono_Posix_SysConf__SC_LEVEL4_CACHE_ASSOC) +#ifdef _SC_LEVEL4_CACHE_ASSOC + {*r = _SC_LEVEL4_CACHE_ASSOC; return 0;} +#else /* def _SC_LEVEL4_CACHE_ASSOC */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_CHAR_BIT */ - if (x == Mono_Posix_SysConf__SC_CHAR_MAX) -#ifdef _SC_CHAR_MAX - {*r = _SC_CHAR_MAX; return 0;} -#else /* def _SC_CHAR_MAX */ +#endif /* ndef _SC_LEVEL4_CACHE_ASSOC */ + if (x == Mono_Posix_SysConf__SC_LEVEL4_CACHE_LINESIZE) +#ifdef _SC_LEVEL4_CACHE_LINESIZE + {*r = _SC_LEVEL4_CACHE_LINESIZE; return 0;} +#else /* def _SC_LEVEL4_CACHE_LINESIZE */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_CHAR_MAX */ - if (x == Mono_Posix_SysConf__SC_CHAR_MIN) -#ifdef _SC_CHAR_MIN - {*r = _SC_CHAR_MIN; return 0;} -#else /* def _SC_CHAR_MIN */ +#endif /* ndef _SC_LEVEL4_CACHE_LINESIZE */ + if (x == Mono_Posix_SysConf__SC_LEVEL4_CACHE_SIZE) +#ifdef _SC_LEVEL4_CACHE_SIZE + {*r = _SC_LEVEL4_CACHE_SIZE; return 0;} +#else /* def _SC_LEVEL4_CACHE_SIZE */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_CHAR_MIN */ - if (x == Mono_Posix_SysConf__SC_INT_MAX) -#ifdef _SC_INT_MAX - {*r = _SC_INT_MAX; return 0;} -#else /* def _SC_INT_MAX */ +#endif /* ndef _SC_LEVEL4_CACHE_SIZE */ + if (x == Mono_Posix_SysConf__SC_LINE_MAX) +#ifdef _SC_LINE_MAX + {*r = _SC_LINE_MAX; return 0;} +#else /* def _SC_LINE_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_INT_MAX */ - if (x == Mono_Posix_SysConf__SC_INT_MIN) -#ifdef _SC_INT_MIN - {*r = _SC_INT_MIN; return 0;} -#else /* def _SC_INT_MIN */ +#endif /* ndef _SC_LINE_MAX */ + if (x == Mono_Posix_SysConf__SC_LOGIN_NAME_MAX) +#ifdef _SC_LOGIN_NAME_MAX + {*r = _SC_LOGIN_NAME_MAX; return 0;} +#else /* def _SC_LOGIN_NAME_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_INT_MIN */ +#endif /* ndef _SC_LOGIN_NAME_MAX */ if (x == Mono_Posix_SysConf__SC_LONG_BIT) #ifdef _SC_LONG_BIT {*r = _SC_LONG_BIT; return 0;} #else /* def _SC_LONG_BIT */ {errno = EINVAL; return -1;} #endif /* ndef _SC_LONG_BIT */ - if (x == Mono_Posix_SysConf__SC_WORD_BIT) -#ifdef _SC_WORD_BIT - {*r = _SC_WORD_BIT; return 0;} -#else /* def _SC_WORD_BIT */ + if (x == Mono_Posix_SysConf__SC_MAPPED_FILES) +#ifdef _SC_MAPPED_FILES + {*r = _SC_MAPPED_FILES; return 0;} +#else /* def _SC_MAPPED_FILES */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_WORD_BIT */ +#endif /* ndef _SC_MAPPED_FILES */ if (x == Mono_Posix_SysConf__SC_MB_LEN_MAX) #ifdef _SC_MB_LEN_MAX {*r = _SC_MB_LEN_MAX; return 0;} #else /* def _SC_MB_LEN_MAX */ {errno = EINVAL; return -1;} #endif /* ndef _SC_MB_LEN_MAX */ - if (x == Mono_Posix_SysConf__SC_NZERO) -#ifdef _SC_NZERO - {*r = _SC_NZERO; return 0;} -#else /* def _SC_NZERO */ + if (x == Mono_Posix_SysConf__SC_MEMLOCK) +#ifdef _SC_MEMLOCK + {*r = _SC_MEMLOCK; return 0;} +#else /* def _SC_MEMLOCK */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_NZERO */ - if (x == Mono_Posix_SysConf__SC_SSIZE_MAX) -#ifdef _SC_SSIZE_MAX - {*r = _SC_SSIZE_MAX; return 0;} -#else /* def _SC_SSIZE_MAX */ +#endif /* ndef _SC_MEMLOCK */ + if (x == Mono_Posix_SysConf__SC_MEMLOCK_RANGE) +#ifdef _SC_MEMLOCK_RANGE + {*r = _SC_MEMLOCK_RANGE; return 0;} +#else /* def _SC_MEMLOCK_RANGE */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_SSIZE_MAX */ - if (x == Mono_Posix_SysConf__SC_SCHAR_MAX) -#ifdef _SC_SCHAR_MAX - {*r = _SC_SCHAR_MAX; return 0;} -#else /* def _SC_SCHAR_MAX */ +#endif /* ndef _SC_MEMLOCK_RANGE */ + if (x == Mono_Posix_SysConf__SC_MEMORY_PROTECTION) +#ifdef _SC_MEMORY_PROTECTION + {*r = _SC_MEMORY_PROTECTION; return 0;} +#else /* def _SC_MEMORY_PROTECTION */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_SCHAR_MAX */ - if (x == Mono_Posix_SysConf__SC_SCHAR_MIN) -#ifdef _SC_SCHAR_MIN - {*r = _SC_SCHAR_MIN; return 0;} -#else /* def _SC_SCHAR_MIN */ +#endif /* ndef _SC_MEMORY_PROTECTION */ + if (x == Mono_Posix_SysConf__SC_MESSAGE_PASSING) +#ifdef _SC_MESSAGE_PASSING + {*r = _SC_MESSAGE_PASSING; return 0;} +#else /* def _SC_MESSAGE_PASSING */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_SCHAR_MIN */ - if (x == Mono_Posix_SysConf__SC_SHRT_MAX) -#ifdef _SC_SHRT_MAX - {*r = _SC_SHRT_MAX; return 0;} -#else /* def _SC_SHRT_MAX */ +#endif /* ndef _SC_MESSAGE_PASSING */ + if (x == Mono_Posix_SysConf__SC_MONOTONIC_CLOCK) +#ifdef _SC_MONOTONIC_CLOCK + {*r = _SC_MONOTONIC_CLOCK; return 0;} +#else /* def _SC_MONOTONIC_CLOCK */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_SHRT_MAX */ - if (x == Mono_Posix_SysConf__SC_SHRT_MIN) -#ifdef _SC_SHRT_MIN - {*r = _SC_SHRT_MIN; return 0;} -#else /* def _SC_SHRT_MIN */ +#endif /* ndef _SC_MONOTONIC_CLOCK */ + if (x == Mono_Posix_SysConf__SC_MQ_OPEN_MAX) +#ifdef _SC_MQ_OPEN_MAX + {*r = _SC_MQ_OPEN_MAX; return 0;} +#else /* def _SC_MQ_OPEN_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_SHRT_MIN */ - if (x == Mono_Posix_SysConf__SC_UCHAR_MAX) -#ifdef _SC_UCHAR_MAX - {*r = _SC_UCHAR_MAX; return 0;} -#else /* def _SC_UCHAR_MAX */ +#endif /* ndef _SC_MQ_OPEN_MAX */ + if (x == Mono_Posix_SysConf__SC_MQ_PRIO_MAX) +#ifdef _SC_MQ_PRIO_MAX + {*r = _SC_MQ_PRIO_MAX; return 0;} +#else /* def _SC_MQ_PRIO_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_UCHAR_MAX */ - if (x == Mono_Posix_SysConf__SC_UINT_MAX) -#ifdef _SC_UINT_MAX - {*r = _SC_UINT_MAX; return 0;} -#else /* def _SC_UINT_MAX */ +#endif /* ndef _SC_MQ_PRIO_MAX */ + if (x == Mono_Posix_SysConf__SC_MULTI_PROCESS) +#ifdef _SC_MULTI_PROCESS + {*r = _SC_MULTI_PROCESS; return 0;} +#else /* def _SC_MULTI_PROCESS */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_UINT_MAX */ - if (x == Mono_Posix_SysConf__SC_ULONG_MAX) -#ifdef _SC_ULONG_MAX - {*r = _SC_ULONG_MAX; return 0;} -#else /* def _SC_ULONG_MAX */ +#endif /* ndef _SC_MULTI_PROCESS */ + if (x == Mono_Posix_SysConf__SC_NETWORKING) +#ifdef _SC_NETWORKING + {*r = _SC_NETWORKING; return 0;} +#else /* def _SC_NETWORKING */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_ULONG_MAX */ - if (x == Mono_Posix_SysConf__SC_USHRT_MAX) -#ifdef _SC_USHRT_MAX - {*r = _SC_USHRT_MAX; return 0;} -#else /* def _SC_USHRT_MAX */ +#endif /* ndef _SC_NETWORKING */ + if (x == Mono_Posix_SysConf__SC_NGROUPS_MAX) +#ifdef _SC_NGROUPS_MAX + {*r = _SC_NGROUPS_MAX; return 0;} +#else /* def _SC_NGROUPS_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_USHRT_MAX */ +#endif /* ndef _SC_NGROUPS_MAX */ if (x == Mono_Posix_SysConf__SC_NL_ARGMAX) #ifdef _SC_NL_ARGMAX {*r = _SC_NL_ARGMAX; return 0;} @@ -4093,186 +5956,144 @@ int Mono_Posix_FromSysConf (int x, int *r) #else /* def _SC_NL_TEXTMAX */ {errno = EINVAL; return -1;} #endif /* ndef _SC_NL_TEXTMAX */ - if (x == Mono_Posix_SysConf__SC_XBS5_ILP32_OFF32) -#ifdef _SC_XBS5_ILP32_OFF32 - {*r = _SC_XBS5_ILP32_OFF32; return 0;} -#else /* def _SC_XBS5_ILP32_OFF32 */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_XBS5_ILP32_OFF32 */ - if (x == Mono_Posix_SysConf__SC_XBS5_ILP32_OFFBIG) -#ifdef _SC_XBS5_ILP32_OFFBIG - {*r = _SC_XBS5_ILP32_OFFBIG; return 0;} -#else /* def _SC_XBS5_ILP32_OFFBIG */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_XBS5_ILP32_OFFBIG */ - if (x == Mono_Posix_SysConf__SC_XBS5_LP64_OFF64) -#ifdef _SC_XBS5_LP64_OFF64 - {*r = _SC_XBS5_LP64_OFF64; return 0;} -#else /* def _SC_XBS5_LP64_OFF64 */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_XBS5_LP64_OFF64 */ - if (x == Mono_Posix_SysConf__SC_XBS5_LPBIG_OFFBIG) -#ifdef _SC_XBS5_LPBIG_OFFBIG - {*r = _SC_XBS5_LPBIG_OFFBIG; return 0;} -#else /* def _SC_XBS5_LPBIG_OFFBIG */ + if (x == Mono_Posix_SysConf__SC_NPROCESSORS_CONF) +#ifdef _SC_NPROCESSORS_CONF + {*r = _SC_NPROCESSORS_CONF; return 0;} +#else /* def _SC_NPROCESSORS_CONF */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_XBS5_LPBIG_OFFBIG */ - if (x == Mono_Posix_SysConf__SC_XOPEN_LEGACY) -#ifdef _SC_XOPEN_LEGACY - {*r = _SC_XOPEN_LEGACY; return 0;} -#else /* def _SC_XOPEN_LEGACY */ +#endif /* ndef _SC_NPROCESSORS_CONF */ + if (x == Mono_Posix_SysConf__SC_NPROCESSORS_ONLN) +#ifdef _SC_NPROCESSORS_ONLN + {*r = _SC_NPROCESSORS_ONLN; return 0;} +#else /* def _SC_NPROCESSORS_ONLN */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_XOPEN_LEGACY */ - if (x == Mono_Posix_SysConf__SC_XOPEN_REALTIME) -#ifdef _SC_XOPEN_REALTIME - {*r = _SC_XOPEN_REALTIME; return 0;} -#else /* def _SC_XOPEN_REALTIME */ +#endif /* ndef _SC_NPROCESSORS_ONLN */ + if (x == Mono_Posix_SysConf__SC_NZERO) +#ifdef _SC_NZERO + {*r = _SC_NZERO; return 0;} +#else /* def _SC_NZERO */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_XOPEN_REALTIME */ - if (x == Mono_Posix_SysConf__SC_XOPEN_REALTIME_THREADS) -#ifdef _SC_XOPEN_REALTIME_THREADS - {*r = _SC_XOPEN_REALTIME_THREADS; return 0;} -#else /* def _SC_XOPEN_REALTIME_THREADS */ +#endif /* ndef _SC_NZERO */ + if (x == Mono_Posix_SysConf__SC_OPEN_MAX) +#ifdef _SC_OPEN_MAX + {*r = _SC_OPEN_MAX; return 0;} +#else /* def _SC_OPEN_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_XOPEN_REALTIME_THREADS */ - if (x == Mono_Posix_SysConf__SC_ADVISORY_INFO) -#ifdef _SC_ADVISORY_INFO - {*r = _SC_ADVISORY_INFO; return 0;} -#else /* def _SC_ADVISORY_INFO */ +#endif /* ndef _SC_OPEN_MAX */ + if (x == Mono_Posix_SysConf__SC_PAGESIZE) +#ifdef _SC_PAGESIZE + {*r = _SC_PAGESIZE; return 0;} +#else /* def _SC_PAGESIZE */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_ADVISORY_INFO */ - if (x == Mono_Posix_SysConf__SC_BARRIERS) -#ifdef _SC_BARRIERS - {*r = _SC_BARRIERS; return 0;} -#else /* def _SC_BARRIERS */ +#endif /* ndef _SC_PAGESIZE */ + if (x == Mono_Posix_SysConf__SC_PASS_MAX) +#ifdef _SC_PASS_MAX + {*r = _SC_PASS_MAX; return 0;} +#else /* def _SC_PASS_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_BARRIERS */ - if (x == Mono_Posix_SysConf__SC_BASE) -#ifdef _SC_BASE - {*r = _SC_BASE; return 0;} -#else /* def _SC_BASE */ +#endif /* ndef _SC_PASS_MAX */ + if (x == Mono_Posix_SysConf__SC_PHYS_PAGES) +#ifdef _SC_PHYS_PAGES + {*r = _SC_PHYS_PAGES; return 0;} +#else /* def _SC_PHYS_PAGES */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_BASE */ - if (x == Mono_Posix_SysConf__SC_C_LANG_SUPPORT) -#ifdef _SC_C_LANG_SUPPORT - {*r = _SC_C_LANG_SUPPORT; return 0;} -#else /* def _SC_C_LANG_SUPPORT */ +#endif /* ndef _SC_PHYS_PAGES */ + if (x == Mono_Posix_SysConf__SC_PII) +#ifdef _SC_PII + {*r = _SC_PII; return 0;} +#else /* def _SC_PII */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_C_LANG_SUPPORT */ - if (x == Mono_Posix_SysConf__SC_C_LANG_SUPPORT_R) -#ifdef _SC_C_LANG_SUPPORT_R - {*r = _SC_C_LANG_SUPPORT_R; return 0;} -#else /* def _SC_C_LANG_SUPPORT_R */ +#endif /* ndef _SC_PII */ + if (x == Mono_Posix_SysConf__SC_PII_INTERNET) +#ifdef _SC_PII_INTERNET + {*r = _SC_PII_INTERNET; return 0;} +#else /* def _SC_PII_INTERNET */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_C_LANG_SUPPORT_R */ - if (x == Mono_Posix_SysConf__SC_CLOCK_SELECTION) -#ifdef _SC_CLOCK_SELECTION - {*r = _SC_CLOCK_SELECTION; return 0;} -#else /* def _SC_CLOCK_SELECTION */ +#endif /* ndef _SC_PII_INTERNET */ + if (x == Mono_Posix_SysConf__SC_PII_INTERNET_DGRAM) +#ifdef _SC_PII_INTERNET_DGRAM + {*r = _SC_PII_INTERNET_DGRAM; return 0;} +#else /* def _SC_PII_INTERNET_DGRAM */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_CLOCK_SELECTION */ - if (x == Mono_Posix_SysConf__SC_CPUTIME) -#ifdef _SC_CPUTIME - {*r = _SC_CPUTIME; return 0;} -#else /* def _SC_CPUTIME */ +#endif /* ndef _SC_PII_INTERNET_DGRAM */ + if (x == Mono_Posix_SysConf__SC_PII_INTERNET_STREAM) +#ifdef _SC_PII_INTERNET_STREAM + {*r = _SC_PII_INTERNET_STREAM; return 0;} +#else /* def _SC_PII_INTERNET_STREAM */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_CPUTIME */ - if (x == Mono_Posix_SysConf__SC_THREAD_CPUTIME) -#ifdef _SC_THREAD_CPUTIME - {*r = _SC_THREAD_CPUTIME; return 0;} -#else /* def _SC_THREAD_CPUTIME */ +#endif /* ndef _SC_PII_INTERNET_STREAM */ + if (x == Mono_Posix_SysConf__SC_PII_OSI) +#ifdef _SC_PII_OSI + {*r = _SC_PII_OSI; return 0;} +#else /* def _SC_PII_OSI */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_THREAD_CPUTIME */ - if (x == Mono_Posix_SysConf__SC_DEVICE_IO) -#ifdef _SC_DEVICE_IO - {*r = _SC_DEVICE_IO; return 0;} -#else /* def _SC_DEVICE_IO */ +#endif /* ndef _SC_PII_OSI */ + if (x == Mono_Posix_SysConf__SC_PII_OSI_CLTS) +#ifdef _SC_PII_OSI_CLTS + {*r = _SC_PII_OSI_CLTS; return 0;} +#else /* def _SC_PII_OSI_CLTS */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_DEVICE_IO */ - if (x == Mono_Posix_SysConf__SC_DEVICE_SPECIFIC) -#ifdef _SC_DEVICE_SPECIFIC - {*r = _SC_DEVICE_SPECIFIC; return 0;} -#else /* def _SC_DEVICE_SPECIFIC */ +#endif /* ndef _SC_PII_OSI_CLTS */ + if (x == Mono_Posix_SysConf__SC_PII_OSI_COTS) +#ifdef _SC_PII_OSI_COTS + {*r = _SC_PII_OSI_COTS; return 0;} +#else /* def _SC_PII_OSI_COTS */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_DEVICE_SPECIFIC */ - if (x == Mono_Posix_SysConf__SC_DEVICE_SPECIFIC_R) -#ifdef _SC_DEVICE_SPECIFIC_R - {*r = _SC_DEVICE_SPECIFIC_R; return 0;} -#else /* def _SC_DEVICE_SPECIFIC_R */ +#endif /* ndef _SC_PII_OSI_COTS */ + if (x == Mono_Posix_SysConf__SC_PII_OSI_M) +#ifdef _SC_PII_OSI_M + {*r = _SC_PII_OSI_M; return 0;} +#else /* def _SC_PII_OSI_M */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_DEVICE_SPECIFIC_R */ - if (x == Mono_Posix_SysConf__SC_FD_MGMT) -#ifdef _SC_FD_MGMT - {*r = _SC_FD_MGMT; return 0;} -#else /* def _SC_FD_MGMT */ +#endif /* ndef _SC_PII_OSI_M */ + if (x == Mono_Posix_SysConf__SC_PII_SOCKET) +#ifdef _SC_PII_SOCKET + {*r = _SC_PII_SOCKET; return 0;} +#else /* def _SC_PII_SOCKET */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_FD_MGMT */ - if (x == Mono_Posix_SysConf__SC_FIFO) -#ifdef _SC_FIFO - {*r = _SC_FIFO; return 0;} -#else /* def _SC_FIFO */ +#endif /* ndef _SC_PII_SOCKET */ + if (x == Mono_Posix_SysConf__SC_PII_XTI) +#ifdef _SC_PII_XTI + {*r = _SC_PII_XTI; return 0;} +#else /* def _SC_PII_XTI */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_FIFO */ +#endif /* ndef _SC_PII_XTI */ if (x == Mono_Posix_SysConf__SC_PIPE) #ifdef _SC_PIPE {*r = _SC_PIPE; return 0;} #else /* def _SC_PIPE */ {errno = EINVAL; return -1;} #endif /* ndef _SC_PIPE */ - if (x == Mono_Posix_SysConf__SC_FILE_ATTRIBUTES) -#ifdef _SC_FILE_ATTRIBUTES - {*r = _SC_FILE_ATTRIBUTES; return 0;} -#else /* def _SC_FILE_ATTRIBUTES */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_FILE_ATTRIBUTES */ - if (x == Mono_Posix_SysConf__SC_FILE_LOCKING) -#ifdef _SC_FILE_LOCKING - {*r = _SC_FILE_LOCKING; return 0;} -#else /* def _SC_FILE_LOCKING */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_FILE_LOCKING */ - if (x == Mono_Posix_SysConf__SC_FILE_SYSTEM) -#ifdef _SC_FILE_SYSTEM - {*r = _SC_FILE_SYSTEM; return 0;} -#else /* def _SC_FILE_SYSTEM */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_FILE_SYSTEM */ - if (x == Mono_Posix_SysConf__SC_MONOTONIC_CLOCK) -#ifdef _SC_MONOTONIC_CLOCK - {*r = _SC_MONOTONIC_CLOCK; return 0;} -#else /* def _SC_MONOTONIC_CLOCK */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_MONOTONIC_CLOCK */ - if (x == Mono_Posix_SysConf__SC_MULTI_PROCESS) -#ifdef _SC_MULTI_PROCESS - {*r = _SC_MULTI_PROCESS; return 0;} -#else /* def _SC_MULTI_PROCESS */ + if (x == Mono_Posix_SysConf__SC_POLL) +#ifdef _SC_POLL + {*r = _SC_POLL; return 0;} +#else /* def _SC_POLL */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_MULTI_PROCESS */ - if (x == Mono_Posix_SysConf__SC_SINGLE_PROCESS) -#ifdef _SC_SINGLE_PROCESS - {*r = _SC_SINGLE_PROCESS; return 0;} -#else /* def _SC_SINGLE_PROCESS */ +#endif /* ndef _SC_POLL */ + if (x == Mono_Posix_SysConf__SC_PRIORITIZED_IO) +#ifdef _SC_PRIORITIZED_IO + {*r = _SC_PRIORITIZED_IO; return 0;} +#else /* def _SC_PRIORITIZED_IO */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_SINGLE_PROCESS */ - if (x == Mono_Posix_SysConf__SC_NETWORKING) -#ifdef _SC_NETWORKING - {*r = _SC_NETWORKING; return 0;} -#else /* def _SC_NETWORKING */ +#endif /* ndef _SC_PRIORITIZED_IO */ + if (x == Mono_Posix_SysConf__SC_PRIORITY_SCHEDULING) +#ifdef _SC_PRIORITY_SCHEDULING + {*r = _SC_PRIORITY_SCHEDULING; return 0;} +#else /* def _SC_PRIORITY_SCHEDULING */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_NETWORKING */ +#endif /* ndef _SC_PRIORITY_SCHEDULING */ if (x == Mono_Posix_SysConf__SC_READER_WRITER_LOCKS) #ifdef _SC_READER_WRITER_LOCKS {*r = _SC_READER_WRITER_LOCKS; return 0;} #else /* def _SC_READER_WRITER_LOCKS */ {errno = EINVAL; return -1;} #endif /* ndef _SC_READER_WRITER_LOCKS */ - if (x == Mono_Posix_SysConf__SC_SPIN_LOCKS) -#ifdef _SC_SPIN_LOCKS - {*r = _SC_SPIN_LOCKS; return 0;} -#else /* def _SC_SPIN_LOCKS */ + if (x == Mono_Posix_SysConf__SC_REALTIME_SIGNALS) +#ifdef _SC_REALTIME_SIGNALS + {*r = _SC_REALTIME_SIGNALS; return 0;} +#else /* def _SC_REALTIME_SIGNALS */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_SPIN_LOCKS */ +#endif /* ndef _SC_REALTIME_SIGNALS */ if (x == Mono_Posix_SysConf__SC_REGEXP) #ifdef _SC_REGEXP {*r = _SC_REGEXP; return 0;} @@ -4285,36 +6106,150 @@ int Mono_Posix_FromSysConf (int x, int *r) #else /* def _SC_REGEX_VERSION */ {errno = EINVAL; return -1;} #endif /* ndef _SC_REGEX_VERSION */ + if (x == Mono_Posix_SysConf__SC_RE_DUP_MAX) +#ifdef _SC_RE_DUP_MAX + {*r = _SC_RE_DUP_MAX; return 0;} +#else /* def _SC_RE_DUP_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_RE_DUP_MAX */ + if (x == Mono_Posix_SysConf__SC_RTSIG_MAX) +#ifdef _SC_RTSIG_MAX + {*r = _SC_RTSIG_MAX; return 0;} +#else /* def _SC_RTSIG_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_RTSIG_MAX */ + if (x == Mono_Posix_SysConf__SC_SAVED_IDS) +#ifdef _SC_SAVED_IDS + {*r = _SC_SAVED_IDS; return 0;} +#else /* def _SC_SAVED_IDS */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_SAVED_IDS */ + if (x == Mono_Posix_SysConf__SC_SCHAR_MAX) +#ifdef _SC_SCHAR_MAX + {*r = _SC_SCHAR_MAX; return 0;} +#else /* def _SC_SCHAR_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_SCHAR_MAX */ + if (x == Mono_Posix_SysConf__SC_SCHAR_MIN) +#ifdef _SC_SCHAR_MIN + {*r = _SC_SCHAR_MIN; return 0;} +#else /* def _SC_SCHAR_MIN */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_SCHAR_MIN */ + if (x == Mono_Posix_SysConf__SC_SELECT) +#ifdef _SC_SELECT + {*r = _SC_SELECT; return 0;} +#else /* def _SC_SELECT */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_SELECT */ + if (x == Mono_Posix_SysConf__SC_SEMAPHORES) +#ifdef _SC_SEMAPHORES + {*r = _SC_SEMAPHORES; return 0;} +#else /* def _SC_SEMAPHORES */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_SEMAPHORES */ + if (x == Mono_Posix_SysConf__SC_SEM_NSEMS_MAX) +#ifdef _SC_SEM_NSEMS_MAX + {*r = _SC_SEM_NSEMS_MAX; return 0;} +#else /* def _SC_SEM_NSEMS_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_SEM_NSEMS_MAX */ + if (x == Mono_Posix_SysConf__SC_SEM_VALUE_MAX) +#ifdef _SC_SEM_VALUE_MAX + {*r = _SC_SEM_VALUE_MAX; return 0;} +#else /* def _SC_SEM_VALUE_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_SEM_VALUE_MAX */ + if (x == Mono_Posix_SysConf__SC_SHARED_MEMORY_OBJECTS) +#ifdef _SC_SHARED_MEMORY_OBJECTS + {*r = _SC_SHARED_MEMORY_OBJECTS; return 0;} +#else /* def _SC_SHARED_MEMORY_OBJECTS */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_SHARED_MEMORY_OBJECTS */ if (x == Mono_Posix_SysConf__SC_SHELL) #ifdef _SC_SHELL {*r = _SC_SHELL; return 0;} #else /* def _SC_SHELL */ {errno = EINVAL; return -1;} #endif /* ndef _SC_SHELL */ + if (x == Mono_Posix_SysConf__SC_SHRT_MAX) +#ifdef _SC_SHRT_MAX + {*r = _SC_SHRT_MAX; return 0;} +#else /* def _SC_SHRT_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_SHRT_MAX */ + if (x == Mono_Posix_SysConf__SC_SHRT_MIN) +#ifdef _SC_SHRT_MIN + {*r = _SC_SHRT_MIN; return 0;} +#else /* def _SC_SHRT_MIN */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_SHRT_MIN */ if (x == Mono_Posix_SysConf__SC_SIGNALS) #ifdef _SC_SIGNALS {*r = _SC_SIGNALS; return 0;} #else /* def _SC_SIGNALS */ {errno = EINVAL; return -1;} #endif /* ndef _SC_SIGNALS */ + if (x == Mono_Posix_SysConf__SC_SIGQUEUE_MAX) +#ifdef _SC_SIGQUEUE_MAX + {*r = _SC_SIGQUEUE_MAX; return 0;} +#else /* def _SC_SIGQUEUE_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_SIGQUEUE_MAX */ + if (x == Mono_Posix_SysConf__SC_SINGLE_PROCESS) +#ifdef _SC_SINGLE_PROCESS + {*r = _SC_SINGLE_PROCESS; return 0;} +#else /* def _SC_SINGLE_PROCESS */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_SINGLE_PROCESS */ if (x == Mono_Posix_SysConf__SC_SPAWN) #ifdef _SC_SPAWN {*r = _SC_SPAWN; return 0;} #else /* def _SC_SPAWN */ {errno = EINVAL; return -1;} #endif /* ndef _SC_SPAWN */ + if (x == Mono_Posix_SysConf__SC_SPIN_LOCKS) +#ifdef _SC_SPIN_LOCKS + {*r = _SC_SPIN_LOCKS; return 0;} +#else /* def _SC_SPIN_LOCKS */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_SPIN_LOCKS */ if (x == Mono_Posix_SysConf__SC_SPORADIC_SERVER) #ifdef _SC_SPORADIC_SERVER {*r = _SC_SPORADIC_SERVER; return 0;} #else /* def _SC_SPORADIC_SERVER */ {errno = EINVAL; return -1;} #endif /* ndef _SC_SPORADIC_SERVER */ - if (x == Mono_Posix_SysConf__SC_THREAD_SPORADIC_SERVER) -#ifdef _SC_THREAD_SPORADIC_SERVER - {*r = _SC_THREAD_SPORADIC_SERVER; return 0;} -#else /* def _SC_THREAD_SPORADIC_SERVER */ + if (x == Mono_Posix_SysConf__SC_SSIZE_MAX) +#ifdef _SC_SSIZE_MAX + {*r = _SC_SSIZE_MAX; return 0;} +#else /* def _SC_SSIZE_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_THREAD_SPORADIC_SERVER */ +#endif /* ndef _SC_SSIZE_MAX */ + if (x == Mono_Posix_SysConf__SC_STREAMS) +#ifdef _SC_STREAMS + {*r = _SC_STREAMS; return 0;} +#else /* def _SC_STREAMS */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_STREAMS */ + if (x == Mono_Posix_SysConf__SC_STREAM_MAX) +#ifdef _SC_STREAM_MAX + {*r = _SC_STREAM_MAX; return 0;} +#else /* def _SC_STREAM_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_STREAM_MAX */ + if (x == Mono_Posix_SysConf__SC_SYMLOOP_MAX) +#ifdef _SC_SYMLOOP_MAX + {*r = _SC_SYMLOOP_MAX; return 0;} +#else /* def _SC_SYMLOOP_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_SYMLOOP_MAX */ + if (x == Mono_Posix_SysConf__SC_SYNCHRONIZED_IO) +#ifdef _SC_SYNCHRONIZED_IO + {*r = _SC_SYNCHRONIZED_IO; return 0;} +#else /* def _SC_SYNCHRONIZED_IO */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_SYNCHRONIZED_IO */ if (x == Mono_Posix_SysConf__SC_SYSTEM_DATABASE) #ifdef _SC_SYSTEM_DATABASE {*r = _SC_SYSTEM_DATABASE; return 0;} @@ -4327,18 +6262,180 @@ int Mono_Posix_FromSysConf (int x, int *r) #else /* def _SC_SYSTEM_DATABASE_R */ {errno = EINVAL; return -1;} #endif /* ndef _SC_SYSTEM_DATABASE_R */ + if (x == Mono_Posix_SysConf__SC_THREADS) +#ifdef _SC_THREADS + {*r = _SC_THREADS; return 0;} +#else /* def _SC_THREADS */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_THREADS */ + if (x == Mono_Posix_SysConf__SC_THREAD_ATTR_STACKADDR) +#ifdef _SC_THREAD_ATTR_STACKADDR + {*r = _SC_THREAD_ATTR_STACKADDR; return 0;} +#else /* def _SC_THREAD_ATTR_STACKADDR */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_THREAD_ATTR_STACKADDR */ + if (x == Mono_Posix_SysConf__SC_THREAD_ATTR_STACKSIZE) +#ifdef _SC_THREAD_ATTR_STACKSIZE + {*r = _SC_THREAD_ATTR_STACKSIZE; return 0;} +#else /* def _SC_THREAD_ATTR_STACKSIZE */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_THREAD_ATTR_STACKSIZE */ + if (x == Mono_Posix_SysConf__SC_THREAD_CPUTIME) +#ifdef _SC_THREAD_CPUTIME + {*r = _SC_THREAD_CPUTIME; return 0;} +#else /* def _SC_THREAD_CPUTIME */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_THREAD_CPUTIME */ + if (x == Mono_Posix_SysConf__SC_THREAD_DESTRUCTOR_ITERATIONS) +#ifdef _SC_THREAD_DESTRUCTOR_ITERATIONS + {*r = _SC_THREAD_DESTRUCTOR_ITERATIONS; return 0;} +#else /* def _SC_THREAD_DESTRUCTOR_ITERATIONS */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_THREAD_DESTRUCTOR_ITERATIONS */ + if (x == Mono_Posix_SysConf__SC_THREAD_KEYS_MAX) +#ifdef _SC_THREAD_KEYS_MAX + {*r = _SC_THREAD_KEYS_MAX; return 0;} +#else /* def _SC_THREAD_KEYS_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_THREAD_KEYS_MAX */ + if (x == Mono_Posix_SysConf__SC_THREAD_PRIORITY_SCHEDULING) +#ifdef _SC_THREAD_PRIORITY_SCHEDULING + {*r = _SC_THREAD_PRIORITY_SCHEDULING; return 0;} +#else /* def _SC_THREAD_PRIORITY_SCHEDULING */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_THREAD_PRIORITY_SCHEDULING */ + if (x == Mono_Posix_SysConf__SC_THREAD_PRIO_INHERIT) +#ifdef _SC_THREAD_PRIO_INHERIT + {*r = _SC_THREAD_PRIO_INHERIT; return 0;} +#else /* def _SC_THREAD_PRIO_INHERIT */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_THREAD_PRIO_INHERIT */ + if (x == Mono_Posix_SysConf__SC_THREAD_PRIO_PROTECT) +#ifdef _SC_THREAD_PRIO_PROTECT + {*r = _SC_THREAD_PRIO_PROTECT; return 0;} +#else /* def _SC_THREAD_PRIO_PROTECT */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_THREAD_PRIO_PROTECT */ + if (x == Mono_Posix_SysConf__SC_THREAD_PROCESS_SHARED) +#ifdef _SC_THREAD_PROCESS_SHARED + {*r = _SC_THREAD_PROCESS_SHARED; return 0;} +#else /* def _SC_THREAD_PROCESS_SHARED */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_THREAD_PROCESS_SHARED */ + if (x == Mono_Posix_SysConf__SC_THREAD_SAFE_FUNCTIONS) +#ifdef _SC_THREAD_SAFE_FUNCTIONS + {*r = _SC_THREAD_SAFE_FUNCTIONS; return 0;} +#else /* def _SC_THREAD_SAFE_FUNCTIONS */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_THREAD_SAFE_FUNCTIONS */ + if (x == Mono_Posix_SysConf__SC_THREAD_SPORADIC_SERVER) +#ifdef _SC_THREAD_SPORADIC_SERVER + {*r = _SC_THREAD_SPORADIC_SERVER; return 0;} +#else /* def _SC_THREAD_SPORADIC_SERVER */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_THREAD_SPORADIC_SERVER */ + if (x == Mono_Posix_SysConf__SC_THREAD_STACK_MIN) +#ifdef _SC_THREAD_STACK_MIN + {*r = _SC_THREAD_STACK_MIN; return 0;} +#else /* def _SC_THREAD_STACK_MIN */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_THREAD_STACK_MIN */ + if (x == Mono_Posix_SysConf__SC_THREAD_THREADS_MAX) +#ifdef _SC_THREAD_THREADS_MAX + {*r = _SC_THREAD_THREADS_MAX; return 0;} +#else /* def _SC_THREAD_THREADS_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_THREAD_THREADS_MAX */ if (x == Mono_Posix_SysConf__SC_TIMEOUTS) #ifdef _SC_TIMEOUTS {*r = _SC_TIMEOUTS; return 0;} #else /* def _SC_TIMEOUTS */ {errno = EINVAL; return -1;} #endif /* ndef _SC_TIMEOUTS */ + if (x == Mono_Posix_SysConf__SC_TIMERS) +#ifdef _SC_TIMERS + {*r = _SC_TIMERS; return 0;} +#else /* def _SC_TIMERS */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_TIMERS */ + if (x == Mono_Posix_SysConf__SC_TIMER_MAX) +#ifdef _SC_TIMER_MAX + {*r = _SC_TIMER_MAX; return 0;} +#else /* def _SC_TIMER_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_TIMER_MAX */ + if (x == Mono_Posix_SysConf__SC_TRACE) +#ifdef _SC_TRACE + {*r = _SC_TRACE; return 0;} +#else /* def _SC_TRACE */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_TRACE */ + if (x == Mono_Posix_SysConf__SC_TRACE_EVENT_FILTER) +#ifdef _SC_TRACE_EVENT_FILTER + {*r = _SC_TRACE_EVENT_FILTER; return 0;} +#else /* def _SC_TRACE_EVENT_FILTER */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_TRACE_EVENT_FILTER */ + if (x == Mono_Posix_SysConf__SC_TRACE_INHERIT) +#ifdef _SC_TRACE_INHERIT + {*r = _SC_TRACE_INHERIT; return 0;} +#else /* def _SC_TRACE_INHERIT */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_TRACE_INHERIT */ + if (x == Mono_Posix_SysConf__SC_TRACE_LOG) +#ifdef _SC_TRACE_LOG + {*r = _SC_TRACE_LOG; return 0;} +#else /* def _SC_TRACE_LOG */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_TRACE_LOG */ + if (x == Mono_Posix_SysConf__SC_TTY_NAME_MAX) +#ifdef _SC_TTY_NAME_MAX + {*r = _SC_TTY_NAME_MAX; return 0;} +#else /* def _SC_TTY_NAME_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_TTY_NAME_MAX */ if (x == Mono_Posix_SysConf__SC_TYPED_MEMORY_OBJECTS) #ifdef _SC_TYPED_MEMORY_OBJECTS {*r = _SC_TYPED_MEMORY_OBJECTS; return 0;} #else /* def _SC_TYPED_MEMORY_OBJECTS */ {errno = EINVAL; return -1;} #endif /* ndef _SC_TYPED_MEMORY_OBJECTS */ + if (x == Mono_Posix_SysConf__SC_TZNAME_MAX) +#ifdef _SC_TZNAME_MAX + {*r = _SC_TZNAME_MAX; return 0;} +#else /* def _SC_TZNAME_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_TZNAME_MAX */ + if (x == Mono_Posix_SysConf__SC_T_IOV_MAX) +#ifdef _SC_T_IOV_MAX + {*r = _SC_T_IOV_MAX; return 0;} +#else /* def _SC_T_IOV_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_T_IOV_MAX */ + if (x == Mono_Posix_SysConf__SC_UCHAR_MAX) +#ifdef _SC_UCHAR_MAX + {*r = _SC_UCHAR_MAX; return 0;} +#else /* def _SC_UCHAR_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_UCHAR_MAX */ + if (x == Mono_Posix_SysConf__SC_UINT_MAX) +#ifdef _SC_UINT_MAX + {*r = _SC_UINT_MAX; return 0;} +#else /* def _SC_UINT_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_UINT_MAX */ + if (x == Mono_Posix_SysConf__SC_UIO_MAXIOV) +#ifdef _SC_UIO_MAXIOV + {*r = _SC_UIO_MAXIOV; return 0;} +#else /* def _SC_UIO_MAXIOV */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_UIO_MAXIOV */ + if (x == Mono_Posix_SysConf__SC_ULONG_MAX) +#ifdef _SC_ULONG_MAX + {*r = _SC_ULONG_MAX; return 0;} +#else /* def _SC_ULONG_MAX */ + {errno = EINVAL; return -1;} +#endif /* ndef _SC_ULONG_MAX */ if (x == Mono_Posix_SysConf__SC_USER_GROUPS) #ifdef _SC_USER_GROUPS {*r = _SC_USER_GROUPS; return 0;} @@ -4351,54 +6448,12 @@ int Mono_Posix_FromSysConf (int x, int *r) #else /* def _SC_USER_GROUPS_R */ {errno = EINVAL; return -1;} #endif /* ndef _SC_USER_GROUPS_R */ - if (x == Mono_Posix_SysConf__SC_2_PBS) -#ifdef _SC_2_PBS - {*r = _SC_2_PBS; return 0;} -#else /* def _SC_2_PBS */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_2_PBS */ - if (x == Mono_Posix_SysConf__SC_2_PBS_ACCOUNTING) -#ifdef _SC_2_PBS_ACCOUNTING - {*r = _SC_2_PBS_ACCOUNTING; return 0;} -#else /* def _SC_2_PBS_ACCOUNTING */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_2_PBS_ACCOUNTING */ - if (x == Mono_Posix_SysConf__SC_2_PBS_LOCATE) -#ifdef _SC_2_PBS_LOCATE - {*r = _SC_2_PBS_LOCATE; return 0;} -#else /* def _SC_2_PBS_LOCATE */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_2_PBS_LOCATE */ - if (x == Mono_Posix_SysConf__SC_2_PBS_MESSAGE) -#ifdef _SC_2_PBS_MESSAGE - {*r = _SC_2_PBS_MESSAGE; return 0;} -#else /* def _SC_2_PBS_MESSAGE */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_2_PBS_MESSAGE */ - if (x == Mono_Posix_SysConf__SC_2_PBS_TRACK) -#ifdef _SC_2_PBS_TRACK - {*r = _SC_2_PBS_TRACK; return 0;} -#else /* def _SC_2_PBS_TRACK */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_2_PBS_TRACK */ - if (x == Mono_Posix_SysConf__SC_SYMLOOP_MAX) -#ifdef _SC_SYMLOOP_MAX - {*r = _SC_SYMLOOP_MAX; return 0;} -#else /* def _SC_SYMLOOP_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_SYMLOOP_MAX */ - if (x == Mono_Posix_SysConf__SC_STREAMS) -#ifdef _SC_STREAMS - {*r = _SC_STREAMS; return 0;} -#else /* def _SC_STREAMS */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_STREAMS */ - if (x == Mono_Posix_SysConf__SC_2_PBS_CHECKPOINT) -#ifdef _SC_2_PBS_CHECKPOINT - {*r = _SC_2_PBS_CHECKPOINT; return 0;} -#else /* def _SC_2_PBS_CHECKPOINT */ + if (x == Mono_Posix_SysConf__SC_USHRT_MAX) +#ifdef _SC_USHRT_MAX + {*r = _SC_USHRT_MAX; return 0;} +#else /* def _SC_USHRT_MAX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_2_PBS_CHECKPOINT */ +#endif /* ndef _SC_USHRT_MAX */ if (x == Mono_Posix_SysConf__SC_V6_ILP32_OFF32) #ifdef _SC_V6_ILP32_OFF32 {*r = _SC_V6_ILP32_OFF32; return 0;} @@ -4423,126 +6478,114 @@ int Mono_Posix_FromSysConf (int x, int *r) #else /* def _SC_V6_LPBIG_OFFBIG */ {errno = EINVAL; return -1;} #endif /* ndef _SC_V6_LPBIG_OFFBIG */ - if (x == Mono_Posix_SysConf__SC_HOST_NAME_MAX) -#ifdef _SC_HOST_NAME_MAX - {*r = _SC_HOST_NAME_MAX; return 0;} -#else /* def _SC_HOST_NAME_MAX */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_HOST_NAME_MAX */ - if (x == Mono_Posix_SysConf__SC_TRACE) -#ifdef _SC_TRACE - {*r = _SC_TRACE; return 0;} -#else /* def _SC_TRACE */ - {errno = EINVAL; return -1;} -#endif /* ndef _SC_TRACE */ - if (x == Mono_Posix_SysConf__SC_TRACE_EVENT_FILTER) -#ifdef _SC_TRACE_EVENT_FILTER - {*r = _SC_TRACE_EVENT_FILTER; return 0;} -#else /* def _SC_TRACE_EVENT_FILTER */ + if (x == Mono_Posix_SysConf__SC_VERSION) +#ifdef _SC_VERSION + {*r = _SC_VERSION; return 0;} +#else /* def _SC_VERSION */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_TRACE_EVENT_FILTER */ - if (x == Mono_Posix_SysConf__SC_TRACE_INHERIT) -#ifdef _SC_TRACE_INHERIT - {*r = _SC_TRACE_INHERIT; return 0;} -#else /* def _SC_TRACE_INHERIT */ +#endif /* ndef _SC_VERSION */ + if (x == Mono_Posix_SysConf__SC_WORD_BIT) +#ifdef _SC_WORD_BIT + {*r = _SC_WORD_BIT; return 0;} +#else /* def _SC_WORD_BIT */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_TRACE_INHERIT */ - if (x == Mono_Posix_SysConf__SC_TRACE_LOG) -#ifdef _SC_TRACE_LOG - {*r = _SC_TRACE_LOG; return 0;} -#else /* def _SC_TRACE_LOG */ +#endif /* ndef _SC_WORD_BIT */ + if (x == Mono_Posix_SysConf__SC_XBS5_ILP32_OFF32) +#ifdef _SC_XBS5_ILP32_OFF32 + {*r = _SC_XBS5_ILP32_OFF32; return 0;} +#else /* def _SC_XBS5_ILP32_OFF32 */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_TRACE_LOG */ - if (x == Mono_Posix_SysConf__SC_LEVEL1_ICACHE_SIZE) -#ifdef _SC_LEVEL1_ICACHE_SIZE - {*r = _SC_LEVEL1_ICACHE_SIZE; return 0;} -#else /* def _SC_LEVEL1_ICACHE_SIZE */ +#endif /* ndef _SC_XBS5_ILP32_OFF32 */ + if (x == Mono_Posix_SysConf__SC_XBS5_ILP32_OFFBIG) +#ifdef _SC_XBS5_ILP32_OFFBIG + {*r = _SC_XBS5_ILP32_OFFBIG; return 0;} +#else /* def _SC_XBS5_ILP32_OFFBIG */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_LEVEL1_ICACHE_SIZE */ - if (x == Mono_Posix_SysConf__SC_LEVEL1_ICACHE_ASSOC) -#ifdef _SC_LEVEL1_ICACHE_ASSOC - {*r = _SC_LEVEL1_ICACHE_ASSOC; return 0;} -#else /* def _SC_LEVEL1_ICACHE_ASSOC */ +#endif /* ndef _SC_XBS5_ILP32_OFFBIG */ + if (x == Mono_Posix_SysConf__SC_XBS5_LP64_OFF64) +#ifdef _SC_XBS5_LP64_OFF64 + {*r = _SC_XBS5_LP64_OFF64; return 0;} +#else /* def _SC_XBS5_LP64_OFF64 */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_LEVEL1_ICACHE_ASSOC */ - if (x == Mono_Posix_SysConf__SC_LEVEL1_ICACHE_LINESIZE) -#ifdef _SC_LEVEL1_ICACHE_LINESIZE - {*r = _SC_LEVEL1_ICACHE_LINESIZE; return 0;} -#else /* def _SC_LEVEL1_ICACHE_LINESIZE */ +#endif /* ndef _SC_XBS5_LP64_OFF64 */ + if (x == Mono_Posix_SysConf__SC_XBS5_LPBIG_OFFBIG) +#ifdef _SC_XBS5_LPBIG_OFFBIG + {*r = _SC_XBS5_LPBIG_OFFBIG; return 0;} +#else /* def _SC_XBS5_LPBIG_OFFBIG */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_LEVEL1_ICACHE_LINESIZE */ - if (x == Mono_Posix_SysConf__SC_LEVEL1_DCACHE_SIZE) -#ifdef _SC_LEVEL1_DCACHE_SIZE - {*r = _SC_LEVEL1_DCACHE_SIZE; return 0;} -#else /* def _SC_LEVEL1_DCACHE_SIZE */ +#endif /* ndef _SC_XBS5_LPBIG_OFFBIG */ + if (x == Mono_Posix_SysConf__SC_XOPEN_CRYPT) +#ifdef _SC_XOPEN_CRYPT + {*r = _SC_XOPEN_CRYPT; return 0;} +#else /* def _SC_XOPEN_CRYPT */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_LEVEL1_DCACHE_SIZE */ - if (x == Mono_Posix_SysConf__SC_LEVEL1_DCACHE_ASSOC) -#ifdef _SC_LEVEL1_DCACHE_ASSOC - {*r = _SC_LEVEL1_DCACHE_ASSOC; return 0;} -#else /* def _SC_LEVEL1_DCACHE_ASSOC */ +#endif /* ndef _SC_XOPEN_CRYPT */ + if (x == Mono_Posix_SysConf__SC_XOPEN_ENH_I18N) +#ifdef _SC_XOPEN_ENH_I18N + {*r = _SC_XOPEN_ENH_I18N; return 0;} +#else /* def _SC_XOPEN_ENH_I18N */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_LEVEL1_DCACHE_ASSOC */ - if (x == Mono_Posix_SysConf__SC_LEVEL1_DCACHE_LINESIZE) -#ifdef _SC_LEVEL1_DCACHE_LINESIZE - {*r = _SC_LEVEL1_DCACHE_LINESIZE; return 0;} -#else /* def _SC_LEVEL1_DCACHE_LINESIZE */ +#endif /* ndef _SC_XOPEN_ENH_I18N */ + if (x == Mono_Posix_SysConf__SC_XOPEN_LEGACY) +#ifdef _SC_XOPEN_LEGACY + {*r = _SC_XOPEN_LEGACY; return 0;} +#else /* def _SC_XOPEN_LEGACY */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_LEVEL1_DCACHE_LINESIZE */ - if (x == Mono_Posix_SysConf__SC_LEVEL2_CACHE_SIZE) -#ifdef _SC_LEVEL2_CACHE_SIZE - {*r = _SC_LEVEL2_CACHE_SIZE; return 0;} -#else /* def _SC_LEVEL2_CACHE_SIZE */ +#endif /* ndef _SC_XOPEN_LEGACY */ + if (x == Mono_Posix_SysConf__SC_XOPEN_REALTIME) +#ifdef _SC_XOPEN_REALTIME + {*r = _SC_XOPEN_REALTIME; return 0;} +#else /* def _SC_XOPEN_REALTIME */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_LEVEL2_CACHE_SIZE */ - if (x == Mono_Posix_SysConf__SC_LEVEL2_CACHE_ASSOC) -#ifdef _SC_LEVEL2_CACHE_ASSOC - {*r = _SC_LEVEL2_CACHE_ASSOC; return 0;} -#else /* def _SC_LEVEL2_CACHE_ASSOC */ +#endif /* ndef _SC_XOPEN_REALTIME */ + if (x == Mono_Posix_SysConf__SC_XOPEN_REALTIME_THREADS) +#ifdef _SC_XOPEN_REALTIME_THREADS + {*r = _SC_XOPEN_REALTIME_THREADS; return 0;} +#else /* def _SC_XOPEN_REALTIME_THREADS */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_LEVEL2_CACHE_ASSOC */ - if (x == Mono_Posix_SysConf__SC_LEVEL2_CACHE_LINESIZE) -#ifdef _SC_LEVEL2_CACHE_LINESIZE - {*r = _SC_LEVEL2_CACHE_LINESIZE; return 0;} -#else /* def _SC_LEVEL2_CACHE_LINESIZE */ +#endif /* ndef _SC_XOPEN_REALTIME_THREADS */ + if (x == Mono_Posix_SysConf__SC_XOPEN_SHM) +#ifdef _SC_XOPEN_SHM + {*r = _SC_XOPEN_SHM; return 0;} +#else /* def _SC_XOPEN_SHM */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_LEVEL2_CACHE_LINESIZE */ - if (x == Mono_Posix_SysConf__SC_LEVEL3_CACHE_SIZE) -#ifdef _SC_LEVEL3_CACHE_SIZE - {*r = _SC_LEVEL3_CACHE_SIZE; return 0;} -#else /* def _SC_LEVEL3_CACHE_SIZE */ +#endif /* ndef _SC_XOPEN_SHM */ + if (x == Mono_Posix_SysConf__SC_XOPEN_UNIX) +#ifdef _SC_XOPEN_UNIX + {*r = _SC_XOPEN_UNIX; return 0;} +#else /* def _SC_XOPEN_UNIX */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_LEVEL3_CACHE_SIZE */ - if (x == Mono_Posix_SysConf__SC_LEVEL3_CACHE_ASSOC) -#ifdef _SC_LEVEL3_CACHE_ASSOC - {*r = _SC_LEVEL3_CACHE_ASSOC; return 0;} -#else /* def _SC_LEVEL3_CACHE_ASSOC */ +#endif /* ndef _SC_XOPEN_UNIX */ + if (x == Mono_Posix_SysConf__SC_XOPEN_VERSION) +#ifdef _SC_XOPEN_VERSION + {*r = _SC_XOPEN_VERSION; return 0;} +#else /* def _SC_XOPEN_VERSION */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_LEVEL3_CACHE_ASSOC */ - if (x == Mono_Posix_SysConf__SC_LEVEL3_CACHE_LINESIZE) -#ifdef _SC_LEVEL3_CACHE_LINESIZE - {*r = _SC_LEVEL3_CACHE_LINESIZE; return 0;} -#else /* def _SC_LEVEL3_CACHE_LINESIZE */ +#endif /* ndef _SC_XOPEN_VERSION */ + if (x == Mono_Posix_SysConf__SC_XOPEN_XCU_VERSION) +#ifdef _SC_XOPEN_XCU_VERSION + {*r = _SC_XOPEN_XCU_VERSION; return 0;} +#else /* def _SC_XOPEN_XCU_VERSION */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_LEVEL3_CACHE_LINESIZE */ - if (x == Mono_Posix_SysConf__SC_LEVEL4_CACHE_SIZE) -#ifdef _SC_LEVEL4_CACHE_SIZE - {*r = _SC_LEVEL4_CACHE_SIZE; return 0;} -#else /* def _SC_LEVEL4_CACHE_SIZE */ +#endif /* ndef _SC_XOPEN_XCU_VERSION */ + if (x == Mono_Posix_SysConf__SC_XOPEN_XPG2) +#ifdef _SC_XOPEN_XPG2 + {*r = _SC_XOPEN_XPG2; return 0;} +#else /* def _SC_XOPEN_XPG2 */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_LEVEL4_CACHE_SIZE */ - if (x == Mono_Posix_SysConf__SC_LEVEL4_CACHE_ASSOC) -#ifdef _SC_LEVEL4_CACHE_ASSOC - {*r = _SC_LEVEL4_CACHE_ASSOC; return 0;} -#else /* def _SC_LEVEL4_CACHE_ASSOC */ +#endif /* ndef _SC_XOPEN_XPG2 */ + if (x == Mono_Posix_SysConf__SC_XOPEN_XPG3) +#ifdef _SC_XOPEN_XPG3 + {*r = _SC_XOPEN_XPG3; return 0;} +#else /* def _SC_XOPEN_XPG3 */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_LEVEL4_CACHE_ASSOC */ - if (x == Mono_Posix_SysConf__SC_LEVEL4_CACHE_LINESIZE) -#ifdef _SC_LEVEL4_CACHE_LINESIZE - {*r = _SC_LEVEL4_CACHE_LINESIZE; return 0;} -#else /* def _SC_LEVEL4_CACHE_LINESIZE */ +#endif /* ndef _SC_XOPEN_XPG3 */ + if (x == Mono_Posix_SysConf__SC_XOPEN_XPG4) +#ifdef _SC_XOPEN_XPG4 + {*r = _SC_XOPEN_XPG4; return 0;} +#else /* def _SC_XOPEN_XPG4 */ {errno = EINVAL; return -1;} -#endif /* ndef _SC_LEVEL4_CACHE_LINESIZE */ +#endif /* ndef _SC_XOPEN_XPG4 */ errno = EINVAL; return -1; } @@ -4551,98 +6594,74 @@ int Mono_Posix_ToSysConf (int x, int *r) *r = 0; if (x == 0) return 0; -#ifdef _SC_ARG_MAX - if (x == _SC_ARG_MAX) - {*r = Mono_Posix_SysConf__SC_ARG_MAX; return 0;} -#endif /* ndef _SC_ARG_MAX */ -#ifdef _SC_CHILD_MAX - if (x == _SC_CHILD_MAX) - {*r = Mono_Posix_SysConf__SC_CHILD_MAX; return 0;} -#endif /* ndef _SC_CHILD_MAX */ -#ifdef _SC_CLK_TCK - if (x == _SC_CLK_TCK) - {*r = Mono_Posix_SysConf__SC_CLK_TCK; return 0;} -#endif /* ndef _SC_CLK_TCK */ -#ifdef _SC_NGROUPS_MAX - if (x == _SC_NGROUPS_MAX) - {*r = Mono_Posix_SysConf__SC_NGROUPS_MAX; return 0;} -#endif /* ndef _SC_NGROUPS_MAX */ -#ifdef _SC_OPEN_MAX - if (x == _SC_OPEN_MAX) - {*r = Mono_Posix_SysConf__SC_OPEN_MAX; return 0;} -#endif /* ndef _SC_OPEN_MAX */ -#ifdef _SC_STREAM_MAX - if (x == _SC_STREAM_MAX) - {*r = Mono_Posix_SysConf__SC_STREAM_MAX; return 0;} -#endif /* ndef _SC_STREAM_MAX */ -#ifdef _SC_TZNAME_MAX - if (x == _SC_TZNAME_MAX) - {*r = Mono_Posix_SysConf__SC_TZNAME_MAX; return 0;} -#endif /* ndef _SC_TZNAME_MAX */ -#ifdef _SC_JOB_CONTROL - if (x == _SC_JOB_CONTROL) - {*r = Mono_Posix_SysConf__SC_JOB_CONTROL; return 0;} -#endif /* ndef _SC_JOB_CONTROL */ -#ifdef _SC_SAVED_IDS - if (x == _SC_SAVED_IDS) - {*r = Mono_Posix_SysConf__SC_SAVED_IDS; return 0;} -#endif /* ndef _SC_SAVED_IDS */ -#ifdef _SC_REALTIME_SIGNALS - if (x == _SC_REALTIME_SIGNALS) - {*r = Mono_Posix_SysConf__SC_REALTIME_SIGNALS; return 0;} -#endif /* ndef _SC_REALTIME_SIGNALS */ -#ifdef _SC_PRIORITY_SCHEDULING - if (x == _SC_PRIORITY_SCHEDULING) - {*r = Mono_Posix_SysConf__SC_PRIORITY_SCHEDULING; return 0;} -#endif /* ndef _SC_PRIORITY_SCHEDULING */ -#ifdef _SC_TIMERS - if (x == _SC_TIMERS) - {*r = Mono_Posix_SysConf__SC_TIMERS; return 0;} -#endif /* ndef _SC_TIMERS */ -#ifdef _SC_ASYNCHRONOUS_IO - if (x == _SC_ASYNCHRONOUS_IO) - {*r = Mono_Posix_SysConf__SC_ASYNCHRONOUS_IO; return 0;} -#endif /* ndef _SC_ASYNCHRONOUS_IO */ -#ifdef _SC_PRIORITIZED_IO - if (x == _SC_PRIORITIZED_IO) - {*r = Mono_Posix_SysConf__SC_PRIORITIZED_IO; return 0;} -#endif /* ndef _SC_PRIORITIZED_IO */ -#ifdef _SC_SYNCHRONIZED_IO - if (x == _SC_SYNCHRONIZED_IO) - {*r = Mono_Posix_SysConf__SC_SYNCHRONIZED_IO; return 0;} -#endif /* ndef _SC_SYNCHRONIZED_IO */ -#ifdef _SC_FSYNC - if (x == _SC_FSYNC) - {*r = Mono_Posix_SysConf__SC_FSYNC; return 0;} -#endif /* ndef _SC_FSYNC */ -#ifdef _SC_MAPPED_FILES - if (x == _SC_MAPPED_FILES) - {*r = Mono_Posix_SysConf__SC_MAPPED_FILES; return 0;} -#endif /* ndef _SC_MAPPED_FILES */ -#ifdef _SC_MEMLOCK - if (x == _SC_MEMLOCK) - {*r = Mono_Posix_SysConf__SC_MEMLOCK; return 0;} -#endif /* ndef _SC_MEMLOCK */ -#ifdef _SC_MEMLOCK_RANGE - if (x == _SC_MEMLOCK_RANGE) - {*r = Mono_Posix_SysConf__SC_MEMLOCK_RANGE; return 0;} -#endif /* ndef _SC_MEMLOCK_RANGE */ -#ifdef _SC_MEMORY_PROTECTION - if (x == _SC_MEMORY_PROTECTION) - {*r = Mono_Posix_SysConf__SC_MEMORY_PROTECTION; return 0;} -#endif /* ndef _SC_MEMORY_PROTECTION */ -#ifdef _SC_MESSAGE_PASSING - if (x == _SC_MESSAGE_PASSING) - {*r = Mono_Posix_SysConf__SC_MESSAGE_PASSING; return 0;} -#endif /* ndef _SC_MESSAGE_PASSING */ -#ifdef _SC_SEMAPHORES - if (x == _SC_SEMAPHORES) - {*r = Mono_Posix_SysConf__SC_SEMAPHORES; return 0;} -#endif /* ndef _SC_SEMAPHORES */ -#ifdef _SC_SHARED_MEMORY_OBJECTS - if (x == _SC_SHARED_MEMORY_OBJECTS) - {*r = Mono_Posix_SysConf__SC_SHARED_MEMORY_OBJECTS; return 0;} -#endif /* ndef _SC_SHARED_MEMORY_OBJECTS */ +#ifdef _SC_2_CHAR_TERM + if (x == _SC_2_CHAR_TERM) + {*r = Mono_Posix_SysConf__SC_2_CHAR_TERM; return 0;} +#endif /* ndef _SC_2_CHAR_TERM */ +#ifdef _SC_2_C_BIND + if (x == _SC_2_C_BIND) + {*r = Mono_Posix_SysConf__SC_2_C_BIND; return 0;} +#endif /* ndef _SC_2_C_BIND */ +#ifdef _SC_2_C_DEV + if (x == _SC_2_C_DEV) + {*r = Mono_Posix_SysConf__SC_2_C_DEV; return 0;} +#endif /* ndef _SC_2_C_DEV */ +#ifdef _SC_2_C_VERSION + if (x == _SC_2_C_VERSION) + {*r = Mono_Posix_SysConf__SC_2_C_VERSION; return 0;} +#endif /* ndef _SC_2_C_VERSION */ +#ifdef _SC_2_FORT_DEV + if (x == _SC_2_FORT_DEV) + {*r = Mono_Posix_SysConf__SC_2_FORT_DEV; return 0;} +#endif /* ndef _SC_2_FORT_DEV */ +#ifdef _SC_2_FORT_RUN + if (x == _SC_2_FORT_RUN) + {*r = Mono_Posix_SysConf__SC_2_FORT_RUN; return 0;} +#endif /* ndef _SC_2_FORT_RUN */ +#ifdef _SC_2_LOCALEDEF + if (x == _SC_2_LOCALEDEF) + {*r = Mono_Posix_SysConf__SC_2_LOCALEDEF; return 0;} +#endif /* ndef _SC_2_LOCALEDEF */ +#ifdef _SC_2_PBS + if (x == _SC_2_PBS) + {*r = Mono_Posix_SysConf__SC_2_PBS; return 0;} +#endif /* ndef _SC_2_PBS */ +#ifdef _SC_2_PBS_ACCOUNTING + if (x == _SC_2_PBS_ACCOUNTING) + {*r = Mono_Posix_SysConf__SC_2_PBS_ACCOUNTING; return 0;} +#endif /* ndef _SC_2_PBS_ACCOUNTING */ +#ifdef _SC_2_PBS_CHECKPOINT + if (x == _SC_2_PBS_CHECKPOINT) + {*r = Mono_Posix_SysConf__SC_2_PBS_CHECKPOINT; return 0;} +#endif /* ndef _SC_2_PBS_CHECKPOINT */ +#ifdef _SC_2_PBS_LOCATE + if (x == _SC_2_PBS_LOCATE) + {*r = Mono_Posix_SysConf__SC_2_PBS_LOCATE; return 0;} +#endif /* ndef _SC_2_PBS_LOCATE */ +#ifdef _SC_2_PBS_MESSAGE + if (x == _SC_2_PBS_MESSAGE) + {*r = Mono_Posix_SysConf__SC_2_PBS_MESSAGE; return 0;} +#endif /* ndef _SC_2_PBS_MESSAGE */ +#ifdef _SC_2_PBS_TRACK + if (x == _SC_2_PBS_TRACK) + {*r = Mono_Posix_SysConf__SC_2_PBS_TRACK; return 0;} +#endif /* ndef _SC_2_PBS_TRACK */ +#ifdef _SC_2_SW_DEV + if (x == _SC_2_SW_DEV) + {*r = Mono_Posix_SysConf__SC_2_SW_DEV; return 0;} +#endif /* ndef _SC_2_SW_DEV */ +#ifdef _SC_2_UPE + if (x == _SC_2_UPE) + {*r = Mono_Posix_SysConf__SC_2_UPE; return 0;} +#endif /* ndef _SC_2_UPE */ +#ifdef _SC_2_VERSION + if (x == _SC_2_VERSION) + {*r = Mono_Posix_SysConf__SC_2_VERSION; return 0;} +#endif /* ndef _SC_2_VERSION */ +#ifdef _SC_ADVISORY_INFO + if (x == _SC_ADVISORY_INFO) + {*r = Mono_Posix_SysConf__SC_ADVISORY_INFO; return 0;} +#endif /* ndef _SC_ADVISORY_INFO */ #ifdef _SC_AIO_LISTIO_MAX if (x == _SC_AIO_LISTIO_MAX) {*r = Mono_Posix_SysConf__SC_AIO_LISTIO_MAX; return 0;} @@ -4655,46 +6674,30 @@ int Mono_Posix_ToSysConf (int x, int *r) if (x == _SC_AIO_PRIO_DELTA_MAX) {*r = Mono_Posix_SysConf__SC_AIO_PRIO_DELTA_MAX; return 0;} #endif /* ndef _SC_AIO_PRIO_DELTA_MAX */ -#ifdef _SC_DELAYTIMER_MAX - if (x == _SC_DELAYTIMER_MAX) - {*r = Mono_Posix_SysConf__SC_DELAYTIMER_MAX; return 0;} -#endif /* ndef _SC_DELAYTIMER_MAX */ -#ifdef _SC_MQ_OPEN_MAX - if (x == _SC_MQ_OPEN_MAX) - {*r = Mono_Posix_SysConf__SC_MQ_OPEN_MAX; return 0;} -#endif /* ndef _SC_MQ_OPEN_MAX */ -#ifdef _SC_MQ_PRIO_MAX - if (x == _SC_MQ_PRIO_MAX) - {*r = Mono_Posix_SysConf__SC_MQ_PRIO_MAX; return 0;} -#endif /* ndef _SC_MQ_PRIO_MAX */ -#ifdef _SC_VERSION - if (x == _SC_VERSION) - {*r = Mono_Posix_SysConf__SC_VERSION; return 0;} -#endif /* ndef _SC_VERSION */ -#ifdef _SC_PAGESIZE - if (x == _SC_PAGESIZE) - {*r = Mono_Posix_SysConf__SC_PAGESIZE; return 0;} -#endif /* ndef _SC_PAGESIZE */ -#ifdef _SC_RTSIG_MAX - if (x == _SC_RTSIG_MAX) - {*r = Mono_Posix_SysConf__SC_RTSIG_MAX; return 0;} -#endif /* ndef _SC_RTSIG_MAX */ -#ifdef _SC_SEM_NSEMS_MAX - if (x == _SC_SEM_NSEMS_MAX) - {*r = Mono_Posix_SysConf__SC_SEM_NSEMS_MAX; return 0;} -#endif /* ndef _SC_SEM_NSEMS_MAX */ -#ifdef _SC_SEM_VALUE_MAX - if (x == _SC_SEM_VALUE_MAX) - {*r = Mono_Posix_SysConf__SC_SEM_VALUE_MAX; return 0;} -#endif /* ndef _SC_SEM_VALUE_MAX */ -#ifdef _SC_SIGQUEUE_MAX - if (x == _SC_SIGQUEUE_MAX) - {*r = Mono_Posix_SysConf__SC_SIGQUEUE_MAX; return 0;} -#endif /* ndef _SC_SIGQUEUE_MAX */ -#ifdef _SC_TIMER_MAX - if (x == _SC_TIMER_MAX) - {*r = Mono_Posix_SysConf__SC_TIMER_MAX; return 0;} -#endif /* ndef _SC_TIMER_MAX */ +#ifdef _SC_ARG_MAX + if (x == _SC_ARG_MAX) + {*r = Mono_Posix_SysConf__SC_ARG_MAX; return 0;} +#endif /* ndef _SC_ARG_MAX */ +#ifdef _SC_ASYNCHRONOUS_IO + if (x == _SC_ASYNCHRONOUS_IO) + {*r = Mono_Posix_SysConf__SC_ASYNCHRONOUS_IO; return 0;} +#endif /* ndef _SC_ASYNCHRONOUS_IO */ +#ifdef _SC_ATEXIT_MAX + if (x == _SC_ATEXIT_MAX) + {*r = Mono_Posix_SysConf__SC_ATEXIT_MAX; return 0;} +#endif /* ndef _SC_ATEXIT_MAX */ +#ifdef _SC_AVPHYS_PAGES + if (x == _SC_AVPHYS_PAGES) + {*r = Mono_Posix_SysConf__SC_AVPHYS_PAGES; return 0;} +#endif /* ndef _SC_AVPHYS_PAGES */ +#ifdef _SC_BARRIERS + if (x == _SC_BARRIERS) + {*r = Mono_Posix_SysConf__SC_BARRIERS; return 0;} +#endif /* ndef _SC_BARRIERS */ +#ifdef _SC_BASE + if (x == _SC_BASE) + {*r = Mono_Posix_SysConf__SC_BASE; return 0;} +#endif /* ndef _SC_BASE */ #ifdef _SC_BC_BASE_MAX if (x == _SC_BC_BASE_MAX) {*r = Mono_Posix_SysConf__SC_BC_BASE_MAX; return 0;} @@ -4711,254 +6714,10 @@ int Mono_Posix_ToSysConf (int x, int *r) if (x == _SC_BC_STRING_MAX) {*r = Mono_Posix_SysConf__SC_BC_STRING_MAX; return 0;} #endif /* ndef _SC_BC_STRING_MAX */ -#ifdef _SC_COLL_WEIGHTS_MAX - if (x == _SC_COLL_WEIGHTS_MAX) - {*r = Mono_Posix_SysConf__SC_COLL_WEIGHTS_MAX; return 0;} -#endif /* ndef _SC_COLL_WEIGHTS_MAX */ -#ifdef _SC_EQUIV_CLASS_MAX - if (x == _SC_EQUIV_CLASS_MAX) - {*r = Mono_Posix_SysConf__SC_EQUIV_CLASS_MAX; return 0;} -#endif /* ndef _SC_EQUIV_CLASS_MAX */ -#ifdef _SC_EXPR_NEST_MAX - if (x == _SC_EXPR_NEST_MAX) - {*r = Mono_Posix_SysConf__SC_EXPR_NEST_MAX; return 0;} -#endif /* ndef _SC_EXPR_NEST_MAX */ -#ifdef _SC_LINE_MAX - if (x == _SC_LINE_MAX) - {*r = Mono_Posix_SysConf__SC_LINE_MAX; return 0;} -#endif /* ndef _SC_LINE_MAX */ -#ifdef _SC_RE_DUP_MAX - if (x == _SC_RE_DUP_MAX) - {*r = Mono_Posix_SysConf__SC_RE_DUP_MAX; return 0;} -#endif /* ndef _SC_RE_DUP_MAX */ #ifdef _SC_CHARCLASS_NAME_MAX if (x == _SC_CHARCLASS_NAME_MAX) {*r = Mono_Posix_SysConf__SC_CHARCLASS_NAME_MAX; return 0;} #endif /* ndef _SC_CHARCLASS_NAME_MAX */ -#ifdef _SC_2_VERSION - if (x == _SC_2_VERSION) - {*r = Mono_Posix_SysConf__SC_2_VERSION; return 0;} -#endif /* ndef _SC_2_VERSION */ -#ifdef _SC_2_C_BIND - if (x == _SC_2_C_BIND) - {*r = Mono_Posix_SysConf__SC_2_C_BIND; return 0;} -#endif /* ndef _SC_2_C_BIND */ -#ifdef _SC_2_C_DEV - if (x == _SC_2_C_DEV) - {*r = Mono_Posix_SysConf__SC_2_C_DEV; return 0;} -#endif /* ndef _SC_2_C_DEV */ -#ifdef _SC_2_FORT_DEV - if (x == _SC_2_FORT_DEV) - {*r = Mono_Posix_SysConf__SC_2_FORT_DEV; return 0;} -#endif /* ndef _SC_2_FORT_DEV */ -#ifdef _SC_2_FORT_RUN - if (x == _SC_2_FORT_RUN) - {*r = Mono_Posix_SysConf__SC_2_FORT_RUN; return 0;} -#endif /* ndef _SC_2_FORT_RUN */ -#ifdef _SC_2_SW_DEV - if (x == _SC_2_SW_DEV) - {*r = Mono_Posix_SysConf__SC_2_SW_DEV; return 0;} -#endif /* ndef _SC_2_SW_DEV */ -#ifdef _SC_2_LOCALEDEF - if (x == _SC_2_LOCALEDEF) - {*r = Mono_Posix_SysConf__SC_2_LOCALEDEF; return 0;} -#endif /* ndef _SC_2_LOCALEDEF */ -#ifdef _SC_PII - if (x == _SC_PII) - {*r = Mono_Posix_SysConf__SC_PII; return 0;} -#endif /* ndef _SC_PII */ -#ifdef _SC_PII_XTI - if (x == _SC_PII_XTI) - {*r = Mono_Posix_SysConf__SC_PII_XTI; return 0;} -#endif /* ndef _SC_PII_XTI */ -#ifdef _SC_PII_SOCKET - if (x == _SC_PII_SOCKET) - {*r = Mono_Posix_SysConf__SC_PII_SOCKET; return 0;} -#endif /* ndef _SC_PII_SOCKET */ -#ifdef _SC_PII_INTERNET - if (x == _SC_PII_INTERNET) - {*r = Mono_Posix_SysConf__SC_PII_INTERNET; return 0;} -#endif /* ndef _SC_PII_INTERNET */ -#ifdef _SC_PII_OSI - if (x == _SC_PII_OSI) - {*r = Mono_Posix_SysConf__SC_PII_OSI; return 0;} -#endif /* ndef _SC_PII_OSI */ -#ifdef _SC_POLL - if (x == _SC_POLL) - {*r = Mono_Posix_SysConf__SC_POLL; return 0;} -#endif /* ndef _SC_POLL */ -#ifdef _SC_SELECT - if (x == _SC_SELECT) - {*r = Mono_Posix_SysConf__SC_SELECT; return 0;} -#endif /* ndef _SC_SELECT */ -#ifdef _SC_UIO_MAXIOV - if (x == _SC_UIO_MAXIOV) - {*r = Mono_Posix_SysConf__SC_UIO_MAXIOV; return 0;} -#endif /* ndef _SC_UIO_MAXIOV */ -#ifdef _SC_IOV_MAX - if (x == _SC_IOV_MAX) - {*r = Mono_Posix_SysConf__SC_IOV_MAX; return 0;} -#endif /* ndef _SC_IOV_MAX */ -#ifdef _SC_PII_INTERNET_STREAM - if (x == _SC_PII_INTERNET_STREAM) - {*r = Mono_Posix_SysConf__SC_PII_INTERNET_STREAM; return 0;} -#endif /* ndef _SC_PII_INTERNET_STREAM */ -#ifdef _SC_PII_INTERNET_DGRAM - if (x == _SC_PII_INTERNET_DGRAM) - {*r = Mono_Posix_SysConf__SC_PII_INTERNET_DGRAM; return 0;} -#endif /* ndef _SC_PII_INTERNET_DGRAM */ -#ifdef _SC_PII_OSI_COTS - if (x == _SC_PII_OSI_COTS) - {*r = Mono_Posix_SysConf__SC_PII_OSI_COTS; return 0;} -#endif /* ndef _SC_PII_OSI_COTS */ -#ifdef _SC_PII_OSI_CLTS - if (x == _SC_PII_OSI_CLTS) - {*r = Mono_Posix_SysConf__SC_PII_OSI_CLTS; return 0;} -#endif /* ndef _SC_PII_OSI_CLTS */ -#ifdef _SC_PII_OSI_M - if (x == _SC_PII_OSI_M) - {*r = Mono_Posix_SysConf__SC_PII_OSI_M; return 0;} -#endif /* ndef _SC_PII_OSI_M */ -#ifdef _SC_T_IOV_MAX - if (x == _SC_T_IOV_MAX) - {*r = Mono_Posix_SysConf__SC_T_IOV_MAX; return 0;} -#endif /* ndef _SC_T_IOV_MAX */ -#ifdef _SC_THREADS - if (x == _SC_THREADS) - {*r = Mono_Posix_SysConf__SC_THREADS; return 0;} -#endif /* ndef _SC_THREADS */ -#ifdef _SC_THREAD_SAFE_FUNCTIONS - if (x == _SC_THREAD_SAFE_FUNCTIONS) - {*r = Mono_Posix_SysConf__SC_THREAD_SAFE_FUNCTIONS; return 0;} -#endif /* ndef _SC_THREAD_SAFE_FUNCTIONS */ -#ifdef _SC_GETGR_R_SIZE_MAX - if (x == _SC_GETGR_R_SIZE_MAX) - {*r = Mono_Posix_SysConf__SC_GETGR_R_SIZE_MAX; return 0;} -#endif /* ndef _SC_GETGR_R_SIZE_MAX */ -#ifdef _SC_GETPW_R_SIZE_MAX - if (x == _SC_GETPW_R_SIZE_MAX) - {*r = Mono_Posix_SysConf__SC_GETPW_R_SIZE_MAX; return 0;} -#endif /* ndef _SC_GETPW_R_SIZE_MAX */ -#ifdef _SC_LOGIN_NAME_MAX - if (x == _SC_LOGIN_NAME_MAX) - {*r = Mono_Posix_SysConf__SC_LOGIN_NAME_MAX; return 0;} -#endif /* ndef _SC_LOGIN_NAME_MAX */ -#ifdef _SC_TTY_NAME_MAX - if (x == _SC_TTY_NAME_MAX) - {*r = Mono_Posix_SysConf__SC_TTY_NAME_MAX; return 0;} -#endif /* ndef _SC_TTY_NAME_MAX */ -#ifdef _SC_THREAD_DESTRUCTOR_ITERATIONS - if (x == _SC_THREAD_DESTRUCTOR_ITERATIONS) - {*r = Mono_Posix_SysConf__SC_THREAD_DESTRUCTOR_ITERATIONS; return 0;} -#endif /* ndef _SC_THREAD_DESTRUCTOR_ITERATIONS */ -#ifdef _SC_THREAD_KEYS_MAX - if (x == _SC_THREAD_KEYS_MAX) - {*r = Mono_Posix_SysConf__SC_THREAD_KEYS_MAX; return 0;} -#endif /* ndef _SC_THREAD_KEYS_MAX */ -#ifdef _SC_THREAD_STACK_MIN - if (x == _SC_THREAD_STACK_MIN) - {*r = Mono_Posix_SysConf__SC_THREAD_STACK_MIN; return 0;} -#endif /* ndef _SC_THREAD_STACK_MIN */ -#ifdef _SC_THREAD_THREADS_MAX - if (x == _SC_THREAD_THREADS_MAX) - {*r = Mono_Posix_SysConf__SC_THREAD_THREADS_MAX; return 0;} -#endif /* ndef _SC_THREAD_THREADS_MAX */ -#ifdef _SC_THREAD_ATTR_STACKADDR - if (x == _SC_THREAD_ATTR_STACKADDR) - {*r = Mono_Posix_SysConf__SC_THREAD_ATTR_STACKADDR; return 0;} -#endif /* ndef _SC_THREAD_ATTR_STACKADDR */ -#ifdef _SC_THREAD_ATTR_STACKSIZE - if (x == _SC_THREAD_ATTR_STACKSIZE) - {*r = Mono_Posix_SysConf__SC_THREAD_ATTR_STACKSIZE; return 0;} -#endif /* ndef _SC_THREAD_ATTR_STACKSIZE */ -#ifdef _SC_THREAD_PRIORITY_SCHEDULING - if (x == _SC_THREAD_PRIORITY_SCHEDULING) - {*r = Mono_Posix_SysConf__SC_THREAD_PRIORITY_SCHEDULING; return 0;} -#endif /* ndef _SC_THREAD_PRIORITY_SCHEDULING */ -#ifdef _SC_THREAD_PRIO_INHERIT - if (x == _SC_THREAD_PRIO_INHERIT) - {*r = Mono_Posix_SysConf__SC_THREAD_PRIO_INHERIT; return 0;} -#endif /* ndef _SC_THREAD_PRIO_INHERIT */ -#ifdef _SC_THREAD_PRIO_PROTECT - if (x == _SC_THREAD_PRIO_PROTECT) - {*r = Mono_Posix_SysConf__SC_THREAD_PRIO_PROTECT; return 0;} -#endif /* ndef _SC_THREAD_PRIO_PROTECT */ -#ifdef _SC_THREAD_PROCESS_SHARED - if (x == _SC_THREAD_PROCESS_SHARED) - {*r = Mono_Posix_SysConf__SC_THREAD_PROCESS_SHARED; return 0;} -#endif /* ndef _SC_THREAD_PROCESS_SHARED */ -#ifdef _SC_NPROCESSORS_CONF - if (x == _SC_NPROCESSORS_CONF) - {*r = Mono_Posix_SysConf__SC_NPROCESSORS_CONF; return 0;} -#endif /* ndef _SC_NPROCESSORS_CONF */ -#ifdef _SC_NPROCESSORS_ONLN - if (x == _SC_NPROCESSORS_ONLN) - {*r = Mono_Posix_SysConf__SC_NPROCESSORS_ONLN; return 0;} -#endif /* ndef _SC_NPROCESSORS_ONLN */ -#ifdef _SC_PHYS_PAGES - if (x == _SC_PHYS_PAGES) - {*r = Mono_Posix_SysConf__SC_PHYS_PAGES; return 0;} -#endif /* ndef _SC_PHYS_PAGES */ -#ifdef _SC_AVPHYS_PAGES - if (x == _SC_AVPHYS_PAGES) - {*r = Mono_Posix_SysConf__SC_AVPHYS_PAGES; return 0;} -#endif /* ndef _SC_AVPHYS_PAGES */ -#ifdef _SC_ATEXIT_MAX - if (x == _SC_ATEXIT_MAX) - {*r = Mono_Posix_SysConf__SC_ATEXIT_MAX; return 0;} -#endif /* ndef _SC_ATEXIT_MAX */ -#ifdef _SC_PASS_MAX - if (x == _SC_PASS_MAX) - {*r = Mono_Posix_SysConf__SC_PASS_MAX; return 0;} -#endif /* ndef _SC_PASS_MAX */ -#ifdef _SC_XOPEN_VERSION - if (x == _SC_XOPEN_VERSION) - {*r = Mono_Posix_SysConf__SC_XOPEN_VERSION; return 0;} -#endif /* ndef _SC_XOPEN_VERSION */ -#ifdef _SC_XOPEN_XCU_VERSION - if (x == _SC_XOPEN_XCU_VERSION) - {*r = Mono_Posix_SysConf__SC_XOPEN_XCU_VERSION; return 0;} -#endif /* ndef _SC_XOPEN_XCU_VERSION */ -#ifdef _SC_XOPEN_UNIX - if (x == _SC_XOPEN_UNIX) - {*r = Mono_Posix_SysConf__SC_XOPEN_UNIX; return 0;} -#endif /* ndef _SC_XOPEN_UNIX */ -#ifdef _SC_XOPEN_CRYPT - if (x == _SC_XOPEN_CRYPT) - {*r = Mono_Posix_SysConf__SC_XOPEN_CRYPT; return 0;} -#endif /* ndef _SC_XOPEN_CRYPT */ -#ifdef _SC_XOPEN_ENH_I18N - if (x == _SC_XOPEN_ENH_I18N) - {*r = Mono_Posix_SysConf__SC_XOPEN_ENH_I18N; return 0;} -#endif /* ndef _SC_XOPEN_ENH_I18N */ -#ifdef _SC_XOPEN_SHM - if (x == _SC_XOPEN_SHM) - {*r = Mono_Posix_SysConf__SC_XOPEN_SHM; return 0;} -#endif /* ndef _SC_XOPEN_SHM */ -#ifdef _SC_2_CHAR_TERM - if (x == _SC_2_CHAR_TERM) - {*r = Mono_Posix_SysConf__SC_2_CHAR_TERM; return 0;} -#endif /* ndef _SC_2_CHAR_TERM */ -#ifdef _SC_2_C_VERSION - if (x == _SC_2_C_VERSION) - {*r = Mono_Posix_SysConf__SC_2_C_VERSION; return 0;} -#endif /* ndef _SC_2_C_VERSION */ -#ifdef _SC_2_UPE - if (x == _SC_2_UPE) - {*r = Mono_Posix_SysConf__SC_2_UPE; return 0;} -#endif /* ndef _SC_2_UPE */ -#ifdef _SC_XOPEN_XPG2 - if (x == _SC_XOPEN_XPG2) - {*r = Mono_Posix_SysConf__SC_XOPEN_XPG2; return 0;} -#endif /* ndef _SC_XOPEN_XPG2 */ -#ifdef _SC_XOPEN_XPG3 - if (x == _SC_XOPEN_XPG3) - {*r = Mono_Posix_SysConf__SC_XOPEN_XPG3; return 0;} -#endif /* ndef _SC_XOPEN_XPG3 */ -#ifdef _SC_XOPEN_XPG4 - if (x == _SC_XOPEN_XPG4) - {*r = Mono_Posix_SysConf__SC_XOPEN_XPG4; return 0;} -#endif /* ndef _SC_XOPEN_XPG4 */ #ifdef _SC_CHAR_BIT if (x == _SC_CHAR_BIT) {*r = Mono_Posix_SysConf__SC_CHAR_BIT; return 0;} @@ -4971,150 +6730,38 @@ int Mono_Posix_ToSysConf (int x, int *r) if (x == _SC_CHAR_MIN) {*r = Mono_Posix_SysConf__SC_CHAR_MIN; return 0;} #endif /* ndef _SC_CHAR_MIN */ -#ifdef _SC_INT_MAX - if (x == _SC_INT_MAX) - {*r = Mono_Posix_SysConf__SC_INT_MAX; return 0;} -#endif /* ndef _SC_INT_MAX */ -#ifdef _SC_INT_MIN - if (x == _SC_INT_MIN) - {*r = Mono_Posix_SysConf__SC_INT_MIN; return 0;} -#endif /* ndef _SC_INT_MIN */ -#ifdef _SC_LONG_BIT - if (x == _SC_LONG_BIT) - {*r = Mono_Posix_SysConf__SC_LONG_BIT; return 0;} -#endif /* ndef _SC_LONG_BIT */ -#ifdef _SC_WORD_BIT - if (x == _SC_WORD_BIT) - {*r = Mono_Posix_SysConf__SC_WORD_BIT; return 0;} -#endif /* ndef _SC_WORD_BIT */ -#ifdef _SC_MB_LEN_MAX - if (x == _SC_MB_LEN_MAX) - {*r = Mono_Posix_SysConf__SC_MB_LEN_MAX; return 0;} -#endif /* ndef _SC_MB_LEN_MAX */ -#ifdef _SC_NZERO - if (x == _SC_NZERO) - {*r = Mono_Posix_SysConf__SC_NZERO; return 0;} -#endif /* ndef _SC_NZERO */ -#ifdef _SC_SSIZE_MAX - if (x == _SC_SSIZE_MAX) - {*r = Mono_Posix_SysConf__SC_SSIZE_MAX; return 0;} -#endif /* ndef _SC_SSIZE_MAX */ -#ifdef _SC_SCHAR_MAX - if (x == _SC_SCHAR_MAX) - {*r = Mono_Posix_SysConf__SC_SCHAR_MAX; return 0;} -#endif /* ndef _SC_SCHAR_MAX */ -#ifdef _SC_SCHAR_MIN - if (x == _SC_SCHAR_MIN) - {*r = Mono_Posix_SysConf__SC_SCHAR_MIN; return 0;} -#endif /* ndef _SC_SCHAR_MIN */ -#ifdef _SC_SHRT_MAX - if (x == _SC_SHRT_MAX) - {*r = Mono_Posix_SysConf__SC_SHRT_MAX; return 0;} -#endif /* ndef _SC_SHRT_MAX */ -#ifdef _SC_SHRT_MIN - if (x == _SC_SHRT_MIN) - {*r = Mono_Posix_SysConf__SC_SHRT_MIN; return 0;} -#endif /* ndef _SC_SHRT_MIN */ -#ifdef _SC_UCHAR_MAX - if (x == _SC_UCHAR_MAX) - {*r = Mono_Posix_SysConf__SC_UCHAR_MAX; return 0;} -#endif /* ndef _SC_UCHAR_MAX */ -#ifdef _SC_UINT_MAX - if (x == _SC_UINT_MAX) - {*r = Mono_Posix_SysConf__SC_UINT_MAX; return 0;} -#endif /* ndef _SC_UINT_MAX */ -#ifdef _SC_ULONG_MAX - if (x == _SC_ULONG_MAX) - {*r = Mono_Posix_SysConf__SC_ULONG_MAX; return 0;} -#endif /* ndef _SC_ULONG_MAX */ -#ifdef _SC_USHRT_MAX - if (x == _SC_USHRT_MAX) - {*r = Mono_Posix_SysConf__SC_USHRT_MAX; return 0;} -#endif /* ndef _SC_USHRT_MAX */ -#ifdef _SC_NL_ARGMAX - if (x == _SC_NL_ARGMAX) - {*r = Mono_Posix_SysConf__SC_NL_ARGMAX; return 0;} -#endif /* ndef _SC_NL_ARGMAX */ -#ifdef _SC_NL_LANGMAX - if (x == _SC_NL_LANGMAX) - {*r = Mono_Posix_SysConf__SC_NL_LANGMAX; return 0;} -#endif /* ndef _SC_NL_LANGMAX */ -#ifdef _SC_NL_MSGMAX - if (x == _SC_NL_MSGMAX) - {*r = Mono_Posix_SysConf__SC_NL_MSGMAX; return 0;} -#endif /* ndef _SC_NL_MSGMAX */ -#ifdef _SC_NL_NMAX - if (x == _SC_NL_NMAX) - {*r = Mono_Posix_SysConf__SC_NL_NMAX; return 0;} -#endif /* ndef _SC_NL_NMAX */ -#ifdef _SC_NL_SETMAX - if (x == _SC_NL_SETMAX) - {*r = Mono_Posix_SysConf__SC_NL_SETMAX; return 0;} -#endif /* ndef _SC_NL_SETMAX */ -#ifdef _SC_NL_TEXTMAX - if (x == _SC_NL_TEXTMAX) - {*r = Mono_Posix_SysConf__SC_NL_TEXTMAX; return 0;} -#endif /* ndef _SC_NL_TEXTMAX */ -#ifdef _SC_XBS5_ILP32_OFF32 - if (x == _SC_XBS5_ILP32_OFF32) - {*r = Mono_Posix_SysConf__SC_XBS5_ILP32_OFF32; return 0;} -#endif /* ndef _SC_XBS5_ILP32_OFF32 */ -#ifdef _SC_XBS5_ILP32_OFFBIG - if (x == _SC_XBS5_ILP32_OFFBIG) - {*r = Mono_Posix_SysConf__SC_XBS5_ILP32_OFFBIG; return 0;} -#endif /* ndef _SC_XBS5_ILP32_OFFBIG */ -#ifdef _SC_XBS5_LP64_OFF64 - if (x == _SC_XBS5_LP64_OFF64) - {*r = Mono_Posix_SysConf__SC_XBS5_LP64_OFF64; return 0;} -#endif /* ndef _SC_XBS5_LP64_OFF64 */ -#ifdef _SC_XBS5_LPBIG_OFFBIG - if (x == _SC_XBS5_LPBIG_OFFBIG) - {*r = Mono_Posix_SysConf__SC_XBS5_LPBIG_OFFBIG; return 0;} -#endif /* ndef _SC_XBS5_LPBIG_OFFBIG */ -#ifdef _SC_XOPEN_LEGACY - if (x == _SC_XOPEN_LEGACY) - {*r = Mono_Posix_SysConf__SC_XOPEN_LEGACY; return 0;} -#endif /* ndef _SC_XOPEN_LEGACY */ -#ifdef _SC_XOPEN_REALTIME - if (x == _SC_XOPEN_REALTIME) - {*r = Mono_Posix_SysConf__SC_XOPEN_REALTIME; return 0;} -#endif /* ndef _SC_XOPEN_REALTIME */ -#ifdef _SC_XOPEN_REALTIME_THREADS - if (x == _SC_XOPEN_REALTIME_THREADS) - {*r = Mono_Posix_SysConf__SC_XOPEN_REALTIME_THREADS; return 0;} -#endif /* ndef _SC_XOPEN_REALTIME_THREADS */ -#ifdef _SC_ADVISORY_INFO - if (x == _SC_ADVISORY_INFO) - {*r = Mono_Posix_SysConf__SC_ADVISORY_INFO; return 0;} -#endif /* ndef _SC_ADVISORY_INFO */ -#ifdef _SC_BARRIERS - if (x == _SC_BARRIERS) - {*r = Mono_Posix_SysConf__SC_BARRIERS; return 0;} -#endif /* ndef _SC_BARRIERS */ -#ifdef _SC_BASE - if (x == _SC_BASE) - {*r = Mono_Posix_SysConf__SC_BASE; return 0;} -#endif /* ndef _SC_BASE */ -#ifdef _SC_C_LANG_SUPPORT - if (x == _SC_C_LANG_SUPPORT) - {*r = Mono_Posix_SysConf__SC_C_LANG_SUPPORT; return 0;} -#endif /* ndef _SC_C_LANG_SUPPORT */ -#ifdef _SC_C_LANG_SUPPORT_R - if (x == _SC_C_LANG_SUPPORT_R) - {*r = Mono_Posix_SysConf__SC_C_LANG_SUPPORT_R; return 0;} -#endif /* ndef _SC_C_LANG_SUPPORT_R */ +#ifdef _SC_CHILD_MAX + if (x == _SC_CHILD_MAX) + {*r = Mono_Posix_SysConf__SC_CHILD_MAX; return 0;} +#endif /* ndef _SC_CHILD_MAX */ +#ifdef _SC_CLK_TCK + if (x == _SC_CLK_TCK) + {*r = Mono_Posix_SysConf__SC_CLK_TCK; return 0;} +#endif /* ndef _SC_CLK_TCK */ #ifdef _SC_CLOCK_SELECTION if (x == _SC_CLOCK_SELECTION) {*r = Mono_Posix_SysConf__SC_CLOCK_SELECTION; return 0;} #endif /* ndef _SC_CLOCK_SELECTION */ +#ifdef _SC_COLL_WEIGHTS_MAX + if (x == _SC_COLL_WEIGHTS_MAX) + {*r = Mono_Posix_SysConf__SC_COLL_WEIGHTS_MAX; return 0;} +#endif /* ndef _SC_COLL_WEIGHTS_MAX */ #ifdef _SC_CPUTIME if (x == _SC_CPUTIME) {*r = Mono_Posix_SysConf__SC_CPUTIME; return 0;} #endif /* ndef _SC_CPUTIME */ -#ifdef _SC_THREAD_CPUTIME - if (x == _SC_THREAD_CPUTIME) - {*r = Mono_Posix_SysConf__SC_THREAD_CPUTIME; return 0;} -#endif /* ndef _SC_THREAD_CPUTIME */ +#ifdef _SC_C_LANG_SUPPORT + if (x == _SC_C_LANG_SUPPORT) + {*r = Mono_Posix_SysConf__SC_C_LANG_SUPPORT; return 0;} +#endif /* ndef _SC_C_LANG_SUPPORT */ +#ifdef _SC_C_LANG_SUPPORT_R + if (x == _SC_C_LANG_SUPPORT_R) + {*r = Mono_Posix_SysConf__SC_C_LANG_SUPPORT_R; return 0;} +#endif /* ndef _SC_C_LANG_SUPPORT_R */ +#ifdef _SC_DELAYTIMER_MAX + if (x == _SC_DELAYTIMER_MAX) + {*r = Mono_Posix_SysConf__SC_DELAYTIMER_MAX; return 0;} +#endif /* ndef _SC_DELAYTIMER_MAX */ #ifdef _SC_DEVICE_IO if (x == _SC_DEVICE_IO) {*r = Mono_Posix_SysConf__SC_DEVICE_IO; return 0;} @@ -5127,6 +6774,14 @@ int Mono_Posix_ToSysConf (int x, int *r) if (x == _SC_DEVICE_SPECIFIC_R) {*r = Mono_Posix_SysConf__SC_DEVICE_SPECIFIC_R; return 0;} #endif /* ndef _SC_DEVICE_SPECIFIC_R */ +#ifdef _SC_EQUIV_CLASS_MAX + if (x == _SC_EQUIV_CLASS_MAX) + {*r = Mono_Posix_SysConf__SC_EQUIV_CLASS_MAX; return 0;} +#endif /* ndef _SC_EQUIV_CLASS_MAX */ +#ifdef _SC_EXPR_NEST_MAX + if (x == _SC_EXPR_NEST_MAX) + {*r = Mono_Posix_SysConf__SC_EXPR_NEST_MAX; return 0;} +#endif /* ndef _SC_EXPR_NEST_MAX */ #ifdef _SC_FD_MGMT if (x == _SC_FD_MGMT) {*r = Mono_Posix_SysConf__SC_FD_MGMT; return 0;} @@ -5135,10 +6790,6 @@ int Mono_Posix_ToSysConf (int x, int *r) if (x == _SC_FIFO) {*r = Mono_Posix_SysConf__SC_FIFO; return 0;} #endif /* ndef _SC_FIFO */ -#ifdef _SC_PIPE - if (x == _SC_PIPE) - {*r = Mono_Posix_SysConf__SC_PIPE; return 0;} -#endif /* ndef _SC_PIPE */ #ifdef _SC_FILE_ATTRIBUTES if (x == _SC_FILE_ATTRIBUTES) {*r = Mono_Posix_SysConf__SC_FILE_ATTRIBUTES; return 0;} @@ -5151,30 +6802,274 @@ int Mono_Posix_ToSysConf (int x, int *r) if (x == _SC_FILE_SYSTEM) {*r = Mono_Posix_SysConf__SC_FILE_SYSTEM; return 0;} #endif /* ndef _SC_FILE_SYSTEM */ +#ifdef _SC_FSYNC + if (x == _SC_FSYNC) + {*r = Mono_Posix_SysConf__SC_FSYNC; return 0;} +#endif /* ndef _SC_FSYNC */ +#ifdef _SC_GETGR_R_SIZE_MAX + if (x == _SC_GETGR_R_SIZE_MAX) + {*r = Mono_Posix_SysConf__SC_GETGR_R_SIZE_MAX; return 0;} +#endif /* ndef _SC_GETGR_R_SIZE_MAX */ +#ifdef _SC_GETPW_R_SIZE_MAX + if (x == _SC_GETPW_R_SIZE_MAX) + {*r = Mono_Posix_SysConf__SC_GETPW_R_SIZE_MAX; return 0;} +#endif /* ndef _SC_GETPW_R_SIZE_MAX */ +#ifdef _SC_HOST_NAME_MAX + if (x == _SC_HOST_NAME_MAX) + {*r = Mono_Posix_SysConf__SC_HOST_NAME_MAX; return 0;} +#endif /* ndef _SC_HOST_NAME_MAX */ +#ifdef _SC_INT_MAX + if (x == _SC_INT_MAX) + {*r = Mono_Posix_SysConf__SC_INT_MAX; return 0;} +#endif /* ndef _SC_INT_MAX */ +#ifdef _SC_INT_MIN + if (x == _SC_INT_MIN) + {*r = Mono_Posix_SysConf__SC_INT_MIN; return 0;} +#endif /* ndef _SC_INT_MIN */ +#ifdef _SC_IOV_MAX + if (x == _SC_IOV_MAX) + {*r = Mono_Posix_SysConf__SC_IOV_MAX; return 0;} +#endif /* ndef _SC_IOV_MAX */ +#ifdef _SC_JOB_CONTROL + if (x == _SC_JOB_CONTROL) + {*r = Mono_Posix_SysConf__SC_JOB_CONTROL; return 0;} +#endif /* ndef _SC_JOB_CONTROL */ +#ifdef _SC_LEVEL1_DCACHE_ASSOC + if (x == _SC_LEVEL1_DCACHE_ASSOC) + {*r = Mono_Posix_SysConf__SC_LEVEL1_DCACHE_ASSOC; return 0;} +#endif /* ndef _SC_LEVEL1_DCACHE_ASSOC */ +#ifdef _SC_LEVEL1_DCACHE_LINESIZE + if (x == _SC_LEVEL1_DCACHE_LINESIZE) + {*r = Mono_Posix_SysConf__SC_LEVEL1_DCACHE_LINESIZE; return 0;} +#endif /* ndef _SC_LEVEL1_DCACHE_LINESIZE */ +#ifdef _SC_LEVEL1_DCACHE_SIZE + if (x == _SC_LEVEL1_DCACHE_SIZE) + {*r = Mono_Posix_SysConf__SC_LEVEL1_DCACHE_SIZE; return 0;} +#endif /* ndef _SC_LEVEL1_DCACHE_SIZE */ +#ifdef _SC_LEVEL1_ICACHE_ASSOC + if (x == _SC_LEVEL1_ICACHE_ASSOC) + {*r = Mono_Posix_SysConf__SC_LEVEL1_ICACHE_ASSOC; return 0;} +#endif /* ndef _SC_LEVEL1_ICACHE_ASSOC */ +#ifdef _SC_LEVEL1_ICACHE_LINESIZE + if (x == _SC_LEVEL1_ICACHE_LINESIZE) + {*r = Mono_Posix_SysConf__SC_LEVEL1_ICACHE_LINESIZE; return 0;} +#endif /* ndef _SC_LEVEL1_ICACHE_LINESIZE */ +#ifdef _SC_LEVEL1_ICACHE_SIZE + if (x == _SC_LEVEL1_ICACHE_SIZE) + {*r = Mono_Posix_SysConf__SC_LEVEL1_ICACHE_SIZE; return 0;} +#endif /* ndef _SC_LEVEL1_ICACHE_SIZE */ +#ifdef _SC_LEVEL2_CACHE_ASSOC + if (x == _SC_LEVEL2_CACHE_ASSOC) + {*r = Mono_Posix_SysConf__SC_LEVEL2_CACHE_ASSOC; return 0;} +#endif /* ndef _SC_LEVEL2_CACHE_ASSOC */ +#ifdef _SC_LEVEL2_CACHE_LINESIZE + if (x == _SC_LEVEL2_CACHE_LINESIZE) + {*r = Mono_Posix_SysConf__SC_LEVEL2_CACHE_LINESIZE; return 0;} +#endif /* ndef _SC_LEVEL2_CACHE_LINESIZE */ +#ifdef _SC_LEVEL2_CACHE_SIZE + if (x == _SC_LEVEL2_CACHE_SIZE) + {*r = Mono_Posix_SysConf__SC_LEVEL2_CACHE_SIZE; return 0;} +#endif /* ndef _SC_LEVEL2_CACHE_SIZE */ +#ifdef _SC_LEVEL3_CACHE_ASSOC + if (x == _SC_LEVEL3_CACHE_ASSOC) + {*r = Mono_Posix_SysConf__SC_LEVEL3_CACHE_ASSOC; return 0;} +#endif /* ndef _SC_LEVEL3_CACHE_ASSOC */ +#ifdef _SC_LEVEL3_CACHE_LINESIZE + if (x == _SC_LEVEL3_CACHE_LINESIZE) + {*r = Mono_Posix_SysConf__SC_LEVEL3_CACHE_LINESIZE; return 0;} +#endif /* ndef _SC_LEVEL3_CACHE_LINESIZE */ +#ifdef _SC_LEVEL3_CACHE_SIZE + if (x == _SC_LEVEL3_CACHE_SIZE) + {*r = Mono_Posix_SysConf__SC_LEVEL3_CACHE_SIZE; return 0;} +#endif /* ndef _SC_LEVEL3_CACHE_SIZE */ +#ifdef _SC_LEVEL4_CACHE_ASSOC + if (x == _SC_LEVEL4_CACHE_ASSOC) + {*r = Mono_Posix_SysConf__SC_LEVEL4_CACHE_ASSOC; return 0;} +#endif /* ndef _SC_LEVEL4_CACHE_ASSOC */ +#ifdef _SC_LEVEL4_CACHE_LINESIZE + if (x == _SC_LEVEL4_CACHE_LINESIZE) + {*r = Mono_Posix_SysConf__SC_LEVEL4_CACHE_LINESIZE; return 0;} +#endif /* ndef _SC_LEVEL4_CACHE_LINESIZE */ +#ifdef _SC_LEVEL4_CACHE_SIZE + if (x == _SC_LEVEL4_CACHE_SIZE) + {*r = Mono_Posix_SysConf__SC_LEVEL4_CACHE_SIZE; return 0;} +#endif /* ndef _SC_LEVEL4_CACHE_SIZE */ +#ifdef _SC_LINE_MAX + if (x == _SC_LINE_MAX) + {*r = Mono_Posix_SysConf__SC_LINE_MAX; return 0;} +#endif /* ndef _SC_LINE_MAX */ +#ifdef _SC_LOGIN_NAME_MAX + if (x == _SC_LOGIN_NAME_MAX) + {*r = Mono_Posix_SysConf__SC_LOGIN_NAME_MAX; return 0;} +#endif /* ndef _SC_LOGIN_NAME_MAX */ +#ifdef _SC_LONG_BIT + if (x == _SC_LONG_BIT) + {*r = Mono_Posix_SysConf__SC_LONG_BIT; return 0;} +#endif /* ndef _SC_LONG_BIT */ +#ifdef _SC_MAPPED_FILES + if (x == _SC_MAPPED_FILES) + {*r = Mono_Posix_SysConf__SC_MAPPED_FILES; return 0;} +#endif /* ndef _SC_MAPPED_FILES */ +#ifdef _SC_MB_LEN_MAX + if (x == _SC_MB_LEN_MAX) + {*r = Mono_Posix_SysConf__SC_MB_LEN_MAX; return 0;} +#endif /* ndef _SC_MB_LEN_MAX */ +#ifdef _SC_MEMLOCK + if (x == _SC_MEMLOCK) + {*r = Mono_Posix_SysConf__SC_MEMLOCK; return 0;} +#endif /* ndef _SC_MEMLOCK */ +#ifdef _SC_MEMLOCK_RANGE + if (x == _SC_MEMLOCK_RANGE) + {*r = Mono_Posix_SysConf__SC_MEMLOCK_RANGE; return 0;} +#endif /* ndef _SC_MEMLOCK_RANGE */ +#ifdef _SC_MEMORY_PROTECTION + if (x == _SC_MEMORY_PROTECTION) + {*r = Mono_Posix_SysConf__SC_MEMORY_PROTECTION; return 0;} +#endif /* ndef _SC_MEMORY_PROTECTION */ +#ifdef _SC_MESSAGE_PASSING + if (x == _SC_MESSAGE_PASSING) + {*r = Mono_Posix_SysConf__SC_MESSAGE_PASSING; return 0;} +#endif /* ndef _SC_MESSAGE_PASSING */ #ifdef _SC_MONOTONIC_CLOCK if (x == _SC_MONOTONIC_CLOCK) {*r = Mono_Posix_SysConf__SC_MONOTONIC_CLOCK; return 0;} #endif /* ndef _SC_MONOTONIC_CLOCK */ +#ifdef _SC_MQ_OPEN_MAX + if (x == _SC_MQ_OPEN_MAX) + {*r = Mono_Posix_SysConf__SC_MQ_OPEN_MAX; return 0;} +#endif /* ndef _SC_MQ_OPEN_MAX */ +#ifdef _SC_MQ_PRIO_MAX + if (x == _SC_MQ_PRIO_MAX) + {*r = Mono_Posix_SysConf__SC_MQ_PRIO_MAX; return 0;} +#endif /* ndef _SC_MQ_PRIO_MAX */ #ifdef _SC_MULTI_PROCESS if (x == _SC_MULTI_PROCESS) {*r = Mono_Posix_SysConf__SC_MULTI_PROCESS; return 0;} #endif /* ndef _SC_MULTI_PROCESS */ -#ifdef _SC_SINGLE_PROCESS - if (x == _SC_SINGLE_PROCESS) - {*r = Mono_Posix_SysConf__SC_SINGLE_PROCESS; return 0;} -#endif /* ndef _SC_SINGLE_PROCESS */ #ifdef _SC_NETWORKING if (x == _SC_NETWORKING) {*r = Mono_Posix_SysConf__SC_NETWORKING; return 0;} #endif /* ndef _SC_NETWORKING */ +#ifdef _SC_NGROUPS_MAX + if (x == _SC_NGROUPS_MAX) + {*r = Mono_Posix_SysConf__SC_NGROUPS_MAX; return 0;} +#endif /* ndef _SC_NGROUPS_MAX */ +#ifdef _SC_NL_ARGMAX + if (x == _SC_NL_ARGMAX) + {*r = Mono_Posix_SysConf__SC_NL_ARGMAX; return 0;} +#endif /* ndef _SC_NL_ARGMAX */ +#ifdef _SC_NL_LANGMAX + if (x == _SC_NL_LANGMAX) + {*r = Mono_Posix_SysConf__SC_NL_LANGMAX; return 0;} +#endif /* ndef _SC_NL_LANGMAX */ +#ifdef _SC_NL_MSGMAX + if (x == _SC_NL_MSGMAX) + {*r = Mono_Posix_SysConf__SC_NL_MSGMAX; return 0;} +#endif /* ndef _SC_NL_MSGMAX */ +#ifdef _SC_NL_NMAX + if (x == _SC_NL_NMAX) + {*r = Mono_Posix_SysConf__SC_NL_NMAX; return 0;} +#endif /* ndef _SC_NL_NMAX */ +#ifdef _SC_NL_SETMAX + if (x == _SC_NL_SETMAX) + {*r = Mono_Posix_SysConf__SC_NL_SETMAX; return 0;} +#endif /* ndef _SC_NL_SETMAX */ +#ifdef _SC_NL_TEXTMAX + if (x == _SC_NL_TEXTMAX) + {*r = Mono_Posix_SysConf__SC_NL_TEXTMAX; return 0;} +#endif /* ndef _SC_NL_TEXTMAX */ +#ifdef _SC_NPROCESSORS_CONF + if (x == _SC_NPROCESSORS_CONF) + {*r = Mono_Posix_SysConf__SC_NPROCESSORS_CONF; return 0;} +#endif /* ndef _SC_NPROCESSORS_CONF */ +#ifdef _SC_NPROCESSORS_ONLN + if (x == _SC_NPROCESSORS_ONLN) + {*r = Mono_Posix_SysConf__SC_NPROCESSORS_ONLN; return 0;} +#endif /* ndef _SC_NPROCESSORS_ONLN */ +#ifdef _SC_NZERO + if (x == _SC_NZERO) + {*r = Mono_Posix_SysConf__SC_NZERO; return 0;} +#endif /* ndef _SC_NZERO */ +#ifdef _SC_OPEN_MAX + if (x == _SC_OPEN_MAX) + {*r = Mono_Posix_SysConf__SC_OPEN_MAX; return 0;} +#endif /* ndef _SC_OPEN_MAX */ +#ifdef _SC_PAGESIZE + if (x == _SC_PAGESIZE) + {*r = Mono_Posix_SysConf__SC_PAGESIZE; return 0;} +#endif /* ndef _SC_PAGESIZE */ +#ifdef _SC_PASS_MAX + if (x == _SC_PASS_MAX) + {*r = Mono_Posix_SysConf__SC_PASS_MAX; return 0;} +#endif /* ndef _SC_PASS_MAX */ +#ifdef _SC_PHYS_PAGES + if (x == _SC_PHYS_PAGES) + {*r = Mono_Posix_SysConf__SC_PHYS_PAGES; return 0;} +#endif /* ndef _SC_PHYS_PAGES */ +#ifdef _SC_PII + if (x == _SC_PII) + {*r = Mono_Posix_SysConf__SC_PII; return 0;} +#endif /* ndef _SC_PII */ +#ifdef _SC_PII_INTERNET + if (x == _SC_PII_INTERNET) + {*r = Mono_Posix_SysConf__SC_PII_INTERNET; return 0;} +#endif /* ndef _SC_PII_INTERNET */ +#ifdef _SC_PII_INTERNET_DGRAM + if (x == _SC_PII_INTERNET_DGRAM) + {*r = Mono_Posix_SysConf__SC_PII_INTERNET_DGRAM; return 0;} +#endif /* ndef _SC_PII_INTERNET_DGRAM */ +#ifdef _SC_PII_INTERNET_STREAM + if (x == _SC_PII_INTERNET_STREAM) + {*r = Mono_Posix_SysConf__SC_PII_INTERNET_STREAM; return 0;} +#endif /* ndef _SC_PII_INTERNET_STREAM */ +#ifdef _SC_PII_OSI + if (x == _SC_PII_OSI) + {*r = Mono_Posix_SysConf__SC_PII_OSI; return 0;} +#endif /* ndef _SC_PII_OSI */ +#ifdef _SC_PII_OSI_CLTS + if (x == _SC_PII_OSI_CLTS) + {*r = Mono_Posix_SysConf__SC_PII_OSI_CLTS; return 0;} +#endif /* ndef _SC_PII_OSI_CLTS */ +#ifdef _SC_PII_OSI_COTS + if (x == _SC_PII_OSI_COTS) + {*r = Mono_Posix_SysConf__SC_PII_OSI_COTS; return 0;} +#endif /* ndef _SC_PII_OSI_COTS */ +#ifdef _SC_PII_OSI_M + if (x == _SC_PII_OSI_M) + {*r = Mono_Posix_SysConf__SC_PII_OSI_M; return 0;} +#endif /* ndef _SC_PII_OSI_M */ +#ifdef _SC_PII_SOCKET + if (x == _SC_PII_SOCKET) + {*r = Mono_Posix_SysConf__SC_PII_SOCKET; return 0;} +#endif /* ndef _SC_PII_SOCKET */ +#ifdef _SC_PII_XTI + if (x == _SC_PII_XTI) + {*r = Mono_Posix_SysConf__SC_PII_XTI; return 0;} +#endif /* ndef _SC_PII_XTI */ +#ifdef _SC_PIPE + if (x == _SC_PIPE) + {*r = Mono_Posix_SysConf__SC_PIPE; return 0;} +#endif /* ndef _SC_PIPE */ +#ifdef _SC_POLL + if (x == _SC_POLL) + {*r = Mono_Posix_SysConf__SC_POLL; return 0;} +#endif /* ndef _SC_POLL */ +#ifdef _SC_PRIORITIZED_IO + if (x == _SC_PRIORITIZED_IO) + {*r = Mono_Posix_SysConf__SC_PRIORITIZED_IO; return 0;} +#endif /* ndef _SC_PRIORITIZED_IO */ +#ifdef _SC_PRIORITY_SCHEDULING + if (x == _SC_PRIORITY_SCHEDULING) + {*r = Mono_Posix_SysConf__SC_PRIORITY_SCHEDULING; return 0;} +#endif /* ndef _SC_PRIORITY_SCHEDULING */ #ifdef _SC_READER_WRITER_LOCKS if (x == _SC_READER_WRITER_LOCKS) {*r = Mono_Posix_SysConf__SC_READER_WRITER_LOCKS; return 0;} #endif /* ndef _SC_READER_WRITER_LOCKS */ -#ifdef _SC_SPIN_LOCKS - if (x == _SC_SPIN_LOCKS) - {*r = Mono_Posix_SysConf__SC_SPIN_LOCKS; return 0;} -#endif /* ndef _SC_SPIN_LOCKS */ +#ifdef _SC_REALTIME_SIGNALS + if (x == _SC_REALTIME_SIGNALS) + {*r = Mono_Posix_SysConf__SC_REALTIME_SIGNALS; return 0;} +#endif /* ndef _SC_REALTIME_SIGNALS */ #ifdef _SC_REGEXP if (x == _SC_REGEXP) {*r = Mono_Posix_SysConf__SC_REGEXP; return 0;} @@ -5183,26 +7078,102 @@ int Mono_Posix_ToSysConf (int x, int *r) if (x == _SC_REGEX_VERSION) {*r = Mono_Posix_SysConf__SC_REGEX_VERSION; return 0;} #endif /* ndef _SC_REGEX_VERSION */ +#ifdef _SC_RE_DUP_MAX + if (x == _SC_RE_DUP_MAX) + {*r = Mono_Posix_SysConf__SC_RE_DUP_MAX; return 0;} +#endif /* ndef _SC_RE_DUP_MAX */ +#ifdef _SC_RTSIG_MAX + if (x == _SC_RTSIG_MAX) + {*r = Mono_Posix_SysConf__SC_RTSIG_MAX; return 0;} +#endif /* ndef _SC_RTSIG_MAX */ +#ifdef _SC_SAVED_IDS + if (x == _SC_SAVED_IDS) + {*r = Mono_Posix_SysConf__SC_SAVED_IDS; return 0;} +#endif /* ndef _SC_SAVED_IDS */ +#ifdef _SC_SCHAR_MAX + if (x == _SC_SCHAR_MAX) + {*r = Mono_Posix_SysConf__SC_SCHAR_MAX; return 0;} +#endif /* ndef _SC_SCHAR_MAX */ +#ifdef _SC_SCHAR_MIN + if (x == _SC_SCHAR_MIN) + {*r = Mono_Posix_SysConf__SC_SCHAR_MIN; return 0;} +#endif /* ndef _SC_SCHAR_MIN */ +#ifdef _SC_SELECT + if (x == _SC_SELECT) + {*r = Mono_Posix_SysConf__SC_SELECT; return 0;} +#endif /* ndef _SC_SELECT */ +#ifdef _SC_SEMAPHORES + if (x == _SC_SEMAPHORES) + {*r = Mono_Posix_SysConf__SC_SEMAPHORES; return 0;} +#endif /* ndef _SC_SEMAPHORES */ +#ifdef _SC_SEM_NSEMS_MAX + if (x == _SC_SEM_NSEMS_MAX) + {*r = Mono_Posix_SysConf__SC_SEM_NSEMS_MAX; return 0;} +#endif /* ndef _SC_SEM_NSEMS_MAX */ +#ifdef _SC_SEM_VALUE_MAX + if (x == _SC_SEM_VALUE_MAX) + {*r = Mono_Posix_SysConf__SC_SEM_VALUE_MAX; return 0;} +#endif /* ndef _SC_SEM_VALUE_MAX */ +#ifdef _SC_SHARED_MEMORY_OBJECTS + if (x == _SC_SHARED_MEMORY_OBJECTS) + {*r = Mono_Posix_SysConf__SC_SHARED_MEMORY_OBJECTS; return 0;} +#endif /* ndef _SC_SHARED_MEMORY_OBJECTS */ #ifdef _SC_SHELL if (x == _SC_SHELL) {*r = Mono_Posix_SysConf__SC_SHELL; return 0;} #endif /* ndef _SC_SHELL */ +#ifdef _SC_SHRT_MAX + if (x == _SC_SHRT_MAX) + {*r = Mono_Posix_SysConf__SC_SHRT_MAX; return 0;} +#endif /* ndef _SC_SHRT_MAX */ +#ifdef _SC_SHRT_MIN + if (x == _SC_SHRT_MIN) + {*r = Mono_Posix_SysConf__SC_SHRT_MIN; return 0;} +#endif /* ndef _SC_SHRT_MIN */ #ifdef _SC_SIGNALS if (x == _SC_SIGNALS) {*r = Mono_Posix_SysConf__SC_SIGNALS; return 0;} #endif /* ndef _SC_SIGNALS */ +#ifdef _SC_SIGQUEUE_MAX + if (x == _SC_SIGQUEUE_MAX) + {*r = Mono_Posix_SysConf__SC_SIGQUEUE_MAX; return 0;} +#endif /* ndef _SC_SIGQUEUE_MAX */ +#ifdef _SC_SINGLE_PROCESS + if (x == _SC_SINGLE_PROCESS) + {*r = Mono_Posix_SysConf__SC_SINGLE_PROCESS; return 0;} +#endif /* ndef _SC_SINGLE_PROCESS */ #ifdef _SC_SPAWN if (x == _SC_SPAWN) {*r = Mono_Posix_SysConf__SC_SPAWN; return 0;} #endif /* ndef _SC_SPAWN */ +#ifdef _SC_SPIN_LOCKS + if (x == _SC_SPIN_LOCKS) + {*r = Mono_Posix_SysConf__SC_SPIN_LOCKS; return 0;} +#endif /* ndef _SC_SPIN_LOCKS */ #ifdef _SC_SPORADIC_SERVER if (x == _SC_SPORADIC_SERVER) {*r = Mono_Posix_SysConf__SC_SPORADIC_SERVER; return 0;} #endif /* ndef _SC_SPORADIC_SERVER */ -#ifdef _SC_THREAD_SPORADIC_SERVER - if (x == _SC_THREAD_SPORADIC_SERVER) - {*r = Mono_Posix_SysConf__SC_THREAD_SPORADIC_SERVER; return 0;} -#endif /* ndef _SC_THREAD_SPORADIC_SERVER */ +#ifdef _SC_SSIZE_MAX + if (x == _SC_SSIZE_MAX) + {*r = Mono_Posix_SysConf__SC_SSIZE_MAX; return 0;} +#endif /* ndef _SC_SSIZE_MAX */ +#ifdef _SC_STREAMS + if (x == _SC_STREAMS) + {*r = Mono_Posix_SysConf__SC_STREAMS; return 0;} +#endif /* ndef _SC_STREAMS */ +#ifdef _SC_STREAM_MAX + if (x == _SC_STREAM_MAX) + {*r = Mono_Posix_SysConf__SC_STREAM_MAX; return 0;} +#endif /* ndef _SC_STREAM_MAX */ +#ifdef _SC_SYMLOOP_MAX + if (x == _SC_SYMLOOP_MAX) + {*r = Mono_Posix_SysConf__SC_SYMLOOP_MAX; return 0;} +#endif /* ndef _SC_SYMLOOP_MAX */ +#ifdef _SC_SYNCHRONIZED_IO + if (x == _SC_SYNCHRONIZED_IO) + {*r = Mono_Posix_SysConf__SC_SYNCHRONIZED_IO; return 0;} +#endif /* ndef _SC_SYNCHRONIZED_IO */ #ifdef _SC_SYSTEM_DATABASE if (x == _SC_SYSTEM_DATABASE) {*r = Mono_Posix_SysConf__SC_SYSTEM_DATABASE; return 0;} @@ -5211,14 +7182,122 @@ int Mono_Posix_ToSysConf (int x, int *r) if (x == _SC_SYSTEM_DATABASE_R) {*r = Mono_Posix_SysConf__SC_SYSTEM_DATABASE_R; return 0;} #endif /* ndef _SC_SYSTEM_DATABASE_R */ +#ifdef _SC_THREADS + if (x == _SC_THREADS) + {*r = Mono_Posix_SysConf__SC_THREADS; return 0;} +#endif /* ndef _SC_THREADS */ +#ifdef _SC_THREAD_ATTR_STACKADDR + if (x == _SC_THREAD_ATTR_STACKADDR) + {*r = Mono_Posix_SysConf__SC_THREAD_ATTR_STACKADDR; return 0;} +#endif /* ndef _SC_THREAD_ATTR_STACKADDR */ +#ifdef _SC_THREAD_ATTR_STACKSIZE + if (x == _SC_THREAD_ATTR_STACKSIZE) + {*r = Mono_Posix_SysConf__SC_THREAD_ATTR_STACKSIZE; return 0;} +#endif /* ndef _SC_THREAD_ATTR_STACKSIZE */ +#ifdef _SC_THREAD_CPUTIME + if (x == _SC_THREAD_CPUTIME) + {*r = Mono_Posix_SysConf__SC_THREAD_CPUTIME; return 0;} +#endif /* ndef _SC_THREAD_CPUTIME */ +#ifdef _SC_THREAD_DESTRUCTOR_ITERATIONS + if (x == _SC_THREAD_DESTRUCTOR_ITERATIONS) + {*r = Mono_Posix_SysConf__SC_THREAD_DESTRUCTOR_ITERATIONS; return 0;} +#endif /* ndef _SC_THREAD_DESTRUCTOR_ITERATIONS */ +#ifdef _SC_THREAD_KEYS_MAX + if (x == _SC_THREAD_KEYS_MAX) + {*r = Mono_Posix_SysConf__SC_THREAD_KEYS_MAX; return 0;} +#endif /* ndef _SC_THREAD_KEYS_MAX */ +#ifdef _SC_THREAD_PRIORITY_SCHEDULING + if (x == _SC_THREAD_PRIORITY_SCHEDULING) + {*r = Mono_Posix_SysConf__SC_THREAD_PRIORITY_SCHEDULING; return 0;} +#endif /* ndef _SC_THREAD_PRIORITY_SCHEDULING */ +#ifdef _SC_THREAD_PRIO_INHERIT + if (x == _SC_THREAD_PRIO_INHERIT) + {*r = Mono_Posix_SysConf__SC_THREAD_PRIO_INHERIT; return 0;} +#endif /* ndef _SC_THREAD_PRIO_INHERIT */ +#ifdef _SC_THREAD_PRIO_PROTECT + if (x == _SC_THREAD_PRIO_PROTECT) + {*r = Mono_Posix_SysConf__SC_THREAD_PRIO_PROTECT; return 0;} +#endif /* ndef _SC_THREAD_PRIO_PROTECT */ +#ifdef _SC_THREAD_PROCESS_SHARED + if (x == _SC_THREAD_PROCESS_SHARED) + {*r = Mono_Posix_SysConf__SC_THREAD_PROCESS_SHARED; return 0;} +#endif /* ndef _SC_THREAD_PROCESS_SHARED */ +#ifdef _SC_THREAD_SAFE_FUNCTIONS + if (x == _SC_THREAD_SAFE_FUNCTIONS) + {*r = Mono_Posix_SysConf__SC_THREAD_SAFE_FUNCTIONS; return 0;} +#endif /* ndef _SC_THREAD_SAFE_FUNCTIONS */ +#ifdef _SC_THREAD_SPORADIC_SERVER + if (x == _SC_THREAD_SPORADIC_SERVER) + {*r = Mono_Posix_SysConf__SC_THREAD_SPORADIC_SERVER; return 0;} +#endif /* ndef _SC_THREAD_SPORADIC_SERVER */ +#ifdef _SC_THREAD_STACK_MIN + if (x == _SC_THREAD_STACK_MIN) + {*r = Mono_Posix_SysConf__SC_THREAD_STACK_MIN; return 0;} +#endif /* ndef _SC_THREAD_STACK_MIN */ +#ifdef _SC_THREAD_THREADS_MAX + if (x == _SC_THREAD_THREADS_MAX) + {*r = Mono_Posix_SysConf__SC_THREAD_THREADS_MAX; return 0;} +#endif /* ndef _SC_THREAD_THREADS_MAX */ #ifdef _SC_TIMEOUTS if (x == _SC_TIMEOUTS) {*r = Mono_Posix_SysConf__SC_TIMEOUTS; return 0;} #endif /* ndef _SC_TIMEOUTS */ +#ifdef _SC_TIMERS + if (x == _SC_TIMERS) + {*r = Mono_Posix_SysConf__SC_TIMERS; return 0;} +#endif /* ndef _SC_TIMERS */ +#ifdef _SC_TIMER_MAX + if (x == _SC_TIMER_MAX) + {*r = Mono_Posix_SysConf__SC_TIMER_MAX; return 0;} +#endif /* ndef _SC_TIMER_MAX */ +#ifdef _SC_TRACE + if (x == _SC_TRACE) + {*r = Mono_Posix_SysConf__SC_TRACE; return 0;} +#endif /* ndef _SC_TRACE */ +#ifdef _SC_TRACE_EVENT_FILTER + if (x == _SC_TRACE_EVENT_FILTER) + {*r = Mono_Posix_SysConf__SC_TRACE_EVENT_FILTER; return 0;} +#endif /* ndef _SC_TRACE_EVENT_FILTER */ +#ifdef _SC_TRACE_INHERIT + if (x == _SC_TRACE_INHERIT) + {*r = Mono_Posix_SysConf__SC_TRACE_INHERIT; return 0;} +#endif /* ndef _SC_TRACE_INHERIT */ +#ifdef _SC_TRACE_LOG + if (x == _SC_TRACE_LOG) + {*r = Mono_Posix_SysConf__SC_TRACE_LOG; return 0;} +#endif /* ndef _SC_TRACE_LOG */ +#ifdef _SC_TTY_NAME_MAX + if (x == _SC_TTY_NAME_MAX) + {*r = Mono_Posix_SysConf__SC_TTY_NAME_MAX; return 0;} +#endif /* ndef _SC_TTY_NAME_MAX */ #ifdef _SC_TYPED_MEMORY_OBJECTS if (x == _SC_TYPED_MEMORY_OBJECTS) {*r = Mono_Posix_SysConf__SC_TYPED_MEMORY_OBJECTS; return 0;} #endif /* ndef _SC_TYPED_MEMORY_OBJECTS */ +#ifdef _SC_TZNAME_MAX + if (x == _SC_TZNAME_MAX) + {*r = Mono_Posix_SysConf__SC_TZNAME_MAX; return 0;} +#endif /* ndef _SC_TZNAME_MAX */ +#ifdef _SC_T_IOV_MAX + if (x == _SC_T_IOV_MAX) + {*r = Mono_Posix_SysConf__SC_T_IOV_MAX; return 0;} +#endif /* ndef _SC_T_IOV_MAX */ +#ifdef _SC_UCHAR_MAX + if (x == _SC_UCHAR_MAX) + {*r = Mono_Posix_SysConf__SC_UCHAR_MAX; return 0;} +#endif /* ndef _SC_UCHAR_MAX */ +#ifdef _SC_UINT_MAX + if (x == _SC_UINT_MAX) + {*r = Mono_Posix_SysConf__SC_UINT_MAX; return 0;} +#endif /* ndef _SC_UINT_MAX */ +#ifdef _SC_UIO_MAXIOV + if (x == _SC_UIO_MAXIOV) + {*r = Mono_Posix_SysConf__SC_UIO_MAXIOV; return 0;} +#endif /* ndef _SC_UIO_MAXIOV */ +#ifdef _SC_ULONG_MAX + if (x == _SC_ULONG_MAX) + {*r = Mono_Posix_SysConf__SC_ULONG_MAX; return 0;} +#endif /* ndef _SC_ULONG_MAX */ #ifdef _SC_USER_GROUPS if (x == _SC_USER_GROUPS) {*r = Mono_Posix_SysConf__SC_USER_GROUPS; return 0;} @@ -5227,38 +7306,10 @@ int Mono_Posix_ToSysConf (int x, int *r) if (x == _SC_USER_GROUPS_R) {*r = Mono_Posix_SysConf__SC_USER_GROUPS_R; return 0;} #endif /* ndef _SC_USER_GROUPS_R */ -#ifdef _SC_2_PBS - if (x == _SC_2_PBS) - {*r = Mono_Posix_SysConf__SC_2_PBS; return 0;} -#endif /* ndef _SC_2_PBS */ -#ifdef _SC_2_PBS_ACCOUNTING - if (x == _SC_2_PBS_ACCOUNTING) - {*r = Mono_Posix_SysConf__SC_2_PBS_ACCOUNTING; return 0;} -#endif /* ndef _SC_2_PBS_ACCOUNTING */ -#ifdef _SC_2_PBS_LOCATE - if (x == _SC_2_PBS_LOCATE) - {*r = Mono_Posix_SysConf__SC_2_PBS_LOCATE; return 0;} -#endif /* ndef _SC_2_PBS_LOCATE */ -#ifdef _SC_2_PBS_MESSAGE - if (x == _SC_2_PBS_MESSAGE) - {*r = Mono_Posix_SysConf__SC_2_PBS_MESSAGE; return 0;} -#endif /* ndef _SC_2_PBS_MESSAGE */ -#ifdef _SC_2_PBS_TRACK - if (x == _SC_2_PBS_TRACK) - {*r = Mono_Posix_SysConf__SC_2_PBS_TRACK; return 0;} -#endif /* ndef _SC_2_PBS_TRACK */ -#ifdef _SC_SYMLOOP_MAX - if (x == _SC_SYMLOOP_MAX) - {*r = Mono_Posix_SysConf__SC_SYMLOOP_MAX; return 0;} -#endif /* ndef _SC_SYMLOOP_MAX */ -#ifdef _SC_STREAMS - if (x == _SC_STREAMS) - {*r = Mono_Posix_SysConf__SC_STREAMS; return 0;} -#endif /* ndef _SC_STREAMS */ -#ifdef _SC_2_PBS_CHECKPOINT - if (x == _SC_2_PBS_CHECKPOINT) - {*r = Mono_Posix_SysConf__SC_2_PBS_CHECKPOINT; return 0;} -#endif /* ndef _SC_2_PBS_CHECKPOINT */ +#ifdef _SC_USHRT_MAX + if (x == _SC_USHRT_MAX) + {*r = Mono_Posix_SysConf__SC_USHRT_MAX; return 0;} +#endif /* ndef _SC_USHRT_MAX */ #ifdef _SC_V6_ILP32_OFF32 if (x == _SC_V6_ILP32_OFF32) {*r = Mono_Posix_SysConf__SC_V6_ILP32_OFF32; return 0;} @@ -5275,714 +7326,507 @@ int Mono_Posix_ToSysConf (int x, int *r) if (x == _SC_V6_LPBIG_OFFBIG) {*r = Mono_Posix_SysConf__SC_V6_LPBIG_OFFBIG; return 0;} #endif /* ndef _SC_V6_LPBIG_OFFBIG */ -#ifdef _SC_HOST_NAME_MAX - if (x == _SC_HOST_NAME_MAX) - {*r = Mono_Posix_SysConf__SC_HOST_NAME_MAX; return 0;} -#endif /* ndef _SC_HOST_NAME_MAX */ -#ifdef _SC_TRACE - if (x == _SC_TRACE) - {*r = Mono_Posix_SysConf__SC_TRACE; return 0;} -#endif /* ndef _SC_TRACE */ -#ifdef _SC_TRACE_EVENT_FILTER - if (x == _SC_TRACE_EVENT_FILTER) - {*r = Mono_Posix_SysConf__SC_TRACE_EVENT_FILTER; return 0;} -#endif /* ndef _SC_TRACE_EVENT_FILTER */ -#ifdef _SC_TRACE_INHERIT - if (x == _SC_TRACE_INHERIT) - {*r = Mono_Posix_SysConf__SC_TRACE_INHERIT; return 0;} -#endif /* ndef _SC_TRACE_INHERIT */ -#ifdef _SC_TRACE_LOG - if (x == _SC_TRACE_LOG) - {*r = Mono_Posix_SysConf__SC_TRACE_LOG; return 0;} -#endif /* ndef _SC_TRACE_LOG */ -#ifdef _SC_LEVEL1_ICACHE_SIZE - if (x == _SC_LEVEL1_ICACHE_SIZE) - {*r = Mono_Posix_SysConf__SC_LEVEL1_ICACHE_SIZE; return 0;} -#endif /* ndef _SC_LEVEL1_ICACHE_SIZE */ -#ifdef _SC_LEVEL1_ICACHE_ASSOC - if (x == _SC_LEVEL1_ICACHE_ASSOC) - {*r = Mono_Posix_SysConf__SC_LEVEL1_ICACHE_ASSOC; return 0;} -#endif /* ndef _SC_LEVEL1_ICACHE_ASSOC */ -#ifdef _SC_LEVEL1_ICACHE_LINESIZE - if (x == _SC_LEVEL1_ICACHE_LINESIZE) - {*r = Mono_Posix_SysConf__SC_LEVEL1_ICACHE_LINESIZE; return 0;} -#endif /* ndef _SC_LEVEL1_ICACHE_LINESIZE */ -#ifdef _SC_LEVEL1_DCACHE_SIZE - if (x == _SC_LEVEL1_DCACHE_SIZE) - {*r = Mono_Posix_SysConf__SC_LEVEL1_DCACHE_SIZE; return 0;} -#endif /* ndef _SC_LEVEL1_DCACHE_SIZE */ -#ifdef _SC_LEVEL1_DCACHE_ASSOC - if (x == _SC_LEVEL1_DCACHE_ASSOC) - {*r = Mono_Posix_SysConf__SC_LEVEL1_DCACHE_ASSOC; return 0;} -#endif /* ndef _SC_LEVEL1_DCACHE_ASSOC */ -#ifdef _SC_LEVEL1_DCACHE_LINESIZE - if (x == _SC_LEVEL1_DCACHE_LINESIZE) - {*r = Mono_Posix_SysConf__SC_LEVEL1_DCACHE_LINESIZE; return 0;} -#endif /* ndef _SC_LEVEL1_DCACHE_LINESIZE */ -#ifdef _SC_LEVEL2_CACHE_SIZE - if (x == _SC_LEVEL2_CACHE_SIZE) - {*r = Mono_Posix_SysConf__SC_LEVEL2_CACHE_SIZE; return 0;} -#endif /* ndef _SC_LEVEL2_CACHE_SIZE */ -#ifdef _SC_LEVEL2_CACHE_ASSOC - if (x == _SC_LEVEL2_CACHE_ASSOC) - {*r = Mono_Posix_SysConf__SC_LEVEL2_CACHE_ASSOC; return 0;} -#endif /* ndef _SC_LEVEL2_CACHE_ASSOC */ -#ifdef _SC_LEVEL2_CACHE_LINESIZE - if (x == _SC_LEVEL2_CACHE_LINESIZE) - {*r = Mono_Posix_SysConf__SC_LEVEL2_CACHE_LINESIZE; return 0;} -#endif /* ndef _SC_LEVEL2_CACHE_LINESIZE */ -#ifdef _SC_LEVEL3_CACHE_SIZE - if (x == _SC_LEVEL3_CACHE_SIZE) - {*r = Mono_Posix_SysConf__SC_LEVEL3_CACHE_SIZE; return 0;} -#endif /* ndef _SC_LEVEL3_CACHE_SIZE */ -#ifdef _SC_LEVEL3_CACHE_ASSOC - if (x == _SC_LEVEL3_CACHE_ASSOC) - {*r = Mono_Posix_SysConf__SC_LEVEL3_CACHE_ASSOC; return 0;} -#endif /* ndef _SC_LEVEL3_CACHE_ASSOC */ -#ifdef _SC_LEVEL3_CACHE_LINESIZE - if (x == _SC_LEVEL3_CACHE_LINESIZE) - {*r = Mono_Posix_SysConf__SC_LEVEL3_CACHE_LINESIZE; return 0;} -#endif /* ndef _SC_LEVEL3_CACHE_LINESIZE */ -#ifdef _SC_LEVEL4_CACHE_SIZE - if (x == _SC_LEVEL4_CACHE_SIZE) - {*r = Mono_Posix_SysConf__SC_LEVEL4_CACHE_SIZE; return 0;} -#endif /* ndef _SC_LEVEL4_CACHE_SIZE */ -#ifdef _SC_LEVEL4_CACHE_ASSOC - if (x == _SC_LEVEL4_CACHE_ASSOC) - {*r = Mono_Posix_SysConf__SC_LEVEL4_CACHE_ASSOC; return 0;} -#endif /* ndef _SC_LEVEL4_CACHE_ASSOC */ -#ifdef _SC_LEVEL4_CACHE_LINESIZE - if (x == _SC_LEVEL4_CACHE_LINESIZE) - {*r = Mono_Posix_SysConf__SC_LEVEL4_CACHE_LINESIZE; return 0;} -#endif /* ndef _SC_LEVEL4_CACHE_LINESIZE */ +#ifdef _SC_VERSION + if (x == _SC_VERSION) + {*r = Mono_Posix_SysConf__SC_VERSION; return 0;} +#endif /* ndef _SC_VERSION */ +#ifdef _SC_WORD_BIT + if (x == _SC_WORD_BIT) + {*r = Mono_Posix_SysConf__SC_WORD_BIT; return 0;} +#endif /* ndef _SC_WORD_BIT */ +#ifdef _SC_XBS5_ILP32_OFF32 + if (x == _SC_XBS5_ILP32_OFF32) + {*r = Mono_Posix_SysConf__SC_XBS5_ILP32_OFF32; return 0;} +#endif /* ndef _SC_XBS5_ILP32_OFF32 */ +#ifdef _SC_XBS5_ILP32_OFFBIG + if (x == _SC_XBS5_ILP32_OFFBIG) + {*r = Mono_Posix_SysConf__SC_XBS5_ILP32_OFFBIG; return 0;} +#endif /* ndef _SC_XBS5_ILP32_OFFBIG */ +#ifdef _SC_XBS5_LP64_OFF64 + if (x == _SC_XBS5_LP64_OFF64) + {*r = Mono_Posix_SysConf__SC_XBS5_LP64_OFF64; return 0;} +#endif /* ndef _SC_XBS5_LP64_OFF64 */ +#ifdef _SC_XBS5_LPBIG_OFFBIG + if (x == _SC_XBS5_LPBIG_OFFBIG) + {*r = Mono_Posix_SysConf__SC_XBS5_LPBIG_OFFBIG; return 0;} +#endif /* ndef _SC_XBS5_LPBIG_OFFBIG */ +#ifdef _SC_XOPEN_CRYPT + if (x == _SC_XOPEN_CRYPT) + {*r = Mono_Posix_SysConf__SC_XOPEN_CRYPT; return 0;} +#endif /* ndef _SC_XOPEN_CRYPT */ +#ifdef _SC_XOPEN_ENH_I18N + if (x == _SC_XOPEN_ENH_I18N) + {*r = Mono_Posix_SysConf__SC_XOPEN_ENH_I18N; return 0;} +#endif /* ndef _SC_XOPEN_ENH_I18N */ +#ifdef _SC_XOPEN_LEGACY + if (x == _SC_XOPEN_LEGACY) + {*r = Mono_Posix_SysConf__SC_XOPEN_LEGACY; return 0;} +#endif /* ndef _SC_XOPEN_LEGACY */ +#ifdef _SC_XOPEN_REALTIME + if (x == _SC_XOPEN_REALTIME) + {*r = Mono_Posix_SysConf__SC_XOPEN_REALTIME; return 0;} +#endif /* ndef _SC_XOPEN_REALTIME */ +#ifdef _SC_XOPEN_REALTIME_THREADS + if (x == _SC_XOPEN_REALTIME_THREADS) + {*r = Mono_Posix_SysConf__SC_XOPEN_REALTIME_THREADS; return 0;} +#endif /* ndef _SC_XOPEN_REALTIME_THREADS */ +#ifdef _SC_XOPEN_SHM + if (x == _SC_XOPEN_SHM) + {*r = Mono_Posix_SysConf__SC_XOPEN_SHM; return 0;} +#endif /* ndef _SC_XOPEN_SHM */ +#ifdef _SC_XOPEN_UNIX + if (x == _SC_XOPEN_UNIX) + {*r = Mono_Posix_SysConf__SC_XOPEN_UNIX; return 0;} +#endif /* ndef _SC_XOPEN_UNIX */ +#ifdef _SC_XOPEN_VERSION + if (x == _SC_XOPEN_VERSION) + {*r = Mono_Posix_SysConf__SC_XOPEN_VERSION; return 0;} +#endif /* ndef _SC_XOPEN_VERSION */ +#ifdef _SC_XOPEN_XCU_VERSION + if (x == _SC_XOPEN_XCU_VERSION) + {*r = Mono_Posix_SysConf__SC_XOPEN_XCU_VERSION; return 0;} +#endif /* ndef _SC_XOPEN_XCU_VERSION */ +#ifdef _SC_XOPEN_XPG2 + if (x == _SC_XOPEN_XPG2) + {*r = Mono_Posix_SysConf__SC_XOPEN_XPG2; return 0;} +#endif /* ndef _SC_XOPEN_XPG2 */ +#ifdef _SC_XOPEN_XPG3 + if (x == _SC_XOPEN_XPG3) + {*r = Mono_Posix_SysConf__SC_XOPEN_XPG3; return 0;} +#endif /* ndef _SC_XOPEN_XPG3 */ +#ifdef _SC_XOPEN_XPG4 + if (x == _SC_XOPEN_XPG4) + {*r = Mono_Posix_SysConf__SC_XOPEN_XPG4; return 0;} +#endif /* ndef _SC_XOPEN_XPG4 */ errno = EINVAL; return -1; } -int Mono_Posix_FromConfStr (int x, int *r) +int Mono_Posix_FromSyslogFacility (int x, int *r) { *r = 0; if (x == 0) return 0; - if (x == Mono_Posix_ConfStr__CS_PATH) -#ifdef _CS_PATH - {*r = _CS_PATH; return 0;} -#else /* def _CS_PATH */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_PATH */ - if (x == Mono_Posix_ConfStr__CS_V6_WIDTH_RESTRICTED_ENVS) -#ifdef _CS_V6_WIDTH_RESTRICTED_ENVS - {*r = _CS_V6_WIDTH_RESTRICTED_ENVS; return 0;} -#else /* def _CS_V6_WIDTH_RESTRICTED_ENVS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_V6_WIDTH_RESTRICTED_ENVS */ - if (x == Mono_Posix_ConfStr__CS_GNU_LIBC_VERSION) -#ifdef _CS_GNU_LIBC_VERSION - {*r = _CS_GNU_LIBC_VERSION; return 0;} -#else /* def _CS_GNU_LIBC_VERSION */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_GNU_LIBC_VERSION */ - if (x == Mono_Posix_ConfStr__CS_GNU_LIBPTHREAD_VERSION) -#ifdef _CS_GNU_LIBPTHREAD_VERSION - {*r = _CS_GNU_LIBPTHREAD_VERSION; return 0;} -#else /* def _CS_GNU_LIBPTHREAD_VERSION */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_GNU_LIBPTHREAD_VERSION */ - if (x == Mono_Posix_ConfStr__CS_LFS_CFLAGS) -#ifdef _CS_LFS_CFLAGS - {*r = _CS_LFS_CFLAGS; return 0;} -#else /* def _CS_LFS_CFLAGS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_LFS_CFLAGS */ - if (x == Mono_Posix_ConfStr__CS_LFS_LDFLAGS) -#ifdef _CS_LFS_LDFLAGS - {*r = _CS_LFS_LDFLAGS; return 0;} -#else /* def _CS_LFS_LDFLAGS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_LFS_LDFLAGS */ - if (x == Mono_Posix_ConfStr__CS_LFS_LIBS) -#ifdef _CS_LFS_LIBS - {*r = _CS_LFS_LIBS; return 0;} -#else /* def _CS_LFS_LIBS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_LFS_LIBS */ - if (x == Mono_Posix_ConfStr__CS_LFS_LINTFLAGS) -#ifdef _CS_LFS_LINTFLAGS - {*r = _CS_LFS_LINTFLAGS; return 0;} -#else /* def _CS_LFS_LINTFLAGS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_LFS_LINTFLAGS */ - if (x == Mono_Posix_ConfStr__CS_LFS64_CFLAGS) -#ifdef _CS_LFS64_CFLAGS - {*r = _CS_LFS64_CFLAGS; return 0;} -#else /* def _CS_LFS64_CFLAGS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_LFS64_CFLAGS */ - if (x == Mono_Posix_ConfStr__CS_LFS64_LDFLAGS) -#ifdef _CS_LFS64_LDFLAGS - {*r = _CS_LFS64_LDFLAGS; return 0;} -#else /* def _CS_LFS64_LDFLAGS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_LFS64_LDFLAGS */ - if (x == Mono_Posix_ConfStr__CS_LFS64_LIBS) -#ifdef _CS_LFS64_LIBS - {*r = _CS_LFS64_LIBS; return 0;} -#else /* def _CS_LFS64_LIBS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_LFS64_LIBS */ - if (x == Mono_Posix_ConfStr__CS_LFS64_LINTFLAGS) -#ifdef _CS_LFS64_LINTFLAGS - {*r = _CS_LFS64_LINTFLAGS; return 0;} -#else /* def _CS_LFS64_LINTFLAGS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_LFS64_LINTFLAGS */ - if (x == Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_CFLAGS) -#ifdef _CS_XBS5_ILP32_OFF32_CFLAGS - {*r = _CS_XBS5_ILP32_OFF32_CFLAGS; return 0;} -#else /* def _CS_XBS5_ILP32_OFF32_CFLAGS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_XBS5_ILP32_OFF32_CFLAGS */ - if (x == Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LDFLAGS) -#ifdef _CS_XBS5_ILP32_OFF32_LDFLAGS - {*r = _CS_XBS5_ILP32_OFF32_LDFLAGS; return 0;} -#else /* def _CS_XBS5_ILP32_OFF32_LDFLAGS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_XBS5_ILP32_OFF32_LDFLAGS */ - if (x == Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LIBS) -#ifdef _CS_XBS5_ILP32_OFF32_LIBS - {*r = _CS_XBS5_ILP32_OFF32_LIBS; return 0;} -#else /* def _CS_XBS5_ILP32_OFF32_LIBS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_XBS5_ILP32_OFF32_LIBS */ - if (x == Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LINTFLAGS) -#ifdef _CS_XBS5_ILP32_OFF32_LINTFLAGS - {*r = _CS_XBS5_ILP32_OFF32_LINTFLAGS; return 0;} -#else /* def _CS_XBS5_ILP32_OFF32_LINTFLAGS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_XBS5_ILP32_OFF32_LINTFLAGS */ - if (x == Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_CFLAGS) -#ifdef _CS_XBS5_ILP32_OFFBIG_CFLAGS - {*r = _CS_XBS5_ILP32_OFFBIG_CFLAGS; return 0;} -#else /* def _CS_XBS5_ILP32_OFFBIG_CFLAGS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_XBS5_ILP32_OFFBIG_CFLAGS */ - if (x == Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LDFLAGS) -#ifdef _CS_XBS5_ILP32_OFFBIG_LDFLAGS - {*r = _CS_XBS5_ILP32_OFFBIG_LDFLAGS; return 0;} -#else /* def _CS_XBS5_ILP32_OFFBIG_LDFLAGS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_XBS5_ILP32_OFFBIG_LDFLAGS */ - if (x == Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LIBS) -#ifdef _CS_XBS5_ILP32_OFFBIG_LIBS - {*r = _CS_XBS5_ILP32_OFFBIG_LIBS; return 0;} -#else /* def _CS_XBS5_ILP32_OFFBIG_LIBS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_XBS5_ILP32_OFFBIG_LIBS */ - if (x == Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LINTFLAGS) -#ifdef _CS_XBS5_ILP32_OFFBIG_LINTFLAGS - {*r = _CS_XBS5_ILP32_OFFBIG_LINTFLAGS; return 0;} -#else /* def _CS_XBS5_ILP32_OFFBIG_LINTFLAGS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_XBS5_ILP32_OFFBIG_LINTFLAGS */ - if (x == Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_CFLAGS) -#ifdef _CS_XBS5_LP64_OFF64_CFLAGS - {*r = _CS_XBS5_LP64_OFF64_CFLAGS; return 0;} -#else /* def _CS_XBS5_LP64_OFF64_CFLAGS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_XBS5_LP64_OFF64_CFLAGS */ - if (x == Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LDFLAGS) -#ifdef _CS_XBS5_LP64_OFF64_LDFLAGS - {*r = _CS_XBS5_LP64_OFF64_LDFLAGS; return 0;} -#else /* def _CS_XBS5_LP64_OFF64_LDFLAGS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_XBS5_LP64_OFF64_LDFLAGS */ - if (x == Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LIBS) -#ifdef _CS_XBS5_LP64_OFF64_LIBS - {*r = _CS_XBS5_LP64_OFF64_LIBS; return 0;} -#else /* def _CS_XBS5_LP64_OFF64_LIBS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_XBS5_LP64_OFF64_LIBS */ - if (x == Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LINTFLAGS) -#ifdef _CS_XBS5_LP64_OFF64_LINTFLAGS - {*r = _CS_XBS5_LP64_OFF64_LINTFLAGS; return 0;} -#else /* def _CS_XBS5_LP64_OFF64_LINTFLAGS */ - {errno = EINVAL; return -1;} -#endif /* ndef _CS_XBS5_LP64_OFF64_LINTFLAGS */ - if (x == Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_CFLAGS) -#ifdef _CS_XBS5_LPBIG_OFFBIG_CFLAGS - {*r = _CS_XBS5_LPBIG_OFFBIG_CFLAGS; return 0;} -#else /* def _CS_XBS5_LPBIG_OFFBIG_CFLAGS */ + if (x == Mono_Posix_SyslogFacility_LOG_AUTH) +#ifdef LOG_AUTH + {*r = LOG_AUTH; return 0;} +#else /* def LOG_AUTH */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_XBS5_LPBIG_OFFBIG_CFLAGS */ - if (x == Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LDFLAGS) -#ifdef _CS_XBS5_LPBIG_OFFBIG_LDFLAGS - {*r = _CS_XBS5_LPBIG_OFFBIG_LDFLAGS; return 0;} -#else /* def _CS_XBS5_LPBIG_OFFBIG_LDFLAGS */ +#endif /* ndef LOG_AUTH */ + if (x == Mono_Posix_SyslogFacility_LOG_AUTHPRIV) +#ifdef LOG_AUTHPRIV + {*r = LOG_AUTHPRIV; return 0;} +#else /* def LOG_AUTHPRIV */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_XBS5_LPBIG_OFFBIG_LDFLAGS */ - if (x == Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LIBS) -#ifdef _CS_XBS5_LPBIG_OFFBIG_LIBS - {*r = _CS_XBS5_LPBIG_OFFBIG_LIBS; return 0;} -#else /* def _CS_XBS5_LPBIG_OFFBIG_LIBS */ +#endif /* ndef LOG_AUTHPRIV */ + if (x == Mono_Posix_SyslogFacility_LOG_CRON) +#ifdef LOG_CRON + {*r = LOG_CRON; return 0;} +#else /* def LOG_CRON */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_XBS5_LPBIG_OFFBIG_LIBS */ - if (x == Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LINTFLAGS) -#ifdef _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS - {*r = _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS; return 0;} -#else /* def _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS */ +#endif /* ndef LOG_CRON */ + if (x == Mono_Posix_SyslogFacility_LOG_DAEMON) +#ifdef LOG_DAEMON + {*r = LOG_DAEMON; return 0;} +#else /* def LOG_DAEMON */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS */ - if (x == Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_CFLAGS) -#ifdef _CS_POSIX_V6_ILP32_OFF32_CFLAGS - {*r = _CS_POSIX_V6_ILP32_OFF32_CFLAGS; return 0;} -#else /* def _CS_POSIX_V6_ILP32_OFF32_CFLAGS */ +#endif /* ndef LOG_DAEMON */ + if (x == Mono_Posix_SyslogFacility_LOG_FTP) +#ifdef LOG_FTP + {*r = LOG_FTP; return 0;} +#else /* def LOG_FTP */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_POSIX_V6_ILP32_OFF32_CFLAGS */ - if (x == Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LDFLAGS) -#ifdef _CS_POSIX_V6_ILP32_OFF32_LDFLAGS - {*r = _CS_POSIX_V6_ILP32_OFF32_LDFLAGS; return 0;} -#else /* def _CS_POSIX_V6_ILP32_OFF32_LDFLAGS */ +#endif /* ndef LOG_FTP */ + if (x == Mono_Posix_SyslogFacility_LOG_KERN) +#ifdef LOG_KERN + {*r = LOG_KERN; return 0;} +#else /* def LOG_KERN */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_POSIX_V6_ILP32_OFF32_LDFLAGS */ - if (x == Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LIBS) -#ifdef _CS_POSIX_V6_ILP32_OFF32_LIBS - {*r = _CS_POSIX_V6_ILP32_OFF32_LIBS; return 0;} -#else /* def _CS_POSIX_V6_ILP32_OFF32_LIBS */ +#endif /* ndef LOG_KERN */ + if (x == Mono_Posix_SyslogFacility_LOG_LOCAL0) +#ifdef LOG_LOCAL0 + {*r = LOG_LOCAL0; return 0;} +#else /* def LOG_LOCAL0 */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_POSIX_V6_ILP32_OFF32_LIBS */ - if (x == Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LINTFLAGS) -#ifdef _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS - {*r = _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS; return 0;} -#else /* def _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS */ +#endif /* ndef LOG_LOCAL0 */ + if (x == Mono_Posix_SyslogFacility_LOG_LOCAL1) +#ifdef LOG_LOCAL1 + {*r = LOG_LOCAL1; return 0;} +#else /* def LOG_LOCAL1 */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS */ - if (x == Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_CFLAGS) -#ifdef _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS - {*r = _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS; return 0;} -#else /* def _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS */ +#endif /* ndef LOG_LOCAL1 */ + if (x == Mono_Posix_SyslogFacility_LOG_LOCAL2) +#ifdef LOG_LOCAL2 + {*r = LOG_LOCAL2; return 0;} +#else /* def LOG_LOCAL2 */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS */ - if (x == Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS) -#ifdef _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS - {*r = _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS; return 0;} -#else /* def _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS */ +#endif /* ndef LOG_LOCAL2 */ + if (x == Mono_Posix_SyslogFacility_LOG_LOCAL3) +#ifdef LOG_LOCAL3 + {*r = LOG_LOCAL3; return 0;} +#else /* def LOG_LOCAL3 */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS */ - if (x == Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LIBS) -#ifdef _CS_POSIX_V6_ILP32_OFFBIG_LIBS - {*r = _CS_POSIX_V6_ILP32_OFFBIG_LIBS; return 0;} -#else /* def _CS_POSIX_V6_ILP32_OFFBIG_LIBS */ +#endif /* ndef LOG_LOCAL3 */ + if (x == Mono_Posix_SyslogFacility_LOG_LOCAL4) +#ifdef LOG_LOCAL4 + {*r = LOG_LOCAL4; return 0;} +#else /* def LOG_LOCAL4 */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_LIBS */ - if (x == Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS) -#ifdef _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS - {*r = _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS; return 0;} -#else /* def _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS */ +#endif /* ndef LOG_LOCAL4 */ + if (x == Mono_Posix_SyslogFacility_LOG_LOCAL5) +#ifdef LOG_LOCAL5 + {*r = LOG_LOCAL5; return 0;} +#else /* def LOG_LOCAL5 */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS */ - if (x == Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_CFLAGS) -#ifdef _CS_POSIX_V6_LP64_OFF64_CFLAGS - {*r = _CS_POSIX_V6_LP64_OFF64_CFLAGS; return 0;} -#else /* def _CS_POSIX_V6_LP64_OFF64_CFLAGS */ +#endif /* ndef LOG_LOCAL5 */ + if (x == Mono_Posix_SyslogFacility_LOG_LOCAL6) +#ifdef LOG_LOCAL6 + {*r = LOG_LOCAL6; return 0;} +#else /* def LOG_LOCAL6 */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_POSIX_V6_LP64_OFF64_CFLAGS */ - if (x == Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LDFLAGS) -#ifdef _CS_POSIX_V6_LP64_OFF64_LDFLAGS - {*r = _CS_POSIX_V6_LP64_OFF64_LDFLAGS; return 0;} -#else /* def _CS_POSIX_V6_LP64_OFF64_LDFLAGS */ +#endif /* ndef LOG_LOCAL6 */ + if (x == Mono_Posix_SyslogFacility_LOG_LOCAL7) +#ifdef LOG_LOCAL7 + {*r = LOG_LOCAL7; return 0;} +#else /* def LOG_LOCAL7 */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_POSIX_V6_LP64_OFF64_LDFLAGS */ - if (x == Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LIBS) -#ifdef _CS_POSIX_V6_LP64_OFF64_LIBS - {*r = _CS_POSIX_V6_LP64_OFF64_LIBS; return 0;} -#else /* def _CS_POSIX_V6_LP64_OFF64_LIBS */ +#endif /* ndef LOG_LOCAL7 */ + if (x == Mono_Posix_SyslogFacility_LOG_LPR) +#ifdef LOG_LPR + {*r = LOG_LPR; return 0;} +#else /* def LOG_LPR */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_POSIX_V6_LP64_OFF64_LIBS */ - if (x == Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LINTFLAGS) -#ifdef _CS_POSIX_V6_LP64_OFF64_LINTFLAGS - {*r = _CS_POSIX_V6_LP64_OFF64_LINTFLAGS; return 0;} -#else /* def _CS_POSIX_V6_LP64_OFF64_LINTFLAGS */ +#endif /* ndef LOG_LPR */ + if (x == Mono_Posix_SyslogFacility_LOG_MAIL) +#ifdef LOG_MAIL + {*r = LOG_MAIL; return 0;} +#else /* def LOG_MAIL */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_POSIX_V6_LP64_OFF64_LINTFLAGS */ - if (x == Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS) -#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS - {*r = _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS; return 0;} -#else /* def _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS */ +#endif /* ndef LOG_MAIL */ + if (x == Mono_Posix_SyslogFacility_LOG_NEWS) +#ifdef LOG_NEWS + {*r = LOG_NEWS; return 0;} +#else /* def LOG_NEWS */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS */ - if (x == Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS) -#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS - {*r = _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS; return 0;} -#else /* def _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS */ +#endif /* ndef LOG_NEWS */ + if (x == Mono_Posix_SyslogFacility_LOG_SYSLOG) +#ifdef LOG_SYSLOG + {*r = LOG_SYSLOG; return 0;} +#else /* def LOG_SYSLOG */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS */ - if (x == Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LIBS) -#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LIBS - {*r = _CS_POSIX_V6_LPBIG_OFFBIG_LIBS; return 0;} -#else /* def _CS_POSIX_V6_LPBIG_OFFBIG_LIBS */ +#endif /* ndef LOG_SYSLOG */ + if (x == Mono_Posix_SyslogFacility_LOG_USER) +#ifdef LOG_USER + {*r = LOG_USER; return 0;} +#else /* def LOG_USER */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_LIBS */ - if (x == Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS) -#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS - {*r = _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS; return 0;} -#else /* def _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS */ +#endif /* ndef LOG_USER */ + /* Mono_Posix_SyslogFacility_LOG_USRE is obsolete; ignoring */ + if (x == Mono_Posix_SyslogFacility_LOG_UUCP) +#ifdef LOG_UUCP + {*r = LOG_UUCP; return 0;} +#else /* def LOG_UUCP */ {errno = EINVAL; return -1;} -#endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS */ +#endif /* ndef LOG_UUCP */ errno = EINVAL; return -1; } -int Mono_Posix_ToConfStr (int x, int *r) +int Mono_Posix_ToSyslogFacility (int x, int *r) { *r = 0; if (x == 0) return 0; -#ifdef _CS_PATH - if (x == _CS_PATH) - {*r = Mono_Posix_ConfStr__CS_PATH; return 0;} -#endif /* ndef _CS_PATH */ -#ifdef _CS_V6_WIDTH_RESTRICTED_ENVS - if (x == _CS_V6_WIDTH_RESTRICTED_ENVS) - {*r = Mono_Posix_ConfStr__CS_V6_WIDTH_RESTRICTED_ENVS; return 0;} -#endif /* ndef _CS_V6_WIDTH_RESTRICTED_ENVS */ -#ifdef _CS_GNU_LIBC_VERSION - if (x == _CS_GNU_LIBC_VERSION) - {*r = Mono_Posix_ConfStr__CS_GNU_LIBC_VERSION; return 0;} -#endif /* ndef _CS_GNU_LIBC_VERSION */ -#ifdef _CS_GNU_LIBPTHREAD_VERSION - if (x == _CS_GNU_LIBPTHREAD_VERSION) - {*r = Mono_Posix_ConfStr__CS_GNU_LIBPTHREAD_VERSION; return 0;} -#endif /* ndef _CS_GNU_LIBPTHREAD_VERSION */ -#ifdef _CS_LFS_CFLAGS - if (x == _CS_LFS_CFLAGS) - {*r = Mono_Posix_ConfStr__CS_LFS_CFLAGS; return 0;} -#endif /* ndef _CS_LFS_CFLAGS */ -#ifdef _CS_LFS_LDFLAGS - if (x == _CS_LFS_LDFLAGS) - {*r = Mono_Posix_ConfStr__CS_LFS_LDFLAGS; return 0;} -#endif /* ndef _CS_LFS_LDFLAGS */ -#ifdef _CS_LFS_LIBS - if (x == _CS_LFS_LIBS) - {*r = Mono_Posix_ConfStr__CS_LFS_LIBS; return 0;} -#endif /* ndef _CS_LFS_LIBS */ -#ifdef _CS_LFS_LINTFLAGS - if (x == _CS_LFS_LINTFLAGS) - {*r = Mono_Posix_ConfStr__CS_LFS_LINTFLAGS; return 0;} -#endif /* ndef _CS_LFS_LINTFLAGS */ -#ifdef _CS_LFS64_CFLAGS - if (x == _CS_LFS64_CFLAGS) - {*r = Mono_Posix_ConfStr__CS_LFS64_CFLAGS; return 0;} -#endif /* ndef _CS_LFS64_CFLAGS */ -#ifdef _CS_LFS64_LDFLAGS - if (x == _CS_LFS64_LDFLAGS) - {*r = Mono_Posix_ConfStr__CS_LFS64_LDFLAGS; return 0;} -#endif /* ndef _CS_LFS64_LDFLAGS */ -#ifdef _CS_LFS64_LIBS - if (x == _CS_LFS64_LIBS) - {*r = Mono_Posix_ConfStr__CS_LFS64_LIBS; return 0;} -#endif /* ndef _CS_LFS64_LIBS */ -#ifdef _CS_LFS64_LINTFLAGS - if (x == _CS_LFS64_LINTFLAGS) - {*r = Mono_Posix_ConfStr__CS_LFS64_LINTFLAGS; return 0;} -#endif /* ndef _CS_LFS64_LINTFLAGS */ -#ifdef _CS_XBS5_ILP32_OFF32_CFLAGS - if (x == _CS_XBS5_ILP32_OFF32_CFLAGS) - {*r = Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_CFLAGS; return 0;} -#endif /* ndef _CS_XBS5_ILP32_OFF32_CFLAGS */ -#ifdef _CS_XBS5_ILP32_OFF32_LDFLAGS - if (x == _CS_XBS5_ILP32_OFF32_LDFLAGS) - {*r = Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LDFLAGS; return 0;} -#endif /* ndef _CS_XBS5_ILP32_OFF32_LDFLAGS */ -#ifdef _CS_XBS5_ILP32_OFF32_LIBS - if (x == _CS_XBS5_ILP32_OFF32_LIBS) - {*r = Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LIBS; return 0;} -#endif /* ndef _CS_XBS5_ILP32_OFF32_LIBS */ -#ifdef _CS_XBS5_ILP32_OFF32_LINTFLAGS - if (x == _CS_XBS5_ILP32_OFF32_LINTFLAGS) - {*r = Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LINTFLAGS; return 0;} -#endif /* ndef _CS_XBS5_ILP32_OFF32_LINTFLAGS */ -#ifdef _CS_XBS5_ILP32_OFFBIG_CFLAGS - if (x == _CS_XBS5_ILP32_OFFBIG_CFLAGS) - {*r = Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_CFLAGS; return 0;} -#endif /* ndef _CS_XBS5_ILP32_OFFBIG_CFLAGS */ -#ifdef _CS_XBS5_ILP32_OFFBIG_LDFLAGS - if (x == _CS_XBS5_ILP32_OFFBIG_LDFLAGS) - {*r = Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LDFLAGS; return 0;} -#endif /* ndef _CS_XBS5_ILP32_OFFBIG_LDFLAGS */ -#ifdef _CS_XBS5_ILP32_OFFBIG_LIBS - if (x == _CS_XBS5_ILP32_OFFBIG_LIBS) - {*r = Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LIBS; return 0;} -#endif /* ndef _CS_XBS5_ILP32_OFFBIG_LIBS */ -#ifdef _CS_XBS5_ILP32_OFFBIG_LINTFLAGS - if (x == _CS_XBS5_ILP32_OFFBIG_LINTFLAGS) - {*r = Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LINTFLAGS; return 0;} -#endif /* ndef _CS_XBS5_ILP32_OFFBIG_LINTFLAGS */ -#ifdef _CS_XBS5_LP64_OFF64_CFLAGS - if (x == _CS_XBS5_LP64_OFF64_CFLAGS) - {*r = Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_CFLAGS; return 0;} -#endif /* ndef _CS_XBS5_LP64_OFF64_CFLAGS */ -#ifdef _CS_XBS5_LP64_OFF64_LDFLAGS - if (x == _CS_XBS5_LP64_OFF64_LDFLAGS) - {*r = Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LDFLAGS; return 0;} -#endif /* ndef _CS_XBS5_LP64_OFF64_LDFLAGS */ -#ifdef _CS_XBS5_LP64_OFF64_LIBS - if (x == _CS_XBS5_LP64_OFF64_LIBS) - {*r = Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LIBS; return 0;} -#endif /* ndef _CS_XBS5_LP64_OFF64_LIBS */ -#ifdef _CS_XBS5_LP64_OFF64_LINTFLAGS - if (x == _CS_XBS5_LP64_OFF64_LINTFLAGS) - {*r = Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LINTFLAGS; return 0;} -#endif /* ndef _CS_XBS5_LP64_OFF64_LINTFLAGS */ -#ifdef _CS_XBS5_LPBIG_OFFBIG_CFLAGS - if (x == _CS_XBS5_LPBIG_OFFBIG_CFLAGS) - {*r = Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_CFLAGS; return 0;} -#endif /* ndef _CS_XBS5_LPBIG_OFFBIG_CFLAGS */ -#ifdef _CS_XBS5_LPBIG_OFFBIG_LDFLAGS - if (x == _CS_XBS5_LPBIG_OFFBIG_LDFLAGS) - {*r = Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LDFLAGS; return 0;} -#endif /* ndef _CS_XBS5_LPBIG_OFFBIG_LDFLAGS */ -#ifdef _CS_XBS5_LPBIG_OFFBIG_LIBS - if (x == _CS_XBS5_LPBIG_OFFBIG_LIBS) - {*r = Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LIBS; return 0;} -#endif /* ndef _CS_XBS5_LPBIG_OFFBIG_LIBS */ -#ifdef _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS - if (x == _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS) - {*r = Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LINTFLAGS; return 0;} -#endif /* ndef _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS */ -#ifdef _CS_POSIX_V6_ILP32_OFF32_CFLAGS - if (x == _CS_POSIX_V6_ILP32_OFF32_CFLAGS) - {*r = Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_CFLAGS; return 0;} -#endif /* ndef _CS_POSIX_V6_ILP32_OFF32_CFLAGS */ -#ifdef _CS_POSIX_V6_ILP32_OFF32_LDFLAGS - if (x == _CS_POSIX_V6_ILP32_OFF32_LDFLAGS) - {*r = Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LDFLAGS; return 0;} -#endif /* ndef _CS_POSIX_V6_ILP32_OFF32_LDFLAGS */ -#ifdef _CS_POSIX_V6_ILP32_OFF32_LIBS - if (x == _CS_POSIX_V6_ILP32_OFF32_LIBS) - {*r = Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LIBS; return 0;} -#endif /* ndef _CS_POSIX_V6_ILP32_OFF32_LIBS */ -#ifdef _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS - if (x == _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS) - {*r = Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LINTFLAGS; return 0;} -#endif /* ndef _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS */ -#ifdef _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS - if (x == _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS) - {*r = Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_CFLAGS; return 0;} -#endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS */ -#ifdef _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS - if (x == _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS) - {*r = Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS; return 0;} -#endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS */ -#ifdef _CS_POSIX_V6_ILP32_OFFBIG_LIBS - if (x == _CS_POSIX_V6_ILP32_OFFBIG_LIBS) - {*r = Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LIBS; return 0;} -#endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_LIBS */ -#ifdef _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS - if (x == _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS) - {*r = Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS; return 0;} -#endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS */ -#ifdef _CS_POSIX_V6_LP64_OFF64_CFLAGS - if (x == _CS_POSIX_V6_LP64_OFF64_CFLAGS) - {*r = Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_CFLAGS; return 0;} -#endif /* ndef _CS_POSIX_V6_LP64_OFF64_CFLAGS */ -#ifdef _CS_POSIX_V6_LP64_OFF64_LDFLAGS - if (x == _CS_POSIX_V6_LP64_OFF64_LDFLAGS) - {*r = Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LDFLAGS; return 0;} -#endif /* ndef _CS_POSIX_V6_LP64_OFF64_LDFLAGS */ -#ifdef _CS_POSIX_V6_LP64_OFF64_LIBS - if (x == _CS_POSIX_V6_LP64_OFF64_LIBS) - {*r = Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LIBS; return 0;} -#endif /* ndef _CS_POSIX_V6_LP64_OFF64_LIBS */ -#ifdef _CS_POSIX_V6_LP64_OFF64_LINTFLAGS - if (x == _CS_POSIX_V6_LP64_OFF64_LINTFLAGS) - {*r = Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LINTFLAGS; return 0;} -#endif /* ndef _CS_POSIX_V6_LP64_OFF64_LINTFLAGS */ -#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS - if (x == _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS) - {*r = Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS; return 0;} -#endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS */ -#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS - if (x == _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS) - {*r = Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS; return 0;} -#endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS */ -#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LIBS - if (x == _CS_POSIX_V6_LPBIG_OFFBIG_LIBS) - {*r = Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LIBS; return 0;} -#endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_LIBS */ -#ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS - if (x == _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS) - {*r = Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS; return 0;} -#endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS */ +#ifdef LOG_AUTH + if (x == LOG_AUTH) + {*r = Mono_Posix_SyslogFacility_LOG_AUTH; return 0;} +#endif /* ndef LOG_AUTH */ +#ifdef LOG_AUTHPRIV + if (x == LOG_AUTHPRIV) + {*r = Mono_Posix_SyslogFacility_LOG_AUTHPRIV; return 0;} +#endif /* ndef LOG_AUTHPRIV */ +#ifdef LOG_CRON + if (x == LOG_CRON) + {*r = Mono_Posix_SyslogFacility_LOG_CRON; return 0;} +#endif /* ndef LOG_CRON */ +#ifdef LOG_DAEMON + if (x == LOG_DAEMON) + {*r = Mono_Posix_SyslogFacility_LOG_DAEMON; return 0;} +#endif /* ndef LOG_DAEMON */ +#ifdef LOG_FTP + if (x == LOG_FTP) + {*r = Mono_Posix_SyslogFacility_LOG_FTP; return 0;} +#endif /* ndef LOG_FTP */ +#ifdef LOG_KERN + if (x == LOG_KERN) + {*r = Mono_Posix_SyslogFacility_LOG_KERN; return 0;} +#endif /* ndef LOG_KERN */ +#ifdef LOG_LOCAL0 + if (x == LOG_LOCAL0) + {*r = Mono_Posix_SyslogFacility_LOG_LOCAL0; return 0;} +#endif /* ndef LOG_LOCAL0 */ +#ifdef LOG_LOCAL1 + if (x == LOG_LOCAL1) + {*r = Mono_Posix_SyslogFacility_LOG_LOCAL1; return 0;} +#endif /* ndef LOG_LOCAL1 */ +#ifdef LOG_LOCAL2 + if (x == LOG_LOCAL2) + {*r = Mono_Posix_SyslogFacility_LOG_LOCAL2; return 0;} +#endif /* ndef LOG_LOCAL2 */ +#ifdef LOG_LOCAL3 + if (x == LOG_LOCAL3) + {*r = Mono_Posix_SyslogFacility_LOG_LOCAL3; return 0;} +#endif /* ndef LOG_LOCAL3 */ +#ifdef LOG_LOCAL4 + if (x == LOG_LOCAL4) + {*r = Mono_Posix_SyslogFacility_LOG_LOCAL4; return 0;} +#endif /* ndef LOG_LOCAL4 */ +#ifdef LOG_LOCAL5 + if (x == LOG_LOCAL5) + {*r = Mono_Posix_SyslogFacility_LOG_LOCAL5; return 0;} +#endif /* ndef LOG_LOCAL5 */ +#ifdef LOG_LOCAL6 + if (x == LOG_LOCAL6) + {*r = Mono_Posix_SyslogFacility_LOG_LOCAL6; return 0;} +#endif /* ndef LOG_LOCAL6 */ +#ifdef LOG_LOCAL7 + if (x == LOG_LOCAL7) + {*r = Mono_Posix_SyslogFacility_LOG_LOCAL7; return 0;} +#endif /* ndef LOG_LOCAL7 */ +#ifdef LOG_LPR + if (x == LOG_LPR) + {*r = Mono_Posix_SyslogFacility_LOG_LPR; return 0;} +#endif /* ndef LOG_LPR */ +#ifdef LOG_MAIL + if (x == LOG_MAIL) + {*r = Mono_Posix_SyslogFacility_LOG_MAIL; return 0;} +#endif /* ndef LOG_MAIL */ +#ifdef LOG_NEWS + if (x == LOG_NEWS) + {*r = Mono_Posix_SyslogFacility_LOG_NEWS; return 0;} +#endif /* ndef LOG_NEWS */ +#ifdef LOG_SYSLOG + if (x == LOG_SYSLOG) + {*r = Mono_Posix_SyslogFacility_LOG_SYSLOG; return 0;} +#endif /* ndef LOG_SYSLOG */ +#ifdef LOG_USER + if (x == LOG_USER) + {*r = Mono_Posix_SyslogFacility_LOG_USER; return 0;} +#endif /* ndef LOG_USER */ +#ifdef LOG_USRE + if (x == LOG_USRE) + {*r = Mono_Posix_SyslogFacility_LOG_USRE; return 0;} +#endif /* ndef LOG_USRE */ +#ifdef LOG_UUCP + if (x == LOG_UUCP) + {*r = Mono_Posix_SyslogFacility_LOG_UUCP; return 0;} +#endif /* ndef LOG_UUCP */ errno = EINVAL; return -1; } -int Mono_Posix_FromLockfCommand (int x, int *r) +int Mono_Posix_FromSyslogLevel (int x, int *r) { *r = 0; if (x == 0) return 0; - if (x == Mono_Posix_LockfCommand_F_ULOCK) -#ifdef F_ULOCK - {*r = F_ULOCK; return 0;} -#else /* def F_ULOCK */ + if (x == Mono_Posix_SyslogLevel_LOG_ALERT) +#ifdef LOG_ALERT + {*r = LOG_ALERT; return 0;} +#else /* def LOG_ALERT */ {errno = EINVAL; return -1;} -#endif /* ndef F_ULOCK */ - if (x == Mono_Posix_LockfCommand_F_LOCK) -#ifdef F_LOCK - {*r = F_LOCK; return 0;} -#else /* def F_LOCK */ +#endif /* ndef LOG_ALERT */ + if (x == Mono_Posix_SyslogLevel_LOG_CRIT) +#ifdef LOG_CRIT + {*r = LOG_CRIT; return 0;} +#else /* def LOG_CRIT */ {errno = EINVAL; return -1;} -#endif /* ndef F_LOCK */ - if (x == Mono_Posix_LockfCommand_F_TLOCK) -#ifdef F_TLOCK - {*r = F_TLOCK; return 0;} -#else /* def F_TLOCK */ +#endif /* ndef LOG_CRIT */ + if (x == Mono_Posix_SyslogLevel_LOG_DEBUG) +#ifdef LOG_DEBUG + {*r = LOG_DEBUG; return 0;} +#else /* def LOG_DEBUG */ {errno = EINVAL; return -1;} -#endif /* ndef F_TLOCK */ - if (x == Mono_Posix_LockfCommand_F_TEST) -#ifdef F_TEST - {*r = F_TEST; return 0;} -#else /* def F_TEST */ +#endif /* ndef LOG_DEBUG */ + if (x == Mono_Posix_SyslogLevel_LOG_EMERG) +#ifdef LOG_EMERG + {*r = LOG_EMERG; return 0;} +#else /* def LOG_EMERG */ {errno = EINVAL; return -1;} -#endif /* ndef F_TEST */ +#endif /* ndef LOG_EMERG */ + if (x == Mono_Posix_SyslogLevel_LOG_ERR) +#ifdef LOG_ERR + {*r = LOG_ERR; return 0;} +#else /* def LOG_ERR */ + {errno = EINVAL; return -1;} +#endif /* ndef LOG_ERR */ + if (x == Mono_Posix_SyslogLevel_LOG_INFO) +#ifdef LOG_INFO + {*r = LOG_INFO; return 0;} +#else /* def LOG_INFO */ + {errno = EINVAL; return -1;} +#endif /* ndef LOG_INFO */ + if (x == Mono_Posix_SyslogLevel_LOG_NOTICE) +#ifdef LOG_NOTICE + {*r = LOG_NOTICE; return 0;} +#else /* def LOG_NOTICE */ + {errno = EINVAL; return -1;} +#endif /* ndef LOG_NOTICE */ + if (x == Mono_Posix_SyslogLevel_LOG_WARNING) +#ifdef LOG_WARNING + {*r = LOG_WARNING; return 0;} +#else /* def LOG_WARNING */ + {errno = EINVAL; return -1;} +#endif /* ndef LOG_WARNING */ errno = EINVAL; return -1; } -int Mono_Posix_ToLockfCommand (int x, int *r) +int Mono_Posix_ToSyslogLevel (int x, int *r) { *r = 0; if (x == 0) return 0; -#ifdef F_ULOCK - if (x == F_ULOCK) - {*r = Mono_Posix_LockfCommand_F_ULOCK; return 0;} -#endif /* ndef F_ULOCK */ -#ifdef F_LOCK - if (x == F_LOCK) - {*r = Mono_Posix_LockfCommand_F_LOCK; return 0;} -#endif /* ndef F_LOCK */ -#ifdef F_TLOCK - if (x == F_TLOCK) - {*r = Mono_Posix_LockfCommand_F_TLOCK; return 0;} -#endif /* ndef F_TLOCK */ -#ifdef F_TEST - if (x == F_TEST) - {*r = Mono_Posix_LockfCommand_F_TEST; return 0;} -#endif /* ndef F_TEST */ +#ifdef LOG_ALERT + if (x == LOG_ALERT) + {*r = Mono_Posix_SyslogLevel_LOG_ALERT; return 0;} +#endif /* ndef LOG_ALERT */ +#ifdef LOG_CRIT + if (x == LOG_CRIT) + {*r = Mono_Posix_SyslogLevel_LOG_CRIT; return 0;} +#endif /* ndef LOG_CRIT */ +#ifdef LOG_DEBUG + if (x == LOG_DEBUG) + {*r = Mono_Posix_SyslogLevel_LOG_DEBUG; return 0;} +#endif /* ndef LOG_DEBUG */ +#ifdef LOG_EMERG + if (x == LOG_EMERG) + {*r = Mono_Posix_SyslogLevel_LOG_EMERG; return 0;} +#endif /* ndef LOG_EMERG */ +#ifdef LOG_ERR + if (x == LOG_ERR) + {*r = Mono_Posix_SyslogLevel_LOG_ERR; return 0;} +#endif /* ndef LOG_ERR */ +#ifdef LOG_INFO + if (x == LOG_INFO) + {*r = Mono_Posix_SyslogLevel_LOG_INFO; return 0;} +#endif /* ndef LOG_INFO */ +#ifdef LOG_NOTICE + if (x == LOG_NOTICE) + {*r = Mono_Posix_SyslogLevel_LOG_NOTICE; return 0;} +#endif /* ndef LOG_NOTICE */ +#ifdef LOG_WARNING + if (x == LOG_WARNING) + {*r = Mono_Posix_SyslogLevel_LOG_WARNING; return 0;} +#endif /* ndef LOG_WARNING */ errno = EINVAL; return -1; } -int Mono_Posix_FromPollEvents (short x, short *r) +int Mono_Posix_FromSyslogOptions (int x, int *r) { *r = 0; if (x == 0) return 0; - if ((x & Mono_Posix_PollEvents_POLLIN) == Mono_Posix_PollEvents_POLLIN) -#ifdef POLLIN - *r |= POLLIN; -#else /* def POLLIN */ - {errno = EINVAL; return -1;} -#endif /* ndef POLLIN */ - if ((x & Mono_Posix_PollEvents_POLLPRI) == Mono_Posix_PollEvents_POLLPRI) -#ifdef POLLPRI - *r |= POLLPRI; -#else /* def POLLPRI */ - {errno = EINVAL; return -1;} -#endif /* ndef POLLPRI */ - if ((x & Mono_Posix_PollEvents_POLLOUT) == Mono_Posix_PollEvents_POLLOUT) -#ifdef POLLOUT - *r |= POLLOUT; -#else /* def POLLOUT */ + if ((x & Mono_Posix_SyslogOptions_LOG_CONS) == Mono_Posix_SyslogOptions_LOG_CONS) +#ifdef LOG_CONS + *r |= LOG_CONS; +#else /* def LOG_CONS */ {errno = EINVAL; return -1;} -#endif /* ndef POLLOUT */ - if ((x & Mono_Posix_PollEvents_POLLERR) == Mono_Posix_PollEvents_POLLERR) -#ifdef POLLERR - *r |= POLLERR; -#else /* def POLLERR */ +#endif /* ndef LOG_CONS */ + if ((x & Mono_Posix_SyslogOptions_LOG_NDELAY) == Mono_Posix_SyslogOptions_LOG_NDELAY) +#ifdef LOG_NDELAY + *r |= LOG_NDELAY; +#else /* def LOG_NDELAY */ {errno = EINVAL; return -1;} -#endif /* ndef POLLERR */ - if ((x & Mono_Posix_PollEvents_POLLHUP) == Mono_Posix_PollEvents_POLLHUP) -#ifdef POLLHUP - *r |= POLLHUP; -#else /* def POLLHUP */ +#endif /* ndef LOG_NDELAY */ + if ((x & Mono_Posix_SyslogOptions_LOG_NOWAIT) == Mono_Posix_SyslogOptions_LOG_NOWAIT) +#ifdef LOG_NOWAIT + *r |= LOG_NOWAIT; +#else /* def LOG_NOWAIT */ {errno = EINVAL; return -1;} -#endif /* ndef POLLHUP */ - if ((x & Mono_Posix_PollEvents_POLLNVAL) == Mono_Posix_PollEvents_POLLNVAL) -#ifdef POLLNVAL - *r |= POLLNVAL; -#else /* def POLLNVAL */ +#endif /* ndef LOG_NOWAIT */ + if ((x & Mono_Posix_SyslogOptions_LOG_ODELAY) == Mono_Posix_SyslogOptions_LOG_ODELAY) +#ifdef LOG_ODELAY + *r |= LOG_ODELAY; +#else /* def LOG_ODELAY */ {errno = EINVAL; return -1;} -#endif /* ndef POLLNVAL */ - if ((x & Mono_Posix_PollEvents_POLLRDNORM) == Mono_Posix_PollEvents_POLLRDNORM) -#ifdef POLLRDNORM - *r |= POLLRDNORM; -#else /* def POLLRDNORM */ +#endif /* ndef LOG_ODELAY */ + if ((x & Mono_Posix_SyslogOptions_LOG_PERROR) == Mono_Posix_SyslogOptions_LOG_PERROR) +#ifdef LOG_PERROR + *r |= LOG_PERROR; +#else /* def LOG_PERROR */ {errno = EINVAL; return -1;} -#endif /* ndef POLLRDNORM */ - if ((x & Mono_Posix_PollEvents_POLLRDBAND) == Mono_Posix_PollEvents_POLLRDBAND) -#ifdef POLLRDBAND - *r |= POLLRDBAND; -#else /* def POLLRDBAND */ +#endif /* ndef LOG_PERROR */ + if ((x & Mono_Posix_SyslogOptions_LOG_PID) == Mono_Posix_SyslogOptions_LOG_PID) +#ifdef LOG_PID + *r |= LOG_PID; +#else /* def LOG_PID */ {errno = EINVAL; return -1;} -#endif /* ndef POLLRDBAND */ - if ((x & Mono_Posix_PollEvents_POLLWRNORM) == Mono_Posix_PollEvents_POLLWRNORM) -#ifdef POLLWRNORM - *r |= POLLWRNORM; -#else /* def POLLWRNORM */ +#endif /* ndef LOG_PID */ + return 0; +} + +int Mono_Posix_ToSyslogOptions (int x, int *r) +{ + *r = 0; + if (x == 0) + return 0; +#ifdef LOG_CONS + if ((x & LOG_CONS) == LOG_CONS) + *r |= Mono_Posix_SyslogOptions_LOG_CONS; +#endif /* ndef LOG_CONS */ +#ifdef LOG_NDELAY + if ((x & LOG_NDELAY) == LOG_NDELAY) + *r |= Mono_Posix_SyslogOptions_LOG_NDELAY; +#endif /* ndef LOG_NDELAY */ +#ifdef LOG_NOWAIT + if ((x & LOG_NOWAIT) == LOG_NOWAIT) + *r |= Mono_Posix_SyslogOptions_LOG_NOWAIT; +#endif /* ndef LOG_NOWAIT */ +#ifdef LOG_ODELAY + if ((x & LOG_ODELAY) == LOG_ODELAY) + *r |= Mono_Posix_SyslogOptions_LOG_ODELAY; +#endif /* ndef LOG_ODELAY */ +#ifdef LOG_PERROR + if ((x & LOG_PERROR) == LOG_PERROR) + *r |= Mono_Posix_SyslogOptions_LOG_PERROR; +#endif /* ndef LOG_PERROR */ +#ifdef LOG_PID + if ((x & LOG_PID) == LOG_PID) + *r |= Mono_Posix_SyslogOptions_LOG_PID; +#endif /* ndef LOG_PID */ + return 0; +} + +int Mono_Posix_FromWaitOptions (int x, int *r) +{ + *r = 0; + if (x == 0) + return 0; + if ((x & Mono_Posix_WaitOptions_WNOHANG) == Mono_Posix_WaitOptions_WNOHANG) +#ifdef WNOHANG + *r |= WNOHANG; +#else /* def WNOHANG */ {errno = EINVAL; return -1;} -#endif /* ndef POLLWRNORM */ - if ((x & Mono_Posix_PollEvents_POLLWRBAND) == Mono_Posix_PollEvents_POLLWRBAND) -#ifdef POLLWRBAND - *r |= POLLWRBAND; -#else /* def POLLWRBAND */ +#endif /* ndef WNOHANG */ + if ((x & Mono_Posix_WaitOptions_WUNTRACED) == Mono_Posix_WaitOptions_WUNTRACED) +#ifdef WUNTRACED + *r |= WUNTRACED; +#else /* def WUNTRACED */ {errno = EINVAL; return -1;} -#endif /* ndef POLLWRBAND */ +#endif /* ndef WUNTRACED */ return 0; } -int Mono_Posix_ToPollEvents (short x, short *r) +int Mono_Posix_ToWaitOptions (int x, int *r) { *r = 0; if (x == 0) return 0; -#ifdef POLLIN - if ((x & POLLIN) == POLLIN) - *r |= Mono_Posix_PollEvents_POLLIN; -#endif /* ndef POLLIN */ -#ifdef POLLPRI - if ((x & POLLPRI) == POLLPRI) - *r |= Mono_Posix_PollEvents_POLLPRI; -#endif /* ndef POLLPRI */ -#ifdef POLLOUT - if ((x & POLLOUT) == POLLOUT) - *r |= Mono_Posix_PollEvents_POLLOUT; -#endif /* ndef POLLOUT */ -#ifdef POLLERR - if ((x & POLLERR) == POLLERR) - *r |= Mono_Posix_PollEvents_POLLERR; -#endif /* ndef POLLERR */ -#ifdef POLLHUP - if ((x & POLLHUP) == POLLHUP) - *r |= Mono_Posix_PollEvents_POLLHUP; -#endif /* ndef POLLHUP */ -#ifdef POLLNVAL - if ((x & POLLNVAL) == POLLNVAL) - *r |= Mono_Posix_PollEvents_POLLNVAL; -#endif /* ndef POLLNVAL */ -#ifdef POLLRDNORM - if ((x & POLLRDNORM) == POLLRDNORM) - *r |= Mono_Posix_PollEvents_POLLRDNORM; -#endif /* ndef POLLRDNORM */ -#ifdef POLLRDBAND - if ((x & POLLRDBAND) == POLLRDBAND) - *r |= Mono_Posix_PollEvents_POLLRDBAND; -#endif /* ndef POLLRDBAND */ -#ifdef POLLWRNORM - if ((x & POLLWRNORM) == POLLWRNORM) - *r |= Mono_Posix_PollEvents_POLLWRNORM; -#endif /* ndef POLLWRNORM */ -#ifdef POLLWRBAND - if ((x & POLLWRBAND) == POLLWRBAND) - *r |= Mono_Posix_PollEvents_POLLWRBAND; -#endif /* ndef POLLWRBAND */ +#ifdef WNOHANG + if ((x & WNOHANG) == WNOHANG) + *r |= Mono_Posix_WaitOptions_WNOHANG; +#endif /* ndef WNOHANG */ +#ifdef WUNTRACED + if ((x & WUNTRACED) == WUNTRACED) + *r |= Mono_Posix_WaitOptions_WUNTRACED; +#endif /* ndef WUNTRACED */ return 0; } @@ -6032,459 +7876,3 @@ int Mono_Posix_ToXattrFlags (int x, int *r) return 0; } -int Mono_Posix_FromMountFlags (guint64 x, guint64 *r) -{ - *r = 0; - if (x == 0) - return 0; - if ((x & Mono_Posix_MountFlags_ST_RDONLY) == Mono_Posix_MountFlags_ST_RDONLY) -#ifdef ST_RDONLY - *r |= ST_RDONLY; -#else /* def ST_RDONLY */ - {errno = EINVAL; return -1;} -#endif /* ndef ST_RDONLY */ - if ((x & Mono_Posix_MountFlags_ST_NOSUID) == Mono_Posix_MountFlags_ST_NOSUID) -#ifdef ST_NOSUID - *r |= ST_NOSUID; -#else /* def ST_NOSUID */ - {errno = EINVAL; return -1;} -#endif /* ndef ST_NOSUID */ - if ((x & Mono_Posix_MountFlags_ST_NODEV) == Mono_Posix_MountFlags_ST_NODEV) -#ifdef ST_NODEV - *r |= ST_NODEV; -#else /* def ST_NODEV */ - {errno = EINVAL; return -1;} -#endif /* ndef ST_NODEV */ - if ((x & Mono_Posix_MountFlags_ST_SYNCHRONOUS) == Mono_Posix_MountFlags_ST_SYNCHRONOUS) -#ifdef ST_SYNCHRONOUS - *r |= ST_SYNCHRONOUS; -#else /* def ST_SYNCHRONOUS */ - {errno = EINVAL; return -1;} -#endif /* ndef ST_SYNCHRONOUS */ - if ((x & Mono_Posix_MountFlags_ST_MANDLOCK) == Mono_Posix_MountFlags_ST_MANDLOCK) -#ifdef ST_MANDLOCK - *r |= ST_MANDLOCK; -#else /* def ST_MANDLOCK */ - {errno = EINVAL; return -1;} -#endif /* ndef ST_MANDLOCK */ - if ((x & Mono_Posix_MountFlags_ST_WRITE) == Mono_Posix_MountFlags_ST_WRITE) -#ifdef ST_WRITE - *r |= ST_WRITE; -#else /* def ST_WRITE */ - {errno = EINVAL; return -1;} -#endif /* ndef ST_WRITE */ - if ((x & Mono_Posix_MountFlags_ST_APPEND) == Mono_Posix_MountFlags_ST_APPEND) -#ifdef ST_APPEND - *r |= ST_APPEND; -#else /* def ST_APPEND */ - {errno = EINVAL; return -1;} -#endif /* ndef ST_APPEND */ - if ((x & Mono_Posix_MountFlags_ST_IMMUTABLE) == Mono_Posix_MountFlags_ST_IMMUTABLE) -#ifdef ST_IMMUTABLE - *r |= ST_IMMUTABLE; -#else /* def ST_IMMUTABLE */ - {errno = EINVAL; return -1;} -#endif /* ndef ST_IMMUTABLE */ - if ((x & Mono_Posix_MountFlags_ST_NOATIME) == Mono_Posix_MountFlags_ST_NOATIME) -#ifdef ST_NOATIME - *r |= ST_NOATIME; -#else /* def ST_NOATIME */ - {errno = EINVAL; return -1;} -#endif /* ndef ST_NOATIME */ - if ((x & Mono_Posix_MountFlags_ST_NODIRATIME) == Mono_Posix_MountFlags_ST_NODIRATIME) -#ifdef ST_NODIRATIME - *r |= ST_NODIRATIME; -#else /* def ST_NODIRATIME */ - {errno = EINVAL; return -1;} -#endif /* ndef ST_NODIRATIME */ - return 0; -} - -int Mono_Posix_ToMountFlags (guint64 x, guint64 *r) -{ - *r = 0; - if (x == 0) - return 0; -#ifdef ST_RDONLY - if ((x & ST_RDONLY) == ST_RDONLY) - *r |= Mono_Posix_MountFlags_ST_RDONLY; -#endif /* ndef ST_RDONLY */ -#ifdef ST_NOSUID - if ((x & ST_NOSUID) == ST_NOSUID) - *r |= Mono_Posix_MountFlags_ST_NOSUID; -#endif /* ndef ST_NOSUID */ -#ifdef ST_NODEV - if ((x & ST_NODEV) == ST_NODEV) - *r |= Mono_Posix_MountFlags_ST_NODEV; -#endif /* ndef ST_NODEV */ -#ifdef ST_SYNCHRONOUS - if ((x & ST_SYNCHRONOUS) == ST_SYNCHRONOUS) - *r |= Mono_Posix_MountFlags_ST_SYNCHRONOUS; -#endif /* ndef ST_SYNCHRONOUS */ -#ifdef ST_MANDLOCK - if ((x & ST_MANDLOCK) == ST_MANDLOCK) - *r |= Mono_Posix_MountFlags_ST_MANDLOCK; -#endif /* ndef ST_MANDLOCK */ -#ifdef ST_WRITE - if ((x & ST_WRITE) == ST_WRITE) - *r |= Mono_Posix_MountFlags_ST_WRITE; -#endif /* ndef ST_WRITE */ -#ifdef ST_APPEND - if ((x & ST_APPEND) == ST_APPEND) - *r |= Mono_Posix_MountFlags_ST_APPEND; -#endif /* ndef ST_APPEND */ -#ifdef ST_IMMUTABLE - if ((x & ST_IMMUTABLE) == ST_IMMUTABLE) - *r |= Mono_Posix_MountFlags_ST_IMMUTABLE; -#endif /* ndef ST_IMMUTABLE */ -#ifdef ST_NOATIME - if ((x & ST_NOATIME) == ST_NOATIME) - *r |= Mono_Posix_MountFlags_ST_NOATIME; -#endif /* ndef ST_NOATIME */ -#ifdef ST_NODIRATIME - if ((x & ST_NODIRATIME) == ST_NODIRATIME) - *r |= Mono_Posix_MountFlags_ST_NODIRATIME; -#endif /* ndef ST_NODIRATIME */ - return 0; -} - -int Mono_Posix_FromMmapFlags (int x, int *r) -{ - *r = 0; - if (x == 0) - return 0; - if ((x & Mono_Posix_MmapFlags_MAP_SHARED) == Mono_Posix_MmapFlags_MAP_SHARED) -#ifdef MAP_SHARED - *r |= MAP_SHARED; -#else /* def MAP_SHARED */ - {errno = EINVAL; return -1;} -#endif /* ndef MAP_SHARED */ - if ((x & Mono_Posix_MmapFlags_MAP_PRIVATE) == Mono_Posix_MmapFlags_MAP_PRIVATE) -#ifdef MAP_PRIVATE - *r |= MAP_PRIVATE; -#else /* def MAP_PRIVATE */ - {errno = EINVAL; return -1;} -#endif /* ndef MAP_PRIVATE */ - if ((x & Mono_Posix_MmapFlags_MAP_TYPE) == Mono_Posix_MmapFlags_MAP_TYPE) -#ifdef MAP_TYPE - *r |= MAP_TYPE; -#else /* def MAP_TYPE */ - {errno = EINVAL; return -1;} -#endif /* ndef MAP_TYPE */ - if ((x & Mono_Posix_MmapFlags_MAP_FIXED) == Mono_Posix_MmapFlags_MAP_FIXED) -#ifdef MAP_FIXED - *r |= MAP_FIXED; -#else /* def MAP_FIXED */ - {errno = EINVAL; return -1;} -#endif /* ndef MAP_FIXED */ - if ((x & Mono_Posix_MmapFlags_MAP_FILE) == Mono_Posix_MmapFlags_MAP_FILE) -#ifdef MAP_FILE - *r |= MAP_FILE; -#else /* def MAP_FILE */ - {errno = EINVAL; return -1;} -#endif /* ndef MAP_FILE */ - if ((x & Mono_Posix_MmapFlags_MAP_ANONYMOUS) == Mono_Posix_MmapFlags_MAP_ANONYMOUS) -#ifdef MAP_ANONYMOUS - *r |= MAP_ANONYMOUS; -#else /* def MAP_ANONYMOUS */ - {errno = EINVAL; return -1;} -#endif /* ndef MAP_ANONYMOUS */ - if ((x & Mono_Posix_MmapFlags_MAP_ANON) == Mono_Posix_MmapFlags_MAP_ANON) -#ifdef MAP_ANON - *r |= MAP_ANON; -#else /* def MAP_ANON */ - {errno = EINVAL; return -1;} -#endif /* ndef MAP_ANON */ - if ((x & Mono_Posix_MmapFlags_MAP_GROWSDOWN) == Mono_Posix_MmapFlags_MAP_GROWSDOWN) -#ifdef MAP_GROWSDOWN - *r |= MAP_GROWSDOWN; -#else /* def MAP_GROWSDOWN */ - {errno = EINVAL; return -1;} -#endif /* ndef MAP_GROWSDOWN */ - if ((x & Mono_Posix_MmapFlags_MAP_DENYWRITE) == Mono_Posix_MmapFlags_MAP_DENYWRITE) -#ifdef MAP_DENYWRITE - *r |= MAP_DENYWRITE; -#else /* def MAP_DENYWRITE */ - {errno = EINVAL; return -1;} -#endif /* ndef MAP_DENYWRITE */ - if ((x & Mono_Posix_MmapFlags_MAP_EXECUTABLE) == Mono_Posix_MmapFlags_MAP_EXECUTABLE) -#ifdef MAP_EXECUTABLE - *r |= MAP_EXECUTABLE; -#else /* def MAP_EXECUTABLE */ - {errno = EINVAL; return -1;} -#endif /* ndef MAP_EXECUTABLE */ - if ((x & Mono_Posix_MmapFlags_MAP_LOCKED) == Mono_Posix_MmapFlags_MAP_LOCKED) -#ifdef MAP_LOCKED - *r |= MAP_LOCKED; -#else /* def MAP_LOCKED */ - {errno = EINVAL; return -1;} -#endif /* ndef MAP_LOCKED */ - if ((x & Mono_Posix_MmapFlags_MAP_NORESERVE) == Mono_Posix_MmapFlags_MAP_NORESERVE) -#ifdef MAP_NORESERVE - *r |= MAP_NORESERVE; -#else /* def MAP_NORESERVE */ - {errno = EINVAL; return -1;} -#endif /* ndef MAP_NORESERVE */ - if ((x & Mono_Posix_MmapFlags_MAP_POPULATE) == Mono_Posix_MmapFlags_MAP_POPULATE) -#ifdef MAP_POPULATE - *r |= MAP_POPULATE; -#else /* def MAP_POPULATE */ - {errno = EINVAL; return -1;} -#endif /* ndef MAP_POPULATE */ - if ((x & Mono_Posix_MmapFlags_MAP_NONBLOCK) == Mono_Posix_MmapFlags_MAP_NONBLOCK) -#ifdef MAP_NONBLOCK - *r |= MAP_NONBLOCK; -#else /* def MAP_NONBLOCK */ - {errno = EINVAL; return -1;} -#endif /* ndef MAP_NONBLOCK */ - return 0; -} - -int Mono_Posix_ToMmapFlags (int x, int *r) -{ - *r = 0; - if (x == 0) - return 0; -#ifdef MAP_SHARED - if ((x & MAP_SHARED) == MAP_SHARED) - *r |= Mono_Posix_MmapFlags_MAP_SHARED; -#endif /* ndef MAP_SHARED */ -#ifdef MAP_PRIVATE - if ((x & MAP_PRIVATE) == MAP_PRIVATE) - *r |= Mono_Posix_MmapFlags_MAP_PRIVATE; -#endif /* ndef MAP_PRIVATE */ -#ifdef MAP_TYPE - if ((x & MAP_TYPE) == MAP_TYPE) - *r |= Mono_Posix_MmapFlags_MAP_TYPE; -#endif /* ndef MAP_TYPE */ -#ifdef MAP_FIXED - if ((x & MAP_FIXED) == MAP_FIXED) - *r |= Mono_Posix_MmapFlags_MAP_FIXED; -#endif /* ndef MAP_FIXED */ -#ifdef MAP_FILE - if ((x & MAP_FILE) == MAP_FILE) - *r |= Mono_Posix_MmapFlags_MAP_FILE; -#endif /* ndef MAP_FILE */ -#ifdef MAP_ANONYMOUS - if ((x & MAP_ANONYMOUS) == MAP_ANONYMOUS) - *r |= Mono_Posix_MmapFlags_MAP_ANONYMOUS; -#endif /* ndef MAP_ANONYMOUS */ -#ifdef MAP_ANON - if ((x & MAP_ANON) == MAP_ANON) - *r |= Mono_Posix_MmapFlags_MAP_ANON; -#endif /* ndef MAP_ANON */ -#ifdef MAP_GROWSDOWN - if ((x & MAP_GROWSDOWN) == MAP_GROWSDOWN) - *r |= Mono_Posix_MmapFlags_MAP_GROWSDOWN; -#endif /* ndef MAP_GROWSDOWN */ -#ifdef MAP_DENYWRITE - if ((x & MAP_DENYWRITE) == MAP_DENYWRITE) - *r |= Mono_Posix_MmapFlags_MAP_DENYWRITE; -#endif /* ndef MAP_DENYWRITE */ -#ifdef MAP_EXECUTABLE - if ((x & MAP_EXECUTABLE) == MAP_EXECUTABLE) - *r |= Mono_Posix_MmapFlags_MAP_EXECUTABLE; -#endif /* ndef MAP_EXECUTABLE */ -#ifdef MAP_LOCKED - if ((x & MAP_LOCKED) == MAP_LOCKED) - *r |= Mono_Posix_MmapFlags_MAP_LOCKED; -#endif /* ndef MAP_LOCKED */ -#ifdef MAP_NORESERVE - if ((x & MAP_NORESERVE) == MAP_NORESERVE) - *r |= Mono_Posix_MmapFlags_MAP_NORESERVE; -#endif /* ndef MAP_NORESERVE */ -#ifdef MAP_POPULATE - if ((x & MAP_POPULATE) == MAP_POPULATE) - *r |= Mono_Posix_MmapFlags_MAP_POPULATE; -#endif /* ndef MAP_POPULATE */ -#ifdef MAP_NONBLOCK - if ((x & MAP_NONBLOCK) == MAP_NONBLOCK) - *r |= Mono_Posix_MmapFlags_MAP_NONBLOCK; -#endif /* ndef MAP_NONBLOCK */ - return 0; -} - -int Mono_Posix_FromMmapProt (int x, int *r) -{ - *r = 0; - if (x == 0) - return 0; - if ((x & Mono_Posix_MmapProt_PROT_READ) == Mono_Posix_MmapProt_PROT_READ) -#ifdef PROT_READ - *r |= PROT_READ; -#else /* def PROT_READ */ - {errno = EINVAL; return -1;} -#endif /* ndef PROT_READ */ - if ((x & Mono_Posix_MmapProt_PROT_WRITE) == Mono_Posix_MmapProt_PROT_WRITE) -#ifdef PROT_WRITE - *r |= PROT_WRITE; -#else /* def PROT_WRITE */ - {errno = EINVAL; return -1;} -#endif /* ndef PROT_WRITE */ - if ((x & Mono_Posix_MmapProt_PROT_EXEC) == Mono_Posix_MmapProt_PROT_EXEC) -#ifdef PROT_EXEC - *r |= PROT_EXEC; -#else /* def PROT_EXEC */ - {errno = EINVAL; return -1;} -#endif /* ndef PROT_EXEC */ - if ((x & Mono_Posix_MmapProt_PROT_NONE) == Mono_Posix_MmapProt_PROT_NONE) -#ifdef PROT_NONE - *r |= PROT_NONE; -#else /* def PROT_NONE */ - {errno = EINVAL; return -1;} -#endif /* ndef PROT_NONE */ - if ((x & Mono_Posix_MmapProt_PROT_GROWSDOWN) == Mono_Posix_MmapProt_PROT_GROWSDOWN) -#ifdef PROT_GROWSDOWN - *r |= PROT_GROWSDOWN; -#else /* def PROT_GROWSDOWN */ - {errno = EINVAL; return -1;} -#endif /* ndef PROT_GROWSDOWN */ - if ((x & Mono_Posix_MmapProt_PROT_GROWSUP) == Mono_Posix_MmapProt_PROT_GROWSUP) -#ifdef PROT_GROWSUP - *r |= PROT_GROWSUP; -#else /* def PROT_GROWSUP */ - {errno = EINVAL; return -1;} -#endif /* ndef PROT_GROWSUP */ - return 0; -} - -int Mono_Posix_ToMmapProt (int x, int *r) -{ - *r = 0; - if (x == 0) - return 0; -#ifdef PROT_READ - if ((x & PROT_READ) == PROT_READ) - *r |= Mono_Posix_MmapProt_PROT_READ; -#endif /* ndef PROT_READ */ -#ifdef PROT_WRITE - if ((x & PROT_WRITE) == PROT_WRITE) - *r |= Mono_Posix_MmapProt_PROT_WRITE; -#endif /* ndef PROT_WRITE */ -#ifdef PROT_EXEC - if ((x & PROT_EXEC) == PROT_EXEC) - *r |= Mono_Posix_MmapProt_PROT_EXEC; -#endif /* ndef PROT_EXEC */ -#ifdef PROT_NONE - if ((x & PROT_NONE) == PROT_NONE) - *r |= Mono_Posix_MmapProt_PROT_NONE; -#endif /* ndef PROT_NONE */ -#ifdef PROT_GROWSDOWN - if ((x & PROT_GROWSDOWN) == PROT_GROWSDOWN) - *r |= Mono_Posix_MmapProt_PROT_GROWSDOWN; -#endif /* ndef PROT_GROWSDOWN */ -#ifdef PROT_GROWSUP - if ((x & PROT_GROWSUP) == PROT_GROWSUP) - *r |= Mono_Posix_MmapProt_PROT_GROWSUP; -#endif /* ndef PROT_GROWSUP */ - return 0; -} - -int Mono_Posix_FromMsyncFlags (int x, int *r) -{ - *r = 0; - if (x == 0) - return 0; - if ((x & Mono_Posix_MsyncFlags_MS_ASYNC) == Mono_Posix_MsyncFlags_MS_ASYNC) -#ifdef MS_ASYNC - *r |= MS_ASYNC; -#else /* def MS_ASYNC */ - {errno = EINVAL; return -1;} -#endif /* ndef MS_ASYNC */ - if ((x & Mono_Posix_MsyncFlags_MS_SYNC) == Mono_Posix_MsyncFlags_MS_SYNC) -#ifdef MS_SYNC - *r |= MS_SYNC; -#else /* def MS_SYNC */ - {errno = EINVAL; return -1;} -#endif /* ndef MS_SYNC */ - if ((x & Mono_Posix_MsyncFlags_MS_INVALIDATE) == Mono_Posix_MsyncFlags_MS_INVALIDATE) -#ifdef MS_INVALIDATE - *r |= MS_INVALIDATE; -#else /* def MS_INVALIDATE */ - {errno = EINVAL; return -1;} -#endif /* ndef MS_INVALIDATE */ - return 0; -} - -int Mono_Posix_ToMsyncFlags (int x, int *r) -{ - *r = 0; - if (x == 0) - return 0; -#ifdef MS_ASYNC - if ((x & MS_ASYNC) == MS_ASYNC) - *r |= Mono_Posix_MsyncFlags_MS_ASYNC; -#endif /* ndef MS_ASYNC */ -#ifdef MS_SYNC - if ((x & MS_SYNC) == MS_SYNC) - *r |= Mono_Posix_MsyncFlags_MS_SYNC; -#endif /* ndef MS_SYNC */ -#ifdef MS_INVALIDATE - if ((x & MS_INVALIDATE) == MS_INVALIDATE) - *r |= Mono_Posix_MsyncFlags_MS_INVALIDATE; -#endif /* ndef MS_INVALIDATE */ - return 0; -} - -int Mono_Posix_FromMlockallFlags (int x, int *r) -{ - *r = 0; - if (x == 0) - return 0; - if ((x & Mono_Posix_MlockallFlags_MCL_CURRENT) == Mono_Posix_MlockallFlags_MCL_CURRENT) -#ifdef MCL_CURRENT - *r |= MCL_CURRENT; -#else /* def MCL_CURRENT */ - {errno = EINVAL; return -1;} -#endif /* ndef MCL_CURRENT */ - if ((x & Mono_Posix_MlockallFlags_MCL_FUTURE) == Mono_Posix_MlockallFlags_MCL_FUTURE) -#ifdef MCL_FUTURE - *r |= MCL_FUTURE; -#else /* def MCL_FUTURE */ - {errno = EINVAL; return -1;} -#endif /* ndef MCL_FUTURE */ - return 0; -} - -int Mono_Posix_ToMlockallFlags (int x, int *r) -{ - *r = 0; - if (x == 0) - return 0; -#ifdef MCL_CURRENT - if ((x & MCL_CURRENT) == MCL_CURRENT) - *r |= Mono_Posix_MlockallFlags_MCL_CURRENT; -#endif /* ndef MCL_CURRENT */ -#ifdef MCL_FUTURE - if ((x & MCL_FUTURE) == MCL_FUTURE) - *r |= Mono_Posix_MlockallFlags_MCL_FUTURE; -#endif /* ndef MCL_FUTURE */ - return 0; -} - -int Mono_Posix_FromMremapFlags (guint64 x, guint64 *r) -{ - *r = 0; - if (x == 0) - return 0; - if ((x & Mono_Posix_MremapFlags_MREMAP_MAYMOVE) == Mono_Posix_MremapFlags_MREMAP_MAYMOVE) -#ifdef MREMAP_MAYMOVE - *r |= MREMAP_MAYMOVE; -#else /* def MREMAP_MAYMOVE */ - {errno = EINVAL; return -1;} -#endif /* ndef MREMAP_MAYMOVE */ - return 0; -} - -int Mono_Posix_ToMremapFlags (guint64 x, guint64 *r) -{ - *r = 0; - if (x == 0) - return 0; -#ifdef MREMAP_MAYMOVE - if ((x & MREMAP_MAYMOVE) == MREMAP_MAYMOVE) - *r |= Mono_Posix_MremapFlags_MREMAP_MAYMOVE; -#endif /* ndef MREMAP_MAYMOVE */ - return 0; -} - diff --git a/support/map.h b/support/map.h index 676d8b132c7..20cc17e1379 100644 --- a/support/map.h +++ b/support/map.h @@ -12,628 +12,825 @@ G_BEGIN_DECLS -#define Mono_Posix_Error_EPERM 0x00000001 -#define Mono_Posix_Error_ENOENT 0x00000002 -#define Mono_Posix_Error_ESRCH 0x00000003 -#define Mono_Posix_Error_EINTR 0x00000004 -#define Mono_Posix_Error_EIO 0x00000005 -#define Mono_Posix_Error_ENXIO 0x00000006 +#define Mono_Posix_AccessMode_F_OK 0x00000008 +#define Mono_Posix_AccessMode_R_OK 0x00000001 +#define Mono_Posix_AccessMode_W_OK 0x00000002 +#define Mono_Posix_AccessMode_X_OK 0x00000004 +int Mono_Posix_FromAccessMode (int x, int *r); +int Mono_Posix_ToAccessMode (int x, int *r); + #define Mono_Posix_Error_E2BIG 0x00000007 -#define Mono_Posix_Error_ENOEXEC 0x00000008 -#define Mono_Posix_Error_EBADF 0x00000009 -#define Mono_Posix_Error_ECHILD 0x0000000a -#define Mono_Posix_Error_EAGAIN 0x0000000b -#define Mono_Posix_Error_ENOMEM 0x0000000c #define Mono_Posix_Error_EACCES 0x0000000d -#define Mono_Posix_Error_EFAULT 0x0000000e -#define Mono_Posix_Error_ENOTBLK 0x0000000f -#define Mono_Posix_Error_EBUSY 0x00000010 -#define Mono_Posix_Error_EEXIST 0x00000011 -#define Mono_Posix_Error_EXDEV 0x00000012 -#define Mono_Posix_Error_ENODEV 0x00000013 -#define Mono_Posix_Error_ENOTDIR 0x00000014 -#define Mono_Posix_Error_EISDIR 0x00000015 -#define Mono_Posix_Error_EINVAL 0x00000016 -#define Mono_Posix_Error_ENFILE 0x00000017 -#define Mono_Posix_Error_EMFILE 0x00000018 -#define Mono_Posix_Error_ENOTTY 0x00000019 -#define Mono_Posix_Error_ETXTBSY 0x0000001a -#define Mono_Posix_Error_EFBIG 0x0000001b -#define Mono_Posix_Error_ENOSPC 0x0000001c -#define Mono_Posix_Error_ESPIPE 0x0000001d -#define Mono_Posix_Error_EROFS 0x0000001e -#define Mono_Posix_Error_EMLINK 0x0000001f -#define Mono_Posix_Error_EPIPE 0x00000020 -#define Mono_Posix_Error_EDOM 0x00000021 -#define Mono_Posix_Error_ERANGE 0x00000022 -#define Mono_Posix_Error_EDEADLK 0x00000023 -#define Mono_Posix_Error_ENAMETOOLONG 0x00000024 -#define Mono_Posix_Error_ENOLCK 0x00000025 -#define Mono_Posix_Error_ENOSYS 0x00000026 -#define Mono_Posix_Error_ENOTEMPTY 0x00000027 -#define Mono_Posix_Error_ELOOP 0x00000028 -#define Mono_Posix_Error_EWOULDBLOCK 0x0000000b -#define Mono_Posix_Error_ENOMSG 0x0000002a -#define Mono_Posix_Error_EIDRM 0x0000002b -#define Mono_Posix_Error_ECHRNG 0x0000002c -#define Mono_Posix_Error_EL2NSYNC 0x0000002d -#define Mono_Posix_Error_EL3HLT 0x0000002e -#define Mono_Posix_Error_EL3RST 0x0000002f -#define Mono_Posix_Error_ELNRNG 0x00000030 -#define Mono_Posix_Error_EUNATCH 0x00000031 -#define Mono_Posix_Error_ENOCSI 0x00000032 -#define Mono_Posix_Error_EL2HLT 0x00000033 +#define Mono_Posix_Error_EADDRINUSE 0x00000062 +#define Mono_Posix_Error_EADDRNOTAVAIL 0x00000063 +#define Mono_Posix_Error_EADV 0x00000044 +#define Mono_Posix_Error_EAFNOSUPPORT 0x00000061 +#define Mono_Posix_Error_EAGAIN 0x0000000b +#define Mono_Posix_Error_EALREADY 0x00000072 #define Mono_Posix_Error_EBADE 0x00000034 +#define Mono_Posix_Error_EBADF 0x00000009 +#define Mono_Posix_Error_EBADFD 0x0000004d +#define Mono_Posix_Error_EBADMSG 0x0000004a #define Mono_Posix_Error_EBADR 0x00000035 -#define Mono_Posix_Error_EXFULL 0x00000036 -#define Mono_Posix_Error_ENOANO 0x00000037 #define Mono_Posix_Error_EBADRQC 0x00000038 #define Mono_Posix_Error_EBADSLT 0x00000039 -#define Mono_Posix_Error_EDEADLOCK 0x00000023 #define Mono_Posix_Error_EBFONT 0x0000003b -#define Mono_Posix_Error_ENOSTR 0x0000003c -#define Mono_Posix_Error_ENODATA 0x0000003d -#define Mono_Posix_Error_ETIME 0x0000003e -#define Mono_Posix_Error_ENOSR 0x0000003f -#define Mono_Posix_Error_ENONET 0x00000040 -#define Mono_Posix_Error_ENOPKG 0x00000041 -#define Mono_Posix_Error_EREMOTE 0x00000042 -#define Mono_Posix_Error_ENOLINK 0x00000043 -#define Mono_Posix_Error_EADV 0x00000044 -#define Mono_Posix_Error_ESRMNT 0x00000045 +#define Mono_Posix_Error_EBUSY 0x00000010 +#define Mono_Posix_Error_ECHILD 0x0000000a +#define Mono_Posix_Error_ECHRNG 0x0000002c #define Mono_Posix_Error_ECOMM 0x00000046 -#define Mono_Posix_Error_EPROTO 0x00000047 -#define Mono_Posix_Error_EMULTIHOP 0x00000048 +#define Mono_Posix_Error_ECONNABORTED 0x00000067 +#define Mono_Posix_Error_ECONNREFUSED 0x0000006f +#define Mono_Posix_Error_ECONNRESET 0x00000068 +#define Mono_Posix_Error_EDEADLK 0x00000023 +#define Mono_Posix_Error_EDEADLOCK 0x00000023 +#define Mono_Posix_Error_EDESTADDRREQ 0x00000059 +#define Mono_Posix_Error_EDOM 0x00000021 #define Mono_Posix_Error_EDOTDOT 0x00000049 -#define Mono_Posix_Error_EBADMSG 0x0000004a -#define Mono_Posix_Error_EOVERFLOW 0x0000004b -#define Mono_Posix_Error_ENOTUNIQ 0x0000004c -#define Mono_Posix_Error_EBADFD 0x0000004d -#define Mono_Posix_Error_EREMCHG 0x0000004e +#define Mono_Posix_Error_EDQUOT 0x0000007a +#define Mono_Posix_Error_EEXIST 0x00000011 +#define Mono_Posix_Error_EFAULT 0x0000000e +#define Mono_Posix_Error_EFBIG 0x0000001b +#define Mono_Posix_Error_EHOSTDOWN 0x00000070 +#define Mono_Posix_Error_EHOSTUNREACH 0x00000071 +#define Mono_Posix_Error_EIDRM 0x0000002b +#define Mono_Posix_Error_EILSEQ 0x00000054 +#define Mono_Posix_Error_EINPROGRESS 0x00000073 +#define Mono_Posix_Error_EINTR 0x00000004 +#define Mono_Posix_Error_EINVAL 0x00000016 +#define Mono_Posix_Error_EIO 0x00000005 +#define Mono_Posix_Error_EISCONN 0x0000006a +#define Mono_Posix_Error_EISDIR 0x00000015 +#define Mono_Posix_Error_EISNAM 0x00000078 +#define Mono_Posix_Error_EL2HLT 0x00000033 +#define Mono_Posix_Error_EL2NSYNC 0x0000002d +#define Mono_Posix_Error_EL3HLT 0x0000002e +#define Mono_Posix_Error_EL3RST 0x0000002f #define Mono_Posix_Error_ELIBACC 0x0000004f #define Mono_Posix_Error_ELIBBAD 0x00000050 -#define Mono_Posix_Error_ELIBSCN 0x00000051 -#define Mono_Posix_Error_ELIBMAX 0x00000052 #define Mono_Posix_Error_ELIBEXEC 0x00000053 -#define Mono_Posix_Error_EILSEQ 0x00000054 -#define Mono_Posix_Error_ERESTART 0x00000055 -#define Mono_Posix_Error_ESTRPIPE 0x00000056 -#define Mono_Posix_Error_EUSERS 0x00000057 -#define Mono_Posix_Error_ENOTSOCK 0x00000058 -#define Mono_Posix_Error_EDESTADDRREQ 0x00000059 +#define Mono_Posix_Error_ELIBMAX 0x00000052 +#define Mono_Posix_Error_ELIBSCN 0x00000051 +#define Mono_Posix_Error_ELNRNG 0x00000030 +#define Mono_Posix_Error_ELOOP 0x00000028 +#define Mono_Posix_Error_EMEDIUMTYPE 0x0000007c +#define Mono_Posix_Error_EMFILE 0x00000018 +#define Mono_Posix_Error_EMLINK 0x0000001f #define Mono_Posix_Error_EMSGSIZE 0x0000005a -#define Mono_Posix_Error_EPROTOTYPE 0x0000005b -#define Mono_Posix_Error_ENOPROTOOPT 0x0000005c -#define Mono_Posix_Error_EPROTONOSUPPORT 0x0000005d -#define Mono_Posix_Error_ESOCKTNOSUPPORT 0x0000005e -#define Mono_Posix_Error_EOPNOTSUPP 0x0000005f -#define Mono_Posix_Error_EPFNOSUPPORT 0x00000060 -#define Mono_Posix_Error_EAFNOSUPPORT 0x00000061 -#define Mono_Posix_Error_EADDRINUSE 0x00000062 -#define Mono_Posix_Error_EADDRNOTAVAIL 0x00000063 +#define Mono_Posix_Error_EMULTIHOP 0x00000048 +#define Mono_Posix_Error_ENAMETOOLONG 0x00000024 +#define Mono_Posix_Error_ENAVAIL 0x00000077 #define Mono_Posix_Error_ENETDOWN 0x00000064 -#define Mono_Posix_Error_ENETUNREACH 0x00000065 #define Mono_Posix_Error_ENETRESET 0x00000066 -#define Mono_Posix_Error_ECONNABORTED 0x00000067 -#define Mono_Posix_Error_ECONNRESET 0x00000068 +#define Mono_Posix_Error_ENETUNREACH 0x00000065 +#define Mono_Posix_Error_ENFILE 0x00000017 +#define Mono_Posix_Error_ENOANO 0x00000037 #define Mono_Posix_Error_ENOBUFS 0x00000069 -#define Mono_Posix_Error_EISCONN 0x0000006a +#define Mono_Posix_Error_ENOCSI 0x00000032 +#define Mono_Posix_Error_ENODATA 0x0000003d +#define Mono_Posix_Error_ENODEV 0x00000013 +#define Mono_Posix_Error_ENOENT 0x00000002 +#define Mono_Posix_Error_ENOEXEC 0x00000008 +#define Mono_Posix_Error_ENOLCK 0x00000025 +#define Mono_Posix_Error_ENOLINK 0x00000043 +#define Mono_Posix_Error_ENOMEDIUM 0x0000007b +#define Mono_Posix_Error_ENOMEM 0x0000000c +#define Mono_Posix_Error_ENOMSG 0x0000002a +#define Mono_Posix_Error_ENONET 0x00000040 +#define Mono_Posix_Error_ENOPKG 0x00000041 +#define Mono_Posix_Error_ENOPROTOOPT 0x0000005c +#define Mono_Posix_Error_ENOSPC 0x0000001c +#define Mono_Posix_Error_ENOSR 0x0000003f +#define Mono_Posix_Error_ENOSTR 0x0000003c +#define Mono_Posix_Error_ENOSYS 0x00000026 +#define Mono_Posix_Error_ENOTBLK 0x0000000f #define Mono_Posix_Error_ENOTCONN 0x0000006b +#define Mono_Posix_Error_ENOTDIR 0x00000014 +#define Mono_Posix_Error_ENOTEMPTY 0x00000027 +#define Mono_Posix_Error_ENOTNAM 0x00000076 +#define Mono_Posix_Error_ENOTSOCK 0x00000058 +#define Mono_Posix_Error_ENOTTY 0x00000019 +#define Mono_Posix_Error_ENOTUNIQ 0x0000004c +#define Mono_Posix_Error_ENXIO 0x00000006 +#define Mono_Posix_Error_EOPNOTSUPP 0x0000005f +#define Mono_Posix_Error_EOVERFLOW 0x0000004b +#define Mono_Posix_Error_EPERM 0x00000001 +#define Mono_Posix_Error_EPFNOSUPPORT 0x00000060 +#define Mono_Posix_Error_EPIPE 0x00000020 +#define Mono_Posix_Error_EPROTO 0x00000047 +#define Mono_Posix_Error_EPROTONOSUPPORT 0x0000005d +#define Mono_Posix_Error_EPROTOTYPE 0x0000005b +#define Mono_Posix_Error_ERANGE 0x00000022 +#define Mono_Posix_Error_EREMCHG 0x0000004e +#define Mono_Posix_Error_EREMOTE 0x00000042 +#define Mono_Posix_Error_EREMOTEIO 0x00000079 +#define Mono_Posix_Error_ERESTART 0x00000055 +#define Mono_Posix_Error_EROFS 0x0000001e #define Mono_Posix_Error_ESHUTDOWN 0x0000006c -#define Mono_Posix_Error_ETOOMANYREFS 0x0000006d -#define Mono_Posix_Error_ETIMEDOUT 0x0000006e -#define Mono_Posix_Error_ECONNREFUSED 0x0000006f -#define Mono_Posix_Error_EHOSTDOWN 0x00000070 -#define Mono_Posix_Error_EHOSTUNREACH 0x00000071 -#define Mono_Posix_Error_EALREADY 0x00000072 -#define Mono_Posix_Error_EINPROGRESS 0x00000073 +#define Mono_Posix_Error_ESOCKTNOSUPPORT 0x0000005e +#define Mono_Posix_Error_ESPIPE 0x0000001d +#define Mono_Posix_Error_ESRCH 0x00000003 +#define Mono_Posix_Error_ESRMNT 0x00000045 #define Mono_Posix_Error_ESTALE 0x00000074 +#define Mono_Posix_Error_ESTRPIPE 0x00000056 +#define Mono_Posix_Error_ETIME 0x0000003e +#define Mono_Posix_Error_ETIMEDOUT 0x0000006e +#define Mono_Posix_Error_ETOOMANYREFS 0x0000006d +#define Mono_Posix_Error_ETXTBSY 0x0000001a #define Mono_Posix_Error_EUCLEAN 0x00000075 -#define Mono_Posix_Error_ENOTNAM 0x00000076 -#define Mono_Posix_Error_ENAVAIL 0x00000077 -#define Mono_Posix_Error_EISNAM 0x00000078 -#define Mono_Posix_Error_EREMOTEIO 0x00000079 -#define Mono_Posix_Error_EDQUOT 0x0000007a -#define Mono_Posix_Error_ENOMEDIUM 0x0000007b -#define Mono_Posix_Error_EMEDIUMTYPE 0x0000007c +#define Mono_Posix_Error_EUNATCH 0x00000031 +#define Mono_Posix_Error_EUSERS 0x00000057 +#define Mono_Posix_Error_EWOULDBLOCK 0x0000000b +#define Mono_Posix_Error_EXDEV 0x00000012 +#define Mono_Posix_Error_EXFULL 0x00000036 int Mono_Posix_FromError (int x, int *r); int Mono_Posix_ToError (int x, int *r); -#define Mono_Posix_SyslogOptions_LOG_PID 0x00000001 -#define Mono_Posix_SyslogOptions_LOG_CONS 0x00000002 -#define Mono_Posix_SyslogOptions_LOG_ODELAY 0x00000004 -#define Mono_Posix_SyslogOptions_LOG_NDELAY 0x00000008 -#define Mono_Posix_SyslogOptions_LOG_NOWAIT 0x00000010 -#define Mono_Posix_SyslogOptions_LOG_PERROR 0x00000020 -int Mono_Posix_FromSyslogOptions (int x, int *r); -int Mono_Posix_ToSyslogOptions (int x, int *r); +#define Mono_Posix_MmapProt_PROT_EXEC 0x00000004 +#define Mono_Posix_MmapProt_PROT_GROWSDOWN 0x01000000 +#define Mono_Posix_MmapProt_PROT_GROWSUP 0x02000000 +#define Mono_Posix_MmapProt_PROT_NONE 0x00000000 +#define Mono_Posix_MmapProt_PROT_READ 0x00000001 +#define Mono_Posix_MmapProt_PROT_WRITE 0x00000002 +int Mono_Posix_FromMmapProt (int x, int *r); +int Mono_Posix_ToMmapProt (int x, int *r); -#define Mono_Posix_SyslogFacility_LOG_KERN 0x00000000 -#define Mono_Posix_SyslogFacility_LOG_USER 0x00000008 -#define Mono_Posix_SyslogFacility_LOG_USRE 0x00000008 -#define Mono_Posix_SyslogFacility_LOG_MAIL 0x00000010 -#define Mono_Posix_SyslogFacility_LOG_DAEMON 0x00000018 -#define Mono_Posix_SyslogFacility_LOG_AUTH 0x00000020 -#define Mono_Posix_SyslogFacility_LOG_SYSLOG 0x00000028 -#define Mono_Posix_SyslogFacility_LOG_LPR 0x00000030 -#define Mono_Posix_SyslogFacility_LOG_NEWS 0x00000038 -#define Mono_Posix_SyslogFacility_LOG_UUCP 0x00000040 -#define Mono_Posix_SyslogFacility_LOG_CRON 0x00000048 -#define Mono_Posix_SyslogFacility_LOG_AUTHPRIV 0x00000050 -#define Mono_Posix_SyslogFacility_LOG_FTP 0x00000058 -#define Mono_Posix_SyslogFacility_LOG_LOCAL0 0x00000080 -#define Mono_Posix_SyslogFacility_LOG_LOCAL1 0x00000088 -#define Mono_Posix_SyslogFacility_LOG_LOCAL2 0x00000090 -#define Mono_Posix_SyslogFacility_LOG_LOCAL3 0x00000098 -#define Mono_Posix_SyslogFacility_LOG_LOCAL4 0x000000a0 -#define Mono_Posix_SyslogFacility_LOG_LOCAL5 0x000000a8 -#define Mono_Posix_SyslogFacility_LOG_LOCAL6 0x000000b0 -#define Mono_Posix_SyslogFacility_LOG_LOCAL7 0x000000b8 -int Mono_Posix_FromSyslogFacility (int x, int *r); -int Mono_Posix_ToSyslogFacility (int x, int *r); +#define Mono_Posix_AccessModes_F_OK 0x00000008 +#define Mono_Posix_AccessModes_R_OK 0x00000001 +#define Mono_Posix_AccessModes_W_OK 0x00000002 +#define Mono_Posix_AccessModes_X_OK 0x00000004 +int Mono_Posix_FromAccessModes (int x, int *r); +int Mono_Posix_ToAccessModes (int x, int *r); -#define Mono_Posix_SyslogLevel_LOG_EMERG 0x00000000 -#define Mono_Posix_SyslogLevel_LOG_ALERT 0x00000001 -#define Mono_Posix_SyslogLevel_LOG_CRIT 0x00000002 -#define Mono_Posix_SyslogLevel_LOG_ERR 0x00000003 -#define Mono_Posix_SyslogLevel_LOG_WARNING 0x00000004 -#define Mono_Posix_SyslogLevel_LOG_NOTICE 0x00000005 -#define Mono_Posix_SyslogLevel_LOG_INFO 0x00000006 -#define Mono_Posix_SyslogLevel_LOG_DEBUG 0x00000007 -int Mono_Posix_FromSyslogLevel (int x, int *r); -int Mono_Posix_ToSyslogLevel (int x, int *r); +#define Mono_Posix_ConfStr__CS_GNU_LIBC_VERSION 0x00000002 +#define Mono_Posix_ConfStr__CS_GNU_LIBPTHREAD_VERSION 0x00000003 +#define Mono_Posix_ConfStr__CS_LFS64_CFLAGS 0x000003ec +#define Mono_Posix_ConfStr__CS_LFS64_LDFLAGS 0x000003ed +#define Mono_Posix_ConfStr__CS_LFS64_LIBS 0x000003ee +#define Mono_Posix_ConfStr__CS_LFS64_LINTFLAGS 0x000003ef +#define Mono_Posix_ConfStr__CS_LFS_CFLAGS 0x000003e8 +#define Mono_Posix_ConfStr__CS_LFS_LDFLAGS 0x000003e9 +#define Mono_Posix_ConfStr__CS_LFS_LIBS 0x000003ea +#define Mono_Posix_ConfStr__CS_LFS_LINTFLAGS 0x000003eb +#define Mono_Posix_ConfStr__CS_PATH 0x00000000 +#define Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_CFLAGS 0x0000045c +#define Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LDFLAGS 0x0000045d +#define Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LIBS 0x0000045e +#define Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LINTFLAGS 0x0000045f +#define Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 0x00000460 +#define Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 0x00000461 +#define Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LIBS 0x00000462 +#define Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS 0x00000463 +#define Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_CFLAGS 0x00000464 +#define Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LDFLAGS 0x00000465 +#define Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LIBS 0x00000466 +#define Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LINTFLAGS 0x00000467 +#define Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 0x00000468 +#define Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 0x00000469 +#define Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LIBS 0x0000046a +#define Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS 0x0000046b +#define Mono_Posix_ConfStr__CS_V6_WIDTH_RESTRICTED_ENVS 0x00000001 +#define Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_CFLAGS 0x0000044c +#define Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LDFLAGS 0x0000044d +#define Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LIBS 0x0000044e +#define Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LINTFLAGS 0x0000044f +#define Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_CFLAGS 0x00000450 +#define Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LDFLAGS 0x00000451 +#define Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LIBS 0x00000452 +#define Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LINTFLAGS 0x00000453 +#define Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_CFLAGS 0x00000454 +#define Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LDFLAGS 0x00000455 +#define Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LIBS 0x00000456 +#define Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LINTFLAGS 0x00000457 +#define Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_CFLAGS 0x00000458 +#define Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LDFLAGS 0x00000459 +#define Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LIBS 0x0000045a +#define Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LINTFLAGS 0x0000045b +int Mono_Posix_FromConfStr (int x, int *r); +int Mono_Posix_ToConfStr (int x, int *r); -#define Mono_Posix_OpenFlags_O_RDONLY 0x00000000 -#define Mono_Posix_OpenFlags_O_WRONLY 0x00000001 -#define Mono_Posix_OpenFlags_O_RDWR 0x00000002 -#define Mono_Posix_OpenFlags_O_CREAT 0x00000040 -#define Mono_Posix_OpenFlags_O_EXCL 0x00000080 -#define Mono_Posix_OpenFlags_O_NOCTTY 0x00000100 -#define Mono_Posix_OpenFlags_O_TRUNC 0x00000200 -#define Mono_Posix_OpenFlags_O_APPEND 0x00000400 -#define Mono_Posix_OpenFlags_O_NONBLOCK 0x00000800 -#define Mono_Posix_OpenFlags_O_SYNC 0x00001000 -#define Mono_Posix_OpenFlags_O_NOFOLLOW 0x00020000 -#define Mono_Posix_OpenFlags_O_DIRECTORY 0x00010000 -#define Mono_Posix_OpenFlags_O_DIRECT 0x00004000 -#define Mono_Posix_OpenFlags_O_ASYNC 0x00002000 -#define Mono_Posix_OpenFlags_O_LARGEFILE 0x00008000 -int Mono_Posix_FromOpenFlags (int x, int *r); -int Mono_Posix_ToOpenFlags (int x, int *r); +#define Mono_Posix_DirectoryNotifyFlags_DN_ACCESS 0x00000001 +#define Mono_Posix_DirectoryNotifyFlags_DN_ATTRIB 0x00000020 +#define Mono_Posix_DirectoryNotifyFlags_DN_CREATE 0x00000004 +#define Mono_Posix_DirectoryNotifyFlags_DN_DELETE 0x00000008 +#define Mono_Posix_DirectoryNotifyFlags_DN_MODIFY 0x00000002 +#define Mono_Posix_DirectoryNotifyFlags_DN_MULTISHOT 0x80000000 +#define Mono_Posix_DirectoryNotifyFlags_DN_RENAME 0x00000010 +int Mono_Posix_FromDirectoryNotifyFlags (int x, int *r); +int Mono_Posix_ToDirectoryNotifyFlags (int x, int *r); -#define Mono_Posix_FilePermissions_S_ISUID 0x00000800 -#define Mono_Posix_FilePermissions_S_ISGID 0x00000400 -#define Mono_Posix_FilePermissions_S_ISVTX 0x00000200 -#define Mono_Posix_FilePermissions_S_IRUSR 0x00000100 -#define Mono_Posix_FilePermissions_S_IWUSR 0x00000080 -#define Mono_Posix_FilePermissions_S_IXUSR 0x00000040 -#define Mono_Posix_FilePermissions_S_IRGRP 0x00000020 -#define Mono_Posix_FilePermissions_S_IWGRP 0x00000010 -#define Mono_Posix_FilePermissions_S_IXGRP 0x00000008 -#define Mono_Posix_FilePermissions_S_IROTH 0x00000004 -#define Mono_Posix_FilePermissions_S_IWOTH 0x00000002 -#define Mono_Posix_FilePermissions_S_IXOTH 0x00000001 -#define Mono_Posix_FilePermissions_S_IRWXG 0x00000038 -#define Mono_Posix_FilePermissions_S_IRWXU 0x000001c0 -#define Mono_Posix_FilePermissions_S_IRWXO 0x00000007 -#define Mono_Posix_FilePermissions_ACCESSPERMS 0x000001ff -#define Mono_Posix_FilePermissions_ALLPERMS 0x00000fff -#define Mono_Posix_FilePermissions_DEFFILEMODE 0x000001b6 -#define Mono_Posix_FilePermissions_S_IFMT 0x0000f000 -#define Mono_Posix_FilePermissions_S_IFDIR 0x00004000 -#define Mono_Posix_FilePermissions_S_IFCHR 0x00002000 -#define Mono_Posix_FilePermissions_S_IFBLK 0x00006000 -#define Mono_Posix_FilePermissions_S_IFREG 0x00008000 -#define Mono_Posix_FilePermissions_S_IFIFO 0x00001000 -#define Mono_Posix_FilePermissions_S_IFLNK 0x0000a000 -#define Mono_Posix_FilePermissions_S_IFSOCK 0x0000c000 -int Mono_Posix_FromFilePermissions (unsigned int x, unsigned int *r); -int Mono_Posix_ToFilePermissions (unsigned int x, unsigned int *r); +#define Mono_Posix_Errno_E2BIG 0x00000007 +#define Mono_Posix_Errno_EACCES 0x0000000d +#define Mono_Posix_Errno_EADDRINUSE 0x00000062 +#define Mono_Posix_Errno_EADDRNOTAVAIL 0x00000063 +#define Mono_Posix_Errno_EADV 0x00000044 +#define Mono_Posix_Errno_EAFNOSUPPORT 0x00000061 +#define Mono_Posix_Errno_EAGAIN 0x0000000b +#define Mono_Posix_Errno_EALREADY 0x00000072 +#define Mono_Posix_Errno_EBADE 0x00000034 +#define Mono_Posix_Errno_EBADF 0x00000009 +#define Mono_Posix_Errno_EBADFD 0x0000004d +#define Mono_Posix_Errno_EBADMSG 0x0000004a +#define Mono_Posix_Errno_EBADR 0x00000035 +#define Mono_Posix_Errno_EBADRQC 0x00000038 +#define Mono_Posix_Errno_EBADSLT 0x00000039 +#define Mono_Posix_Errno_EBFONT 0x0000003b +#define Mono_Posix_Errno_EBUSY 0x00000010 +#define Mono_Posix_Errno_ECHILD 0x0000000a +#define Mono_Posix_Errno_ECHRNG 0x0000002c +#define Mono_Posix_Errno_ECOMM 0x00000046 +#define Mono_Posix_Errno_ECONNABORTED 0x00000067 +#define Mono_Posix_Errno_ECONNREFUSED 0x0000006f +#define Mono_Posix_Errno_ECONNRESET 0x00000068 +#define Mono_Posix_Errno_EDEADLK 0x00000023 +#define Mono_Posix_Errno_EDEADLOCK 0x00000023 +#define Mono_Posix_Errno_EDESTADDRREQ 0x00000059 +#define Mono_Posix_Errno_EDOM 0x00000021 +#define Mono_Posix_Errno_EDOTDOT 0x00000049 +#define Mono_Posix_Errno_EDQUOT 0x0000007a +#define Mono_Posix_Errno_EEXIST 0x00000011 +#define Mono_Posix_Errno_EFAULT 0x0000000e +#define Mono_Posix_Errno_EFBIG 0x0000001b +#define Mono_Posix_Errno_EHOSTDOWN 0x00000070 +#define Mono_Posix_Errno_EHOSTUNREACH 0x00000071 +#define Mono_Posix_Errno_EIDRM 0x0000002b +#define Mono_Posix_Errno_EILSEQ 0x00000054 +#define Mono_Posix_Errno_EINPROGRESS 0x00000073 +#define Mono_Posix_Errno_EINTR 0x00000004 +#define Mono_Posix_Errno_EINVAL 0x00000016 +#define Mono_Posix_Errno_EIO 0x00000005 +#define Mono_Posix_Errno_EISCONN 0x0000006a +#define Mono_Posix_Errno_EISDIR 0x00000015 +#define Mono_Posix_Errno_EISNAM 0x00000078 +#define Mono_Posix_Errno_EL2HLT 0x00000033 +#define Mono_Posix_Errno_EL2NSYNC 0x0000002d +#define Mono_Posix_Errno_EL3HLT 0x0000002e +#define Mono_Posix_Errno_EL3RST 0x0000002f +#define Mono_Posix_Errno_ELIBACC 0x0000004f +#define Mono_Posix_Errno_ELIBBAD 0x00000050 +#define Mono_Posix_Errno_ELIBEXEC 0x00000053 +#define Mono_Posix_Errno_ELIBMAX 0x00000052 +#define Mono_Posix_Errno_ELIBSCN 0x00000051 +#define Mono_Posix_Errno_ELNRNG 0x00000030 +#define Mono_Posix_Errno_ELOOP 0x00000028 +#define Mono_Posix_Errno_EMEDIUMTYPE 0x0000007c +#define Mono_Posix_Errno_EMFILE 0x00000018 +#define Mono_Posix_Errno_EMLINK 0x0000001f +#define Mono_Posix_Errno_EMSGSIZE 0x0000005a +#define Mono_Posix_Errno_EMULTIHOP 0x00000048 +#define Mono_Posix_Errno_ENAMETOOLONG 0x00000024 +#define Mono_Posix_Errno_ENAVAIL 0x00000077 +#define Mono_Posix_Errno_ENETDOWN 0x00000064 +#define Mono_Posix_Errno_ENETRESET 0x00000066 +#define Mono_Posix_Errno_ENETUNREACH 0x00000065 +#define Mono_Posix_Errno_ENFILE 0x00000017 +#define Mono_Posix_Errno_ENOANO 0x00000037 +#define Mono_Posix_Errno_ENOBUFS 0x00000069 +#define Mono_Posix_Errno_ENOCSI 0x00000032 +#define Mono_Posix_Errno_ENODATA 0x0000003d +#define Mono_Posix_Errno_ENODEV 0x00000013 +#define Mono_Posix_Errno_ENOENT 0x00000002 +#define Mono_Posix_Errno_ENOEXEC 0x00000008 +#define Mono_Posix_Errno_ENOLCK 0x00000025 +#define Mono_Posix_Errno_ENOLINK 0x00000043 +#define Mono_Posix_Errno_ENOMEDIUM 0x0000007b +#define Mono_Posix_Errno_ENOMEM 0x0000000c +#define Mono_Posix_Errno_ENOMSG 0x0000002a +#define Mono_Posix_Errno_ENONET 0x00000040 +#define Mono_Posix_Errno_ENOPKG 0x00000041 +#define Mono_Posix_Errno_ENOPROTOOPT 0x0000005c +#define Mono_Posix_Errno_ENOSPC 0x0000001c +#define Mono_Posix_Errno_ENOSR 0x0000003f +#define Mono_Posix_Errno_ENOSTR 0x0000003c +#define Mono_Posix_Errno_ENOSYS 0x00000026 +#define Mono_Posix_Errno_ENOTBLK 0x0000000f +#define Mono_Posix_Errno_ENOTCONN 0x0000006b +#define Mono_Posix_Errno_ENOTDIR 0x00000014 +#define Mono_Posix_Errno_ENOTEMPTY 0x00000027 +#define Mono_Posix_Errno_ENOTNAM 0x00000076 +#define Mono_Posix_Errno_ENOTSOCK 0x00000058 +#define Mono_Posix_Errno_ENOTTY 0x00000019 +#define Mono_Posix_Errno_ENOTUNIQ 0x0000004c +#define Mono_Posix_Errno_ENXIO 0x00000006 +#define Mono_Posix_Errno_EOPNOTSUPP 0x0000005f +#define Mono_Posix_Errno_EOVERFLOW 0x0000004b +#define Mono_Posix_Errno_EPERM 0x00000001 +#define Mono_Posix_Errno_EPFNOSUPPORT 0x00000060 +#define Mono_Posix_Errno_EPIPE 0x00000020 +#define Mono_Posix_Errno_EPROTO 0x00000047 +#define Mono_Posix_Errno_EPROTONOSUPPORT 0x0000005d +#define Mono_Posix_Errno_EPROTOTYPE 0x0000005b +#define Mono_Posix_Errno_ERANGE 0x00000022 +#define Mono_Posix_Errno_EREMCHG 0x0000004e +#define Mono_Posix_Errno_EREMOTE 0x00000042 +#define Mono_Posix_Errno_EREMOTEIO 0x00000079 +#define Mono_Posix_Errno_ERESTART 0x00000055 +#define Mono_Posix_Errno_EROFS 0x0000001e +#define Mono_Posix_Errno_ESHUTDOWN 0x0000006c +#define Mono_Posix_Errno_ESOCKTNOSUPPORT 0x0000005e +#define Mono_Posix_Errno_ESPIPE 0x0000001d +#define Mono_Posix_Errno_ESRCH 0x00000003 +#define Mono_Posix_Errno_ESRMNT 0x00000045 +#define Mono_Posix_Errno_ESTALE 0x00000074 +#define Mono_Posix_Errno_ESTRPIPE 0x00000056 +#define Mono_Posix_Errno_ETIME 0x0000003e +#define Mono_Posix_Errno_ETIMEDOUT 0x0000006e +#define Mono_Posix_Errno_ETOOMANYREFS 0x0000006d +#define Mono_Posix_Errno_ETXTBSY 0x0000001a +#define Mono_Posix_Errno_EUCLEAN 0x00000075 +#define Mono_Posix_Errno_EUNATCH 0x00000031 +#define Mono_Posix_Errno_EUSERS 0x00000057 +#define Mono_Posix_Errno_EWOULDBLOCK 0x0000000b +#define Mono_Posix_Errno_EXDEV 0x00000012 +#define Mono_Posix_Errno_EXFULL 0x00000036 +int Mono_Posix_FromErrno (int x, int *r); +int Mono_Posix_ToErrno (int x, int *r); #define Mono_Posix_FcntlCommand_F_DUPFD 0x00000000 #define Mono_Posix_FcntlCommand_F_GETFD 0x00000001 -#define Mono_Posix_FcntlCommand_F_SETFD 0x00000002 #define Mono_Posix_FcntlCommand_F_GETFL 0x00000003 -#define Mono_Posix_FcntlCommand_F_SETFL 0x00000004 +#define Mono_Posix_FcntlCommand_F_GETLEASE 0x00000401 #define Mono_Posix_FcntlCommand_F_GETLK 0x0000000c +#define Mono_Posix_FcntlCommand_F_GETOWN 0x00000009 +#define Mono_Posix_FcntlCommand_F_GETSIG 0x0000000b +#define Mono_Posix_FcntlCommand_F_NOTIFY 0x00000402 +#define Mono_Posix_FcntlCommand_F_SETFD 0x00000002 +#define Mono_Posix_FcntlCommand_F_SETFL 0x00000004 +#define Mono_Posix_FcntlCommand_F_SETLEASE 0x00000400 #define Mono_Posix_FcntlCommand_F_SETLK 0x0000000d #define Mono_Posix_FcntlCommand_F_SETLKW 0x0000000e #define Mono_Posix_FcntlCommand_F_SETOWN 0x00000008 -#define Mono_Posix_FcntlCommand_F_GETOWN 0x00000009 #define Mono_Posix_FcntlCommand_F_SETSIG 0x0000000a -#define Mono_Posix_FcntlCommand_F_GETSIG 0x0000000b -#define Mono_Posix_FcntlCommand_F_SETLEASE 0x00000400 -#define Mono_Posix_FcntlCommand_F_GETLEASE 0x00000401 -#define Mono_Posix_FcntlCommand_F_NOTIFY 0x00000402 int Mono_Posix_FromFcntlCommand (int x, int *r); int Mono_Posix_ToFcntlCommand (int x, int *r); +#define Mono_Posix_FilePermissions_ACCESSPERMS 0x000001ff +#define Mono_Posix_FilePermissions_ALLPERMS 0x00000fff +#define Mono_Posix_FilePermissions_DEFFILEMODE 0x000001b6 +#define Mono_Posix_FilePermissions_S_IFBLK 0x00006000 +#define Mono_Posix_FilePermissions_S_IFCHR 0x00002000 +#define Mono_Posix_FilePermissions_S_IFDIR 0x00004000 +#define Mono_Posix_FilePermissions_S_IFIFO 0x00001000 +#define Mono_Posix_FilePermissions_S_IFLNK 0x0000a000 +#define Mono_Posix_FilePermissions_S_IFMT 0x0000f000 +#define Mono_Posix_FilePermissions_S_IFREG 0x00008000 +#define Mono_Posix_FilePermissions_S_IFSOCK 0x0000c000 +#define Mono_Posix_FilePermissions_S_IRGRP 0x00000020 +#define Mono_Posix_FilePermissions_S_IROTH 0x00000004 +#define Mono_Posix_FilePermissions_S_IRUSR 0x00000100 +#define Mono_Posix_FilePermissions_S_IRWXG 0x00000038 +#define Mono_Posix_FilePermissions_S_IRWXO 0x00000007 +#define Mono_Posix_FilePermissions_S_IRWXU 0x000001c0 +#define Mono_Posix_FilePermissions_S_ISGID 0x00000400 +#define Mono_Posix_FilePermissions_S_ISUID 0x00000800 +#define Mono_Posix_FilePermissions_S_ISVTX 0x00000200 +#define Mono_Posix_FilePermissions_S_IWGRP 0x00000010 +#define Mono_Posix_FilePermissions_S_IWOTH 0x00000002 +#define Mono_Posix_FilePermissions_S_IWUSR 0x00000080 +#define Mono_Posix_FilePermissions_S_IXGRP 0x00000008 +#define Mono_Posix_FilePermissions_S_IXOTH 0x00000001 +#define Mono_Posix_FilePermissions_S_IXUSR 0x00000040 +int Mono_Posix_FromFilePermissions (unsigned int x, unsigned int *r); +int Mono_Posix_ToFilePermissions (unsigned int x, unsigned int *r); + #define Mono_Posix_LockType_F_RDLCK 0x00000000 -#define Mono_Posix_LockType_F_WRLCK 0x00000001 #define Mono_Posix_LockType_F_UNLCK 0x00000002 +#define Mono_Posix_LockType_F_WRLCK 0x00000001 int Mono_Posix_FromLockType (short x, short *r); int Mono_Posix_ToLockType (short x, short *r); -#define Mono_Posix_SeekFlags_SEEK_SET 0x00000000 -#define Mono_Posix_SeekFlags_SEEK_CUR 0x00000001 -#define Mono_Posix_SeekFlags_SEEK_END 0x00000002 -#define Mono_Posix_SeekFlags_L_SET 0x00000000 -#define Mono_Posix_SeekFlags_L_INCR 0x00000001 -#define Mono_Posix_SeekFlags_L_XTND 0x00000002 -int Mono_Posix_FromSeekFlags (short x, short *r); -int Mono_Posix_ToSeekFlags (short x, short *r); +#define Mono_Posix_LockfCommand_F_LOCK 0x00000001 +#define Mono_Posix_LockfCommand_F_TEST 0x00000003 +#define Mono_Posix_LockfCommand_F_TLOCK 0x00000002 +#define Mono_Posix_LockfCommand_F_ULOCK 0x00000000 +int Mono_Posix_FromLockfCommand (int x, int *r); +int Mono_Posix_ToLockfCommand (int x, int *r); -#define Mono_Posix_DirectoryNotifyFlags_DN_ACCESS 0x00000001 -#define Mono_Posix_DirectoryNotifyFlags_DN_MODIFY 0x00000002 -#define Mono_Posix_DirectoryNotifyFlags_DN_CREATE 0x00000004 -#define Mono_Posix_DirectoryNotifyFlags_DN_DELETE 0x00000008 -#define Mono_Posix_DirectoryNotifyFlags_DN_RENAME 0x00000010 -#define Mono_Posix_DirectoryNotifyFlags_DN_ATTRIB 0x00000020 -#define Mono_Posix_DirectoryNotifyFlags_DN_MULTISHOT 0x80000000 -int Mono_Posix_FromDirectoryNotifyFlags (int x, int *r); -int Mono_Posix_ToDirectoryNotifyFlags (int x, int *r); +#define Mono_Posix_MlockallFlags_MCL_CURRENT 0x00000001 +#define Mono_Posix_MlockallFlags_MCL_FUTURE 0x00000002 +int Mono_Posix_FromMlockallFlags (int x, int *r); +int Mono_Posix_ToMlockallFlags (int x, int *r); + +#define Mono_Posix_MmapFlags_MAP_ANON 0x00000020 +#define Mono_Posix_MmapFlags_MAP_ANONYMOUS 0x00000020 +#define Mono_Posix_MmapFlags_MAP_DENYWRITE 0x00000800 +#define Mono_Posix_MmapFlags_MAP_EXECUTABLE 0x00001000 +#define Mono_Posix_MmapFlags_MAP_FILE 0x00000000 +#define Mono_Posix_MmapFlags_MAP_FIXED 0x00000010 +#define Mono_Posix_MmapFlags_MAP_GROWSDOWN 0x00000100 +#define Mono_Posix_MmapFlags_MAP_LOCKED 0x00002000 +#define Mono_Posix_MmapFlags_MAP_NONBLOCK 0x00010000 +#define Mono_Posix_MmapFlags_MAP_NORESERVE 0x00004000 +#define Mono_Posix_MmapFlags_MAP_POPULATE 0x00008000 +#define Mono_Posix_MmapFlags_MAP_PRIVATE 0x00000002 +#define Mono_Posix_MmapFlags_MAP_SHARED 0x00000001 +#define Mono_Posix_MmapFlags_MAP_TYPE 0x0000000f +int Mono_Posix_FromMmapFlags (int x, int *r); +int Mono_Posix_ToMmapFlags (int x, int *r); + +#define Mono_Posix_MmapProts_PROT_EXEC 0x00000004 +#define Mono_Posix_MmapProts_PROT_GROWSDOWN 0x01000000 +#define Mono_Posix_MmapProts_PROT_GROWSUP 0x02000000 +#define Mono_Posix_MmapProts_PROT_NONE 0x00000000 +#define Mono_Posix_MmapProts_PROT_READ 0x00000001 +#define Mono_Posix_MmapProts_PROT_WRITE 0x00000002 +int Mono_Posix_FromMmapProts (int x, int *r); +int Mono_Posix_ToMmapProts (int x, int *r); + +#define Mono_Posix_MountFlags_ST_APPEND 0x00000100 +#define Mono_Posix_MountFlags_ST_IMMUTABLE 0x00000200 +#define Mono_Posix_MountFlags_ST_MANDLOCK 0x00000040 +#define Mono_Posix_MountFlags_ST_NOATIME 0x00000400 +#define Mono_Posix_MountFlags_ST_NODEV 0x00000004 +#define Mono_Posix_MountFlags_ST_NODIRATIME 0x00000800 +#define Mono_Posix_MountFlags_ST_NOSUID 0x00000002 +#define Mono_Posix_MountFlags_ST_RDONLY 0x00000001 +#define Mono_Posix_MountFlags_ST_SYNCHRONOUS 0x00000010 +#define Mono_Posix_MountFlags_ST_WRITE 0x00000080 +int Mono_Posix_FromMountFlags (guint64 x, guint64 *r); +int Mono_Posix_ToMountFlags (guint64 x, guint64 *r); +#define Mono_Posix_MremapFlags_MREMAP_MAYMOVE 0x00000001 +int Mono_Posix_FromMremapFlags (guint64 x, guint64 *r); +int Mono_Posix_ToMremapFlags (guint64 x, guint64 *r); + +#define Mono_Posix_MsyncFlags_MS_ASYNC 0x00000001 +#define Mono_Posix_MsyncFlags_MS_INVALIDATE 0x00000002 +#define Mono_Posix_MsyncFlags_MS_SYNC 0x00000004 +int Mono_Posix_FromMsyncFlags (int x, int *r); +int Mono_Posix_ToMsyncFlags (int x, int *r); + +#define Mono_Posix_OpenFlags_O_APPEND 0x00000400 +#define Mono_Posix_OpenFlags_O_ASYNC 0x00002000 +#define Mono_Posix_OpenFlags_O_CREAT 0x00000040 +#define Mono_Posix_OpenFlags_O_DIRECT 0x00004000 +#define Mono_Posix_OpenFlags_O_DIRECTORY 0x00010000 +#define Mono_Posix_OpenFlags_O_EXCL 0x00000080 +#define Mono_Posix_OpenFlags_O_LARGEFILE 0x00008000 +#define Mono_Posix_OpenFlags_O_NOCTTY 0x00000100 +#define Mono_Posix_OpenFlags_O_NOFOLLOW 0x00020000 +#define Mono_Posix_OpenFlags_O_NONBLOCK 0x00000800 +#define Mono_Posix_OpenFlags_O_RDONLY 0x00000000 +#define Mono_Posix_OpenFlags_O_RDWR 0x00000002 +#define Mono_Posix_OpenFlags_O_SYNC 0x00001000 +#define Mono_Posix_OpenFlags_O_TRUNC 0x00000200 +#define Mono_Posix_OpenFlags_O_WRONLY 0x00000001 +int Mono_Posix_FromOpenFlags (int x, int *r); +int Mono_Posix_ToOpenFlags (int x, int *r); + +#define Mono_Posix_PathConf__PC_2_SYMLINKS 0x00000014 +#define Mono_Posix_PathConf__PC_ALLOC_SIZE_MIN 0x00000012 +#define Mono_Posix_PathConf__PC_ASYNC_IO 0x0000000a +#define Mono_Posix_PathConf__PC_CHOWN_RESTRICTED 0x00000006 +#define Mono_Posix_PathConf__PC_FILESIZEBITS 0x0000000d +#define Mono_Posix_PathConf__PC_LINK_MAX 0x00000000 +#define Mono_Posix_PathConf__PC_MAX_CANON 0x00000001 +#define Mono_Posix_PathConf__PC_MAX_INPUT 0x00000002 +#define Mono_Posix_PathConf__PC_NAME_MAX 0x00000003 +#define Mono_Posix_PathConf__PC_NO_TRUNC 0x00000007 +#define Mono_Posix_PathConf__PC_PATH_MAX 0x00000004 +#define Mono_Posix_PathConf__PC_PIPE_BUF 0x00000005 +#define Mono_Posix_PathConf__PC_PRIO_IO 0x0000000b +#define Mono_Posix_PathConf__PC_REC_INCR_XFER_SIZE 0x0000000e +#define Mono_Posix_PathConf__PC_REC_MAX_XFER_SIZE 0x0000000f +#define Mono_Posix_PathConf__PC_REC_MIN_XFER_SIZE 0x00000010 +#define Mono_Posix_PathConf__PC_REC_XFER_ALIGN 0x00000011 +#define Mono_Posix_PathConf__PC_SOCK_MAXBUF 0x0000000c +#define Mono_Posix_PathConf__PC_SYMLINK_MAX 0x00000013 +#define Mono_Posix_PathConf__PC_SYNC_IO 0x00000009 +#define Mono_Posix_PathConf__PC_VDISABLE 0x00000008 +int Mono_Posix_FromPathConf (int x, int *r); +int Mono_Posix_ToPathConf (int x, int *r); + +#define Mono_Posix_PollEvents_POLLERR 0x00000008 +#define Mono_Posix_PollEvents_POLLHUP 0x00000010 +#define Mono_Posix_PollEvents_POLLIN 0x00000001 +#define Mono_Posix_PollEvents_POLLNVAL 0x00000020 +#define Mono_Posix_PollEvents_POLLOUT 0x00000004 +#define Mono_Posix_PollEvents_POLLPRI 0x00000002 +#define Mono_Posix_PollEvents_POLLRDBAND 0x00000080 +#define Mono_Posix_PollEvents_POLLRDNORM 0x00000040 +#define Mono_Posix_PollEvents_POLLWRBAND 0x00000200 +#define Mono_Posix_PollEvents_POLLWRNORM 0x00000100 +int Mono_Posix_FromPollEvents (short x, short *r); +int Mono_Posix_ToPollEvents (short x, short *r); + +#define Mono_Posix_PosixFadviseAdvice_POSIX_FADV_DONTNEED 0x00000004 +#define Mono_Posix_PosixFadviseAdvice_POSIX_FADV_NOREUSE 0x00000005 #define Mono_Posix_PosixFadviseAdvice_POSIX_FADV_NORMAL 0x00000000 #define Mono_Posix_PosixFadviseAdvice_POSIX_FADV_RANDOM 0x00000001 #define Mono_Posix_PosixFadviseAdvice_POSIX_FADV_SEQUENTIAL 0x00000002 #define Mono_Posix_PosixFadviseAdvice_POSIX_FADV_WILLNEED 0x00000003 -#define Mono_Posix_PosixFadviseAdvice_POSIX_FADV_DONTNEED 0x00000004 -#define Mono_Posix_PosixFadviseAdvice_POSIX_FADV_NOREUSE 0x00000005 int Mono_Posix_FromPosixFadviseAdvice (int x, int *r); int Mono_Posix_ToPosixFadviseAdvice (int x, int *r); +#define Mono_Posix_PosixMadviseAdvice_POSIX_MADV_DONTNEED 0x00000004 #define Mono_Posix_PosixMadviseAdvice_POSIX_MADV_NORMAL 0x00000000 #define Mono_Posix_PosixMadviseAdvice_POSIX_MADV_RANDOM 0x00000001 #define Mono_Posix_PosixMadviseAdvice_POSIX_MADV_SEQUENTIAL 0x00000002 #define Mono_Posix_PosixMadviseAdvice_POSIX_MADV_WILLNEED 0x00000003 -#define Mono_Posix_PosixMadviseAdvice_POSIX_MADV_DONTNEED 0x00000004 int Mono_Posix_FromPosixMadviseAdvice (int x, int *r); int Mono_Posix_ToPosixMadviseAdvice (int x, int *r); -#define Mono_Posix_Signum_SIGHUP 0x00000001 -#define Mono_Posix_Signum_SIGINT 0x00000002 -#define Mono_Posix_Signum_SIGQUIT 0x00000003 -#define Mono_Posix_Signum_SIGILL 0x00000004 -#define Mono_Posix_Signum_SIGTRAP 0x00000005 +#define Mono_Posix_SeekFlags_L_INCR 0x00000001 +#define Mono_Posix_SeekFlags_L_SET 0x00000000 +#define Mono_Posix_SeekFlags_L_XTND 0x00000002 +#define Mono_Posix_SeekFlags_SEEK_CUR 0x00000001 +#define Mono_Posix_SeekFlags_SEEK_END 0x00000002 +#define Mono_Posix_SeekFlags_SEEK_SET 0x00000000 +int Mono_Posix_FromSeekFlags (short x, short *r); +int Mono_Posix_ToSeekFlags (short x, short *r); + #define Mono_Posix_Signum_SIGABRT 0x00000006 -#define Mono_Posix_Signum_SIGIOT 0x00000006 +#define Mono_Posix_Signum_SIGALRM 0x0000000e #define Mono_Posix_Signum_SIGBUS 0x00000007 +#define Mono_Posix_Signum_SIGCHLD 0x00000011 +#define Mono_Posix_Signum_SIGCLD 0x00000011 +#define Mono_Posix_Signum_SIGCONT 0x00000012 #define Mono_Posix_Signum_SIGFPE 0x00000008 +#define Mono_Posix_Signum_SIGHUP 0x00000001 +#define Mono_Posix_Signum_SIGILL 0x00000004 +#define Mono_Posix_Signum_SIGINT 0x00000002 +#define Mono_Posix_Signum_SIGIO 0x0000001d +#define Mono_Posix_Signum_SIGIOT 0x00000006 #define Mono_Posix_Signum_SIGKILL 0x00000009 -#define Mono_Posix_Signum_SIGUSR1 0x0000000a -#define Mono_Posix_Signum_SIGSEGV 0x0000000b -#define Mono_Posix_Signum_SIGUSR2 0x0000000c #define Mono_Posix_Signum_SIGPIPE 0x0000000d -#define Mono_Posix_Signum_SIGALRM 0x0000000e -#define Mono_Posix_Signum_SIGTERM 0x0000000f +#define Mono_Posix_Signum_SIGPOLL 0x0000001d +#define Mono_Posix_Signum_SIGPROF 0x0000001b +#define Mono_Posix_Signum_SIGPWR 0x0000001e +#define Mono_Posix_Signum_SIGQUIT 0x00000003 +#define Mono_Posix_Signum_SIGSEGV 0x0000000b #define Mono_Posix_Signum_SIGSTKFLT 0x00000010 -#define Mono_Posix_Signum_SIGCHLD 0x00000011 -#define Mono_Posix_Signum_SIGCLD 0x00000011 -#define Mono_Posix_Signum_SIGCONT 0x00000012 #define Mono_Posix_Signum_SIGSTOP 0x00000013 +#define Mono_Posix_Signum_SIGSYS 0x0000001f +#define Mono_Posix_Signum_SIGTERM 0x0000000f +#define Mono_Posix_Signum_SIGTRAP 0x00000005 #define Mono_Posix_Signum_SIGTSTP 0x00000014 #define Mono_Posix_Signum_SIGTTIN 0x00000015 #define Mono_Posix_Signum_SIGTTOU 0x00000016 +#define Mono_Posix_Signum_SIGUNUSED 0x0000001f #define Mono_Posix_Signum_SIGURG 0x00000017 -#define Mono_Posix_Signum_SIGXCPU 0x00000018 -#define Mono_Posix_Signum_SIGXFSZ 0x00000019 +#define Mono_Posix_Signum_SIGUSR1 0x0000000a +#define Mono_Posix_Signum_SIGUSR2 0x0000000c #define Mono_Posix_Signum_SIGVTALRM 0x0000001a -#define Mono_Posix_Signum_SIGPROF 0x0000001b #define Mono_Posix_Signum_SIGWINCH 0x0000001c -#define Mono_Posix_Signum_SIGIO 0x0000001d -#define Mono_Posix_Signum_SIGPOLL 0x0000001d -#define Mono_Posix_Signum_SIGPWR 0x0000001e -#define Mono_Posix_Signum_SIGSYS 0x0000001f -#define Mono_Posix_Signum_SIGUNUSED 0x0000001f +#define Mono_Posix_Signum_SIGXCPU 0x00000018 +#define Mono_Posix_Signum_SIGXFSZ 0x00000019 int Mono_Posix_FromSignum (int x, int *r); int Mono_Posix_ToSignum (int x, int *r); -#define Mono_Posix_WaitOptions_WNOHANG 0x00000001 -#define Mono_Posix_WaitOptions_WUNTRACED 0x00000002 -int Mono_Posix_FromWaitOptions (int x, int *r); -int Mono_Posix_ToWaitOptions (int x, int *r); - -#define Mono_Posix_AccessMode_R_OK 0x00000001 -#define Mono_Posix_AccessMode_W_OK 0x00000002 -#define Mono_Posix_AccessMode_X_OK 0x00000004 -#define Mono_Posix_AccessMode_F_OK 0x00000008 -int Mono_Posix_FromAccessMode (int x, int *r); -int Mono_Posix_ToAccessMode (int x, int *r); - -#define Mono_Posix_PathConf__PC_LINK_MAX 0x00000000 -#define Mono_Posix_PathConf__PC_MAX_CANON 0x00000001 -#define Mono_Posix_PathConf__PC_MAX_INPUT 0x00000002 -#define Mono_Posix_PathConf__PC_NAME_MAX 0x00000003 -#define Mono_Posix_PathConf__PC_PATH_MAX 0x00000004 -#define Mono_Posix_PathConf__PC_PIPE_BUF 0x00000005 -#define Mono_Posix_PathConf__PC_CHOWN_RESTRICTED 0x00000006 -#define Mono_Posix_PathConf__PC_NO_TRUNC 0x00000007 -#define Mono_Posix_PathConf__PC_VDISABLE 0x00000008 -#define Mono_Posix_PathConf__PC_SYNC_IO 0x00000009 -#define Mono_Posix_PathConf__PC_ASYNC_IO 0x0000000a -#define Mono_Posix_PathConf__PC_PRIO_IO 0x0000000b -#define Mono_Posix_PathConf__PC_SOCK_MAXBUF 0x0000000c -#define Mono_Posix_PathConf__PC_FILESIZEBITS 0x0000000d -#define Mono_Posix_PathConf__PC_REC_INCR_XFER_SIZE 0x0000000e -#define Mono_Posix_PathConf__PC_REC_MAX_XFER_SIZE 0x0000000f -#define Mono_Posix_PathConf__PC_REC_MIN_XFER_SIZE 0x00000010 -#define Mono_Posix_PathConf__PC_REC_XFER_ALIGN 0x00000011 -#define Mono_Posix_PathConf__PC_ALLOC_SIZE_MIN 0x00000012 -#define Mono_Posix_PathConf__PC_SYMLINK_MAX 0x00000013 -#define Mono_Posix_PathConf__PC_2_SYMLINKS 0x00000014 -int Mono_Posix_FromPathConf (int x, int *r); -int Mono_Posix_ToPathConf (int x, int *r); - -#define Mono_Posix_SysConf__SC_ARG_MAX 0x00000000 -#define Mono_Posix_SysConf__SC_CHILD_MAX 0x00000001 -#define Mono_Posix_SysConf__SC_CLK_TCK 0x00000002 -#define Mono_Posix_SysConf__SC_NGROUPS_MAX 0x00000003 -#define Mono_Posix_SysConf__SC_OPEN_MAX 0x00000004 -#define Mono_Posix_SysConf__SC_STREAM_MAX 0x00000005 -#define Mono_Posix_SysConf__SC_TZNAME_MAX 0x00000006 -#define Mono_Posix_SysConf__SC_JOB_CONTROL 0x00000007 -#define Mono_Posix_SysConf__SC_SAVED_IDS 0x00000008 -#define Mono_Posix_SysConf__SC_REALTIME_SIGNALS 0x00000009 -#define Mono_Posix_SysConf__SC_PRIORITY_SCHEDULING 0x0000000a -#define Mono_Posix_SysConf__SC_TIMERS 0x0000000b -#define Mono_Posix_SysConf__SC_ASYNCHRONOUS_IO 0x0000000c -#define Mono_Posix_SysConf__SC_PRIORITIZED_IO 0x0000000d -#define Mono_Posix_SysConf__SC_SYNCHRONIZED_IO 0x0000000e -#define Mono_Posix_SysConf__SC_FSYNC 0x0000000f -#define Mono_Posix_SysConf__SC_MAPPED_FILES 0x00000010 -#define Mono_Posix_SysConf__SC_MEMLOCK 0x00000011 -#define Mono_Posix_SysConf__SC_MEMLOCK_RANGE 0x00000012 -#define Mono_Posix_SysConf__SC_MEMORY_PROTECTION 0x00000013 -#define Mono_Posix_SysConf__SC_MESSAGE_PASSING 0x00000014 -#define Mono_Posix_SysConf__SC_SEMAPHORES 0x00000015 -#define Mono_Posix_SysConf__SC_SHARED_MEMORY_OBJECTS 0x00000016 +#define Mono_Posix_SysConf__SC_2_CHAR_TERM 0x0000005f +#define Mono_Posix_SysConf__SC_2_C_BIND 0x0000002f +#define Mono_Posix_SysConf__SC_2_C_DEV 0x00000030 +#define Mono_Posix_SysConf__SC_2_C_VERSION 0x00000060 +#define Mono_Posix_SysConf__SC_2_FORT_DEV 0x00000031 +#define Mono_Posix_SysConf__SC_2_FORT_RUN 0x00000032 +#define Mono_Posix_SysConf__SC_2_LOCALEDEF 0x00000034 +#define Mono_Posix_SysConf__SC_2_PBS 0x000000a8 +#define Mono_Posix_SysConf__SC_2_PBS_ACCOUNTING 0x000000a9 +#define Mono_Posix_SysConf__SC_2_PBS_CHECKPOINT 0x000000af +#define Mono_Posix_SysConf__SC_2_PBS_LOCATE 0x000000aa +#define Mono_Posix_SysConf__SC_2_PBS_MESSAGE 0x000000ab +#define Mono_Posix_SysConf__SC_2_PBS_TRACK 0x000000ac +#define Mono_Posix_SysConf__SC_2_SW_DEV 0x00000033 +#define Mono_Posix_SysConf__SC_2_UPE 0x00000061 +#define Mono_Posix_SysConf__SC_2_VERSION 0x0000002e +#define Mono_Posix_SysConf__SC_ADVISORY_INFO 0x00000084 #define Mono_Posix_SysConf__SC_AIO_LISTIO_MAX 0x00000017 #define Mono_Posix_SysConf__SC_AIO_MAX 0x00000018 #define Mono_Posix_SysConf__SC_AIO_PRIO_DELTA_MAX 0x00000019 -#define Mono_Posix_SysConf__SC_DELAYTIMER_MAX 0x0000001a -#define Mono_Posix_SysConf__SC_MQ_OPEN_MAX 0x0000001b -#define Mono_Posix_SysConf__SC_MQ_PRIO_MAX 0x0000001c -#define Mono_Posix_SysConf__SC_VERSION 0x0000001d -#define Mono_Posix_SysConf__SC_PAGESIZE 0x0000001e -#define Mono_Posix_SysConf__SC_RTSIG_MAX 0x0000001f -#define Mono_Posix_SysConf__SC_SEM_NSEMS_MAX 0x00000020 -#define Mono_Posix_SysConf__SC_SEM_VALUE_MAX 0x00000021 -#define Mono_Posix_SysConf__SC_SIGQUEUE_MAX 0x00000022 -#define Mono_Posix_SysConf__SC_TIMER_MAX 0x00000023 +#define Mono_Posix_SysConf__SC_ARG_MAX 0x00000000 +#define Mono_Posix_SysConf__SC_ASYNCHRONOUS_IO 0x0000000c +#define Mono_Posix_SysConf__SC_ATEXIT_MAX 0x00000057 +#define Mono_Posix_SysConf__SC_AVPHYS_PAGES 0x00000056 +#define Mono_Posix_SysConf__SC_BARRIERS 0x00000085 +#define Mono_Posix_SysConf__SC_BASE 0x00000086 #define Mono_Posix_SysConf__SC_BC_BASE_MAX 0x00000024 #define Mono_Posix_SysConf__SC_BC_DIM_MAX 0x00000025 #define Mono_Posix_SysConf__SC_BC_SCALE_MAX 0x00000026 #define Mono_Posix_SysConf__SC_BC_STRING_MAX 0x00000027 -#define Mono_Posix_SysConf__SC_COLL_WEIGHTS_MAX 0x00000028 -#define Mono_Posix_SysConf__SC_EQUIV_CLASS_MAX 0x00000029 -#define Mono_Posix_SysConf__SC_EXPR_NEST_MAX 0x0000002a -#define Mono_Posix_SysConf__SC_LINE_MAX 0x0000002b -#define Mono_Posix_SysConf__SC_RE_DUP_MAX 0x0000002c #define Mono_Posix_SysConf__SC_CHARCLASS_NAME_MAX 0x0000002d -#define Mono_Posix_SysConf__SC_2_VERSION 0x0000002e -#define Mono_Posix_SysConf__SC_2_C_BIND 0x0000002f -#define Mono_Posix_SysConf__SC_2_C_DEV 0x00000030 -#define Mono_Posix_SysConf__SC_2_FORT_DEV 0x00000031 -#define Mono_Posix_SysConf__SC_2_FORT_RUN 0x00000032 -#define Mono_Posix_SysConf__SC_2_SW_DEV 0x00000033 -#define Mono_Posix_SysConf__SC_2_LOCALEDEF 0x00000034 -#define Mono_Posix_SysConf__SC_PII 0x00000035 -#define Mono_Posix_SysConf__SC_PII_XTI 0x00000036 -#define Mono_Posix_SysConf__SC_PII_SOCKET 0x00000037 -#define Mono_Posix_SysConf__SC_PII_INTERNET 0x00000038 -#define Mono_Posix_SysConf__SC_PII_OSI 0x00000039 -#define Mono_Posix_SysConf__SC_POLL 0x0000003a -#define Mono_Posix_SysConf__SC_SELECT 0x0000003b -#define Mono_Posix_SysConf__SC_UIO_MAXIOV 0x0000003c -#define Mono_Posix_SysConf__SC_IOV_MAX 0x0000003c -#define Mono_Posix_SysConf__SC_PII_INTERNET_STREAM 0x0000003d -#define Mono_Posix_SysConf__SC_PII_INTERNET_DGRAM 0x0000003e -#define Mono_Posix_SysConf__SC_PII_OSI_COTS 0x0000003f -#define Mono_Posix_SysConf__SC_PII_OSI_CLTS 0x00000040 -#define Mono_Posix_SysConf__SC_PII_OSI_M 0x00000041 -#define Mono_Posix_SysConf__SC_T_IOV_MAX 0x00000042 -#define Mono_Posix_SysConf__SC_THREADS 0x00000043 -#define Mono_Posix_SysConf__SC_THREAD_SAFE_FUNCTIONS 0x00000044 -#define Mono_Posix_SysConf__SC_GETGR_R_SIZE_MAX 0x00000045 -#define Mono_Posix_SysConf__SC_GETPW_R_SIZE_MAX 0x00000046 -#define Mono_Posix_SysConf__SC_LOGIN_NAME_MAX 0x00000047 -#define Mono_Posix_SysConf__SC_TTY_NAME_MAX 0x00000048 -#define Mono_Posix_SysConf__SC_THREAD_DESTRUCTOR_ITERATIONS 0x00000049 -#define Mono_Posix_SysConf__SC_THREAD_KEYS_MAX 0x0000004a -#define Mono_Posix_SysConf__SC_THREAD_STACK_MIN 0x0000004b -#define Mono_Posix_SysConf__SC_THREAD_THREADS_MAX 0x0000004c -#define Mono_Posix_SysConf__SC_THREAD_ATTR_STACKADDR 0x0000004d -#define Mono_Posix_SysConf__SC_THREAD_ATTR_STACKSIZE 0x0000004e -#define Mono_Posix_SysConf__SC_THREAD_PRIORITY_SCHEDULING 0x0000004f -#define Mono_Posix_SysConf__SC_THREAD_PRIO_INHERIT 0x00000050 -#define Mono_Posix_SysConf__SC_THREAD_PRIO_PROTECT 0x00000051 -#define Mono_Posix_SysConf__SC_THREAD_PROCESS_SHARED 0x00000052 -#define Mono_Posix_SysConf__SC_NPROCESSORS_CONF 0x00000053 -#define Mono_Posix_SysConf__SC_NPROCESSORS_ONLN 0x00000054 -#define Mono_Posix_SysConf__SC_PHYS_PAGES 0x00000055 -#define Mono_Posix_SysConf__SC_AVPHYS_PAGES 0x00000056 -#define Mono_Posix_SysConf__SC_ATEXIT_MAX 0x00000057 -#define Mono_Posix_SysConf__SC_PASS_MAX 0x00000058 -#define Mono_Posix_SysConf__SC_XOPEN_VERSION 0x00000059 -#define Mono_Posix_SysConf__SC_XOPEN_XCU_VERSION 0x0000005a -#define Mono_Posix_SysConf__SC_XOPEN_UNIX 0x0000005b -#define Mono_Posix_SysConf__SC_XOPEN_CRYPT 0x0000005c -#define Mono_Posix_SysConf__SC_XOPEN_ENH_I18N 0x0000005d -#define Mono_Posix_SysConf__SC_XOPEN_SHM 0x0000005e -#define Mono_Posix_SysConf__SC_2_CHAR_TERM 0x0000005f -#define Mono_Posix_SysConf__SC_2_C_VERSION 0x00000060 -#define Mono_Posix_SysConf__SC_2_UPE 0x00000061 -#define Mono_Posix_SysConf__SC_XOPEN_XPG2 0x00000062 -#define Mono_Posix_SysConf__SC_XOPEN_XPG3 0x00000063 -#define Mono_Posix_SysConf__SC_XOPEN_XPG4 0x00000064 #define Mono_Posix_SysConf__SC_CHAR_BIT 0x00000065 #define Mono_Posix_SysConf__SC_CHAR_MAX 0x00000066 #define Mono_Posix_SysConf__SC_CHAR_MIN 0x00000067 -#define Mono_Posix_SysConf__SC_INT_MAX 0x00000068 -#define Mono_Posix_SysConf__SC_INT_MIN 0x00000069 -#define Mono_Posix_SysConf__SC_LONG_BIT 0x0000006a -#define Mono_Posix_SysConf__SC_WORD_BIT 0x0000006b -#define Mono_Posix_SysConf__SC_MB_LEN_MAX 0x0000006c -#define Mono_Posix_SysConf__SC_NZERO 0x0000006d -#define Mono_Posix_SysConf__SC_SSIZE_MAX 0x0000006e -#define Mono_Posix_SysConf__SC_SCHAR_MAX 0x0000006f -#define Mono_Posix_SysConf__SC_SCHAR_MIN 0x00000070 -#define Mono_Posix_SysConf__SC_SHRT_MAX 0x00000071 -#define Mono_Posix_SysConf__SC_SHRT_MIN 0x00000072 -#define Mono_Posix_SysConf__SC_UCHAR_MAX 0x00000073 -#define Mono_Posix_SysConf__SC_UINT_MAX 0x00000074 -#define Mono_Posix_SysConf__SC_ULONG_MAX 0x00000075 -#define Mono_Posix_SysConf__SC_USHRT_MAX 0x00000076 -#define Mono_Posix_SysConf__SC_NL_ARGMAX 0x00000077 -#define Mono_Posix_SysConf__SC_NL_LANGMAX 0x00000078 -#define Mono_Posix_SysConf__SC_NL_MSGMAX 0x00000079 -#define Mono_Posix_SysConf__SC_NL_NMAX 0x0000007a -#define Mono_Posix_SysConf__SC_NL_SETMAX 0x0000007b -#define Mono_Posix_SysConf__SC_NL_TEXTMAX 0x0000007c -#define Mono_Posix_SysConf__SC_XBS5_ILP32_OFF32 0x0000007d -#define Mono_Posix_SysConf__SC_XBS5_ILP32_OFFBIG 0x0000007e -#define Mono_Posix_SysConf__SC_XBS5_LP64_OFF64 0x0000007f -#define Mono_Posix_SysConf__SC_XBS5_LPBIG_OFFBIG 0x00000080 -#define Mono_Posix_SysConf__SC_XOPEN_LEGACY 0x00000081 -#define Mono_Posix_SysConf__SC_XOPEN_REALTIME 0x00000082 -#define Mono_Posix_SysConf__SC_XOPEN_REALTIME_THREADS 0x00000083 -#define Mono_Posix_SysConf__SC_ADVISORY_INFO 0x00000084 -#define Mono_Posix_SysConf__SC_BARRIERS 0x00000085 -#define Mono_Posix_SysConf__SC_BASE 0x00000086 -#define Mono_Posix_SysConf__SC_C_LANG_SUPPORT 0x00000087 -#define Mono_Posix_SysConf__SC_C_LANG_SUPPORT_R 0x00000088 +#define Mono_Posix_SysConf__SC_CHILD_MAX 0x00000001 +#define Mono_Posix_SysConf__SC_CLK_TCK 0x00000002 #define Mono_Posix_SysConf__SC_CLOCK_SELECTION 0x00000089 +#define Mono_Posix_SysConf__SC_COLL_WEIGHTS_MAX 0x00000028 #define Mono_Posix_SysConf__SC_CPUTIME 0x0000008a -#define Mono_Posix_SysConf__SC_THREAD_CPUTIME 0x0000008b +#define Mono_Posix_SysConf__SC_C_LANG_SUPPORT 0x00000087 +#define Mono_Posix_SysConf__SC_C_LANG_SUPPORT_R 0x00000088 +#define Mono_Posix_SysConf__SC_DELAYTIMER_MAX 0x0000001a #define Mono_Posix_SysConf__SC_DEVICE_IO 0x0000008c #define Mono_Posix_SysConf__SC_DEVICE_SPECIFIC 0x0000008d #define Mono_Posix_SysConf__SC_DEVICE_SPECIFIC_R 0x0000008e +#define Mono_Posix_SysConf__SC_EQUIV_CLASS_MAX 0x00000029 +#define Mono_Posix_SysConf__SC_EXPR_NEST_MAX 0x0000002a #define Mono_Posix_SysConf__SC_FD_MGMT 0x0000008f #define Mono_Posix_SysConf__SC_FIFO 0x00000090 -#define Mono_Posix_SysConf__SC_PIPE 0x00000091 #define Mono_Posix_SysConf__SC_FILE_ATTRIBUTES 0x00000092 #define Mono_Posix_SysConf__SC_FILE_LOCKING 0x00000093 #define Mono_Posix_SysConf__SC_FILE_SYSTEM 0x00000094 +#define Mono_Posix_SysConf__SC_FSYNC 0x0000000f +#define Mono_Posix_SysConf__SC_GETGR_R_SIZE_MAX 0x00000045 +#define Mono_Posix_SysConf__SC_GETPW_R_SIZE_MAX 0x00000046 +#define Mono_Posix_SysConf__SC_HOST_NAME_MAX 0x000000b4 +#define Mono_Posix_SysConf__SC_INT_MAX 0x00000068 +#define Mono_Posix_SysConf__SC_INT_MIN 0x00000069 +#define Mono_Posix_SysConf__SC_IOV_MAX 0x0000003c +#define Mono_Posix_SysConf__SC_JOB_CONTROL 0x00000007 +#define Mono_Posix_SysConf__SC_LEVEL1_DCACHE_ASSOC 0x000000bd +#define Mono_Posix_SysConf__SC_LEVEL1_DCACHE_LINESIZE 0x000000be +#define Mono_Posix_SysConf__SC_LEVEL1_DCACHE_SIZE 0x000000bc +#define Mono_Posix_SysConf__SC_LEVEL1_ICACHE_ASSOC 0x000000ba +#define Mono_Posix_SysConf__SC_LEVEL1_ICACHE_LINESIZE 0x000000bb +#define Mono_Posix_SysConf__SC_LEVEL1_ICACHE_SIZE 0x000000b9 +#define Mono_Posix_SysConf__SC_LEVEL2_CACHE_ASSOC 0x000000c0 +#define Mono_Posix_SysConf__SC_LEVEL2_CACHE_LINESIZE 0x000000c1 +#define Mono_Posix_SysConf__SC_LEVEL2_CACHE_SIZE 0x000000bf +#define Mono_Posix_SysConf__SC_LEVEL3_CACHE_ASSOC 0x000000c3 +#define Mono_Posix_SysConf__SC_LEVEL3_CACHE_LINESIZE 0x000000c4 +#define Mono_Posix_SysConf__SC_LEVEL3_CACHE_SIZE 0x000000c2 +#define Mono_Posix_SysConf__SC_LEVEL4_CACHE_ASSOC 0x000000c6 +#define Mono_Posix_SysConf__SC_LEVEL4_CACHE_LINESIZE 0x000000c7 +#define Mono_Posix_SysConf__SC_LEVEL4_CACHE_SIZE 0x000000c5 +#define Mono_Posix_SysConf__SC_LINE_MAX 0x0000002b +#define Mono_Posix_SysConf__SC_LOGIN_NAME_MAX 0x00000047 +#define Mono_Posix_SysConf__SC_LONG_BIT 0x0000006a +#define Mono_Posix_SysConf__SC_MAPPED_FILES 0x00000010 +#define Mono_Posix_SysConf__SC_MB_LEN_MAX 0x0000006c +#define Mono_Posix_SysConf__SC_MEMLOCK 0x00000011 +#define Mono_Posix_SysConf__SC_MEMLOCK_RANGE 0x00000012 +#define Mono_Posix_SysConf__SC_MEMORY_PROTECTION 0x00000013 +#define Mono_Posix_SysConf__SC_MESSAGE_PASSING 0x00000014 #define Mono_Posix_SysConf__SC_MONOTONIC_CLOCK 0x00000095 +#define Mono_Posix_SysConf__SC_MQ_OPEN_MAX 0x0000001b +#define Mono_Posix_SysConf__SC_MQ_PRIO_MAX 0x0000001c #define Mono_Posix_SysConf__SC_MULTI_PROCESS 0x00000096 -#define Mono_Posix_SysConf__SC_SINGLE_PROCESS 0x00000097 #define Mono_Posix_SysConf__SC_NETWORKING 0x00000098 +#define Mono_Posix_SysConf__SC_NGROUPS_MAX 0x00000003 +#define Mono_Posix_SysConf__SC_NL_ARGMAX 0x00000077 +#define Mono_Posix_SysConf__SC_NL_LANGMAX 0x00000078 +#define Mono_Posix_SysConf__SC_NL_MSGMAX 0x00000079 +#define Mono_Posix_SysConf__SC_NL_NMAX 0x0000007a +#define Mono_Posix_SysConf__SC_NL_SETMAX 0x0000007b +#define Mono_Posix_SysConf__SC_NL_TEXTMAX 0x0000007c +#define Mono_Posix_SysConf__SC_NPROCESSORS_CONF 0x00000053 +#define Mono_Posix_SysConf__SC_NPROCESSORS_ONLN 0x00000054 +#define Mono_Posix_SysConf__SC_NZERO 0x0000006d +#define Mono_Posix_SysConf__SC_OPEN_MAX 0x00000004 +#define Mono_Posix_SysConf__SC_PAGESIZE 0x0000001e +#define Mono_Posix_SysConf__SC_PASS_MAX 0x00000058 +#define Mono_Posix_SysConf__SC_PHYS_PAGES 0x00000055 +#define Mono_Posix_SysConf__SC_PII 0x00000035 +#define Mono_Posix_SysConf__SC_PII_INTERNET 0x00000038 +#define Mono_Posix_SysConf__SC_PII_INTERNET_DGRAM 0x0000003e +#define Mono_Posix_SysConf__SC_PII_INTERNET_STREAM 0x0000003d +#define Mono_Posix_SysConf__SC_PII_OSI 0x00000039 +#define Mono_Posix_SysConf__SC_PII_OSI_CLTS 0x00000040 +#define Mono_Posix_SysConf__SC_PII_OSI_COTS 0x0000003f +#define Mono_Posix_SysConf__SC_PII_OSI_M 0x00000041 +#define Mono_Posix_SysConf__SC_PII_SOCKET 0x00000037 +#define Mono_Posix_SysConf__SC_PII_XTI 0x00000036 +#define Mono_Posix_SysConf__SC_PIPE 0x00000091 +#define Mono_Posix_SysConf__SC_POLL 0x0000003a +#define Mono_Posix_SysConf__SC_PRIORITIZED_IO 0x0000000d +#define Mono_Posix_SysConf__SC_PRIORITY_SCHEDULING 0x0000000a #define Mono_Posix_SysConf__SC_READER_WRITER_LOCKS 0x00000099 -#define Mono_Posix_SysConf__SC_SPIN_LOCKS 0x0000009a +#define Mono_Posix_SysConf__SC_REALTIME_SIGNALS 0x00000009 #define Mono_Posix_SysConf__SC_REGEXP 0x0000009b #define Mono_Posix_SysConf__SC_REGEX_VERSION 0x0000009c +#define Mono_Posix_SysConf__SC_RE_DUP_MAX 0x0000002c +#define Mono_Posix_SysConf__SC_RTSIG_MAX 0x0000001f +#define Mono_Posix_SysConf__SC_SAVED_IDS 0x00000008 +#define Mono_Posix_SysConf__SC_SCHAR_MAX 0x0000006f +#define Mono_Posix_SysConf__SC_SCHAR_MIN 0x00000070 +#define Mono_Posix_SysConf__SC_SELECT 0x0000003b +#define Mono_Posix_SysConf__SC_SEMAPHORES 0x00000015 +#define Mono_Posix_SysConf__SC_SEM_NSEMS_MAX 0x00000020 +#define Mono_Posix_SysConf__SC_SEM_VALUE_MAX 0x00000021 +#define Mono_Posix_SysConf__SC_SHARED_MEMORY_OBJECTS 0x00000016 #define Mono_Posix_SysConf__SC_SHELL 0x0000009d +#define Mono_Posix_SysConf__SC_SHRT_MAX 0x00000071 +#define Mono_Posix_SysConf__SC_SHRT_MIN 0x00000072 #define Mono_Posix_SysConf__SC_SIGNALS 0x0000009e +#define Mono_Posix_SysConf__SC_SIGQUEUE_MAX 0x00000022 +#define Mono_Posix_SysConf__SC_SINGLE_PROCESS 0x00000097 #define Mono_Posix_SysConf__SC_SPAWN 0x0000009f +#define Mono_Posix_SysConf__SC_SPIN_LOCKS 0x0000009a #define Mono_Posix_SysConf__SC_SPORADIC_SERVER 0x000000a0 -#define Mono_Posix_SysConf__SC_THREAD_SPORADIC_SERVER 0x000000a1 +#define Mono_Posix_SysConf__SC_SSIZE_MAX 0x0000006e +#define Mono_Posix_SysConf__SC_STREAMS 0x000000ae +#define Mono_Posix_SysConf__SC_STREAM_MAX 0x00000005 +#define Mono_Posix_SysConf__SC_SYMLOOP_MAX 0x000000ad +#define Mono_Posix_SysConf__SC_SYNCHRONIZED_IO 0x0000000e #define Mono_Posix_SysConf__SC_SYSTEM_DATABASE 0x000000a2 #define Mono_Posix_SysConf__SC_SYSTEM_DATABASE_R 0x000000a3 +#define Mono_Posix_SysConf__SC_THREADS 0x00000043 +#define Mono_Posix_SysConf__SC_THREAD_ATTR_STACKADDR 0x0000004d +#define Mono_Posix_SysConf__SC_THREAD_ATTR_STACKSIZE 0x0000004e +#define Mono_Posix_SysConf__SC_THREAD_CPUTIME 0x0000008b +#define Mono_Posix_SysConf__SC_THREAD_DESTRUCTOR_ITERATIONS 0x00000049 +#define Mono_Posix_SysConf__SC_THREAD_KEYS_MAX 0x0000004a +#define Mono_Posix_SysConf__SC_THREAD_PRIORITY_SCHEDULING 0x0000004f +#define Mono_Posix_SysConf__SC_THREAD_PRIO_INHERIT 0x00000050 +#define Mono_Posix_SysConf__SC_THREAD_PRIO_PROTECT 0x00000051 +#define Mono_Posix_SysConf__SC_THREAD_PROCESS_SHARED 0x00000052 +#define Mono_Posix_SysConf__SC_THREAD_SAFE_FUNCTIONS 0x00000044 +#define Mono_Posix_SysConf__SC_THREAD_SPORADIC_SERVER 0x000000a1 +#define Mono_Posix_SysConf__SC_THREAD_STACK_MIN 0x0000004b +#define Mono_Posix_SysConf__SC_THREAD_THREADS_MAX 0x0000004c #define Mono_Posix_SysConf__SC_TIMEOUTS 0x000000a4 +#define Mono_Posix_SysConf__SC_TIMERS 0x0000000b +#define Mono_Posix_SysConf__SC_TIMER_MAX 0x00000023 +#define Mono_Posix_SysConf__SC_TRACE 0x000000b5 +#define Mono_Posix_SysConf__SC_TRACE_EVENT_FILTER 0x000000b6 +#define Mono_Posix_SysConf__SC_TRACE_INHERIT 0x000000b7 +#define Mono_Posix_SysConf__SC_TRACE_LOG 0x000000b8 +#define Mono_Posix_SysConf__SC_TTY_NAME_MAX 0x00000048 #define Mono_Posix_SysConf__SC_TYPED_MEMORY_OBJECTS 0x000000a5 +#define Mono_Posix_SysConf__SC_TZNAME_MAX 0x00000006 +#define Mono_Posix_SysConf__SC_T_IOV_MAX 0x00000042 +#define Mono_Posix_SysConf__SC_UCHAR_MAX 0x00000073 +#define Mono_Posix_SysConf__SC_UINT_MAX 0x00000074 +#define Mono_Posix_SysConf__SC_UIO_MAXIOV 0x0000003c +#define Mono_Posix_SysConf__SC_ULONG_MAX 0x00000075 #define Mono_Posix_SysConf__SC_USER_GROUPS 0x000000a6 #define Mono_Posix_SysConf__SC_USER_GROUPS_R 0x000000a7 -#define Mono_Posix_SysConf__SC_2_PBS 0x000000a8 -#define Mono_Posix_SysConf__SC_2_PBS_ACCOUNTING 0x000000a9 -#define Mono_Posix_SysConf__SC_2_PBS_LOCATE 0x000000aa -#define Mono_Posix_SysConf__SC_2_PBS_MESSAGE 0x000000ab -#define Mono_Posix_SysConf__SC_2_PBS_TRACK 0x000000ac -#define Mono_Posix_SysConf__SC_SYMLOOP_MAX 0x000000ad -#define Mono_Posix_SysConf__SC_STREAMS 0x000000ae -#define Mono_Posix_SysConf__SC_2_PBS_CHECKPOINT 0x000000af +#define Mono_Posix_SysConf__SC_USHRT_MAX 0x00000076 #define Mono_Posix_SysConf__SC_V6_ILP32_OFF32 0x000000b0 #define Mono_Posix_SysConf__SC_V6_ILP32_OFFBIG 0x000000b1 #define Mono_Posix_SysConf__SC_V6_LP64_OFF64 0x000000b2 #define Mono_Posix_SysConf__SC_V6_LPBIG_OFFBIG 0x000000b3 -#define Mono_Posix_SysConf__SC_HOST_NAME_MAX 0x000000b4 -#define Mono_Posix_SysConf__SC_TRACE 0x000000b5 -#define Mono_Posix_SysConf__SC_TRACE_EVENT_FILTER 0x000000b6 -#define Mono_Posix_SysConf__SC_TRACE_INHERIT 0x000000b7 -#define Mono_Posix_SysConf__SC_TRACE_LOG 0x000000b8 -#define Mono_Posix_SysConf__SC_LEVEL1_ICACHE_SIZE 0x000000b9 -#define Mono_Posix_SysConf__SC_LEVEL1_ICACHE_ASSOC 0x000000ba -#define Mono_Posix_SysConf__SC_LEVEL1_ICACHE_LINESIZE 0x000000bb -#define Mono_Posix_SysConf__SC_LEVEL1_DCACHE_SIZE 0x000000bc -#define Mono_Posix_SysConf__SC_LEVEL1_DCACHE_ASSOC 0x000000bd -#define Mono_Posix_SysConf__SC_LEVEL1_DCACHE_LINESIZE 0x000000be -#define Mono_Posix_SysConf__SC_LEVEL2_CACHE_SIZE 0x000000bf -#define Mono_Posix_SysConf__SC_LEVEL2_CACHE_ASSOC 0x000000c0 -#define Mono_Posix_SysConf__SC_LEVEL2_CACHE_LINESIZE 0x000000c1 -#define Mono_Posix_SysConf__SC_LEVEL3_CACHE_SIZE 0x000000c2 -#define Mono_Posix_SysConf__SC_LEVEL3_CACHE_ASSOC 0x000000c3 -#define Mono_Posix_SysConf__SC_LEVEL3_CACHE_LINESIZE 0x000000c4 -#define Mono_Posix_SysConf__SC_LEVEL4_CACHE_SIZE 0x000000c5 -#define Mono_Posix_SysConf__SC_LEVEL4_CACHE_ASSOC 0x000000c6 -#define Mono_Posix_SysConf__SC_LEVEL4_CACHE_LINESIZE 0x000000c7 +#define Mono_Posix_SysConf__SC_VERSION 0x0000001d +#define Mono_Posix_SysConf__SC_WORD_BIT 0x0000006b +#define Mono_Posix_SysConf__SC_XBS5_ILP32_OFF32 0x0000007d +#define Mono_Posix_SysConf__SC_XBS5_ILP32_OFFBIG 0x0000007e +#define Mono_Posix_SysConf__SC_XBS5_LP64_OFF64 0x0000007f +#define Mono_Posix_SysConf__SC_XBS5_LPBIG_OFFBIG 0x00000080 +#define Mono_Posix_SysConf__SC_XOPEN_CRYPT 0x0000005c +#define Mono_Posix_SysConf__SC_XOPEN_ENH_I18N 0x0000005d +#define Mono_Posix_SysConf__SC_XOPEN_LEGACY 0x00000081 +#define Mono_Posix_SysConf__SC_XOPEN_REALTIME 0x00000082 +#define Mono_Posix_SysConf__SC_XOPEN_REALTIME_THREADS 0x00000083 +#define Mono_Posix_SysConf__SC_XOPEN_SHM 0x0000005e +#define Mono_Posix_SysConf__SC_XOPEN_UNIX 0x0000005b +#define Mono_Posix_SysConf__SC_XOPEN_VERSION 0x00000059 +#define Mono_Posix_SysConf__SC_XOPEN_XCU_VERSION 0x0000005a +#define Mono_Posix_SysConf__SC_XOPEN_XPG2 0x00000062 +#define Mono_Posix_SysConf__SC_XOPEN_XPG3 0x00000063 +#define Mono_Posix_SysConf__SC_XOPEN_XPG4 0x00000064 int Mono_Posix_FromSysConf (int x, int *r); int Mono_Posix_ToSysConf (int x, int *r); -#define Mono_Posix_ConfStr__CS_PATH 0x00000000 -#define Mono_Posix_ConfStr__CS_V6_WIDTH_RESTRICTED_ENVS 0x00000001 -#define Mono_Posix_ConfStr__CS_GNU_LIBC_VERSION 0x00000002 -#define Mono_Posix_ConfStr__CS_GNU_LIBPTHREAD_VERSION 0x00000003 -#define Mono_Posix_ConfStr__CS_LFS_CFLAGS 0x000003e8 -#define Mono_Posix_ConfStr__CS_LFS_LDFLAGS 0x000003e9 -#define Mono_Posix_ConfStr__CS_LFS_LIBS 0x000003ea -#define Mono_Posix_ConfStr__CS_LFS_LINTFLAGS 0x000003eb -#define Mono_Posix_ConfStr__CS_LFS64_CFLAGS 0x000003ec -#define Mono_Posix_ConfStr__CS_LFS64_LDFLAGS 0x000003ed -#define Mono_Posix_ConfStr__CS_LFS64_LIBS 0x000003ee -#define Mono_Posix_ConfStr__CS_LFS64_LINTFLAGS 0x000003ef -#define Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_CFLAGS 0x0000044c -#define Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LDFLAGS 0x0000044d -#define Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LIBS 0x0000044e -#define Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LINTFLAGS 0x0000044f -#define Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_CFLAGS 0x00000450 -#define Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LDFLAGS 0x00000451 -#define Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LIBS 0x00000452 -#define Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LINTFLAGS 0x00000453 -#define Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_CFLAGS 0x00000454 -#define Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LDFLAGS 0x00000455 -#define Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LIBS 0x00000456 -#define Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LINTFLAGS 0x00000457 -#define Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_CFLAGS 0x00000458 -#define Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LDFLAGS 0x00000459 -#define Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LIBS 0x0000045a -#define Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LINTFLAGS 0x0000045b -#define Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_CFLAGS 0x0000045c -#define Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LDFLAGS 0x0000045d -#define Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LIBS 0x0000045e -#define Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LINTFLAGS 0x0000045f -#define Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 0x00000460 -#define Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 0x00000461 -#define Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LIBS 0x00000462 -#define Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS 0x00000463 -#define Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_CFLAGS 0x00000464 -#define Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LDFLAGS 0x00000465 -#define Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LIBS 0x00000466 -#define Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LINTFLAGS 0x00000467 -#define Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 0x00000468 -#define Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 0x00000469 -#define Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LIBS 0x0000046a -#define Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS 0x0000046b -int Mono_Posix_FromConfStr (int x, int *r); -int Mono_Posix_ToConfStr (int x, int *r); +#define Mono_Posix_SyslogFacility_LOG_AUTH 0x00000020 +#define Mono_Posix_SyslogFacility_LOG_AUTHPRIV 0x00000050 +#define Mono_Posix_SyslogFacility_LOG_CRON 0x00000048 +#define Mono_Posix_SyslogFacility_LOG_DAEMON 0x00000018 +#define Mono_Posix_SyslogFacility_LOG_FTP 0x00000058 +#define Mono_Posix_SyslogFacility_LOG_KERN 0x00000000 +#define Mono_Posix_SyslogFacility_LOG_LOCAL0 0x00000080 +#define Mono_Posix_SyslogFacility_LOG_LOCAL1 0x00000088 +#define Mono_Posix_SyslogFacility_LOG_LOCAL2 0x00000090 +#define Mono_Posix_SyslogFacility_LOG_LOCAL3 0x00000098 +#define Mono_Posix_SyslogFacility_LOG_LOCAL4 0x000000a0 +#define Mono_Posix_SyslogFacility_LOG_LOCAL5 0x000000a8 +#define Mono_Posix_SyslogFacility_LOG_LOCAL6 0x000000b0 +#define Mono_Posix_SyslogFacility_LOG_LOCAL7 0x000000b8 +#define Mono_Posix_SyslogFacility_LOG_LPR 0x00000030 +#define Mono_Posix_SyslogFacility_LOG_MAIL 0x00000010 +#define Mono_Posix_SyslogFacility_LOG_NEWS 0x00000038 +#define Mono_Posix_SyslogFacility_LOG_SYSLOG 0x00000028 +#define Mono_Posix_SyslogFacility_LOG_USER 0x00000008 +#define Mono_Posix_SyslogFacility_LOG_USRE 0x00000008 +#define Mono_Posix_SyslogFacility_LOG_UUCP 0x00000040 +int Mono_Posix_FromSyslogFacility (int x, int *r); +int Mono_Posix_ToSyslogFacility (int x, int *r); -#define Mono_Posix_LockfCommand_F_ULOCK 0x00000000 -#define Mono_Posix_LockfCommand_F_LOCK 0x00000001 -#define Mono_Posix_LockfCommand_F_TLOCK 0x00000002 -#define Mono_Posix_LockfCommand_F_TEST 0x00000003 -int Mono_Posix_FromLockfCommand (int x, int *r); -int Mono_Posix_ToLockfCommand (int x, int *r); +#define Mono_Posix_SyslogLevel_LOG_ALERT 0x00000001 +#define Mono_Posix_SyslogLevel_LOG_CRIT 0x00000002 +#define Mono_Posix_SyslogLevel_LOG_DEBUG 0x00000007 +#define Mono_Posix_SyslogLevel_LOG_EMERG 0x00000000 +#define Mono_Posix_SyslogLevel_LOG_ERR 0x00000003 +#define Mono_Posix_SyslogLevel_LOG_INFO 0x00000006 +#define Mono_Posix_SyslogLevel_LOG_NOTICE 0x00000005 +#define Mono_Posix_SyslogLevel_LOG_WARNING 0x00000004 +int Mono_Posix_FromSyslogLevel (int x, int *r); +int Mono_Posix_ToSyslogLevel (int x, int *r); -#define Mono_Posix_PollEvents_POLLIN 0x00000001 -#define Mono_Posix_PollEvents_POLLPRI 0x00000002 -#define Mono_Posix_PollEvents_POLLOUT 0x00000004 -#define Mono_Posix_PollEvents_POLLERR 0x00000008 -#define Mono_Posix_PollEvents_POLLHUP 0x00000010 -#define Mono_Posix_PollEvents_POLLNVAL 0x00000020 -#define Mono_Posix_PollEvents_POLLRDNORM 0x00000040 -#define Mono_Posix_PollEvents_POLLRDBAND 0x00000080 -#define Mono_Posix_PollEvents_POLLWRNORM 0x00000100 -#define Mono_Posix_PollEvents_POLLWRBAND 0x00000200 -int Mono_Posix_FromPollEvents (short x, short *r); -int Mono_Posix_ToPollEvents (short x, short *r); +#define Mono_Posix_SyslogOptions_LOG_CONS 0x00000002 +#define Mono_Posix_SyslogOptions_LOG_NDELAY 0x00000008 +#define Mono_Posix_SyslogOptions_LOG_NOWAIT 0x00000010 +#define Mono_Posix_SyslogOptions_LOG_ODELAY 0x00000004 +#define Mono_Posix_SyslogOptions_LOG_PERROR 0x00000020 +#define Mono_Posix_SyslogOptions_LOG_PID 0x00000001 +int Mono_Posix_FromSyslogOptions (int x, int *r); +int Mono_Posix_ToSyslogOptions (int x, int *r); + +#define Mono_Posix_WaitOptions_WNOHANG 0x00000001 +#define Mono_Posix_WaitOptions_WUNTRACED 0x00000002 +int Mono_Posix_FromWaitOptions (int x, int *r); +int Mono_Posix_ToWaitOptions (int x, int *r); #define Mono_Posix_XattrFlags_XATTR_AUTO 0x00000000 #define Mono_Posix_XattrFlags_XATTR_CREATE 0x00000001 @@ -641,60 +838,6 @@ int Mono_Posix_ToPollEvents (short x, short *r); int Mono_Posix_FromXattrFlags (int x, int *r); int Mono_Posix_ToXattrFlags (int x, int *r); -#define Mono_Posix_MountFlags_ST_RDONLY 0x00000001 -#define Mono_Posix_MountFlags_ST_NOSUID 0x00000002 -#define Mono_Posix_MountFlags_ST_NODEV 0x00000004 -#define Mono_Posix_MountFlags_ST_SYNCHRONOUS 0x00000010 -#define Mono_Posix_MountFlags_ST_MANDLOCK 0x00000040 -#define Mono_Posix_MountFlags_ST_WRITE 0x00000080 -#define Mono_Posix_MountFlags_ST_APPEND 0x00000100 -#define Mono_Posix_MountFlags_ST_IMMUTABLE 0x00000200 -#define Mono_Posix_MountFlags_ST_NOATIME 0x00000400 -#define Mono_Posix_MountFlags_ST_NODIRATIME 0x00000800 -int Mono_Posix_FromMountFlags (guint64 x, guint64 *r); -int Mono_Posix_ToMountFlags (guint64 x, guint64 *r); - -#define Mono_Posix_MmapFlags_MAP_SHARED 0x00000001 -#define Mono_Posix_MmapFlags_MAP_PRIVATE 0x00000002 -#define Mono_Posix_MmapFlags_MAP_TYPE 0x0000000f -#define Mono_Posix_MmapFlags_MAP_FIXED 0x00000010 -#define Mono_Posix_MmapFlags_MAP_FILE 0x00000000 -#define Mono_Posix_MmapFlags_MAP_ANONYMOUS 0x00000020 -#define Mono_Posix_MmapFlags_MAP_ANON 0x00000020 -#define Mono_Posix_MmapFlags_MAP_GROWSDOWN 0x00000100 -#define Mono_Posix_MmapFlags_MAP_DENYWRITE 0x00000800 -#define Mono_Posix_MmapFlags_MAP_EXECUTABLE 0x00001000 -#define Mono_Posix_MmapFlags_MAP_LOCKED 0x00002000 -#define Mono_Posix_MmapFlags_MAP_NORESERVE 0x00004000 -#define Mono_Posix_MmapFlags_MAP_POPULATE 0x00008000 -#define Mono_Posix_MmapFlags_MAP_NONBLOCK 0x00010000 -int Mono_Posix_FromMmapFlags (int x, int *r); -int Mono_Posix_ToMmapFlags (int x, int *r); - -#define Mono_Posix_MmapProt_PROT_READ 0x00000001 -#define Mono_Posix_MmapProt_PROT_WRITE 0x00000002 -#define Mono_Posix_MmapProt_PROT_EXEC 0x00000004 -#define Mono_Posix_MmapProt_PROT_NONE 0x00000000 -#define Mono_Posix_MmapProt_PROT_GROWSDOWN 0x01000000 -#define Mono_Posix_MmapProt_PROT_GROWSUP 0x02000000 -int Mono_Posix_FromMmapProt (int x, int *r); -int Mono_Posix_ToMmapProt (int x, int *r); - -#define Mono_Posix_MsyncFlags_MS_ASYNC 0x00000001 -#define Mono_Posix_MsyncFlags_MS_SYNC 0x00000004 -#define Mono_Posix_MsyncFlags_MS_INVALIDATE 0x00000002 -int Mono_Posix_FromMsyncFlags (int x, int *r); -int Mono_Posix_ToMsyncFlags (int x, int *r); - -#define Mono_Posix_MlockallFlags_MCL_CURRENT 0x00000001 -#define Mono_Posix_MlockallFlags_MCL_FUTURE 0x00000002 -int Mono_Posix_FromMlockallFlags (int x, int *r); -int Mono_Posix_ToMlockallFlags (int x, int *r); - -#define Mono_Posix_MremapFlags_MREMAP_MAYMOVE 0x00000001 -int Mono_Posix_FromMremapFlags (guint64 x, guint64 *r); -int Mono_Posix_ToMremapFlags (guint64 x, guint64 *r); - G_END_DECLS #endif /* ndef INC_Mono_Posix_map_H */ |