1N/A/* Declaration for error-reporting function
1N/A Copyright (C) 1995, 1996, 1997, 2003, 2006, 2008, 2009, 2010 Free Software
1N/A Foundation, Inc.
1N/A This file is part of the GNU C Library.
1N/A
1N/A This program is free software: you can redistribute it and/or modify
1N/A it under the terms of the GNU General Public License as published by
1N/A the Free Software Foundation; either version 3 of the License, or
1N/A (at your option) any later version.
1N/A
1N/A This program is distributed in the hope that it will be useful,
1N/A but WITHOUT ANY WARRANTY; without even the implied warranty of
1N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1N/A GNU General Public License for more details.
1N/A
1N/A You should have received a copy of the GNU General Public License
1N/A along with this program. If not, see <http://www.gnu.org/licenses/>. */
1N/A
1N/A#ifndef _ERROR_H
1N/A#define _ERROR_H 1
1N/A
1N/A#ifndef __attribute__
1N/A/* The __attribute__ feature is available in gcc versions 2.5 and later.
1N/A The __-protected variants of the attributes 'format' and 'printf' are
1N/A accepted by gcc versions 2.6.4 (effectively 2.7) and later.
1N/A We enable __attribute__ only if these are supported too, because
1N/A gnulib and libintl do '#define printf __printf__' when they override
1N/A the 'printf' function. */
1N/A# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
1N/A# define __attribute__(Spec) /* empty */
1N/A# endif
1N/A#endif
1N/A
1N/A#ifdef __cplusplus
1N/Aextern "C" {
1N/A#endif
1N/A
1N/A/* Print a message with `fprintf (stderr, FORMAT, ...)';
1N/A if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
1N/A If STATUS is nonzero, terminate the program with `exit (STATUS)'. */
1N/A
1N/Aextern void error (int __status, int __errnum, const char *__format, ...)
1N/A __attribute__ ((__format__ (__printf__, 3, 4)));
1N/A
1N/Aextern void error_at_line (int __status, int __errnum, const char *__fname,
1N/A unsigned int __lineno, const char *__format, ...)
1N/A __attribute__ ((__format__ (__printf__, 5, 6)));
1N/A
1N/A/* If NULL, error will flush stdout, then print on stderr the program
1N/A name, a colon and a space. Otherwise, error will call this
1N/A function without parameters instead. */
1N/Aextern void (*error_print_progname) (void);
1N/A
1N/A/* This variable is incremented each time `error' is called. */
1N/Aextern unsigned int error_message_count;
1N/A
1N/A/* Sometimes we want to have at most one error per line. This
1N/A variable controls whether this mode is selected or not. */
1N/Aextern int error_one_per_line;
1N/A
1N/A#ifdef __cplusplus
1N/A}
1N/A#endif
1N/A
1N/A#endif /* error.h */