Merge from vendor branch OPENSSL:
[dragonfly.git] / contrib / cvs-1.12.9 / lib / error.h
1 /* error.h -- declaration for error-reporting function
2    Copyright (C) 1995 Software Foundation, Inc.
3
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)
7    any later version.
8
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.  */
13
14 #ifndef ERROR_H
15 #define ERROR_H
16
17 /* Add GNU attribute suppport.  */
18 #ifndef __attribute__
19 /* This feature is available in gcc versions 2.5 and later.  */
20 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
21 #  define __attribute__(Spec) /* empty */
22 # else
23 #   if __GNUC__ == 2 && __GNUC_MINOR__ < 96
24 #    define __pure__    /* empty */
25 #   endif
26 #   if __GNUC__ < 3
27 #    define __malloc__  /* empty */
28 #   endif
29 # endif
30 /* The __-protected variants of `format' and `printf' attributes
31    are accepted by gcc versions 2.6.4 (effectively 2.7) and later.  */
32 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
33 #  define __const__     const
34 #  define __format__    format
35 #  define __noreturn__  noreturn
36 #  define __printf__    printf
37 # endif
38 #endif
39
40 void error (int, int, const char *, ...)
41   __attribute__ ((__format__ (__printf__, 3, 4)));
42
43 /* If non-zero, error will use the CVS protocol to report error
44    messages.  This will only be set in the CVS server parent process;
45    most other code is run via do_cvs_command, which forks off a child
46    process and packages up its stderr in the protocol.  */
47 extern int error_use_protocol;
48
49 #endif /* ERROR_H */