3 * extra stuff for config.h.in (autoconf)
5 * userv is copyright Ian Jackson and other contributors.
6 * See README for full authorship information.
8 * This is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with userv; if not, see <http://www.gnu.org/licenses/>.
22 /* Define if EPROTO exists. */
25 /* Define if LOG_AUTHPRIV exists. */
26 #undef HAVE_LOG_AUTHPRIV
28 /* Define if WCOREDUMP exists. */
31 /* Define if function attributes a la GCC 2.5 and higher are available. */
32 #undef HAVE_GNUC25_ATTRIB
34 /* Define if unused functions a la GCC 2.5 and higher are available. */
35 #undef HAVE_GNUC25_UNUSED
37 /* Define if nonreturning functions a la GCC 2.5 and higher are available. */
38 #undef HAVE_GNUC25_NORETURN
40 /* Define if printf-format argument lists a la GCC are available. */
41 #undef HAVE_GNUC25_PRINTFFORMAT
46 #ifndef HAVE_STRSIGNAL
47 #define STRSIGNAL(x) "[platform has no strsignal!]"
51 #ifndef HAVE_VSNPRINTF
52 # 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/"
61 #ifndef HAVE_LOG_AUTHPRIV
62 #define LOG_AUTHPRIV LOG_AUTH
66 #ifndef HAVE_WCOREDUMP
67 #define WCOREDUMP(x) 0
70 /* GNU C attributes. */
72 #ifdef HAVE_GNUC25_ATTRIB
73 #define FUNCATTR(x) __attribute__(x)
79 /* GNU C printf formats, or null. */
81 #ifdef HAVE_GNUC25_PRINTFFORMAT
82 #define ATTRPRINTF(si,tc) format(printf,si,tc)
84 #define ATTRPRINTF(si,tc)
88 #define PRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc)))
91 /* GNU C nonreturning functions, or null. */
93 #ifdef HAVE_GNUC25_NORETURN
94 #define ATTRNORETURN noreturn
100 #define NONRETURNING FUNCATTR((ATTRNORETURN))
103 /* Combination of both the above. */
104 #ifndef NONRETURNPRINTFFORMAT
105 #define NONRETURNPRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc),ATTRNORETURN))
108 /* GNU C unused functions, or null. */
110 #ifdef HAVE_GNUC25_UNUSED
111 #define ATTRUNUSED unused
117 #define UNUSED FUNCATTR((ATTRUNUSED))