4 * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
5 * Copyright (C) 1999-2003 Internet Software Consortium.
7 * Permission to use, copy, modify, and/or distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
11 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
12 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
14 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
16 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17 * PERFORMANCE OF THIS SOFTWARE.
20 /* $Id: platform.h.in,v 1.48.84.2 2009/02/16 23:47:15 tbox Exp $ */
22 #ifndef ISC_PLATFORM_H
23 #define ISC_PLATFORM_H 1
28 ***** Platform-dependent defines.
36 * Define if this system needs the <netinet/in6.h> header file included
37 * for full IPv6 support (pretty much only UnixWare).
39 #undef ISC_PLATFORM_NEEDNETINETIN6H
42 * Define if this system needs the <netinet6/in6.h> header file included
43 * to support in6_pkinfo (pretty much only BSD/OS).
45 #undef ISC_PLATFORM_NEEDNETINET6IN6H
48 * If sockaddrs on this system have an sa_len field, ISC_PLATFORM_HAVESALEN
51 #define ISC_PLATFORM_HAVESALEN 1
54 * If this system has the IPv6 structure definitions, ISC_PLATFORM_HAVEIPV6
57 #define ISC_PLATFORM_HAVEIPV6 1
60 * If this system is missing in6addr_any, ISC_PLATFORM_NEEDIN6ADDRANY will
63 #undef ISC_PLATFORM_NEEDIN6ADDRANY
66 * If this system is missing in6addr_loopback, ISC_PLATFORM_NEEDIN6ADDRLOOPBACK
69 #undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK
72 * If this system has in6_pktinfo, ISC_PLATFORM_HAVEIN6PKTINFO will be
75 #define ISC_PLATFORM_HAVEIN6PKTINFO 1
78 * If this system has in_addr6, rather than in6_addr, ISC_PLATFORM_HAVEINADDR6
81 #undef ISC_PLATFORM_HAVEINADDR6
84 * If this system has sin6_scope_id, ISC_PLATFORM_HAVESCOPEID will be defined.
86 #define ISC_PLATFORM_HAVESCOPEID 1
89 * If this system needs inet_ntop(), ISC_PLATFORM_NEEDNTOP will be defined.
91 #undef ISC_PLATFORM_NEEDNTOP
94 * If this system needs inet_pton(), ISC_PLATFORM_NEEDPTON will be defined.
96 #undef ISC_PLATFORM_NEEDPTON
99 * If this system needs in_port_t, ISC_PLATFORM_NEEDPORTT will be defined.
101 #undef ISC_PLATFORM_NEEDPORTT
104 * Define if the system has struct lifconf which is a extended struct ifconf
107 #undef ISC_PLATFORM_HAVELIFCONF
110 * Define if the system has struct if_laddrconf which is a extended struct
113 #undef ISC_PLATFORM_HAVEIF_LADDRCONF
116 * Define if the system has struct if_laddrreq.
118 #undef ISC_PLATFORM_HAVEIF_LADDRREQ
121 * Define either ISC_PLATFORM_BSD44MSGHDR or ISC_PLATFORM_BSD43MSGHDR.
123 #define ISC_NET_BSD44MSGHDR 1
126 * Define if the system supports if_nametoindex.
128 #define ISC_PLATFORM_HAVEIFNAMETOINDEX 1
131 * Define on some UnixWare systems to fix erroneous definitions of various
132 * IN6_IS_ADDR_* macros.
134 #undef ISC_PLATFORM_FIXIN6ISADDR
137 * Define if the system supports kqueue multiplexing
139 #define ISC_PLATFORM_HAVEKQUEUE 1
142 * Define if the system supports epoll multiplexing
144 #undef ISC_PLATFORM_HAVEEPOLL
147 * Define if the system supports /dev/poll multiplexing
149 #undef ISC_PLATFORM_HAVEDEVPOLL
156 * If this system needs vsnprintf() and snprintf(), ISC_PLATFORM_NEEDVSNPRINTF
159 #undef ISC_PLATFORM_NEEDVSNPRINTF
162 * If this system need a modern sprintf() that returns (int) not (char*).
164 #undef ISC_PLATFORM_NEEDSPRINTF
167 * The printf format string modifier to use with isc_uint64_t values.
169 #define ISC_PLATFORM_QUADFORMAT "ll"
172 *** String functions.
175 * If the system needs strsep(), ISC_PLATFORM_NEEDSTRSEP will be defined.
177 #undef ISC_PLATFORM_NEEDSTRSEP
180 * If the system needs strlcpy(), ISC_PLATFORM_NEEDSTRLCPY will be defined.
182 #undef ISC_PLATFORM_NEEDSTRLCPY
185 * If the system needs strlcat(), ISC_PLATFORM_NEEDSTRLCAT will be defined.
187 #undef ISC_PLATFORM_NEEDSTRLCAT
190 * Define if this system needs strtoul.
192 #undef ISC_PLATFORM_NEEDSTRTOUL
195 * Define if this system needs memmove.
197 #undef ISC_PLATFORM_NEEDMEMMOVE
204 * Defined if we are using threads.
206 #define ISC_PLATFORM_USETHREADS 1
209 * Defined if unistd.h does not cause fd_set to be delared.
211 #undef ISC_PLATFORM_NEEDSYSSELECTH
214 * Defined to <gssapi.h> or <gssapi/gssapi.h> for how to include
220 * Type used for resource limits.
222 #define ISC_PLATFORM_RLIMITTYPE rlim_t
225 * Define if your compiler supports "long long int".
227 #define ISC_PLATFORM_HAVELONGLONG 1
230 * Define if PTHREAD_ONCE_INIT should be surrounded by braces to
231 * prevent compiler warnings (such as with gcc on Solaris 2.8).
233 #undef ISC_PLATFORM_BRACEPTHREADONCEINIT
236 * Used to control how extern data is linked; needed for Win32 platforms.
238 #undef ISC_PLATFORM_USEDECLSPEC
241 * Define if the platform has <sys/un.h>.
243 #define ISC_PLATFORM_HAVESYSUNH 1
246 * If the "xadd" operation is available on this architecture,
247 * ISC_PLATFORM_HAVEXADD will be defined.
249 #define ISC_PLATFORM_HAVEXADD 1
252 * If the "xaddq" operation (64bit xadd) is available on this architecture,
253 * ISC_PLATFORM_HAVEXADDQ will be defined.
255 #undef ISC_PLATFORM_HAVEXADDQ
258 * If the "atomic swap" operation is available on this architecture,
259 * ISC_PLATFORM_HAVEATOMICSTORE" will be defined.
261 #define ISC_PLATFORM_HAVEATOMICSTORE 1
264 * If the "compare-and-exchange" operation is available on this architecture,
265 * ISC_PLATFORM_HAVECMPXCHG will be defined.
267 #define ISC_PLATFORM_HAVECMPXCHG 1
270 * Define if gcc ASM extension is available
272 #define ISC_PLATFORM_USEGCCASM 1
275 * Define if Tru64 style ASM syntax must be used.
277 #undef ISC_PLATFORM_USEOSFASM
280 * Define if the standard __asm function must be used.
285 * Define if the platform has <strings.h>.
287 #define ISC_PLATFORM_HAVESTRINGSH 1
290 *** Windows dll support.
294 * Define if MacOS style of PPC assembly must be used.
295 * e.g. "r6", not "6", for register six.
299 #ifndef ISC_PLATFORM_USEDECLSPEC
300 #define LIBISC_EXTERNAL_DATA
301 #define LIBDNS_EXTERNAL_DATA
302 #define LIBISCCC_EXTERNAL_DATA
303 #define LIBISCCFG_EXTERNAL_DATA
304 #define LIBBIND9_EXTERNAL_DATA
305 #else /*! \brief ISC_PLATFORM_USEDECLSPEC */
306 #ifdef LIBISC_EXPORTS
307 #define LIBISC_EXTERNAL_DATA __declspec(dllexport)
309 #define LIBISC_EXTERNAL_DATA __declspec(dllimport)
311 #ifdef LIBDNS_EXPORTS
312 #define LIBDNS_EXTERNAL_DATA __declspec(dllexport)
314 #define LIBDNS_EXTERNAL_DATA __declspec(dllimport)
316 #ifdef LIBISCCC_EXPORTS
317 #define LIBISCCC_EXTERNAL_DATA __declspec(dllexport)
319 #define LIBISCCC_EXTERNAL_DATA __declspec(dllimport)
321 #ifdef LIBISCCFG_EXPORTS
322 #define LIBISCCFG_EXTERNAL_DATA __declspec(dllexport)
324 #define LIBISCCFG_EXTERNAL_DATA __declspec(dllimport)
326 #ifdef LIBBIND9_EXPORTS
327 #define LIBBIND9_EXTERNAL_DATA __declspec(dllexport)
329 #define LIBBIND9_EXTERNAL_DATA __declspec(dllimport)
331 #endif /*! \brief ISC_PLATFORM_USEDECLSPEC */
334 * Tell emacs to use C mode for this file.
341 #endif /* ISC_PLATFORM_H */