Blame lib/errno.in.h

Packit 1ac44c
/* A POSIX-like <errno.h>.
Packit 1ac44c
Packit 1ac44c
   Copyright (C) 2008-2018 Free Software Foundation, Inc.
Packit 1ac44c
Packit 1ac44c
   This program is free software; you can redistribute it and/or modify
Packit 1ac44c
   it under the terms of the GNU General Public License as published by
Packit 1ac44c
   the Free Software Foundation; either version 3, or (at your option)
Packit 1ac44c
   any later version.
Packit 1ac44c
Packit 1ac44c
   This program is distributed in the hope that it will be useful,
Packit 1ac44c
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 1ac44c
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 1ac44c
   GNU General Public License for more details.
Packit 1ac44c
Packit 1ac44c
   You should have received a copy of the GNU General Public License
Packit 1ac44c
   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
Packit 1ac44c
Packit 1ac44c
#ifndef _@GUARD_PREFIX@_ERRNO_H
Packit 1ac44c
Packit 1ac44c
#if __GNUC__ >= 3
Packit 1ac44c
@PRAGMA_SYSTEM_HEADER@
Packit 1ac44c
#endif
Packit 1ac44c
@PRAGMA_COLUMNS@
Packit 1ac44c
Packit 1ac44c
/* The include_next requires a split double-inclusion guard.  */
Packit 1ac44c
#@INCLUDE_NEXT@ @NEXT_ERRNO_H@
Packit 1ac44c
Packit 1ac44c
#ifndef _@GUARD_PREFIX@_ERRNO_H
Packit 1ac44c
#define _@GUARD_PREFIX@_ERRNO_H
Packit 1ac44c
Packit 1ac44c
Packit 1ac44c
/* On native Windows platforms, many macros are not defined.  */
Packit 1ac44c
# if defined _WIN32 && ! defined __CYGWIN__
Packit 1ac44c
Packit 1ac44c
/* These are the same values as defined by MSVC 10, for interoperability.  */
Packit 1ac44c
Packit 1ac44c
#  ifndef ENOMSG
Packit 1ac44c
#   define ENOMSG    122
Packit 1ac44c
#   define GNULIB_defined_ENOMSG 1
Packit 1ac44c
#  endif
Packit 1ac44c
Packit 1ac44c
#  ifndef EIDRM
Packit 1ac44c
#   define EIDRM     111
Packit 1ac44c
#   define GNULIB_defined_EIDRM 1
Packit 1ac44c
#  endif
Packit 1ac44c
Packit 1ac44c
#  ifndef ENOLINK
Packit 1ac44c
#   define ENOLINK   121
Packit 1ac44c
#   define GNULIB_defined_ENOLINK 1
Packit 1ac44c
#  endif
Packit 1ac44c
Packit 1ac44c
#  ifndef EPROTO
Packit 1ac44c
#   define EPROTO    134
Packit 1ac44c
#   define GNULIB_defined_EPROTO 1
Packit 1ac44c
#  endif
Packit 1ac44c
Packit 1ac44c
#  ifndef EBADMSG
Packit 1ac44c
#   define EBADMSG   104
Packit 1ac44c
#   define GNULIB_defined_EBADMSG 1
Packit 1ac44c
#  endif
Packit 1ac44c
Packit 1ac44c
#  ifndef EOVERFLOW
Packit 1ac44c
#   define EOVERFLOW 132
Packit 1ac44c
#   define GNULIB_defined_EOVERFLOW 1
Packit 1ac44c
#  endif
Packit 1ac44c
Packit 1ac44c
#  ifndef ENOTSUP
Packit 1ac44c
#   define ENOTSUP   129
Packit 1ac44c
#   define GNULIB_defined_ENOTSUP 1
Packit 1ac44c
#  endif
Packit 1ac44c
Packit 1ac44c
#  ifndef ENETRESET
Packit 1ac44c
#   define ENETRESET 117
Packit 1ac44c
#   define GNULIB_defined_ENETRESET 1
Packit 1ac44c
#  endif
Packit 1ac44c
Packit 1ac44c
#  ifndef ECONNABORTED
Packit 1ac44c
#   define ECONNABORTED 106
Packit 1ac44c
#   define GNULIB_defined_ECONNABORTED 1
Packit 1ac44c
#  endif
Packit 1ac44c
Packit 1ac44c
#  ifndef ECANCELED
Packit 1ac44c
#   define ECANCELED 105
Packit 1ac44c
#   define GNULIB_defined_ECANCELED 1
Packit 1ac44c
#  endif
Packit 1ac44c
Packit 1ac44c
#  ifndef EOWNERDEAD
Packit 1ac44c
#   define EOWNERDEAD 133
Packit 1ac44c
#   define GNULIB_defined_EOWNERDEAD 1
Packit 1ac44c
#  endif
Packit 1ac44c
Packit 1ac44c
#  ifndef ENOTRECOVERABLE
Packit 1ac44c
#   define ENOTRECOVERABLE 127
Packit 1ac44c
#   define GNULIB_defined_ENOTRECOVERABLE 1
Packit 1ac44c
#  endif
Packit 1ac44c
Packit 1ac44c
#  ifndef EINPROGRESS
Packit 1ac44c
#   define EINPROGRESS     112
Packit 1ac44c
#   define EALREADY        103
Packit 1ac44c
#   define ENOTSOCK        128
Packit 1ac44c
#   define EDESTADDRREQ    109
Packit 1ac44c
#   define EMSGSIZE        115
Packit 1ac44c
#   define EPROTOTYPE      136
Packit 1ac44c
#   define ENOPROTOOPT     123
Packit 1ac44c
#   define EPROTONOSUPPORT 135
Packit 1ac44c
#   define EOPNOTSUPP      130
Packit 1ac44c
#   define EAFNOSUPPORT    102
Packit 1ac44c
#   define EADDRINUSE      100
Packit 1ac44c
#   define EADDRNOTAVAIL   101
Packit 1ac44c
#   define ENETDOWN        116
Packit 1ac44c
#   define ENETUNREACH     118
Packit 1ac44c
#   define ECONNRESET      108
Packit 1ac44c
#   define ENOBUFS         119
Packit 1ac44c
#   define EISCONN         113
Packit 1ac44c
#   define ENOTCONN        126
Packit 1ac44c
#   define ETIMEDOUT       138
Packit 1ac44c
#   define ECONNREFUSED    107
Packit 1ac44c
#   define ELOOP           114
Packit 1ac44c
#   define EHOSTUNREACH    110
Packit 1ac44c
#   define EWOULDBLOCK     140
Packit 1ac44c
#   define GNULIB_defined_ESOCK 1
Packit 1ac44c
#  endif
Packit 1ac44c
Packit 1ac44c
#  ifndef ETXTBSY
Packit 1ac44c
#   define ETXTBSY         139
Packit 1ac44c
#   define ENODATA         120  /* not required by POSIX */
Packit 1ac44c
#   define ENOSR           124  /* not required by POSIX */
Packit 1ac44c
#   define ENOSTR          125  /* not required by POSIX */
Packit 1ac44c
#   define ETIME           137  /* not required by POSIX */
Packit 1ac44c
#   define EOTHER          131  /* not required by POSIX */
Packit 1ac44c
#   define GNULIB_defined_ESTREAMS 1
Packit 1ac44c
#  endif
Packit 1ac44c
Packit 1ac44c
/* These are intentionally the same values as the WSA* error numbers, defined
Packit 1ac44c
   in <winsock2.h>.  */
