3 * extra stuff for config.h.in (autoconf)
6 * Copyright 1996-2017 Ian Jackson <ian@davenant.greenend.org.uk>.
7 * Copyright 2000 Ben Harris <bjh21@cam.ac.uk>
8 * Copyright 2016-2017 Peter Benie <pjb1008@cam.ac.uk>
10 * This is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 3 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with userv; if not, see <http://www.gnu.org/licenses/>.
24 /* Define if EPROTO exists. */
27 /* Define if LOG_AUTHPRIV exists. */
28 #undef HAVE_LOG_AUTHPRIV
30 /* Define if WCOREDUMP exists. */
33 /* Define if function attributes a la GCC 2.5 and higher are available. */
34 #undef HAVE_GNUC25_ATTRIB
36 /* Define if unused functions a la GCC 2.5 and higher are available. */
37 #undef HAVE_GNUC25_UNUSED
39 /* Define if nonreturning functions a la GCC 2.5 and higher are available. */
40 #undef HAVE_GNUC25_NORETURN
42 /* Define if printf-format argument lists a la GCC are available. */
43 #undef HAVE_GNUC25_PRINTFFORMAT
48 #ifndef HAVE_STRSIGNAL
49 #define STRSIGNAL(x) "[platform has no strsignal!]"
53 #ifndef HAVE_VSNPRINTF
54 # error "You must have vsnprintf! Without vsnprintf it is very hard to write secure programs. If you don't have it then your system libc is probably full of hideous buffer overrun security bugs. But, if you don't want to fix your system a portable snprintf can be found at http://www.ijs.si/software/snprintf/"
63 #ifndef HAVE_LOG_AUTHPRIV
64 #define LOG_AUTHPRIV LOG_AUTH
68 #ifndef HAVE_WCOREDUMP
69 #define WCOREDUMP(x) 0
72 /* GNU C attributes. */
74 #ifdef HAVE_GNUC25_ATTRIB
75 #define FUNCATTR(x) __attribute__(x)
81 /* GNU C printf formats, or null. */
83 #ifdef HAVE_GNUC25_PRINTFFORMAT
84 #define ATTRPRINTF(si,tc) format(printf,si,tc)
86 #define ATTRPRINTF(si,tc)
90 #define PRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc)))
93 /* GNU C nonreturning functions, or null. */
95 #ifdef HAVE_GNUC25_NORETURN
96 #define ATTRNORETURN noreturn
102 #define NONRETURNING FUNCATTR((ATTRNORETURN))
105 /* Combination of both the above. */
106 #ifndef NONRETURNPRINTFFORMAT
107 #define NONRETURNPRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc),ATTRNORETURN))
110 /* GNU C unused functions, or null. */
112 #ifdef HAVE_GNUC25_UNUSED
113 #define ATTRUNUSED unused
119 #define UNUSED FUNCATTR((ATTRUNUSED))