b6953d1b |
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 | |
a3f177e4 |
35 | /* Define if we want to include rpc/types.h. Crap BSDs put INADDR_LOOPBACK there. */ |
36 | #undef HAVEUSE_RPCTYPES_H |
37 | |
b6953d1b |
38 | @BOTTOM@ |
39 | |
40 | /* Use the definitions: */ |
41 | |
74c94831 |
42 | #ifdef HAVE_POLL |
43 | #include <sys/poll.h> |
44 | #else |
4bc87817 |
45 | /* kludge it up */ |
74c94831 |
46 | struct pollfd { int fd; short events; short revents; }; |
47 | #define POLLIN 1 |
48 | #define POLLPRI 2 |
49 | #define POLLOUT 4 |
50 | #endif |
51 | |
b6953d1b |
52 | /* GNU C attributes. */ |
53 | #ifndef FUNCATTR |
54 | #ifdef HAVE_GNUC25_ATTRIB |
55 | #define FUNCATTR(x) __attribute__(x) |
56 | #else |
57 | #define FUNCATTR(x) |
58 | #endif |
59 | #endif |
60 | |
61 | /* GNU C printf formats, or null. */ |
62 | #ifndef ATTRPRINTF |
63 | #ifdef HAVE_GNUC25_PRINTFFORMAT |
64 | #define ATTRPRINTF(si,tc) format(printf,si,tc) |
65 | #else |
66 | #define ATTRPRINTF(si,tc) |
67 | #endif |
68 | #endif |
69 | #ifndef PRINTFFORMAT |
70 | #define PRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc))) |
71 | #endif |
72 | |
73 | /* GNU C nonreturning functions, or null. */ |
74 | #ifndef ATTRNORETURN |
75 | #ifdef HAVE_GNUC25_NORETURN |
76 | #define ATTRNORETURN noreturn |
77 | #else |
78 | #define ATTRNORETURN |
79 | #endif |
80 | #endif |
81 | #ifndef NONRETURNING |
82 | #define NONRETURNING FUNCATTR((ATTRNORETURN)) |
83 | #endif |
84 | |
85 | /* Combination of both the above. */ |
86 | #ifndef NONRETURNPRINTFFORMAT |
87 | #define NONRETURNPRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc),ATTRNORETURN)) |
88 | #endif |
89 | |
90 | /* GNU C constant functions, or null. */ |
91 | #ifndef ATTRCONST |
92 | #ifdef HAVE_GNUC25_CONST |
93 | #define ATTRCONST const |
94 | #else |
95 | #define ATTRCONST |
96 | #endif |
97 | #endif |
98 | #ifndef CONSTANT |
99 | #define CONSTANT FUNCATTR((ATTRCONST)) |
100 | #endif |
a3f177e4 |
101 | |
102 | #ifdef HAVEUSE_RPCTYPES_H |
103 | #include <rpc/types.h> |
104 | #endif |