~drizzle-trunk/drizzle/development

1720.1.5 by Monty Taylor
Added libdrizzle to the tree.
1
/* A POSIX-like <errno.h>.
2
3
   Copyright (C) 2008 Free Software Foundation, Inc.
4
5
   This program is free software; you can redistribute it and/or modify
6
   it under the terms of the GNU Lesser General Public License as published by
7
   the Free Software Foundation; either version 2, or (at your option)
8
   any later version.
9
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 Lesser General Public License for more details.
14
15
   You should have received a copy of the GNU Lesser 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.  */
18
19
#ifndef _GL_ERRNO_H
20
#define _GL_ERRNO_H
21
22
23
/* On native Windows platforms, many macros are not defined.  */
24
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
25
26
/* POSIX says that EAGAIN and EWOULDBLOCK may have the same value.  */
27
#  define EWOULDBLOCK     EAGAIN
28
29
/* Values >= 100 seem safe to use.  */
30
#  define ETXTBSY   100
31
#  define GNULIB_defined_ETXTBSY 1
32
33
/* These are intentionally the same values as the WSA* error numbers, defined
34
   in <winsock2.h>.  */
35
#  define EINPROGRESS WSAEINPROGRESS
36
#  define EALREADY WSAEALREADY
37
#  define EISCONN WSAEISCONN
38
#  define ENOBUFS WSAENOBUFS
39
#  define EAGAIN WSAEWOULDBLOCK
40
#  define EINTR WSAEINTR
41
#  define EPIPE WSAECONNRESET
42
#  define EINVAL WSAEINVAL
43
#  define ECONNREFUSED WSAECONNREFUSED
44
#  define ENETUNREACH WSAENETUNREACH
45
#  define ETIMEDOUT WSAETIMEDOUT
46
#  define ECONNRESET WSAECONNRESET 
47
#  define EADDRINUSE WSAEADDRINUSE
48
#  define EOPNOTSUPP WSAEOPNOTSUPP
49
#  define ENOPROTOOPT WSAENOPROTOOPT
50
#  define ENOTSOCK        10038
51
#  define EDESTADDRREQ    10039
52
#  define EMSGSIZE        10040
53
#  define EPROTOTYPE      10041
54
#  define EPROTONOSUPPORT 10043
55
#  define ESOCKTNOSUPPORT 10044  /* not required by POSIX */
56
#  define EPFNOSUPPORT    10046  /* not required by POSIX */
57
#  define EAFNOSUPPORT    10047
58
#  define EADDRNOTAVAIL   10049
59
#  define ENETDOWN        10050
60
#  define ENETRESET       10052
61
#  define ECONNABORTED    10053
62
#  define ENOTCONN        10057
63
#  define ESHUTDOWN       10058  /* not required by POSIX */
64
#  define ETOOMANYREFS    10059  /* not required by POSIX */
65
#  define ELOOP           10062
66
#  define EHOSTDOWN       10064  /* not required by POSIX */
67
#  define EHOSTUNREACH    10065
68
#  define EPROCLIM        10067  /* not required by POSIX */
69
#  define EUSERS          10068  /* not required by POSIX */
70
#  define EDQUOT          10069
71
#  define ESTALE          10070
72
#  define EREMOTE         10071  /* not required by POSIX */
73
#  define GNULIB_defined_ESOCK 1
74
75
# endif
76
77
78
/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
79
   EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
80
   Define them here.  Values >= 2000 seem safe to use: Solaris ESTALE = 151,
81
   HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
82
83
   Note: When one of these systems defines some of these macros some day,
84
   binaries will have to be recompiled so that they recognizes the new
85
   errno values from the system.  */
86
87
# ifndef ENOMSG
88
#  define ENOMSG    2000
89
#  define GNULIB_defined_ENOMSG 1
90
# endif
91
92
# ifndef EIDRM
93
#  define EIDRM     2001
94
#  define GNULIB_defined_EIDRM 1
95
# endif
96
97
# ifndef ENOLINK
98
#  define ENOLINK   2002
99
#  define GNULIB_defined_ENOLINK 1
100
# endif
101
102
# ifndef EPROTO
103
#  define EPROTO    2003
104
#  define GNULIB_defined_EPROTO 1
105
# endif
106
107
# ifndef EMULTIHOP
108
#  define EMULTIHOP 2004
109
#  define GNULIB_defined_EMULTIHOP 1
110
# endif
111
112
# ifndef EBADMSG
113
#  define EBADMSG   2005
114
#  define GNULIB_defined_EBADMSG 1
115
# endif
116
117
# ifndef EOVERFLOW
118
#  define EOVERFLOW 2006
119
#  define GNULIB_defined_EOVERFLOW 1
120
# endif
121
122
# ifndef ENOTSUP
123
#  define ENOTSUP   2007
124
#  define GNULIB_defined_ENOTSUP 1
125
# endif
126
127
# ifndef ECANCELED
128
#  define ECANCELED 2008
129
#  define GNULIB_defined_ECANCELED 1
130
# endif
131
132
133
#endif /* _GL_ERRNO_H */