summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2009-04-20 16:34:19 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2009-04-20 16:34:19 +0000
commitaffd35fa8f7cefde6cdc6230547b945da946e08a (patch)
treeb6c12b5f986464e0360e25c846a81dad9e41f557
parent7496fa069f2919b13cca937d3746162f5f4fc77f (diff)
downloadATCD-affd35fa8f7cefde6cdc6230547b945da946e08a.tar.gz
Mon Apr 20 17:34:06 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/os_include/os_errno.h: Prevent redefinitions and when we don't have errno.h, define the error numbers if they are not defined yet. Needed for cegcc
-rw-r--r--ACE/ChangeLog6
-rw-r--r--ACE/ace/os_include/os_errno.h270
2 files changed, 236 insertions, 40 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index 31820ae6e15..f5f10b9cc8c 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,9 @@
+Mon Apr 20 17:34:06 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * ace/os_include/os_errno.h:
+ Prevent redefinitions and when we don't have errno.h, define
+ the error numbers if they are not defined yet. Needed for cegcc
+
Mon Apr 20 17:26:06 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/config-win32-cegcc.h:
diff --git a/ACE/ace/os_include/os_errno.h b/ACE/ace/os_include/os_errno.h
index eb51405c576..a24024ae37c 100644
--- a/ACE/ace/os_include/os_errno.h
+++ b/ACE/ace/os_include/os_errno.h
@@ -41,46 +41,122 @@ extern "C"
#if defined (ACE_WIN32)
// error code mapping for windows
-# define ETIME ERROR_SEM_TIMEOUT
-# define EWOULDBLOCK WSAEWOULDBLOCK
-# define EINPROGRESS WSAEINPROGRESS
-# define EALREADY WSAEALREADY
-# define ENOTSOCK WSAENOTSOCK
-# define EDESTADDRREQ WSAEDESTADDRREQ
-# define EMSGSIZE WSAEMSGSIZE
-# define EPROTOTYPE WSAEPROTOTYPE
-# define ENOPROTOOPT WSAENOPROTOOPT
-# define EPROTONOSUPPORT WSAEPROTONOSUPPORT
-# define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
-# define EOPNOTSUPP WSAEOPNOTSUPP
-# define EPFNOSUPPORT WSAEPFNOSUPPORT
-# define EAFNOSUPPORT WSAEAFNOSUPPORT
-# define EADDRINUSE WSAEADDRINUSE
-# define EADDRNOTAVAIL WSAEADDRNOTAVAIL
-# define ENETDOWN WSAENETDOWN
-# define ENETUNREACH WSAENETUNREACH
-# define ENETRESET WSAENETRESET
-# define ECONNABORTED WSAECONNABORTED
-# define ECONNRESET WSAECONNRESET
-# define ENOBUFS WSAENOBUFS
-# define EISCONN WSAEISCONN
-# define ENOTCONN WSAENOTCONN
-# define ESHUTDOWN WSAESHUTDOWN
-# define ETOOMANYREFS WSAETOOMANYREFS
-# define ETIMEDOUT WSAETIMEDOUT
-# define ECONNREFUSED WSAECONNREFUSED
-# define ELOOP WSAELOOP
-# define EHOSTDOWN WSAEHOSTDOWN
-# define EHOSTUNREACH WSAEHOSTUNREACH
-# define EPROCLIM WSAEPROCLIM
-# define EUSERS WSAEUSERS
-# define EDQUOT WSAEDQUOT
-# define ESTALE WSAESTALE
-# define EREMOTE WSAEREMOTE
- // Grrr! ENAMETOOLONG and ENOTEMPTY are already defined by the horrible
- // 'standard' library.
- // #define ENAMETOOLONG WSAENAMETOOLONG
-# define EADDRINUSE WSAEADDRINUSE
+
+# if !defined (ETIME)
+# define ETIME ERROR_SEM_TIMEOUT
+# endif /* !ETIME */
+# if !defined (EWOULDBLOCK)
+# define EWOULDBLOCK WSAEWOULDBLOCK
+# endif /* !EWOULDBLOCK */
+# if !defined (EINPROGRESS)
+# define EINPROGRESS WSAEINPROGRESS
+# endif /* !EINPROGRESS */
+# if !defined (EALREADY)
+# define EALREADY WSAEALREADY
+# endif /* !EALREADY */
+# if !defined (ENOTSOCK)
+# define ENOTSOCK WSAENOTSOCK
+# endif /* !ENOTSOCK */
+# if !defined (EDESTADDRREQ)
+# define EDESTADDRREQ WSAEDESTADDRREQ
+# endif /* !EDESTADDRREQ */
+# if !defined (EMSGSIZE)
+# define EMSGSIZE WSAEMSGSIZE
+# endif /* !EMSGSIZE */
+# if !defined (EPROTOTYPE)
+# define EPROTOTYPE WSAEPROTOTYPE
+# endif /* !EPROTOTYPE */
+# if !defined (ENOPROTOOPT)
+# define ENOPROTOOPT WSAENOPROTOOPT
+# endif /* !ENOPROTOOPT */
+# if !defined (EPROTONOSUPPORT)
+# define EPROTONOSUPPORT WSAEPROTONOSUPPORT
+# endif /* !EPROTONOSUPPORT */
+# if !defined (ESOCKTNOSUPPORT)
+# define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
+# endif /* !ESOCKTNOSUPPORT */
+# if !defined (EOPNOTSUPP)
+# define EOPNOTSUPP WSAEOPNOTSUPP
+# endif /* !EOPNOTSUPP */
+# if !defined (EPFNOSUPPORT)
+# define EPFNOSUPPORT WSAEPFNOSUPPORT
+# endif /* !EPFNOSUPPORT */
+# if !defined (EAFNOSUPPORT)
+# define EAFNOSUPPORT WSAEAFNOSUPPORT
+# endif /* !EAFNOSUPPORT */
+# if !defined (EADDRINUSE)
+# define EADDRINUSE WSAEADDRINUSE
+# endif /* !EADDRINUSE */
+# if !defined (EADDRNOTAVAIL)
+# define EADDRNOTAVAIL WSAEADDRNOTAVAIL
+# endif /* !EADDRNOTAVAIL */
+# if !defined (ENETDOWN)
+# define ENETDOWN WSAENETDOWN
+# endif /* !ENETDOWN */
+# if !defined (ENETUNREACH)
+# define ENETUNREACH WSAENETUNREACH
+# endif /* !ENETUNREACH */
+# if !defined (ENETRESET)
+# define ENETRESET WSAENETRESET
+# endif /* !ENETRESET */
+# if !defined (ECONNABORTED)
+# define ECONNABORTED WSAECONNABORTED
+# endif /* !ECONNABORTED */
+# if !defined (ECONNRESET)
+# define ECONNRESET WSAECONNRESET
+# endif /* !ECONNRESET */
+# if !defined (ENOBUFS)
+# define ENOBUFS WSAENOBUFS
+# endif /* !ENOBUFS */
+# if !defined (EISCONN)
+# define EISCONN WSAEISCONN
+# endif /* !EISCONN */
+# if !defined (ENOTCONN)
+# define ENOTCONN WSAENOTCONN
+# endif /* !ENOTCONN */
+# if !defined (ESHUTDOWN)
+# define ESHUTDOWN WSAESHUTDOWN
+# endif /* !ESHUTDOWN */
+# if !defined (ETOOMANYREFS)
+# define ETOOMANYREFS WSAETOOMANYREFS
+# endif /* !ETOOMANYREFS */
+# if !defined (ETIMEDOUT)
+# define ETIMEDOUT WSAETIMEDOUT
+# endif /* !ETIMEDOUT */
+# if !defined (ECONNREFUSED)
+# define ECONNREFUSED WSAECONNREFUSED
+# endif /* !ECONNREFUSED */
+# if !defined (ELOOP)
+# define ELOOP WSAELOOP
+# endif /* !ELOOP */
+# if !defined (EHOSTDOWN)
+# define EHOSTDOWN WSAEHOSTDOWN
+# endif /* !EHOSTDOWN */
+# if !defined (EHOSTUNREACH)
+# define EHOSTUNREACH WSAEHOSTUNREACH
+# endif /* !EHOSTUNREACH */
+# if !defined (EPROCLIM)
+# define EPROCLIM WSAEPROCLIM
+# endif /* !EPROCLIM */
+# if !defined (EUSERS)
+# define EUSERS WSAEUSERS
+# endif /* !EUSERS */
+# if !defined (EDQUOT)
+# define EDQUOT WSAEDQUOT
+# endif /* !EDQUOT */
+# if !defined (ESTALE)
+# define ESTALE WSAESTALE
+# endif /* !ESTALE */
+# if !defined (EREMOTE)
+# define EREMOTE WSAEREMOTE
+# endif /* !EREMOTE */
+
+ // Grrr! ENAMETOOLONG and ENOTEMPTY are already defined by the horrible
+ // 'standard' library.
+ // #define ENAMETOOLONG WSAENAMETOOLONG
+# if !defined (EADDRINUSE)
+# define EADDRINUSE WSAEADDRINUSE
+# endif /* EADDRINUSE*/
// CE needs this...
# if !defined (EPERM)
@@ -92,6 +168,120 @@ extern "C"
void herror (const char *str);
#endif /* ACE_HAS_H_ERRNO */
+#if defined (ACE_LACKS_ERRNO_H)
+# if !defined (EPERM)
+# define EPERM 1
+# endif /* EPERM */
+# if !defined (ENOENT)
+# define ENOENT 2
+# endif /* ENOENT */
+# if !defined (ESRCH)
+# define ESRCH 3
+# endif /* ESRCH */
+# if !defined (EINTR)
+# define EINTR 4
+# endif /* EINTR */
+# if !defined (EIO)
+# define EIO 5
+# endif /* EIO */
+# if !defined (ENXIO)
+# define ENXIO 6
+# endif /* ENXIO */
+# if !defined (E2BIG)
+# define E2BIG 7
+# endif /* E2BIG */
+# if !defined (ENOEXEC)
+# define ENOEXEC 8
+# endif /* ENOEXEC */
+# if !defined (EBADF)
+# define EBADF 9
+# endif /* EBADF */
+# if !defined (ECHILD)
+# define ECHILD 10
+# endif /* ECHILD */
+# if !defined (EAGAIN)
+# define EAGAIN 11
+# endif /* EAGAIN */
+# if !defined (ENOMEM)
+# define ENOMEM 12
+# endif /* ENOMEM */
+# if !defined (EACCES)
+# define EACCES 13
+# endif /* EACCES */
+# if !defined (EFAULT)
+# define EFAULT 14
+# endif /* EFAULT */
+# if !defined (EBUSY)
+# define EBUSY 16
+# endif /* EBUSY */
+# if !defined (EEXIST)
+# define EEXIST 17
+# endif /* EEXIST */
+# if !defined (EXDEV)
+# define EXDEV 18
+# endif /* EXDEV */
+# if !defined (ENODEV)
+# define ENODEV 19
+# endif /* ENODEV */
+# if !defined (ENOTDIR)
+# define ENOTDIR 20
+# endif /* ENOTDIR */
+# if !defined (EISDIR)
+# define EISDIR 21
+# endif /* EISDIR */
+# if !defined (EINVAL)
+# define EINVAL 22
+# endif /* EINVAL */
+# if !defined (ENFILE)
+# define ENFILE 23
+# endif /* ENFILE */
+# if !defined (EMFILE)
+# define EMFILE 24
+# endif /* EMFILE */
+# if !defined (ENOTTY)
+# define ENOTTY 25
+# endif /* ENOTTY */
+# if !defined (EFBIG)
+# define EFBIG 27
+# endif /* EFBIG */
+# if !defined (ENOSPC)
+# define ENOSPC 28
+# endif /* ENOSPC */
+# if !defined (ESPIPE)
+# define ESPIPE 29
+# endif /* ESPIPE */
+# if !defined (EROFS)
+# define EROFS 30
+# endif /* EROFS */
+# if !defined (EMLINK)
+# define EMLINK 31
+# endif /* EMLINK */
+# if !defined (EPIPE)
+# define EPIPE 32
+# endif /* EPIPE */
+# if !defined (EDOM)
+# define EDOM 33
+# endif /* EDOM */
+# if !defined (ERANGE)
+# define ERANGE 34
+# endif /* ERANGE */
+# if !defined (EDEADLK)
+# define EDEADLK 36
+# endif /* EDEADLK */
+# if !defined (ENAMETOOLONG)
+# define ENAMETOOLONG 38
+# endif /* ENAMETOOLONG */
+# if !defined (ENOLCK)
+# define ENOLCK 39
+# endif /* ENOLCK */
+# if !defined (ENOSYS)
+# define ENOSYS 40
+# endif /* ENOSYS */
+# if !defined (ENOTEMPTY)
+# define ENOTEMPTY 41
+# endif /* ENOTEMPTY */
+#endif /* ACE_LACKS_ERRNO_H */
+
#if defined (ACE_LACKS_T_ERRNO)
extern int t_errno;
#endif /* ACE_LACKS_T_ERRNO */