Packit 1ac44c
#  define ESOCKTNOSUPPORT 10044  /* not required by POSIX */
Packit 1ac44c
#  define EPFNOSUPPORT    10046  /* not required by POSIX */
Packit 1ac44c
#  define ESHUTDOWN       10058  /* not required by POSIX */
Packit 1ac44c
#  define ETOOMANYREFS    10059  /* not required by POSIX */
Packit 1ac44c
#  define EHOSTDOWN       10064  /* not required by POSIX */
Packit 1ac44c
#  define EPROCLIM        10067  /* not required by POSIX */
Packit 1ac44c
#  define EUSERS          10068  /* not required by POSIX */
Packit 1ac44c
#  define EDQUOT          10069
Packit 1ac44c
#  define ESTALE          10070
Packit 1ac44c
#  define EREMOTE         10071  /* not required by POSIX */
Packit 1ac44c
#  define GNULIB_defined_EWINSOCK 1
Packit 1ac44c
Packit 1ac44c
# endif
Packit 1ac44c
Packit 1ac44c
Packit 1ac44c
/* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros
Packit 1ac44c
   EMULTIHOP, ENOLINK, EOVERFLOW are not defined.  */
Packit 1ac44c
# if @EMULTIHOP_HIDDEN@
Packit 1ac44c
#  define EMULTIHOP @EMULTIHOP_VALUE@
Packit 1ac44c
#  define GNULIB_defined_EMULTIHOP 1
Packit 1ac44c
# endif
Packit 1ac44c
# if @ENOLINK_HIDDEN@
Packit 1ac44c
#  define ENOLINK   @ENOLINK_VALUE@
Packit 1ac44c
#  define GNULIB_defined_ENOLINK 1
Packit 1ac44c
# endif
Packit 1ac44c
# if @EOVERFLOW_HIDDEN@
Packit 1ac44c
#  define EOVERFLOW @EOVERFLOW_VALUE@
Packit 1ac44c
#  define GNULIB_defined_EOVERFLOW 1
Packit 1ac44c
# endif
Packit 1ac44c
Packit 1ac44c
Packit 1ac44c
/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
Packit 1ac44c
   EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
