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