Blame gettext-runtime/gnulib-lib/strerror-override.h

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