Packit 1ac44c
   Likewise, on NonStop Kernel, EDQUOT is not defined.
Packit 1ac44c
   Define them here.  Values >= 2000 seem safe to use: Solaris ESTALE = 151,
Packit 1ac44c
   HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
Packit 1ac44c
Packit 1ac44c
   Note: When one of these systems defines some of these macros some day,
Packit 1ac44c
   binaries will have to be recompiled so that they recognizes the new
Packit 1ac44c
   errno values from the system.  */
Packit 1ac44c
Packit 1ac44c
# ifndef ENOMSG
Packit 1ac44c
#  define ENOMSG    2000
Packit 1ac44c
#  define GNULIB_defined_ENOMSG 1
Packit 1ac44c
# endif
Packit 1ac44c
Packit 1ac44c
# ifndef EIDRM
Packit 1ac44c
#  define EIDRM     2001
Packit 1ac44c
#  define GNULIB_defined_EIDRM 1
Packit 1ac44c
# endif
Packit 1ac44c
Packit 1ac44c
# ifndef ENOLINK
Packit 1ac44c
#  define ENOLINK   2002
Packit 1ac44c
#  define GNULIB_defined_ENOLINK 1
Packit 1ac44c
# endif
Packit 1ac44c
Packit 1ac44c
# ifndef EPROTO
Packit 1ac44c
#  define EPROTO    2003
Packit 1ac44c
#  define GNULIB_defined_EPROTO 1
Packit 1ac44c
# endif
Packit 1ac44c
Packit 1ac44c
# ifndef EMULTIHOP
Packit 1ac44c
#  define EMULTIHOP 2004
Packit 1ac44c
#  define GNULIB_defined_EMULTIHOP 1
Packit 1ac44c
# endif
Packit 1ac44c
Packit 1ac44c
# ifndef EBADMSG
Packit 1ac44c
#  define EBADMSG   2005
Packit 1ac44c
#  define GNULIB_defined_EBADMSG 1
Packit 1ac44c
# endif
Packit 1ac44c
Packit 1ac44c
# ifndef EOVERFLOW
Packit 1ac44c
#  define EOVERFLOW 2006
Packit 1ac44c
#  define GNULIB_defined_EOVERFLOW 1
Packit 1ac44c
# endif
Packit 1ac44c
Packit 1ac44c
# ifndef ENOTSUP
Packit 1ac44c
#  define ENOTSUP   2007
Packit 1ac44c
#  define GNULIB_defined_ENOTSUP 1
Packit 1ac44c
# endif
Packit 1ac44c
Packit 1ac44c
# ifndef ENETRESET
Packit 1ac44c
#  define ENETRESET 2011
Packit 1ac44c
#  define GNULIB_defined_ENETRESET 1
Packit 1ac44c
# endif
Packit 1ac44c
Packit 1ac44c
# ifndef ECONNABORTED
Packit 1ac44c
#  define ECONNABORTED 2012
Packit 1ac44c
#  define GNULIB_defined_ECONNABORTED 1
Packit 1ac44c
# endif
Packit 1ac44c
Packit 1ac44c
# ifndef ESTALE
Packit 1ac44c
#  define ESTALE    2009
Packit 1ac44c
#  define GNULIB_defined_ESTALE 1
Packit 1ac44c
# endif
Packit 1ac44c
Packit 1ac44c
# ifndef EDQUOT
Packit 1ac44c
#  define EDQUOT 2010
Packit 1ac44c
#  define GNULIB_defined_EDQUOT 1
Packit 1ac44c
# endif
Packit 1ac44c
Packit 1ac44c
# ifndef ECANCELED
Packit 1ac44c
#  define ECANCELED 2008
Packit 1ac44c
#  define GNULIB_defined_ECANCELED 1
Packit 1ac44c
# endif
Packit 1ac44c
Packit 1ac44c
/* On many platforms, the macros EOWNERDEAD and ENOTRECOVERABLE are not
Packit 1ac44c
   defined.  */
