diff options
Diffstat (limited to 'lib/error.h')
| -rw-r--r-- | lib/error.h | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/lib/error.h b/lib/error.h index 177b2dcb..8ed63595 100644 --- a/lib/error.h +++ b/lib/error.h | |||
| @@ -1,24 +1,20 @@ | |||
| 1 | /* Declaration for error-reporting function | 1 | /* Declaration for error-reporting function |
| 2 | Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. | 2 | Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | ||
| 3 | 4 | ||
| 4 | 5 | This program is free software; you can redistribute it and/or modify | |
| 5 | NOTE: The canonical source of this file is maintained with the GNU C Library. | 6 | it under the terms of the GNU General Public License as published by |
| 6 | Bugs can be reported to bug-glibc@prep.ai.mit.edu. | 7 | the Free Software Foundation; either version 2, or (at your option) |
| 7 | 8 | any later version. | |
| 8 | This program is free software; you can redistribute it and/or modify it | ||
| 9 | under the terms of the GNU General Public License as published by the | ||
| 10 | Free Software Foundation; either version 2, or (at your option) any | ||
| 11 | later version. | ||
| 12 | 9 | ||
| 13 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
| 17 | 14 | ||
| 18 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License along |
| 19 | along with this program; if not, write to the Free Software | 16 | with this program; if not, write to the Free Software Foundation, |
| 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | 17 | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
| 21 | USA. */ | ||
| 22 | 18 | ||
| 23 | #ifndef _ERROR_H | 19 | #ifndef _ERROR_H |
| 24 | #define _ERROR_H 1 | 20 | #define _ERROR_H 1 |
| @@ -40,17 +36,15 @@ | |||
| 40 | extern "C" { | 36 | extern "C" { |
| 41 | #endif | 37 | #endif |
| 42 | 38 | ||
| 43 | #if defined (__STDC__) && __STDC__ | ||
| 44 | |||
| 45 | /* Print a message with `fprintf (stderr, FORMAT, ...)'; | 39 | /* Print a message with `fprintf (stderr, FORMAT, ...)'; |
| 46 | if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). | 40 | if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). |
| 47 | If STATUS is nonzero, terminate the program with `exit (STATUS)'. */ | 41 | If STATUS is nonzero, terminate the program with `exit (STATUS)'. */ |
| 48 | 42 | ||
| 49 | extern void error (int status, int errnum, const char *format, ...) | 43 | extern void error (int __status, int __errnum, const char *__format, ...) |
| 50 | __attribute__ ((__format__ (__printf__, 3, 4))); | 44 | __attribute__ ((__format__ (__printf__, 3, 4))); |
| 51 | 45 | ||
| 52 | extern void error_at_line (int status, int errnum, const char *fname, | 46 | extern void error_at_line (int __status, int __errnum, const char *__fname, |
| 53 | unsigned int lineno, const char *format, ...) | 47 | unsigned int __lineno, const char *__format, ...) |
| 54 | __attribute__ ((__format__ (__printf__, 5, 6))); | 48 | __attribute__ ((__format__ (__printf__, 5, 6))); |
| 55 | 49 | ||
| 56 | /* If NULL, error will flush stdout, then print on stderr the program | 50 | /* If NULL, error will flush stdout, then print on stderr the program |
| @@ -58,12 +52,6 @@ extern void error_at_line (int status, int errnum, const char *fname, | |||
| 58 | function without parameters instead. */ | 52 | function without parameters instead. */ |
| 59 | extern void (*error_print_progname) (void); | 53 | extern void (*error_print_progname) (void); |
| 60 | 54 | ||
| 61 | #else | ||
| 62 | void error (); | ||
| 63 | void error_at_line (); | ||
| 64 | extern void (*error_print_progname) (); | ||
| 65 | #endif | ||
| 66 | |||
| 67 | /* This variable is incremented each time `error' is called. */ | 55 | /* This variable is incremented each time `error' is called. */ |
| 68 | extern unsigned int error_message_count; | 56 | extern unsigned int error_message_count; |
| 69 | 57 | ||
