summaryrefslogtreecommitdiffstats
path: root/gl/strerror-override.h
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-08-19 23:27:12 +0200
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-08-19 23:27:12 +0200
commit26fbe7f1e68bb0c96da32491efcf3696fe6c299b (patch)
treec4d95289187a64e9c7517bf73d8208026c3d2fb3 /gl/strerror-override.h
parent5f79e3e9f62ca5487d9881973149136ba1d19d3e (diff)
downloadmonitoring-plugins-26fbe7f1e68bb0c96da32491efcf3696fe6c299b.tar.gz
Sync with the latest Gnulib code (6f2d632)
Diffstat (limited to 'gl/strerror-override.h')
-rw-r--r--gl/strerror-override.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/gl/strerror-override.h b/gl/strerror-override.h
new file mode 100644
index 00000000..3b8f24b9
--- /dev/null
+++ b/gl/strerror-override.h
@@ -0,0 +1,56 @@
1/* strerror-override.h --- POSIX compatible system error routine
2
3 Copyright (C) 2010-2013 Free Software Foundation, Inc.
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17
18#ifndef _GL_STRERROR_OVERRIDE_H
19# define _GL_STRERROR_OVERRIDE_H
20
21# include <errno.h>
22# include <stddef.h>
23
24/* Reasonable buffer size that should never trigger ERANGE; if this
25 proves too small, we intentionally abort(), to remind us to fix
26 this value. */
27# define STACKBUF_LEN 256
28
29/* If ERRNUM maps to an errno value defined by gnulib, return a string
30 describing the error. Otherwise return NULL. */
31# if REPLACE_STRERROR_0 \
32 || GNULIB_defined_ESOCK \
33 || GNULIB_defined_ESTREAMS \
34 || GNULIB_defined_EWINSOCK \
35 || GNULIB_defined_ENOMSG \
36 || GNULIB_defined_EIDRM \
37 || GNULIB_defined_ENOLINK \
38 || GNULIB_defined_EPROTO \
39 || GNULIB_defined_EMULTIHOP \
40 || GNULIB_defined_EBADMSG \
41 || GNULIB_defined_EOVERFLOW \
42 || GNULIB_defined_ENOTSUP \
43 || GNULIB_defined_ENETRESET \
44 || GNULIB_defined_ECONNABORTED \
45 || GNULIB_defined_ESTALE \
46 || GNULIB_defined_EDQUOT \
47 || GNULIB_defined_ECANCELED \
48 || GNULIB_defined_EOWNERDEAD \
49 || GNULIB_defined_ENOTRECOVERABLE \
50 || GNULIB_defined_EILSEQ
51extern const char *strerror_override (int errnum);
52# else
53# define strerror_override(ignored) NULL
54# endif
55
56#endif /* _GL_STRERROR_OVERRIDE_H */