Packit 1ac44c
Packit 1ac44c
# ifndef EOWNERDEAD
Packit 1ac44c
#  if defined __sun
Packit 1ac44c
    /* Use the same values as defined for Solaris >= 8, for
Packit 1ac44c
       interoperability.  */
Packit 1ac44c
#   define EOWNERDEAD      58
Packit 1ac44c
#   define ENOTRECOVERABLE 59
Packit 1ac44c
#  elif defined _WIN32 && ! defined __CYGWIN__
Packit 1ac44c
    /* We have a conflict here: pthreads-win32 defines these values
Packit 1ac44c
       differently than MSVC 10.  It's hairy to decide which one to use.  */
Packit 1ac44c
#   if defined __MINGW32__ && !defined USE_WINDOWS_THREADS
Packit 1ac44c
     /* Use the same values as defined by pthreads-win32, for
Packit 1ac44c
        interoperability.  */
Packit 1ac44c
#    define EOWNERDEAD      43
Packit 1ac44c
#    define ENOTRECOVERABLE 44
Packit 1ac44c
#   else
Packit 1ac44c
     /* Use the same values as defined by MSVC 10, for
Packit 1ac44c
        interoperability.  */
Packit 1ac44c
#    define EOWNERDEAD      133
Packit 1ac44c
#    define ENOTRECOVERABLE 127
Packit 1ac44c
#   endif
Packit 1ac44c
#  else
Packit 1ac44c
#   define EOWNERDEAD      2013
Packit 1ac44c
#   define ENOTRECOVERABLE 2014
Packit 1ac44c
#  endif
Packit 1ac44c
#  define GNULIB_defined_EOWNERDEAD 1
Packit 1ac44c
#  define GNULIB_defined_ENOTRECOVERABLE 1
Packit 1ac44c
# endif
Packit 1ac44c
Packit 1ac44c
# ifndef EILSEQ
Packit 1ac44c
#  define EILSEQ 2015
Packit 1ac44c
#  define GNULIB_defined_EILSEQ 1
Packit 1ac44c
# endif
Packit 1ac44c
Packit 1ac44c
#endif /* _@GUARD_PREFIX@_ERRNO_H */
Packit 1ac44c
#endif /* _@GUARD_PREFIX@_ERRNO_H */