su 1.12.10
|
00001 /* 00002 * This file is part of the Sofia-SIP package 00003 * 00004 * Copyright (C) 2005 Nokia Corporation. 00005 * 00006 * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden> 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation; either version 2.1 of 00011 * the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00021 * 02110-1301 USA 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__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) 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) /* WSAEWOULDBLOCK */ 00077 #endif 00078 00079 #ifndef EINPROGRESS 00080 #define EINPROGRESS (10036) /* WSAEINPROGRESS */ 00081 #endif 00082 00083 #ifndef EALREADY 00084 #define EALREADY (10037) /* WSAEALREADY */ 00085 #endif 00086 00087 #ifndef ENOTSOCK 00088 #define ENOTSOCK (10038) /* WSAENOTSOCK */ 00089 #endif 00090 00091 #ifndef EDESTADDRREQ 00092 #define EDESTADDRREQ (10039) /* WSAEDESTADDRREQ */ 00093 #endif 00094 00095 #ifndef EMSGSIZE 00096 #define EMSGSIZE (10040) /* WSAEMSGSIZE */ 00097 #endif 00098 00099 #ifndef EPROTOTYPE 00100 #define EPROTOTYPE (10041) /* WSAEPROTOTYPE */ 00101 #endif 00102 00103 #ifndef ENOPROTOOPT 00104 #define ENOPROTOOPT (10042) /* WSAENOPROTOOPT */ 00105 #endif 00106 00107 #ifndef EPROTONOSUPPORT 00108 #define EPROTONOSUPPORT (10043) /* WSAEPROTONOSUPPORT */ 00109 #endif 00110 00111 #ifndef ESOCKTNOSUPPORT 00112 #define ESOCKTNOSUPPORT (10044) /* WSAESOCKTNOSUPPORT */ 00113 #endif 00114 00115 #ifndef EOPNOTSUPP 00116 #define EOPNOTSUPP (10045) /* WSAEOPNOTSUPP */ 00117 #endif 00118 00119 #ifndef EPFNOSUPPORT 00120 #define EPFNOSUPPORT (10046) /* WSAEPFNOSUPPORT */ 00121 #endif 00122 00123 #ifndef EAFNOSUPPORT 00124 #define EAFNOSUPPORT (10047) /* WSAEAFNOSUPPORT */ 00125 #endif 00126 00127 #ifndef EADDRINUSE 00128 #define EADDRINUSE (10048) /* WSAEADDRINUSE */ 00129 #endif 00130 00131 #ifndef EADDRNOTAVAIL 00132 #define EADDRNOTAVAIL (10049) /* WSAEADDRNOTAVAIL */ 00133 #endif 00134 00135 #ifndef ENETDOWN 00136 #define ENETDOWN (10050) /* WSAENETDOWN */ 00137 #endif 00138 00139 #ifndef ENETUNREACH 00140 #define ENETUNREACH (10051) /* WSAENETUNREACH */ 00141 #endif 00142 00143 #ifndef ENETRESET 00144 #define ENETRESET (10052) /* WSAENETRESET */ 00145 #endif 00146 00147 #ifndef ECONNABORTED 00148 #define ECONNABORTED (10053) /* WSAECONNABORTED */ 00149 #endif 00150 00151 #ifndef ECONNRESET 00152 #define ECONNRESET (10054) /* WSAECONNRESET */ 00153 #endif 00154 00155 #ifndef ENOBUFS 00156 #define ENOBUFS (10055) /* WSAENOBUFS */ 00157 #endif 00158 00159 #ifndef EISCONN 00160 #define EISCONN (10056) /* WSAEISCONN */ 00161 #endif 00162 00163 #ifndef ENOTCONN 00164 #define ENOTCONN (10057) /* WSAENOTCONN */ 00165 #endif 00166 00167 #ifndef ESHUTDOWN 00168 #define ESHUTDOWN (10058) /* WSAESHUTDOWN */ 00169 #endif 00170 00171 #ifndef ETOOMANYREFS 00172 #define ETOOMANYREFS (10059) /* WSAETOOMANYREFS */ 00173 #endif 00174 00175 #ifndef ETIMEDOUT 00176 #define ETIMEDOUT (10060) /* WSAETIMEDOUT */ 00177 #endif 00178 00179 #ifndef ECONNREFUSED 00180 #define ECONNREFUSED (10061) /* WSAECONNREFUSED */ 00181 #endif 00182 00183 #ifndef ELOOP 00184 #define ELOOP (10062) /* WSAELOOP */ 00185 #endif 00186 00187 #ifndef ENAMETOOLONG 00188 #define ENAMETOOLONG (10063) /* WSAENAMETOOLONG */ 00189 #endif 00190 00191 #ifndef EHOSTDOWN 00192 #define EHOSTDOWN (10064) /* WSAEHOSTDOWN */ 00193 #endif 00194 00195 #ifndef EHOSTUNREACH 00196 #define EHOSTUNREACH (10065) /* WSAEHOSTUNREACH */ 00197 #endif 00198 00199 #ifndef ENOTEMPTY 00200 #define ENOTEMPTY (10066) /* WSAENOTEMPTY */ 00201 #endif 00202 00203 #ifndef EPROCLIM 00204 #define EPROCLIM (10067) /* WSAEPROCLIM */ 00205 #endif 00206 00207 #ifndef EUSERS 00208 #define EUSERS (10068) /* WSAEUSERS */ 00209 #endif 00210 00211 #ifndef EDQUOT 00212 #define EDQUOT (10069) /* WSAEDQUOT */ 00213 #endif 00214 00215 #ifndef ESTALE 00216 #define ESTALE (10070) /* WSAESTALE */ 00217 #endif 00218 00219 #ifndef EREMOTE 00220 #define EREMOTE (10071) /* WSAEREMOTE */ 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