chiark / gitweb /
Fix typo in changelog entry for 1.6.1
[adns.git] / acconfig.h
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 Ian Jackson
7  *  and contributors (see the file INSTALL for full details).
8  *  
9  *  This program is free software; you can redistribute it and/or modify
10  *  it under the terms of the GNU General Public License as published by
11  *  the Free Software Foundation; either version 3, or (at your option)
12  *  any later version.
13  *  
14  *  This program is distributed in the hope that it will be useful,
15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *  GNU General Public License for more details.
18  *  
19  *  You should have received a copy of the GNU General Public License
20  *  along with this program; if not, write to the Free Software Foundation.
21  */
22
23 /* Define if inline functions a la GCC are available.  */
24 #undef HAVE_INLINE
25
26 /* Define if function attributes a la GCC 2.5 and higher are available.  */
27 #undef HAVE_GNUC25_ATTRIB
28
29 /* Define if constant functions a la GCC 2.5 and higher are available.  */
30 #undef HAVE_GNUC25_CONST
31
32 /* Define if nonreturning functions a la GCC 2.5 and higher are available.  */
33 #undef HAVE_GNUC25_NORETURN
34
35 /* Define if printf-format argument lists a la GCC are available.  */
36 #undef HAVE_GNUC25_PRINTFFORMAT
37
38 /* Define if we want to include rpc/types.h.  Crap BSDs put INADDR_LOOPBACK there. */
39 #undef HAVEUSE_RPCTYPES_H
40
41 @BOTTOM@
42
43 /* Use the definitions: */
44
45 #ifndef HAVE_INLINE
46 #define inline
47 #endif
48
49 #ifdef HAVE_POLL
50 #include <sys/poll.h>
51 #else
52 /* kludge it up */
53 struct pollfd { int fd; short events; short revents; };
54 #define POLLIN  1
55 #define POLLPRI 2
56 #define POLLOUT 4
57 #endif
58
59 /* GNU C attributes. */
60 #ifndef FUNCATTR
61 #ifdef HAVE_GNUC25_ATTRIB
62 #define FUNCATTR(x) __attribute__(x)
63 #else
64 #define FUNCATTR(x)
65 #endif
66 #endif
67
68 /* GNU C printf formats, or null. */
69 #ifndef ATTRPRINTF
70 #ifdef HAVE_GNUC25_PRINTFFORMAT
71 #define ATTRPRINTF(si,tc) format(printf,si,tc)
72 #else
73 #define ATTRPRINTF(si,tc)
74 #endif
75 #endif
76 #ifndef PRINTFFORMAT
77 #define PRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc)))
78 #endif
79
80 /* GNU C nonreturning functions, or null. */
81 #ifndef ATTRNORETURN
82 #ifdef HAVE_GNUC25_NORETURN
83 #define ATTRNORETURN noreturn
84 #else
85 #define ATTRNORETURN
86 #endif
87 #endif
88 #ifndef NONRETURNING
89 #define NONRETURNING FUNCATTR((ATTRNORETURN))
90 #endif
91
92 /* Combination of both the above. */
93 #ifndef NONRETURNPRINTFFORMAT
94 #define NONRETURNPRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc),ATTRNORETURN))
95 #endif
96
97 /* GNU C constant functions, or null. */
98 #ifndef ATTRCONST
99 #ifdef HAVE_GNUC25_CONST
100 #define ATTRCONST const
101 #else
102 #define ATTRCONST
103 #endif
104 #endif
105 #ifndef CONSTANT
106 #define CONSTANT FUNCATTR((ATTRCONST))
107 #endif
108
109 #ifdef HAVEUSE_RPCTYPES_H
110 #include <rpc/types.h>
111 #endif