Back to index

nagios-plugins  1.4.16
errno.in.h
Go to the documentation of this file.
00001 /* A POSIX-like <errno.h>.
00002 
00003    Copyright (C) 2008-2010 Free Software Foundation, Inc.
00004 
00005    This program is free software; you can redistribute it and/or modify
00006    it under the terms of the GNU General Public License as published by
00007    the Free Software Foundation; either version 3, or (at your option)
00008    any later version.
00009 
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013    GNU General Public License for more details.
00014 
00015    You should have received a copy of the GNU General Public License
00016    along with this program; if not, write to the Free Software Foundation,
00017    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
00018 
00019 #ifndef _GL_ERRNO_H
00020 
00021 #if __GNUC__ >= 3
00022 @PRAGMA_SYSTEM_HEADER@
00023 #endif
00024 
00025 /* The include_next requires a split double-inclusion guard.  */
00026 #@INCLUDE_NEXT@ @NEXT_ERRNO_H@
00027 
00028 #ifndef _GL_ERRNO_H
00029 #define _GL_ERRNO_H
00030 
00031 
00032 /* On native Windows platforms, many macros are not defined.  */
00033 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
00034 
00035 /* POSIX says that EAGAIN and EWOULDBLOCK may have the same value.  */
00036 #  define EWOULDBLOCK     EAGAIN
00037 
00038 /* Values >= 100 seem safe to use.  */
00039 #  define ETXTBSY   100
00040 #  define GNULIB_defined_ETXTBSY 1
00041 
00042 /* These are intentionally the same values as the WSA* error numbers, defined
00043    in <winsock2.h>.  */
00044 #  define EINPROGRESS     10036
00045 #  define EALREADY        10037
00046 #  define ENOTSOCK        10038
00047 #  define EDESTADDRREQ    10039
00048 #  define EMSGSIZE        10040
00049 #  define EPROTOTYPE      10041
00050 #  define ENOPROTOOPT     10042
00051 #  define EPROTONOSUPPORT 10043
00052 #  define ESOCKTNOSUPPORT 10044  /* not required by POSIX */
00053 #  define EOPNOTSUPP      10045
00054 #  define EPFNOSUPPORT    10046  /* not required by POSIX */
00055 #  define EAFNOSUPPORT    10047
00056 #  define EADDRINUSE      10048
00057 #  define EADDRNOTAVAIL   10049
00058 #  define ENETDOWN        10050
00059 #  define ENETUNREACH     10051
00060 #  define ENETRESET       10052
00061 #  define ECONNABORTED    10053
00062 #  define ECONNRESET      10054
00063 #  define ENOBUFS         10055
00064 #  define EISCONN         10056
00065 #  define ENOTCONN        10057
00066 #  define ESHUTDOWN       10058  /* not required by POSIX */
00067 #  define ETOOMANYREFS    10059  /* not required by POSIX */
00068 #  define ETIMEDOUT       10060
00069 #  define ECONNREFUSED    10061
00070 #  define ELOOP           10062
00071 #  define EHOSTDOWN       10064  /* not required by POSIX */
00072 #  define EHOSTUNREACH    10065
00073 #  define EPROCLIM        10067  /* not required by POSIX */
00074 #  define EUSERS          10068  /* not required by POSIX */
00075 #  define EDQUOT          10069
00076 #  define ESTALE          10070
00077 #  define EREMOTE         10071  /* not required by POSIX */
00078 #  define GNULIB_defined_ESOCK 1
00079 
00080 # endif
00081 
00082 
00083 /* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros
00084    EMULTIHOP, ENOLINK, EOVERFLOW are not defined.  */
00085 # if @EMULTIHOP_HIDDEN@
00086 #  define EMULTIHOP @EMULTIHOP_VALUE@
00087 #  define GNULIB_defined_EMULTIHOP 1
00088 # endif
00089 # if @ENOLINK_HIDDEN@
00090 #  define ENOLINK   @ENOLINK_VALUE@
00091 #  define GNULIB_defined_ENOLINK 1
00092 # endif
00093 # if @EOVERFLOW_HIDDEN@
00094 #  define EOVERFLOW @EOVERFLOW_VALUE@
00095 #  define GNULIB_defined_EOVERFLOW 1
00096 # endif
00097 
00098 
00099 /* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
00100    EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
00101    Define them here.  Values >= 2000 seem safe to use: Solaris ESTALE = 151,
00102    HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
00103 
00104    Note: When one of these systems defines some of these macros some day,
00105    binaries will have to be recompiled so that they recognizes the new
00106    errno values from the system.  */
00107 
00108 # ifndef ENOMSG
00109 #  define ENOMSG    2000
00110 #  define GNULIB_defined_ENOMSG 1
00111 # endif
00112 
00113 # ifndef EIDRM
00114 #  define EIDRM     2001
00115 #  define GNULIB_defined_EIDRM 1
00116 # endif
00117 
00118 # ifndef ENOLINK
00119 #  define ENOLINK   2002
00120 #  define GNULIB_defined_ENOLINK 1
00121 # endif
00122 
00123 # ifndef EPROTO
00124 #  define EPROTO    2003
00125 #  define GNULIB_defined_EPROTO 1
00126 # endif
00127 
00128 # ifndef EMULTIHOP
00129 #  define EMULTIHOP 2004
00130 #  define GNULIB_defined_EMULTIHOP 1
00131 # endif
00132 
00133 # ifndef EBADMSG
00134 #  define EBADMSG   2005
00135 #  define GNULIB_defined_EBADMSG 1
00136 # endif
00137 
00138 # ifndef EOVERFLOW
00139 #  define EOVERFLOW 2006
00140 #  define GNULIB_defined_EOVERFLOW 1
00141 # endif
00142 
00143 # ifndef ENOTSUP
00144 #  define ENOTSUP   2007
00145 #  define GNULIB_defined_ENOTSUP 1
00146 # endif
00147 
00148 # ifndef ESTALE
00149 #  define ESTALE    2009
00150 #  define GNULIB_defined_ESTALE 1
00151 # endif
00152 
00153 # ifndef ECANCELED
00154 #  define ECANCELED 2008
00155 #  define GNULIB_defined_ECANCELED 1
00156 # endif
00157 
00158 
00159 #endif /* _GL_ERRNO_H */
00160 #endif /* _GL_ERRNO_H */