chiark / gitweb /
String-termination bugfix. Compilation fixes (-D_GNU_SOURCE, etc.), and some config...
[userv.git] / acconfig.h
1 /*
2  * userv - acconfig.h
3  * extra stuff for config.h.in (autoconf)
4  *
5  * Copyright (C)1996-1997 Ian Jackson
6  *
7  * This is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with userv; if not, write to the Free Software
19  * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20  */
21
22 /* Define if EPROTO exists.  */
23 #undef HAVE_EPROTO
24
25 /* Define if function attributes a la GCC 2.5 and higher are available.  */
26 #undef HAVE_GNUC25_ATTRIB
27
28 /* Define if unused functions a la GCC 2.5 and higher are available.  */
29 #undef HAVE_GNUC25_UNUSED
30
31 /* Define if nonreturning functions a la GCC 2.5 and higher are available.  */
32 #undef HAVE_GNUC25_NORETURN
33
34 /* Define if printf-format argument lists a la GCC are available.  */
35 #undef HAVE_GNUC25_PRINTFFORMAT
36
37 @BOTTOM@
38
39 /* EPROTO */
40 #ifndef HAVE_EPROTO
41 #define EPROTO 0
42 #endif
43
44 /* GNU C attributes. */
45 #ifndef FUNCATTR
46 #ifdef HAVE_GNUC25_ATTRIB
47 #define FUNCATTR(x) __attribute__(x)
48 #else
49 #define FUNCATTR(x)
50 #endif
51 #endif
52
53 /* GNU C printf formats, or null. */
54 #ifndef ATTRPRINTF
55 #ifdef HAVE_GNUC25_PRINTFFORMAT
56 #define ATTRPRINTF(si,tc) format(printf,si,tc)
57 #else
58 #define ATTRPRINTF(si,tc)
59 #endif
60 #endif
61 #ifndef PRINTFFORMAT
62 #define PRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc)))
63 #endif
64
65 /* GNU C nonreturning functions, or null. */
66 #ifndef ATTRNORETURN
67 #ifdef HAVE_GNUC25_NORETURN
68 #define ATTRNORETURN noreturn
69 #else
70 #define ATTRNORETURN
71 #endif
72 #endif
73 #ifndef NONRETURNING
74 #define NONRETURNING FUNCATTR((ATTRNORETURN))
75 #endif
76
77 /* Combination of both the above. */
78 #ifndef NONRETURNPRINTFFORMAT
79 #define NONRETURNPRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc),ATTRNORETURN))
80 #endif
81
82 /* GNU C unused functions, or null. */
83 #ifndef ATTRUNUSED
84 #ifdef HAVE_GNUC25_UNUSED
85 #define ATTRUNUSED unused
86 #else
87 #define ATTRUNUSED
88 #endif
89 #endif
90 #ifndef UNUSED
91 #define UNUSED FUNCATTR((ATTRUNUSED))
92 #endif