11b35193 |
1 | /* |
2 | * acconfig.h |
3 | * input file for autoheader/autoconf/configure: extra stuff for config.h |
4 | */ |
5 | /* |
6 | * This file is part of adns, which is Copyright (C) 1997-1999 Ian Jackson |
7 | * |
8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by |
10 | * the Free Software Foundation; either version 2, or (at your option) |
11 | * any later version. |
12 | * |
13 | * This program is distributed in the hope that it will be useful, |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU General Public License for more details. |
17 | * |
18 | * You should have received a copy of the GNU General Public License |
19 | * along with this program; if not, write to the Free Software Foundation, |
20 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21 | */ |
22 | |
23 | /* Define if function attributes a la GCC 2.5 and higher are available. */ |
24 | #undef HAVE_GNUC25_ATTRIB |
25 | |
26 | /* Define if constant functions a la GCC 2.5 and higher are available. */ |
27 | #undef HAVE_GNUC25_CONST |
28 | |
29 | /* Define if nonreturning functions a la GCC 2.5 and higher are available. */ |
30 | #undef HAVE_GNUC25_NORETURN |
31 | |
32 | /* Define if printf-format argument lists a la GCC are available. */ |
33 | #undef HAVE_GNUC25_PRINTFFORMAT |
34 | |
35 | @BOTTOM@ |
36 | |
37 | /* Use the definitions: */ |
38 | |
620c146d |
39 | #ifdef HAVE_POLL |
40 | #include <sys/poll.h> |
41 | #else |
42 | struct pollfd { int fd; short events; short revents; }; |
43 | #define POLLIN 1 |
44 | #define POLLPRI 2 |
45 | #define POLLOUT 4 |
46 | #endif |
47 | |
11b35193 |
48 | /* GNU C attributes. */ |
49 | #ifndef FUNCATTR |
50 | #ifdef HAVE_GNUC25_ATTRIB |
51 | #define FUNCATTR(x) __attribute__(x) |
52 | #else |
53 | #define FUNCATTR(x) |
54 | #endif |
55 | #endif |
56 | |
57 | /* GNU C printf formats, or null. */ |
58 | #ifndef ATTRPRINTF |
59 | #ifdef HAVE_GNUC25_PRINTFFORMAT |
60 | #define ATTRPRINTF(si,tc) format(printf,si,tc) |
61 | #else |
62 | #define ATTRPRINTF(si,tc) |
63 | #endif |
64 | #endif |
65 | #ifndef PRINTFFORMAT |
66 | #define PRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc))) |
67 | #endif |
68 | |
69 | /* GNU C nonreturning functions, or null. */ |
70 | #ifndef ATTRNORETURN |
71 | #ifdef HAVE_GNUC25_NORETURN |
72 | #define ATTRNORETURN noreturn |
73 | #else |
74 | #define ATTRNORETURN |
75 | #endif |
76 | #endif |
77 | #ifndef NONRETURNING |
78 | #define NONRETURNING FUNCATTR((ATTRNORETURN)) |
79 | #endif |
80 | |
81 | /* Combination of both the above. */ |
82 | #ifndef NONRETURNPRINTFFORMAT |
83 | #define NONRETURNPRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc),ATTRNORETURN)) |
84 | #endif |
85 | |
86 | /* GNU C constant functions, or null. */ |
87 | #ifndef ATTRCONST |
88 | #ifdef HAVE_GNUC25_CONST |
89 | #define ATTRCONST const |
90 | #else |
91 | #define ATTRCONST |
92 | #endif |
93 | #endif |
94 | #ifndef CONSTANT |
95 | #define CONSTANT FUNCATTR((ATTRCONST)) |
96 | #endif |