| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
#ifndef _ERROR_H |
| 20 |
#define _ERROR_H 1 |
| 21 |
|
| 22 |
|
| 23 |
#include <stdio.h> |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
#if GNULIB_VFPRINTF_POSIX |
| 28 |
# define _GL_ATTRIBUTE_SPEC_PRINTF_ERROR _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD |
| 29 |
#else |
| 30 |
# define _GL_ATTRIBUTE_SPEC_PRINTF_ERROR _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM |
| 31 |
#endif |
| 32 |
|
| 33 |
#ifdef __cplusplus |
| 34 |
extern "C" { |
| 35 |
#endif |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
#if @REPLACE_ERROR@ |
| 41 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 42 |
# undef error |
| 43 |
# define error rpl_error |
| 44 |
# endif |
| 45 |
_GL_FUNCDECL_RPL (error, void, |
| 46 |
(int __status, int __errnum, const char *__format, ...) |
| 47 |
_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 3, 4))); |
| 48 |
_GL_CXXALIAS_RPL (error, void, |
| 49 |
(int __status, int __errnum, const char *__format, ...)); |
| 50 |
#else |
| 51 |
# if ! @HAVE_ERROR@ |
| 52 |
_GL_FUNCDECL_SYS (error, void, |
| 53 |
(int __status, int __errnum, const char *__format, ...) |
| 54 |
_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 3, 4))); |
| 55 |
# endif |
| 56 |
_GL_CXXALIAS_SYS (error, void, |
| 57 |
(int __status, int __errnum, const char *__format, ...)); |
| 58 |
#endif |
| 59 |
#if __GLIBC__ >= 2 |
| 60 |
_GL_CXXALIASWARN (error); |
| 61 |
#endif |
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
#if @REPLACE_ERROR_AT_LINE@ |
| 66 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 67 |
# undef error_at_line |
| 68 |
# define error_at_line rpl_error_at_line |
| 69 |
# endif |
| 70 |
_GL_FUNCDECL_RPL (error_at_line, void, |
| 71 |
(int __status, int __errnum, const char *__filename, |
| 72 |
unsigned int __lineno, const char *__format, ...) |
| 73 |
_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 5, 6))); |
| 74 |
_GL_CXXALIAS_RPL (error_at_line, void, |
| 75 |
(int __status, int __errnum, const char *__filename, |
| 76 |
unsigned int __lineno, const char *__format, ...)); |
| 77 |
#else |
| 78 |
# if ! @HAVE_ERROR_AT_LINE@ |
| 79 |
_GL_FUNCDECL_SYS (error_at_line, void, |
| 80 |
(int __status, int __errnum, const char *__filename, |
| 81 |
unsigned int __lineno, const char *__format, ...) |
| 82 |
_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 5, 6))); |
| 83 |
# endif |
| 84 |
_GL_CXXALIAS_SYS (error_at_line, void, |
| 85 |
(int __status, int __errnum, const char *__filename, |
| 86 |
unsigned int __lineno, const char *__format, ...)); |
| 87 |
#endif |
| 88 |
_GL_CXXALIASWARN (error_at_line); |
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
extern void (*error_print_progname) (void); |
| 94 |
|
| 95 |
|
| 96 |
extern unsigned int error_message_count; |
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
extern int error_one_per_line; |
| 101 |
|
| 102 |
#ifdef __cplusplus |
| 103 |
} |
| 104 |
#endif |
| 105 |
|
| 106 |
#endif |