chiark / gitweb /
+ * Fix <sys/fcntl.h> in client/adnsresfilter.c to <fcntl.h>.
[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
7  *    Copyright (C) 1997-1999 Ian Jackson <ian@davenant.greenend.org.uk>
8  *
9  *  It is part of adns, which is
10  *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
11  *    Copyright (C) 1999 Tony Finch <dot@dotat.at>
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 2, 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  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
26  */
27
28 /* Define if function attributes a la GCC 2.5 and higher are available.  */
29 #undef HAVE_GNUC25_ATTRIB
30
31 /* Define if constant functions a la GCC 2.5 and higher are available.  */
32 #undef HAVE_GNUC25_CONST
33
34 /* Define if nonreturning functions a la GCC 2.5 and higher are available.  */
35 #undef HAVE_GNUC25_NORETURN
36
37 /* Define if printf-format argument lists a la GCC are available.  */
38 #undef HAVE_GNUC25_PRINTFFORMAT
39
40 /* Define if we want to include rpc/types.h.  Crap BSDs put INADDR_LOOPBACK there. */
41 #undef HAVEUSE_RPCTYPES_H
42
43 @BOTTOM@
44
45 /* Use the definitions: */
46
47 #ifdef HAVE_POLL
48 #include <sys/poll.h>
49 #else
50 /* kludge it up */
51 struct pollfd { int fd; short events; short revents; };
52 #define POLLIN  1
53 #define POLLPRI 2
54 #define POLLOUT 4
55 #endif
56
57 /* GNU C attributes. */
58 #ifndef FUNCATTR
59 #ifdef HAVE_GNUC25_ATTRIB
60 #define FUNCATTR(x) __attribute__(x)
61 #else
62 #define FUNCATTR(x)
63 #endif
64 #endif
65
66 /* GNU C printf formats, or null. */
67 #ifndef ATTRPRINTF
68 #ifdef HAVE_GNUC25_PRINTFFORMAT
69 #define ATTRPRINTF(si,tc) format(printf,si,tc)
70 #else
71 #define ATTRPRINTF(si,tc)
72 #endif
73 #endif
74 #ifndef PRINTFFORMAT
75 #define PRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc)))
76 #endif
77
78 /* GNU C nonreturning functions, or null. */
79 #ifndef ATTRNORETURN
80 #ifdef HAVE_GNUC25_NORETURN
81 #define ATTRNORETURN noreturn
82 #else
83 #define ATTRNORETURN
84 #endif
85 #endif
86 #ifndef NONRETURNING
87 #define NONRETURNING FUNCATTR((ATTRNORETURN))
88 #endif
89
90 /* Combination of both the above. */
91 #ifndef NONRETURNPRINTFFORMAT
92 #define NONRETURNPRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc),ATTRNORETURN))
93 #endif
94
95 /* GNU C constant functions, or null. */
96 #ifndef ATTRCONST
97 #ifdef HAVE_GNUC25_CONST
98 #define ATTRCONST const
99 #else
100 #define ATTRCONST
101 #endif
102 #endif
103 #ifndef CONSTANT
104 #define CONSTANT FUNCATTR((ATTRCONST))
105 #endif
106
107 #ifdef HAVEUSE_RPCTYPES_H
108 #include <rpc/types.h>
109 #endif