]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - lib/bind/isc/isc/platform.h
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / lib / bind / isc / isc / platform.h
1 /* $FreeBSD$ */
2
3 /*
4  * Copyright (C) 2004, 2005, 2007, 2008  Internet Systems Consortium, Inc. ("ISC")
5  * Copyright (C) 1999-2003  Internet Software Consortium.
6  *
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.
10  *
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.
18  */
19
20 /* $Id: platform.h.in,v 1.34.18.11 2008/06/24 23:45:55 tbox Exp $ */
21
22 #ifndef ISC_PLATFORM_H
23 #define ISC_PLATFORM_H 1
24
25 /*! \file */
26
27 /*****
28  ***** Platform-dependent defines.
29  *****/
30
31 /*
32  * Define if the platform has <strings.h>.
33  */
34 #define ISC_PLATFORM_HAVESTRINGSH 1
35
36 /***
37  *** Network.
38  ***/
39
40 /*! \brief
41  * Define if this system needs the <netinet/in6.h> header file included
42  * for full IPv6 support (pretty much only UnixWare).
43  */
44 #undef ISC_PLATFORM_NEEDNETINETIN6H
45
46 /*! \brief
47  * Define if this system needs the <netinet6/in6.h> header file included
48  * to support in6_pkinfo (pretty much only BSD/OS).
49  */
50 #undef ISC_PLATFORM_NEEDNETINET6IN6H
51
52 /*! \brief
53  * If sockaddrs on this system have an sa_len field, ISC_PLATFORM_HAVESALEN
54  * will be defined.
55  */
56 #define ISC_PLATFORM_HAVESALEN 1
57
58 /*! \brief
59  * If this system has the IPv6 structure definitions, ISC_PLATFORM_HAVEIPV6
60  * will be defined.
61  */
62 #define ISC_PLATFORM_HAVEIPV6 1
63
64 /*! \brief
65  * If this system is missing in6addr_any, ISC_PLATFORM_NEEDIN6ADDRANY will
66  * be defined.
67  */
68 #undef ISC_PLATFORM_NEEDIN6ADDRANY
69
70 /*! \brief
71  * If this system is missing in6addr_loopback, ISC_PLATFORM_NEEDIN6ADDRLOOPBACK
72  * will be defined.
73  */
74 #undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK
75
76 /*! \brief
77  * If this system has in6_pktinfo, ISC_PLATFORM_HAVEIN6PKTINFO will be
78  * defined.
79  */
80 #define ISC_PLATFORM_HAVEIN6PKTINFO 1
81
82 /*! \brief
83  * If this system has in_addr6, rather than in6_addr, ISC_PLATFORM_HAVEINADDR6
84  * will be defined.
85  */
86 #undef ISC_PLATFORM_HAVEINADDR6
87
88 /*! \brief
89  * If this system has sin6_scope_id, ISC_PLATFORM_HAVESCOPEID will be defined.
90  */
91 #define ISC_PLATFORM_HAVESCOPEID 1
92
93 /*! \brief
94  * If this system needs inet_ntop(), ISC_PLATFORM_NEEDNTOP will be defined.
95  */
96 #undef ISC_PLATFORM_NEEDNTOP
97
98 /*! \brief
99  * If this system needs inet_pton(), ISC_PLATFORM_NEEDPTON will be defined.
100  */
101 #undef ISC_PLATFORM_NEEDPTON
102
103 /*! \brief
104  * If this system needs inet_aton(), ISC_PLATFORM_NEEDATON will be defined.
105  */
106 #undef ISC_PLATFORM_NEEDATON
107
108 /*! \brief
109  * If this system needs in_port_t, ISC_PLATFORM_NEEDPORTT will be defined.
110  */
111 #undef ISC_PLATFORM_NEEDPORTT
112
113 /*! \brief
114  * If the system needs strsep(), ISC_PLATFORM_NEEDSTRSEP will be defined.
115  */
116 #undef ISC_PLATFORM_NEEDSTRSEP
117
118 /*! \brief
119  * If the system needs strlcpy(), ISC_PLATFORM_NEEDSTRLCPY will be defined.
120  */
121 #undef ISC_PLATFORM_NEEDSTRLCPY
122
123 /*! \brief
124  * If the system needs strlcat(), ISC_PLATFORM_NEEDSTRLCAT will be defined.
125  */
126 #undef ISC_PLATFORM_NEEDSTRLCAT
127
128 /*! \brief
129  * Define either ISC_PLATFORM_BSD44MSGHDR or ISC_PLATFORM_BSD43MSGHDR.
130  */
131 #define ISC_NET_BSD44MSGHDR 1
132
133 /*! \brief
134  * Define if PTHREAD_ONCE_INIT should be surrounded by braces to
135  * prevent compiler warnings (such as with gcc on Solaris 2.8).
136  */
137 #undef ISC_PLATFORM_BRACEPTHREADONCEINIT
138
139 /*! \brief
140  * Define on some UnixWare systems to fix erroneous definitions of various
141  * IN6_IS_ADDR_* macros.
142  */
143 #undef ISC_PLATFORM_FIXIN6ISADDR
144
145 /*! \brief
146  * Define if the system supports kqueue multiplexing
147  */
148 #define ISC_PLATFORM_HAVEKQUEUE 1
149
150 /*! \brief
151  * Define if the system supports epoll multiplexing
152  */
153 #undef ISC_PLATFORM_HAVEEPOLL
154
155 /*! \brief
156  * Define if the system supports /dev/poll multiplexing
157  */
158 #undef ISC_PLATFORM_HAVEDEVPOLL
159
160 /*
161  *** Printing.
162  ***/
163
164 /*! \brief
165  * If this system needs vsnprintf() and snprintf(), ISC_PLATFORM_NEEDVSNPRINTF
166  * will be defined.
167  */
168 #undef ISC_PLATFORM_NEEDVSNPRINTF
169
170 /*! \brief
171  * If this system need a modern sprintf() that returns (int) not (char*).
172  */
173 #undef ISC_PLATFORM_NEEDSPRINTF
174
175 /*! \brief
176  * The printf format string modifier to use with isc_uint64_t values.
177  */
178 #define ISC_PLATFORM_QUADFORMAT "ll"
179
180 /*! \brief
181  * Defined if we are using threads.
182  */
183 #define ISC_PLATFORM_USETHREADS 1
184
185 /*! \brief
186  * Defined if unistd.h does not cause fd_set to be delared.
187  */
188 #undef ISC_PLATFORM_NEEDSYSSELECTH
189
190 /*! \brief
191  * Type used for resource limits.
192  */
193 #define ISC_PLATFORM_RLIMITTYPE rlim_t
194
195 /*! \brief
196  * Define if your compiler supports "long long int".
197  */
198 #define ISC_PLATFORM_HAVELONGLONG 1
199
200 /*! \brief
201  * Define if the system has struct lifconf which is a extended struct ifconf
202  * for IPv6.
203  */
204 #undef ISC_PLATFORM_HAVELIFCONF
205
206 /*! \brief
207  * Define if the system has struct if_laddrconf which is a extended struct
208  * ifconf for IPv6.
209  */
210 #undef ISC_PLATFORM_HAVEIF_LADDRCONF
211
212 /*! \brief
213  * Define if the system has struct if_laddrreq.
214  */
215 #undef ISC_PLATFORM_HAVEIF_LADDRREQ
216
217 /*! \brief
218  * Used to control how extern data is linked; needed for Win32 platforms.
219  */
220 #undef ISC_PLATFORM_USEDECLSPEC
221
222 /*! \brief
223  * Define if the system supports if_nametoindex.
224  */
225 #define ISC_PLATFORM_HAVEIFNAMETOINDEX 1
226
227 /*! \brief
228  * Define if this system needs strtoul.
229  */
230 #undef ISC_PLATFORM_NEEDSTRTOUL
231
232 /*! \brief
233  * Define if this system needs memmove.
234  */
235 #undef ISC_PLATFORM_NEEDMEMMOVE
236
237 /*
238  * Define if the platform has <sys/un.h>.
239  */
240 #define ISC_PLATFORM_HAVESYSUNH 1
241
242 /*
243  * If the "xadd" operation is available on this architecture,
244  * ISC_PLATFORM_HAVEXADD will be defined.
245  */
246 #define ISC_PLATFORM_HAVEXADD 1
247
248 /*
249  * If the "atomic swap" operation is available on this architecture,
250  * ISC_PLATFORM_HAVEATOMICSTORE" will be defined.
251  */
252 #define ISC_PLATFORM_HAVEATOMICSTORE 1
253
254 /*
255  * If the "compare-and-exchange" operation is available on this architecture,
256  * ISC_PLATFORM_HAVECMPXCHG will be defined.
257  */
258 #define ISC_PLATFORM_HAVECMPXCHG 1
259
260 /*
261  * Define if gcc ASM extension is available
262  */
263 #define ISC_PLATFORM_USEGCCASM 1
264
265 /*
266  * Define if Tru64 style ASM syntax must be used.
267  */
268 #undef ISC_PLATFORM_USEOSFASM
269
270 /*
271  * Define if the standard __asm function must be used.
272  */
273
274
275 /*
276  * Define if MacOS style of PPC assembly must be used.
277  * e.g. "r6", not "6", for register six.
278  */
279
280
281 #ifndef ISC_PLATFORM_USEDECLSPEC
282 #define LIBISC_EXTERNAL_DATA
283 #define LIBDNS_EXTERNAL_DATA
284 #define LIBISCCC_EXTERNAL_DATA
285 #define LIBISCCFG_EXTERNAL_DATA
286 #define LIBBIND9_EXTERNAL_DATA
287 #else /*! \brief ISC_PLATFORM_USEDECLSPEC */
288 #ifdef LIBISC_EXPORTS
289 #define LIBISC_EXTERNAL_DATA __declspec(dllexport)
290 #else
291 #define LIBISC_EXTERNAL_DATA __declspec(dllimport)
292 #endif
293 #ifdef LIBDNS_EXPORTS
294 #define LIBDNS_EXTERNAL_DATA __declspec(dllexport)
295 #else
296 #define LIBDNS_EXTERNAL_DATA __declspec(dllimport)
297 #endif
298 #ifdef LIBISCCC_EXPORTS
299 #define LIBISCCC_EXTERNAL_DATA __declspec(dllexport)
300 #else
301 #define LIBISCCC_EXTERNAL_DATA __declspec(dllimport)
302 #endif
303 #ifdef LIBISCCFG_EXPORTS
304 #define LIBISCCFG_EXTERNAL_DATA __declspec(dllexport)
305 #else
306 #define LIBISCCFG_EXTERNAL_DATA __declspec(dllimport)
307 #endif
308 #ifdef LIBBIND9_EXPORTS
309 #define LIBBIND9_EXTERNAL_DATA __declspec(dllexport)
310 #else
311 #define LIBBIND9_EXTERNAL_DATA __declspec(dllimport)
312 #endif
313 #endif /*! \brief ISC_PLATFORM_USEDECLSPEC */
314
315 /*
316  * Tell emacs to use C mode for this file.
317  *
318  * Local Variables:
319  * mode: c
320  * End:
321  */
322
323 #endif /* ISC_PLATFORM_H */