source: branches/libc-0.6/src/emx/include/error.h

Last change on this file was 1517, checked in by bird, 21 years ago

Fixing warnings. -Znofork

  • Property cvs2svn:cvs-rev set to 1.4
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.8 KB
Line 
1/* error.h,v 1.3 2004/09/14 22:27:32 bird Exp */
2/** @file
3 * GLIBC v2.3.2
4 *
5 * @changed bird: shut up -Wundef.
6 */
7
8/* Declaration for error-reporting function
9 Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
10 This file is part of the GNU C Library. Its master source is NOT part of
11 the C library, however. The master source lives in /gd/gnu/lib.
12
13 The GNU C Library is free software; you can redistribute it and/or
14 modify it under the terms of the GNU Lesser General Public
15 License as published by the Free Software Foundation; either
16 version 2.1 of the License, or (at your option) any later version.
17
18 The GNU C Library is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Lesser General Public License for more details.
22
23 You should have received a copy of the GNU Lesser General Public
24 License along with the GNU C Library; if not, write to the Free
25 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
26 02111-1307 USA. */
27
28#ifndef _ERROR_H
29#define _ERROR_H 1
30
31#ifndef __attribute__
32/* This feature is available in gcc versions 2.5 and later. */
33# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || (defined(__STRICT_ANSI__) && __STRICT_ANSI__) /* bird: shut up -Wundef */
34# define __attribute__(Spec) /* empty */
35# endif
36/* The __-protected variants of `format' and `printf' attributes
37 are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
38# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
39# define __format__ format
40# define __printf__ printf
41# endif
42#endif
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48#if defined (__STDC__) && __STDC__
49
50/* Print a message with `fprintf (stderr, FORMAT, ...)';
51 if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
52 If STATUS is nonzero, terminate the program with `exit (STATUS)'. */
53
54extern void error (int status, int errnum, const char *format, ...)
55 __attribute__ ((__format__ (__printf__, 3, 4)));
56
57extern void error_at_line (int status, int errnum, const char *fname,
58 unsigned int lineno, const char *format, ...)
59 __attribute__ ((__format__ (__printf__, 5, 6)));
60
61/* If NULL, error will flush stdout, then print on stderr the program
62 name, a colon and a space. Otherwise, error will call this
63 function without parameters instead. */
64extern void (*error_print_progname) (void);
65
66#else
67void error ();
68void error_at_line ();
69extern void (*error_print_progname) ();
70#endif
71
72/* This variable is incremented each time `error' is called. */
73extern unsigned int error_message_count;
74
75/* Sometimes we want to have at most one error per line. This
76 variable controls whether this mode is selected or not. */
77extern int error_one_per_line;
78
79#ifdef __cplusplus
80}
81#endif
82
83#endif /* error.h */
Note: See TracBrowser for help on using the repository browser.