3 * extra stuff for config.h.in (autoconf)
5 * Copyright (C)1996-1997 Ian Jackson
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.
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.
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.
22 /* Define if function attributes a la GCC 2.5 and higher are available. */
23 #undef HAVE_GNUC25_ATTRIB
25 /* Define if constant functions a la GCC 2.5 and higher are available. */
26 #undef HAVE_GNUC25_CONST
28 /* Define if nonreturning functions a la GCC 2.5 and higher are available. */
29 #undef HAVE_GNUC25_NORETURN
31 /* Define if printf-format argument lists a la GCC are available. */
32 #undef HAVE_GNUC25_PRINTFFORMAT
36 /* GNU C attributes. */
38 #ifdef HAVE_GNUC25_ATTRIB
39 #define FUNCATTR(x) __attribute__(x)
45 /* GNU C printf formats, or null. */
47 #ifdef HAVE_GNUC25_PRINTFFORMAT
48 #define ATTRPRINTF(si,tc) format(printf,si,tc)
50 #define ATTRPRINTF(si,tc)
54 #define PRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc)))
57 /* GNU C nonreturning functions, or null. */
59 #ifdef HAVE_GNUC25_NORETURN
60 #define ATTRNORETURN noreturn
66 #define NONRETURNING FUNCATTR((ATTRNORETURN))
69 /* Combination of both the above. */
70 #ifndef NONRETURNPRINTFFORMAT
71 #define NONRETURNPRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc),ATTRNORETURN))
74 /* GNU C constant functions, or null. */
76 #ifdef HAVE_GNUC25_CONST
77 #define ATTRCONST const
83 #define CONSTANT FUNCATTR((ATTRCONST))