Blame lib/strerror-override.h

Packit Service fdd496
/* strerror-override.h --- POSIX compatible system error routine
Packit Service fdd496
Packit Service fdd496
   Copyright (C) 2010-2017 Free Software Foundation, Inc.
Packit Service fdd496
Packit Service fdd496
   This program is free software: you can redistribute it and/or modify
Packit Service fdd496
   it under the terms of the GNU General Public License as published by
Packit Service fdd496
   the Free Software Foundation; either version 3 of the License, or
Packit Service fdd496
   (at your option) any later version.
Packit Service fdd496
Packit Service fdd496
   This program is distributed in the hope that it will be useful,
Packit Service fdd496
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service fdd496
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service fdd496
   GNU General Public License for more details.
Packit Service fdd496
Packit Service fdd496
   You should have received a copy of the GNU General Public License
Packit Service fdd496
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
Packit Service fdd496
Packit Service fdd496
#ifndef _GL_STRERROR_OVERRIDE_H
Packit Service fdd496
# define _GL_STRERROR_OVERRIDE_H
Packit Service fdd496
Packit Service fdd496
# include <errno.h>
Packit Service fdd496
# include <stddef.h>
Packit Service fdd496
Packit Service fdd496
/* Reasonable buffer size that should never trigger ERANGE; if this
Packit Service fdd496
   proves too small, we intentionally abort(), to remind us to fix
Packit Service fdd496
   this value.  */
Packit Service fdd496
# define STACKBUF_LEN 256
Packit Service fdd496
Packit Service fdd496
/* If ERRNUM maps to an errno value defined by gnulib, return a string
Packit Service fdd496
   describing the error.  Otherwise return NULL.  */
Packit Service fdd496
# if REPLACE_STRERROR_0 \
Packit Service fdd496
     || GNULIB_defined_ESOCK \
Packit Service fdd496
     || GNULIB_defined_ESTREAMS \
Packit Service fdd496
     || GNULIB_defined_EWINSOCK \
Packit Service fdd496
     || GNULIB_defined_ENOMSG \
Packit Service fdd496
     || GNULIB_defined_EIDRM \
Packit Service fdd496
     || GNULIB_defined_ENOLINK \
Packit Service fdd496
     || GNULIB_defined_EPROTO \
Packit Service fdd496
     || GNULIB_defined_EMULTIHOP \
Packit Service fdd496
     || GNULIB_defined_EBADMSG \
Packit Service fdd496
     || GNULIB_defined_EOVERFLOW \
Packit Service fdd496
     || GNULIB_defined_ENOTSUP \
Packit Service fdd496
     || GNULIB_defined_ENETRESET \
Packit Service fdd496
     || GNULIB_defined_ECONNABORTED \
Packit Service fdd496
     || GNULIB_defined_ESTALE \
Packit Service fdd496
     || GNULIB_defined_EDQUOT \
Packit Service fdd496
     || GNULIB_defined_ECANCELED \
Packit Service fdd496
     || GNULIB_defined_EOWNERDEAD \
Packit Service fdd496
     || GNULIB_defined_ENOTRECOVERABLE \
Packit Service fdd496
     || GNULIB_defined_EILSEQ
Packit Service fdd496
extern const char *strerror_override (int errnum) _GL_ATTRIBUTE_CONST;
Packit Service fdd496
# else
Packit Service fdd496
#  define strerror_override(ignored) NULL
Packit Service fdd496
# endif
Packit Service fdd496
Packit Service fdd496
#endif /* _GL_STRERROR_OVERRIDE_H */