Blame lib/strerror-override.h

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