]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - contrib/bind9/lib/isc/include/isc/platform.h.in
MFV r306384:
[FreeBSD/stable/9.git] / contrib / bind9 / lib / isc / include / isc / platform.h.in
1 /*
2  * Copyright (C) 2004-2010, 2013-2015  Internet Systems Consortium, Inc. ("ISC")
3  * Copyright (C) 1999-2003  Internet Software Consortium.
4  *
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.
8  *
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.
16  */
17
18 #ifndef ISC_PLATFORM_H
19 #define ISC_PLATFORM_H 1
20
21 /*! \file */
22
23 /*****
24  ***** Platform-dependent defines.
25  *****/
26
27 /***
28  *** Network.
29  ***/
30
31 /*! \brief
32  * Define if this system needs the <netinet/in6.h> header file included
33  * for full IPv6 support (pretty much only UnixWare).
34  */
35 @ISC_PLATFORM_NEEDNETINETIN6H@
36
37 /*! \brief
38  * Define if this system needs the <netinet6/in6.h> header file included
39  * to support in6_pkinfo (pretty much only BSD/OS).
40  */
41 @ISC_PLATFORM_NEEDNETINET6IN6H@
42
43 /*! \brief
44  * If sockaddrs on this system have an sa_len field, ISC_PLATFORM_HAVESALEN
45  * will be defined.
46  */
47 @ISC_PLATFORM_HAVESALEN@
48
49 /*! \brief
50  * If this system has the IPv6 structure definitions, ISC_PLATFORM_HAVEIPV6
51  * will be defined.
52  */
53 @ISC_PLATFORM_HAVEIPV6@
54
55 /*! \brief
56  * If this system is missing in6addr_any, ISC_PLATFORM_NEEDIN6ADDRANY will
57  * be defined.
58  */
59 @ISC_PLATFORM_NEEDIN6ADDRANY@
60
61 /*! \brief
62  * If this system is missing in6addr_loopback, ISC_PLATFORM_NEEDIN6ADDRLOOPBACK
63  * will be defined.
64  */
65 @ISC_PLATFORM_NEEDIN6ADDRLOOPBACK@
66
67 /*! \brief
68  * If this system has in6_pktinfo, ISC_PLATFORM_HAVEIN6PKTINFO will be
69  * defined.
70  */
71 @ISC_PLATFORM_HAVEIN6PKTINFO@
72
73 /*! \brief
74  * If this system has in_addr6, rather than in6_addr, ISC_PLATFORM_HAVEINADDR6
75  * will be defined.
76  */
77 @ISC_PLATFORM_HAVEINADDR6@
78
79 /*! \brief
80  * If this system has sin6_scope_id, ISC_PLATFORM_HAVESCOPEID will be defined.
81  */
82 @ISC_PLATFORM_HAVESCOPEID@
83
84 /*! \brief
85  * If this system needs inet_ntop(), ISC_PLATFORM_NEEDNTOP will be defined.
86  */
87 @ISC_PLATFORM_NEEDNTOP@
88
89 /*! \brief
90  * If this system needs inet_pton(), ISC_PLATFORM_NEEDPTON will be defined.
91  */
92 @ISC_PLATFORM_NEEDPTON@
93
94 /*! \brief
95  * If this system needs in_port_t, ISC_PLATFORM_NEEDPORTT will be defined.
96  */
97 @ISC_PLATFORM_NEEDPORTT@
98
99 /*! \brief
100  * Define if the system has struct lifconf which is a extended struct ifconf
101  * for IPv6.
102  */
103 @ISC_PLATFORM_HAVELIFCONF@
104
105 /*! \brief
106  * Define if the system has struct if_laddrconf which is a extended struct
107  * ifconf for IPv6.
108  */
109 @ISC_PLATFORM_HAVEIF_LADDRCONF@
110
111 /*! \brief
112  * Define if the system has struct if_laddrreq.
113  */
114 @ISC_PLATFORM_HAVEIF_LADDRREQ@
115
116 /*! \brief
117  * Define either ISC_PLATFORM_BSD44MSGHDR or ISC_PLATFORM_BSD43MSGHDR.
118  */
119 @ISC_PLATFORM_MSGHDRFLAVOR@
120
121 /*! \brief
122  * Define if the system supports if_nametoindex.
123  */
124 @ISC_PLATFORM_HAVEIFNAMETOINDEX@
125
126 /*! \brief
127  * Define on some UnixWare systems to fix erroneous definitions of various
128  * IN6_IS_ADDR_* macros.
129  */
130 @ISC_PLATFORM_FIXIN6ISADDR@
131
132 /*! \brief
133  * Define if the system has struct sockaddr_storage.
134  */
135 @ISC_PLATFORM_HAVESOCKADDRSTORAGE@
136
137 /*! \brief
138  * Define if the system supports kqueue multiplexing
139  */
140 @ISC_PLATFORM_HAVEKQUEUE@
141
142 /*! \brief
143  * Define if the system supports epoll multiplexing
144  */
145 @ISC_PLATFORM_HAVEEPOLL@
146
147 /*! \brief
148  * Define if the system supports /dev/poll multiplexing
149  */
150 @ISC_PLATFORM_HAVEDEVPOLL@
151
152 /*! \brief
153  * Define if we want to log backtrace
154  */
155 @ISC_PLATFORM_USEBACKTRACE@
156
157 /*
158  *** Printing.
159  ***/
160
161 /*! \brief
162  * If this system needs vsnprintf() and snprintf(), ISC_PLATFORM_NEEDVSNPRINTF
163  * will be defined.
164  */
165 @ISC_PLATFORM_NEEDVSNPRINTF@
166
167 /*! \brief
168  * If this system need a modern sprintf() that returns (int) not (char*).
169  */
170 @ISC_PLATFORM_NEEDSPRINTF@
171
172 /*! \brief
173  * If this system need a modern printf() that format size %z (size_t).
174  */
175 @ISC_PLATFORM_NEEDPRINTF@
176
177 /*! \brief
178  * If this system need a modern fprintf() that format size %z (size_t).
179  */
180 @ISC_PLATFORM_NEEDFPRINTF@
181
182 /*! \brief
183  * The printf format string modifier to use with isc_uint64_t values.
184  */
185 @ISC_PLATFORM_QUADFORMAT@
186
187 /***
188  *** String functions.
189  ***/
190 /*
191  * If the system needs strsep(), ISC_PLATFORM_NEEDSTRSEP will be defined.
192  */
193 @ISC_PLATFORM_NEEDSTRSEP@
194
195 /*
196  * If the system needs strlcpy(), ISC_PLATFORM_NEEDSTRLCPY will be defined.
197  */
198 @ISC_PLATFORM_NEEDSTRLCPY@
199
200 /*
201  * If the system needs strlcat(), ISC_PLATFORM_NEEDSTRLCAT will be defined.
202  */
203 @ISC_PLATFORM_NEEDSTRLCAT@
204
205 /*
206  * Define if this system needs strtoul.
207  */
208 @ISC_PLATFORM_NEEDSTRTOUL@
209
210 /*
211  * Define if this system needs memmove.
212  */
213 @ISC_PLATFORM_NEEDMEMMOVE@
214
215 /*
216  * Define if this system needs strcasestr.
217  */
218 @ISC_PLATFORM_NEEDSTRCASESTR@
219
220 /***
221  *** Miscellaneous.
222  ***/
223
224 /*
225  * Defined if we are using threads.
226  */
227 @ISC_PLATFORM_USETHREADS@
228
229 /*
230  * Defined if unistd.h does not cause fd_set to be delared.
231  */
232 @ISC_PLATFORM_NEEDSYSSELECTH@
233
234 /*
235  * Defined to <gssapi.h> or <gssapi/gssapi.h> for how to include
236  * the GSSAPI header.
237  */
238 @ISC_PLATFORM_GSSAPIHEADER@
239
240 /*
241  * Defined to <gssapi_krb5.h> or <gssapi/gssapi_krb5.h> for how to
242  * include the GSSAPI KRB5 header.
243  */
244 @ISC_PLATFORM_GSSAPI_KRB5_HEADER@
245
246 /*
247  * Defined to <krb5.h> or <krb5/krb5.h> for how to include
248  * the KRB5 header.
249  */
250 @ISC_PLATFORM_KRB5HEADER@
251
252 /*
253  * Type used for resource limits.
254  */
255 @ISC_PLATFORM_RLIMITTYPE@
256
257 /*
258  * Define if your compiler supports "long long int".
259  */
260 @ISC_PLATFORM_HAVELONGLONG@
261
262 /*
263  * Define if PTHREAD_ONCE_INIT should be surrounded by braces to
264  * prevent compiler warnings (such as with gcc on Solaris 2.8).
265  */
266 @ISC_PLATFORM_BRACEPTHREADONCEINIT@
267
268 /*
269  * Used to control how extern data is linked; needed for Win32 platforms.
270  */
271 @ISC_PLATFORM_USEDECLSPEC@
272
273 /*
274  * Define if the platform has <sys/un.h>.
275  */
276 @ISC_PLATFORM_HAVESYSUNH@
277
278 /*
279  * If the "xadd" operation is available on this architecture,
280  * ISC_PLATFORM_HAVEXADD will be defined.
281  */
282 @ISC_PLATFORM_HAVEXADD@
283
284 /*
285  * If the "xaddq" operation (64bit xadd) is available on this architecture,
286  * ISC_PLATFORM_HAVEXADDQ will be defined.
287  */
288 @ISC_PLATFORM_HAVEXADDQ@
289
290 /*
291  * If the 32-bit "atomic swap" operation is available on this
292  * architecture, ISC_PLATFORM_HAVEATOMICSTORE" will be defined.
293  */
294 @ISC_PLATFORM_HAVEATOMICSTORE@
295
296 /*
297  * If the 64-bit "atomic swap" operation is available on this
298  * architecture, ISC_PLATFORM_HAVEATOMICSTORE" will be defined.
299  */
300 @ISC_PLATFORM_HAVEATOMICSTOREQ@
301
302 /*
303  * If the "compare-and-exchange" operation is available on this architecture,
304  * ISC_PLATFORM_HAVECMPXCHG will be defined.
305  */
306 @ISC_PLATFORM_HAVECMPXCHG@
307
308 /*
309  * Define if gcc ASM extension is available
310  */
311 @ISC_PLATFORM_USEGCCASM@
312
313 /*
314  * Define if Tru64 style ASM syntax must be used.
315  */
316 @ISC_PLATFORM_USEOSFASM@
317
318 /*
319  * Define if the standard __asm function must be used.
320  */
321 @ISC_PLATFORM_USESTDASM@
322
323 /*
324  * Define if the platform has <strings.h>.
325  */
326 @ISC_PLATFORM_HAVESTRINGSH@
327
328 /*
329  * Define if the hash functions must be provided by OpenSSL.
330  */
331 @ISC_PLATFORM_OPENSSLHASH@
332
333 /*
334  * Defines for the noreturn attribute.
335  */
336 @ISC_PLATFORM_NORETURN_PRE@
337 @ISC_PLATFORM_NORETURN_POST@
338
339 /***
340  ***    Windows dll support.
341  ***/
342
343 /*
344  * Define if MacOS style of PPC assembly must be used.
345  * e.g. "r6", not "6", for register six.
346  */
347 @ISC_PLATFORM_USEMACASM@
348
349 #ifndef ISC_PLATFORM_USEDECLSPEC
350 #define LIBISC_EXTERNAL_DATA
351 #define LIBDNS_EXTERNAL_DATA
352 #define LIBISCCC_EXTERNAL_DATA
353 #define LIBISCCFG_EXTERNAL_DATA
354 #define LIBBIND9_EXTERNAL_DATA
355 #define LIBTESTS_EXTERNAL_DATA
356 #else /*! \brief ISC_PLATFORM_USEDECLSPEC */
357 #ifdef LIBISC_EXPORTS
358 #define LIBISC_EXTERNAL_DATA __declspec(dllexport)
359 #else
360 #define LIBISC_EXTERNAL_DATA __declspec(dllimport)
361 #endif
362 #ifdef LIBDNS_EXPORTS
363 #define LIBDNS_EXTERNAL_DATA __declspec(dllexport)
364 #else
365 #define LIBDNS_EXTERNAL_DATA __declspec(dllimport)
366 #endif
367 #ifdef LIBISCCC_EXPORTS
368 #define LIBISCCC_EXTERNAL_DATA __declspec(dllexport)
369 #else
370 #define LIBISCCC_EXTERNAL_DATA __declspec(dllimport)
371 #endif
372 #ifdef LIBISCCFG_EXPORTS
373 #define LIBISCCFG_EXTERNAL_DATA __declspec(dllexport)
374 #else
375 #define LIBISCCFG_EXTERNAL_DATA __declspec(dllimport)
376 #endif
377 #ifdef LIBBIND9_EXPORTS
378 #define LIBBIND9_EXTERNAL_DATA __declspec(dllexport)
379 #else
380 #define LIBBIND9_EXTERNAL_DATA __declspec(dllimport)
381 #endif
382 #ifdef LIBTESTS_EXPORTS
383 #define LIBTESTS_EXTERNAL_DATA __declspec(dllexport)
384 #else
385 #define LIBTESTS_EXTERNAL_DATA __declspec(dllimport)
386 #endif
387 #endif /*! \brief ISC_PLATFORM_USEDECLSPEC */
388
389 /*
390  * Tell emacs to use C mode for this file.
391  *
392  * Local Variables:
393  * mode: c
394  * End:
395  */
396
397 #endif /* ISC_PLATFORM_H */