os_errno.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    os_errno.h
00006  *
00007  *  system error numbers
00008  *
00009  *  os_errno.h,v 1.12 2006/05/05 08:03:19 jwillemsen Exp
00010  *
00011  *  @author Don Hinton <dhinton@dresystems.com>
00012  *  @author This code was originally in various places including ace/OS.h.
00013  */
00014 //=============================================================================
00015 
00016 #ifndef ACE_OS_INCLUDE_OS_ERRNO_H
00017 #define ACE_OS_INCLUDE_OS_ERRNO_H
00018 
00019 #include /**/ "ace/pre.h"
00020 
00021 #include "ace/config-lite.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 #if !defined (ACE_LACKS_ERRNO_H)
00028 # include /**/ <errno.h>
00029 #endif /* !ACE_LACKS_ERRNO_H */
00030 
00031 #if defined (ACE_VXWORKS)
00032 // Needed for VxWorks to pickup errnoSet()
00033 #include /**/ <errnoLib.h>
00034 #endif /* ACE_VXWORKS */
00035 
00036 // Place all additions (especially function declarations) within extern "C" {}
00037 #ifdef __cplusplus
00038 extern "C"
00039 {
00040 #endif /* __cplusplus */
00041 
00042 #if defined (ACE_WIN32)
00043    // error code mapping for windows
00044 #  define ETIME                   ERROR_SEM_TIMEOUT
00045 #  define EWOULDBLOCK             WSAEWOULDBLOCK
00046 #  define EINPROGRESS             WSAEINPROGRESS
00047 #  define EALREADY                WSAEALREADY
00048 #  define ENOTSOCK                WSAENOTSOCK
00049 #  define EDESTADDRREQ            WSAEDESTADDRREQ
00050 #  define EMSGSIZE                WSAEMSGSIZE
00051 #  define EPROTOTYPE              WSAEPROTOTYPE
00052 #  define ENOPROTOOPT             WSAENOPROTOOPT
00053 #  define EPROTONOSUPPORT         WSAEPROTONOSUPPORT
00054 #  define ESOCKTNOSUPPORT         WSAESOCKTNOSUPPORT
00055 #  define EOPNOTSUPP              WSAEOPNOTSUPP
00056 #  define EPFNOSUPPORT            WSAEPFNOSUPPORT
00057 #  define EAFNOSUPPORT            WSAEAFNOSUPPORT
00058 #  define EADDRINUSE              WSAEADDRINUSE
00059 #  define EADDRNOTAVAIL           WSAEADDRNOTAVAIL
00060 #  define ENETDOWN                WSAENETDOWN
00061 #  define ENETUNREACH             WSAENETUNREACH
00062 #  define ENETRESET               WSAENETRESET
00063 #  define ECONNABORTED            WSAECONNABORTED
00064 #  define ECONNRESET              WSAECONNRESET
00065 #  define ENOBUFS                 WSAENOBUFS
00066 #  define EISCONN                 WSAEISCONN
00067 #  define ENOTCONN                WSAENOTCONN
00068 #  define ESHUTDOWN               WSAESHUTDOWN
00069 #  define ETOOMANYREFS            WSAETOOMANYREFS
00070 #  define ETIMEDOUT               WSAETIMEDOUT
00071 #  define ECONNREFUSED            WSAECONNREFUSED
00072 #  define ELOOP                   WSAELOOP
00073 #  define EHOSTDOWN               WSAEHOSTDOWN
00074 #  define EHOSTUNREACH            WSAEHOSTUNREACH
00075 #  define EPROCLIM                WSAEPROCLIM
00076 #  define EUSERS                  WSAEUSERS
00077 #  define EDQUOT                  WSAEDQUOT
00078 #  define ESTALE                  WSAESTALE
00079 #  define EREMOTE                 WSAEREMOTE
00080    // Grrr! ENAMETOOLONG and ENOTEMPTY are already defined by the horrible
00081    // 'standard' library.
00082    // #define ENAMETOOLONG            WSAENAMETOOLONG
00083 #  define EADDRINUSE WSAEADDRINUSE
00084 
00085   // CE needs this...
00086 #  if !defined (EPERM)
00087 #    define EPERM                 ERROR_ACCESS_DENIED
00088 #  endif
00089 #endif /* ACE_WIN32 */
00090 
00091 #if defined (ACE_HAS_H_ERRNO)
00092 void herror (const char *str);
00093 #endif /* ACE_HAS_H_ERRNO */
00094 
00095 #if !defined (ACE_WIN32) && defined (ACE_LACKS_T_ERRNO)
00096 extern int t_errno;
00097 #endif /* ACE_WIN32 && ACE_LACKS_T_ERRNO */
00098 
00099 #if !defined (ENOSYS)
00100 # define ENOSYS EFAULT /* Operation not supported or unknown error. */
00101 #endif /* !ENOSYS */
00102 
00103 #if !defined (ENOTSUP)
00104 # define ENOTSUP ENOSYS  /* Operation not supported. */
00105 #endif /* !ENOTSUP */
00106 
00107 #if !defined (ESUCCESS)
00108 #  define ESUCCESS 0
00109 #endif /* !ESUCCESS */
00110 
00111 #if !defined (EIDRM)
00112 #  define EIDRM 0
00113 #endif /* !EIDRM */
00114 
00115 #if !defined (ENFILE)
00116 #  define ENFILE EMFILE /* No more socket descriptors are available. */
00117 #endif /* !ENFILE */
00118 
00119 #if !defined (ECOMM)
00120    // Not the same, but ECONNABORTED is provided on NT.
00121 #  define ECOMM ECONNABORTED
00122 #endif /* ECOMM */
00123 
00124 #if !defined (EDEADLK)
00125 #  define EDEADLK 1000 /* Some large number.... */
00126 #endif /* !EDEADLK */
00127 
00128 #if !defined (ENXIO)     /* Needed in SOCK_Dgram_Mcast */
00129 #   define ENXIO  6
00130 #endif /* ENXIO */
00131 
00132 #if !defined (ETIMEDOUT) && defined (ETIME)
00133 #  define ETIMEDOUT ETIME
00134 #endif /* ETIMEDOUT */
00135 
00136 #if !defined (ETIME) && defined (ETIMEDOUT)
00137 #  define ETIME ETIMEDOUT
00138 #endif /* ETIMED */
00139 
00140 #if !defined (EBUSY)
00141 #  define EBUSY ETIME
00142 #endif /* EBUSY */
00143 
00144 #ifdef __cplusplus
00145 }
00146 #endif /* __cplusplus */
00147 
00148 #include /**/ "ace/post.h"
00149 #endif /* ACE_OS_INCLUDE_OS_ERRNO_H */

Generated on Thu Nov 9 09:41:57 2006 for ACE by doxygen 1.3.6