1 /* error.h -- declaration for error-reporting function
2 Copyright (C) 1995 Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. */
17 /* Add prototype support. Normally this is done in cvs.h, but that
18 doesn't get included from lib/savecwd.c. */
20 #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__)
21 #define PROTO(ARGS) ARGS
23 #define PROTO(ARGS) ()
28 /* This feature is available in gcc versions 2.5 and later. */
29 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
30 # define __attribute__(Spec) /* empty */
32 /* The __-protected variants of `format' and `printf' attributes
33 are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
34 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
35 # define __format__ format
36 # define __printf__ printf
41 void error (int, int, const char *, ...) \
42 __attribute__ ((__format__ (__printf__, 3, 4)));
47 /* Exit due to an error. Similar to error (1, 0, "message"), but call
48 it in the case where the message has already been printed. */
49 extern void error_exit PROTO ((void));
51 /* If non-zero, error will use the CVS protocol to report error
52 messages. This will only be set in the CVS server parent process;
53 most other code is run via do_cvs_command, which forks off a child
54 process and packages up its stderr in the protocol. */
55 extern int error_use_protocol;
57 #endif /* _error_h_ */