Sync usage with man page.
[netbsd-mini2440.git] / external / bsd / bind / include / isc / platform.h
blob5cce2cc60211537be5cac96893a67462636657a6
1 /*
2 * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 1999-2003 Internet Software Consortium.
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
18 /* Id: platform.h.in,v 1.53 2009/09/29 15:06:07 fdupont Exp */
20 #ifndef ISC_PLATFORM_H
21 #define ISC_PLATFORM_H 1
23 /*! \file */
25 /*****
26 ***** Platform-dependent defines.
27 *****/
28 #include <sys/atomic.h>
30 /***
31 *** Network.
32 ***/
34 /*! \brief
35 * Define if this system needs the <netinet/in6.h> header file included
36 * for full IPv6 support (pretty much only UnixWare).
38 #undef ISC_PLATFORM_NEEDNETINETIN6H
40 /*! \brief
41 * Define if this system needs the <netinet6/in6.h> header file included
42 * to support in6_pkinfo (pretty much only BSD/OS).
44 #undef ISC_PLATFORM_NEEDNETINET6IN6H
46 /*! \brief
47 * If sockaddrs on this system have an sa_len field, ISC_PLATFORM_HAVESALEN
48 * will be defined.
50 #define ISC_PLATFORM_HAVESALEN 1
52 /*! \brief
53 * If this system has the IPv6 structure definitions, ISC_PLATFORM_HAVEIPV6
54 * will be defined.
56 #define ISC_PLATFORM_HAVEIPV6 1
58 /*! \brief
59 * If this system is missing in6addr_any, ISC_PLATFORM_NEEDIN6ADDRANY will
60 * be defined.
62 #undef ISC_PLATFORM_NEEDIN6ADDRANY
64 /*! \brief
65 * If this system is missing in6addr_loopback, ISC_PLATFORM_NEEDIN6ADDRLOOPBACK
66 * will be defined.
68 #undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK
70 /*! \brief
71 * If this system has in6_pktinfo, ISC_PLATFORM_HAVEIN6PKTINFO will be
72 * defined.
74 #define ISC_PLATFORM_HAVEIN6PKTINFO 1
76 /*! \brief
77 * If this system has in_addr6, rather than in6_addr, ISC_PLATFORM_HAVEINADDR6
78 * will be defined.
80 #undef ISC_PLATFORM_HAVEINADDR6
82 /*! \brief
83 * If this system has sin6_scope_id, ISC_PLATFORM_HAVESCOPEID will be defined.
85 #define ISC_PLATFORM_HAVESCOPEID 1
87 /*! \brief
88 * If this system needs inet_ntop(), ISC_PLATFORM_NEEDNTOP will be defined.
90 #undef ISC_PLATFORM_NEEDNTOP
92 /*! \brief
93 * If this system needs inet_pton(), ISC_PLATFORM_NEEDPTON will be defined.
95 #undef ISC_PLATFORM_NEEDPTON
97 /*! \brief
98 * If this system needs in_port_t, ISC_PLATFORM_NEEDPORTT will be defined.
100 #undef ISC_PLATFORM_NEEDPORTT
102 /*! \brief
103 * Define if the system has struct lifconf which is a extended struct ifconf
104 * for IPv6.
106 #undef ISC_PLATFORM_HAVELIFCONF
108 /*! \brief
109 * Define if the system has struct if_laddrconf which is a extended struct
110 * ifconf for IPv6.
112 #undef ISC_PLATFORM_HAVEIF_LADDRCONF
114 /*! \brief
115 * Define if the system has struct if_laddrreq.
117 #undef ISC_PLATFORM_HAVEIF_LADDRREQ
119 /*! \brief
120 * Define either ISC_PLATFORM_BSD44MSGHDR or ISC_PLATFORM_BSD43MSGHDR.
122 #define ISC_NET_BSD44MSGHDR 1
124 /*! \brief
125 * Define if the system supports if_nametoindex.
127 #define ISC_PLATFORM_HAVEIFNAMETOINDEX 1
129 /*! \brief
130 * Define on some UnixWare systems to fix erroneous definitions of various
131 * IN6_IS_ADDR_* macros.
133 #undef ISC_PLATFORM_FIXIN6ISADDR
135 /*! \brief
136 * Define if the system supports kqueue multiplexing
138 #define ISC_PLATFORM_HAVEKQUEUE 1
140 /*! \brief
141 * Define if the system supports epoll multiplexing
143 #undef ISC_PLATFORM_HAVEEPOLL
145 /*! \brief
146 * Define if the system supports /dev/poll multiplexing
148 #undef ISC_PLATFORM_HAVEDEVPOLL
150 /*! \brief
151 * Define if we want to log backtrace
153 #define ISC_PLATFORM_USEBACKTRACE 1
156 *** Printing.
157 ***/
159 /*! \brief
160 * If this system needs vsnprintf() and snprintf(), ISC_PLATFORM_NEEDVSNPRINTF
161 * will be defined.
163 #undef ISC_PLATFORM_NEEDVSNPRINTF
165 /*! \brief
166 * If this system need a modern sprintf() that returns (int) not (char*).
168 #undef ISC_PLATFORM_NEEDSPRINTF
170 /*! \brief
171 * The printf format string modifier to use with isc_uint64_t values.
173 #define ISC_PLATFORM_QUADFORMAT "ll"
175 /***
176 *** String functions.
177 ***/
179 * If the system needs strsep(), ISC_PLATFORM_NEEDSTRSEP will be defined.
181 #undef ISC_PLATFORM_NEEDSTRSEP
184 * If the system needs strlcpy(), ISC_PLATFORM_NEEDSTRLCPY will be defined.
186 #undef ISC_PLATFORM_NEEDSTRLCPY
189 * If the system needs strlcat(), ISC_PLATFORM_NEEDSTRLCAT will be defined.
191 #undef ISC_PLATFORM_NEEDSTRLCAT
194 * Define if this system needs strtoul.
196 #undef ISC_PLATFORM_NEEDSTRTOUL
199 * Define if this system needs memmove.
201 #undef ISC_PLATFORM_NEEDMEMMOVE
203 /***
204 *** Miscellaneous.
205 ***/
208 * Defined if we are using threads.
210 #define ISC_PLATFORM_USETHREADS 1
213 * Defined if unistd.h does not cause fd_set to be delared.
215 #undef ISC_PLATFORM_NEEDSYSSELECTH
218 * Defined to <gssapi.h> or <gssapi/gssapi.h> for how to include
219 * the GSSAPI header.
224 * Type used for resource limits.
226 #define ISC_PLATFORM_RLIMITTYPE rlim_t
229 * Define if your compiler supports "long long int".
231 #define ISC_PLATFORM_HAVELONGLONG 1
234 * Define if PTHREAD_ONCE_INIT should be surrounded by braces to
235 * prevent compiler warnings (such as with gcc on Solaris 2.8).
237 #undef ISC_PLATFORM_BRACEPTHREADONCEINIT
240 * Used to control how extern data is linked; needed for Win32 platforms.
242 #undef ISC_PLATFORM_USEDECLSPEC
245 * Define if the platform has <sys/un.h>.
247 #define ISC_PLATFORM_HAVESYSUNH 1
250 * If the "xadd" operation is available on this architecture,
251 * ISC_PLATFORM_HAVEXADD will be defined.
253 #define ISC_PLATFORM_HAVEXADD 1
256 * If the "xaddq" operation (64bit xadd) is available on this architecture,
257 * ISC_PLATFORM_HAVEXADDQ will be defined.
259 #ifdef __HAVE_ATOMIC64_OPS
260 #define ISC_PLATFORM_HAVEXADDQ 1
261 #endif
264 * If the "atomic swap" operation is available on this architecture,
265 * ISC_PLATFORM_HAVEATOMICSTORE" will be defined.
267 #define ISC_PLATFORM_HAVEATOMICSTORE 1
270 * If the "compare-and-exchange" operation is available on this architecture,
271 * ISC_PLATFORM_HAVECMPXCHG will be defined.
273 #define ISC_PLATFORM_HAVECMPXCHG 1
276 * Define if gcc ASM extension is available
278 #define ISC_PLATFORM_USEGCCASM 1
281 * Define if Tru64 style ASM syntax must be used.
283 #undef ISC_PLATFORM_USEOSFASM
286 * Define if the standard __asm function must be used.
291 * Define if the platform has <strings.h>.
293 #define ISC_PLATFORM_HAVESTRINGSH 1
296 * Define if the hash functions must be provided by OpenSSL.
298 #undef ISC_PLATFORM_OPENSSLHASH
301 * Defines for the noreturn attribute.
303 #define ISC_PLATFORM_NORETURN_PRE
304 #define ISC_PLATFORM_NORETURN_POST __attribute__((noreturn))
306 /***
307 *** Windows dll support.
308 ***/
311 * Define if MacOS style of PPC assembly must be used.
312 * e.g. "r6", not "6", for register six.
316 #ifndef ISC_PLATFORM_USEDECLSPEC
317 #define LIBISC_EXTERNAL_DATA
318 #define LIBDNS_EXTERNAL_DATA
319 #define LIBISCCC_EXTERNAL_DATA
320 #define LIBISCCFG_EXTERNAL_DATA
321 #define LIBBIND9_EXTERNAL_DATA
322 #else /*! \brief ISC_PLATFORM_USEDECLSPEC */
323 #ifdef LIBISC_EXPORTS
324 #define LIBISC_EXTERNAL_DATA __declspec(dllexport)
325 #else
326 #define LIBISC_EXTERNAL_DATA __declspec(dllimport)
327 #endif
328 #ifdef LIBDNS_EXPORTS
329 #define LIBDNS_EXTERNAL_DATA __declspec(dllexport)
330 #else
331 #define LIBDNS_EXTERNAL_DATA __declspec(dllimport)
332 #endif
333 #ifdef LIBISCCC_EXPORTS
334 #define LIBISCCC_EXTERNAL_DATA __declspec(dllexport)
335 #else
336 #define LIBISCCC_EXTERNAL_DATA __declspec(dllimport)
337 #endif
338 #ifdef LIBISCCFG_EXPORTS
339 #define LIBISCCFG_EXTERNAL_DATA __declspec(dllexport)
340 #else
341 #define LIBISCCFG_EXTERNAL_DATA __declspec(dllimport)
342 #endif
343 #ifdef LIBBIND9_EXPORTS
344 #define LIBBIND9_EXTERNAL_DATA __declspec(dllexport)
345 #else
346 #define LIBBIND9_EXTERNAL_DATA __declspec(dllimport)
347 #endif
348 #endif /*! \brief ISC_PLATFORM_USEDECLSPEC */
351 * Tell emacs to use C mode for this file.
353 * Local Variables:
354 * mode: c
355 * End:
358 #endif /* ISC_PLATFORM_H */