Blame lib/strerror-override.h

Packit 8f70b4
/* strerror-override.h --- POSIX compatible system error routine
Packit 8f70b4
Packit 8f70b4
   Copyright (C) 2010-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 of the License, or
Packit 8f70b4
   (at your option) 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 _GL_STRERROR_OVERRIDE_H
Packit 8f70b4
# define _GL_STRERROR_OVERRIDE_H
Packit 8f70b4
Packit 8f70b4
# include <errno.h>
Packit 8f70b4
# include <stddef.h>
Packit 8f70b4
Packit 8f70b4
/* Reasonable buffer size that should never trigger ERANGE; if this
Packit 8f70b4
   proves too small, we intentionally abort(), to remind us to fix
Packit 8f70b4
   this value.  */
Packit 8f70b4
# define STACKBUF_LEN 256
Packit 8f70b4
Packit 8f70b4
/* If ERRNUM maps to an errno value defined by gnulib, return a string
Packit 8f70b4
   describing the error.  Otherwise return NULL.  */
Packit 8f70b4
# if REPLACE_STRERROR_0 \
Packit 8f70b4
     || GNULIB_defined_ESOCK \
Packit 8f70b4
     || GNULIB_defined_ESTREAMS \
Packit 8f70b4
     || GNULIB_defined_EWINSOCK \
Packit 8f70b4
     || GNULIB_defined_ENOMSG \
Packit 8f70b4
     || GNULIB_defined_EIDRM \
Packit 8f70b4
     || GNULIB_defined_ENOLINK \
Packit 8f70b4
     || GNULIB_defined_EPROTO \
Packit 8f70b4
     || GNULIB_defined_EMULTIHOP \
Packit 8f70b4
     || GNULIB_defined_EBADMSG \
Packit 8f70b4
     || GNULIB_defined_EOVERFLOW \
Packit 8f70b4
     || GNULIB_defined_ENOTSUP \
Packit 8f70b4
     || GNULIB_defined_ENETRESET \
Packit 8f70b4
     || GNULIB_defined_ECONNABORTED \
Packit 8f70b4
     || GNULIB_defined_ESTALE \
Packit 8f70b4
     || GNULIB_defined_EDQUOT \
Packit 8f70b4
     || GNULIB_defined_ECANCELED \
Packit 8f70b4
     || GNULIB_defined_EOWNERDEAD \
Packit 8f70b4
     || GNULIB_defined_ENOTRECOVERABLE \
Packit 8f70b4
     || GNULIB_defined_EILSEQ
Packit 8f70b4
extern const char *strerror_override (int errnum) _GL_ATTRIBUTE_CONST;
Packit 8f70b4
# else
Packit 8f70b4
#  define strerror_override(ignored) NULL
Packit 8f70b4
# endif
Packit 8f70b4
Packit 8f70b4
#endif /* _GL_STRERROR_OVERRIDE_H */