Blame lib/errno.in.h

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