]> git.ipfire.org Git - thirdparty/squid.git/blob - compat/xstrerror.h
SourceFormat Enforcement
[thirdparty/squid.git] / compat / xstrerror.h
1 /*
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 #ifndef _SQUID_COMPAT_XSTRERROR_H
10 #define _SQUID_COMPAT_XSTRERROR_H
11
12 #if HAVE_ERRNO_H
13 #include <errno.h>
14 #endif
15
16 /** strerror() wrapper replacement.
17 *
18 * Provides the guarantee that a string is always returned.
19 * Where strerror() would have provided NULL this will report the error as unknown.
20 */
21 #define xstrerror() xstrerr(errno)
22
23 /** Provide the textual display of a system error number.
24 * A string is always returned.
25 * On MS Windows the native Win32 errors are also translated.
26 */
27 extern const char * xstrerr(int error);
28
29 #endif /* _SQUID_COMPAT_XSTRERROR_H */
30