~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to win32/windows/errno.h

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-11-12 12:26:01 UTC
  • mfrom: (1.1.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101112122601-myppfj3tfmlkccuq
Tags: upstream-2010.11.03
ImportĀ upstreamĀ versionĀ 2010.11.03

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
21
 
 
22
#include <errno.h>
 
23
 
 
24
#ifndef _GL_ERRNO_H
 
25
#define _GL_ERRNO_H
 
26
 
 
27
 
 
28
/* On native Windows platforms, many macros are not defined.  */
 
29
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 
30
 
 
31
/* POSIX says that EAGAIN and EWOULDBLOCK may have the same value.  */
 
32
#  define EWOULDBLOCK     EAGAIN
 
33
 
 
34
/* Values >= 100 seem safe to use.  */
 
35
#  define ETXTBSY   100
 
36
#  define GNULIB_defined_ETXTBSY 1
 
37
 
 
38
/* These are intentionally the same values as the WSA* error numbers, defined
 
39
   in <winsock2.h>.  */
 
40
#  define EINPROGRESS     10036
 
41
#  define EALREADY        10037
 
42
#  define ENOTSOCK        10038
 
43
#  define EDESTADDRREQ    10039
 
44
#  define EMSGSIZE        10040
 
45
#  define EPROTOTYPE      10041
 
46
#  define ENOPROTOOPT     10042
 
47
#  define EPROTONOSUPPORT 10043
 
48
#  define ESOCKTNOSUPPORT 10044  /* not required by POSIX */
 
49
#  define EOPNOTSUPP      10045
 
50
#  define EPFNOSUPPORT    10046  /* not required by POSIX */
 
51
#  define EAFNOSUPPORT    10047
 
52
#  define EADDRINUSE      10048
 
53
#  define EADDRNOTAVAIL   10049
 
54
#  define ENETDOWN        10050
 
55
#  define ENETUNREACH     10051
 
56
#  define ENETRESET       10052
 
57
#  define ECONNABORTED    10053
 
58
#  define ECONNRESET      10054
 
59
#  define ENOBUFS         10055
 
60
#  define EISCONN         10056
 
61
#  define ENOTCONN        10057
 
62
#  define ESHUTDOWN       10058  /* not required by POSIX */
 
63
#  define ETOOMANYREFS    10059  /* not required by POSIX */
 
64
#  define ETIMEDOUT       10060
 
65
#  define ECONNREFUSED    10061
 
66
#  define ELOOP           10062
 
67
#  define EHOSTDOWN       10064  /* not required by POSIX */
 
68
#  define EHOSTUNREACH    10065
 
69
#  define EPROCLIM        10067  /* not required by POSIX */
 
70
#  define EUSERS          10068  /* not required by POSIX */
 
71
#  define EDQUOT          10069
 
72
#  define ESTALE          10070
 
73
#  define EREMOTE         10071  /* not required by POSIX */
 
74
#  define GNULIB_defined_ESOCK 1
 
75
 
 
76
# endif
 
77
 
 
78
 
 
79
/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
 
80
   EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
 
81
   Define them here.  Values >= 2000 seem safe to use: Solaris ESTALE = 151,
 
82
   HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
 
83
 
 
84
   Note: When one of these systems defines some of these macros some day,
 
85
   binaries will have to be recompiled so that they recognizes the new
 
86
   errno values from the system.  */
 
87
 
 
88
# ifndef ENOMSG
 
89
#  define ENOMSG    2000
 
90
#  define GNULIB_defined_ENOMSG 1
 
91
# endif
 
92
 
 
93
# ifndef EIDRM
 
94
#  define EIDRM     2001
 
95
#  define GNULIB_defined_EIDRM 1
 
96
# endif
 
97
 
 
98
# ifndef ENOLINK
 
99
#  define ENOLINK   2002
 
100
#  define GNULIB_defined_ENOLINK 1
 
101
# endif
 
102
 
 
103
# ifndef EPROTO
 
104
#  define EPROTO    2003
 
105
#  define GNULIB_defined_EPROTO 1
 
106
# endif
 
107
 
 
108
# ifndef EMULTIHOP
 
109
#  define EMULTIHOP 2004
 
110
#  define GNULIB_defined_EMULTIHOP 1
 
111
# endif
 
112
 
 
113
# ifndef EBADMSG
 
114
#  define EBADMSG   2005
 
115
#  define GNULIB_defined_EBADMSG 1
 
116
# endif
 
117
 
 
118
# ifndef EOVERFLOW
 
119
#  define EOVERFLOW 2006
 
120
#  define GNULIB_defined_EOVERFLOW 1
 
121
# endif
 
122
 
 
123
# ifndef ENOTSUP
 
124
#  define ENOTSUP   2007
 
125
#  define GNULIB_defined_ENOTSUP 1
 
126
# endif
 
127
 
 
128
# ifndef ECANCELED
 
129
#  define ECANCELED 2008
 
130
#  define GNULIB_defined_ECANCELED 1
 
131
# endif
 
132
 
 
133
 
 
134
#endif /* _GL_ERRNO_H */
 
135
#endif /* _GL_ERRNO_H */