Add `gnutls/dtls.h' to the distribution.
[gnutls.git] / gl / errno.in.h
blob7ebaddcfc2c7dd7bffede5ca5b5188568a8c64ef
1 /* A POSIX-like <errno.h>.
3 Copyright (C) 2008-2010 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3, or (at your option)
8 any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software Foundation,
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
19 #ifndef _GL_ERRNO_H
21 #if __GNUC__ >= 3
22 @PRAGMA_SYSTEM_HEADER@
23 #endif
24 @PRAGMA_COLUMNS@
26 /* The include_next requires a split double-inclusion guard. */
27 #@INCLUDE_NEXT@ @NEXT_ERRNO_H@
29 #ifndef _GL_ERRNO_H
30 #define _GL_ERRNO_H
33 /* On native Windows platforms, many macros are not defined. */
34 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
36 /* POSIX says that EAGAIN and EWOULDBLOCK may have the same value. */
37 # define EWOULDBLOCK EAGAIN
39 /* Values >= 100 seem safe to use. */
40 # define ETXTBSY 100
41 # define GNULIB_defined_ETXTBSY 1
43 /* These are intentionally the same values as the WSA* error numbers, defined
44 in <winsock2.h>. */
45 # define EINPROGRESS 10036
46 # define EALREADY 10037
47 # define ENOTSOCK 10038
48 # define EDESTADDRREQ 10039
49 # define EMSGSIZE 10040
50 # define EPROTOTYPE 10041
51 # define ENOPROTOOPT 10042
52 # define EPROTONOSUPPORT 10043
53 # define ESOCKTNOSUPPORT 10044 /* not required by POSIX */
54 # define EOPNOTSUPP 10045
55 # define EPFNOSUPPORT 10046 /* not required by POSIX */
56 # define EAFNOSUPPORT 10047
57 # define EADDRINUSE 10048
58 # define EADDRNOTAVAIL 10049
59 # define ENETDOWN 10050
60 # define ENETUNREACH 10051
61 # define ENETRESET 10052
62 # define ECONNABORTED 10053
63 # define ECONNRESET 10054
64 # define ENOBUFS 10055
65 # define EISCONN 10056
66 # define ENOTCONN 10057
67 # define ESHUTDOWN 10058 /* not required by POSIX */
68 # define ETOOMANYREFS 10059 /* not required by POSIX */
69 # define ETIMEDOUT 10060
70 # define ECONNREFUSED 10061
71 # define ELOOP 10062
72 # define EHOSTDOWN 10064 /* not required by POSIX */
73 # define EHOSTUNREACH 10065
74 # define EPROCLIM 10067 /* not required by POSIX */
75 # define EUSERS 10068 /* not required by POSIX */
76 # define EDQUOT 10069
77 # define ESTALE 10070
78 # define EREMOTE 10071 /* not required by POSIX */
79 # define GNULIB_defined_ESOCK 1
81 # endif
84 /* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros
85 EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */
86 # if @EMULTIHOP_HIDDEN@
87 # define EMULTIHOP @EMULTIHOP_VALUE@
88 # define GNULIB_defined_EMULTIHOP 1
89 # endif
90 # if @ENOLINK_HIDDEN@
91 # define ENOLINK @ENOLINK_VALUE@
92 # define GNULIB_defined_ENOLINK 1
93 # endif
94 # if @EOVERFLOW_HIDDEN@
95 # define EOVERFLOW @EOVERFLOW_VALUE@
96 # define GNULIB_defined_EOVERFLOW 1
97 # endif
100 /* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
101 EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
102 Likewise, on NonStop Kernel, EDQUOT is not defined.
103 Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151,
104 HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
106 Note: When one of these systems defines some of these macros some day,
107 binaries will have to be recompiled so that they recognizes the new
108 errno values from the system. */
110 # ifndef ENOMSG
111 # define ENOMSG 2000
112 # define GNULIB_defined_ENOMSG 1
113 # endif
115 # ifndef EIDRM
116 # define EIDRM 2001
117 # define GNULIB_defined_EIDRM 1
118 # endif
120 # ifndef ENOLINK
121 # define ENOLINK 2002
122 # define GNULIB_defined_ENOLINK 1
123 # endif
125 # ifndef EPROTO
126 # define EPROTO 2003
127 # define GNULIB_defined_EPROTO 1
128 # endif
130 # ifndef EMULTIHOP
131 # define EMULTIHOP 2004
132 # define GNULIB_defined_EMULTIHOP 1
133 # endif
135 # ifndef EBADMSG
136 # define EBADMSG 2005
137 # define GNULIB_defined_EBADMSG 1
138 # endif
140 # ifndef EOVERFLOW
141 # define EOVERFLOW 2006
142 # define GNULIB_defined_EOVERFLOW 1
143 # endif
145 # ifndef ENOTSUP
146 # define ENOTSUP 2007
147 # define GNULIB_defined_ENOTSUP 1
148 # endif
150 # ifndef ESTALE
151 # define ESTALE 2009
152 # define GNULIB_defined_ESTALE 1
153 # endif
155 # ifndef EDQUOT
156 # define EDQUOT 2010
157 # define GNULIB_defined_EDQUOT 1
158 # endif
160 # ifndef ECANCELED
161 # define ECANCELED 2008
162 # define GNULIB_defined_ECANCELED 1
163 # endif
166 #endif /* _GL_ERRNO_H */
167 #endif /* _GL_ERRNO_H */