00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef SU_ERRNO_H
00026
00027 #define SU_ERRNO_H
00028
00039 #ifndef SU_CONFIG_H
00040 #include "sofia-sip/su_config.h"
00041 #endif
00042
00043 #include <errno.h>
00044
00045 SOFIA_BEGIN_DECLS
00046
00048 SOFIAPUBFUN char const *su_strerror(int e);
00049
00051 SOFIAPUBFUN int su_errno(void);
00052
00054 SOFIAPUBFUN int su_seterrno(int);
00055
00056 #if !SU_HAVE_WINSOCK
00057 #define su_errno() (errno)
00058 #define su_seterrno(n) ((errno = (n)), -1)
00059 #endif
00060
00061 #if defined(__APPLE_CC__)
00062 #ifndef EBADMSG
00063 #define EBADMSG EFAULT
00064 #endif
00065 #ifndef EPROTO
00066 #define EPROTO EPROTOTYPE
00067 #endif
00068 #ifndef EBADMSG
00069 #define EBADMSG EFAULT
00070 #endif
00071 #endif
00072
00073 #if defined(_WIN32)
00074
00075 #ifndef EWOULDBLOCK
00076 #define EWOULDBLOCK (10035)
00077 #endif
00078
00079 #ifndef EINPROGRESS
00080 #define EINPROGRESS (10036)
00081 #endif
00082
00083 #ifndef EALREADY
00084 #define EALREADY (10037)
00085 #endif
00086
00087 #ifndef ENOTSOCK
00088 #define ENOTSOCK (10038)
00089 #endif
00090
00091 #ifndef EDESTADDRREQ
00092 #define EDESTADDRREQ (10039)
00093 #endif
00094
00095 #ifndef EMSGSIZE
00096 #define EMSGSIZE (10040)
00097 #endif
00098
00099 #ifndef EPROTOTYPE
00100 #define EPROTOTYPE (10041)
00101 #endif
00102
00103 #ifndef ENOPROTOOPT
00104 #define ENOPROTOOPT (10042)
00105 #endif
00106
00107 #ifndef EPROTONOSUPPORT
00108 #define EPROTONOSUPPORT (10043)
00109 #endif
00110
00111 #ifndef ESOCKTNOSUPPORT
00112 #define ESOCKTNOSUPPORT (10044)
00113 #endif
00114
00115 #ifndef EOPNOTSUPP
00116 #define EOPNOTSUPP (10045)
00117 #endif
00118
00119 #ifndef EPFNOSUPPORT
00120 #define EPFNOSUPPORT (10046)
00121 #endif
00122
00123 #ifndef EAFNOSUPPORT
00124 #define EAFNOSUPPORT (10047)
00125 #endif
00126
00127 #ifndef EADDRINUSE
00128 #define EADDRINUSE (10048)
00129 #endif
00130
00131 #ifndef EADDRNOTAVAIL
00132 #define EADDRNOTAVAIL (10049)
00133 #endif
00134
00135 #ifndef ENETDOWN
00136 #define ENETDOWN (10050)
00137 #endif
00138
00139 #ifndef ENETUNREACH
00140 #define ENETUNREACH (10051)
00141 #endif
00142
00143 #ifndef ENETRESET
00144 #define ENETRESET (10052)
00145 #endif
00146
00147 #ifndef ECONNABORTED
00148 #define ECONNABORTED (10053)
00149 #endif
00150
00151 #ifndef ECONNRESET
00152 #define ECONNRESET (10054)
00153 #endif
00154
00155 #ifndef ENOBUFS
00156 #define ENOBUFS (10055)
00157 #endif
00158
00159 #ifndef EISCONN
00160 #define EISCONN (10056)
00161 #endif
00162
00163 #ifndef ENOTCONN
00164 #define ENOTCONN (10057)
00165 #endif
00166
00167 #ifndef ESHUTDOWN
00168 #define ESHUTDOWN (10058)
00169 #endif
00170
00171 #ifndef ETOOMANYREFS
00172 #define ETOOMANYREFS (10059)
00173 #endif
00174
00175 #ifndef ETIMEDOUT
00176 #define ETIMEDOUT (10060)
00177 #endif
00178
00179 #ifndef ECONNREFUSED
00180 #define ECONNREFUSED (10061)
00181 #endif
00182
00183 #ifndef ELOOP
00184 #define ELOOP (10062)
00185 #endif
00186
00187 #ifndef ENAMETOOLONG
00188 #define ENAMETOOLONG (10063)
00189 #endif
00190
00191 #ifndef EHOSTDOWN
00192 #define EHOSTDOWN (10064)
00193 #endif
00194
00195 #ifndef EHOSTUNREACH
00196 #define EHOSTUNREACH (10065)
00197 #endif
00198
00199 #ifndef ENOTEMPTY
00200 #define ENOTEMPTY (10066)
00201 #endif
00202
00203 #ifndef EPROCLIM
00204 #define EPROCLIM (10067)
00205 #endif
00206
00207 #ifndef EUSERS
00208 #define EUSERS (10068)
00209 #endif
00210
00211 #ifndef EDQUOT
00212 #define EDQUOT (10069)
00213 #endif
00214
00215 #ifndef ESTALE
00216 #define ESTALE (10070)
00217 #endif
00218
00219 #ifndef EREMOTE
00220 #define EREMOTE (10071)
00221 #endif
00222
00223 #ifndef EBADMSG
00224 # if defined(WSABADMSG)
00225 # define EBADMSG (WSAEBADMSG)
00226 # else
00227 # define EBADMSG (20005)
00228 # endif
00229 #endif
00230
00231 #ifndef EPROTO
00232 # if defined(WSAEPROTO)
00233 # define EPROTO WSAEPROTO
00234 # else
00235 # define EPROTO (20006)
00236 # endif
00237 #endif
00238
00239 #endif
00240
00241 SOFIA_END_DECLS
00242
00243 #endif