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