5f4f8718e4ae0baf8837350a4d83df7e1860153d
[dragonfly.git] / usr.sbin / named / include / isc / platform.h
1 /*
2  * Copyright (C) 1999-2001  Internet Software Consortium.
3  *
4  * Permission to use, copy, modify, and distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
9  * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
10  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
11  * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
12  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
13  * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
14  * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
15  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  */
17
18 /* $Id: platform.h.in,v 1.24.2.1 2001/11/02 00:20:07 marka Exp $ */
19 /* $DragonFly: src/usr.sbin/named/include/isc/platform.h,v 1.1 2004/05/27 18:15:42 dillon Exp $ */
20
21 #ifndef ISC_PLATFORM_H
22 #define ISC_PLATFORM_H 1
23
24 /*****
25  ***** Platform-dependent defines.
26  *****/
27
28 /***
29  *** Network.
30  ***/
31
32 /*
33  * Define if this system needs the <netinet/in6.h> header file included
34  * for full IPv6 support (pretty much only UnixWare).
35  */
36 #undef ISC_PLATFORM_NEEDNETINETIN6H
37
38 /*
39  * Define if this system needs the <netinet6/in6.h> header file included
40  * to support in6_pkinfo (pretty much only BSD/OS).
41  */
42 #undef ISC_PLATFORM_NEEDNETINET6IN6H
43
44 /*
45  * If sockaddrs on this system have an sa_len field, ISC_PLATFORM_HAVESALEN
46  * will be defined.
47  */
48 #define ISC_PLATFORM_HAVESALEN 1
49
50 /*
51  * If this system has the IPv6 structure definitions, ISC_PLATFORM_HAVEIPV6
52  * will be defined.
53  */
54 #define ISC_PLATFORM_HAVEIPV6 1
55
56 /*
57  * If this system is missing in6addr_any, ISC_PLATFORM_NEEDIN6ADDRANY will
58  * be defined.
59  */
60 #undef ISC_PLATFORM_NEEDIN6ADDRANY
61
62 /*
63  * If this system is missing in6addr_loopback, ISC_PLATFORM_NEEDIN6ADDRLOOPBACK
64  * will be defined.
65  */
66 #undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK
67
68 /*
69  * If this system has in6_pktinfo, ISC_PLATFORM_HAVEIN6PKTINFO will be
70  * defined.
71  */
72 #define ISC_PLATFORM_HAVEIN6PKTINFO 1
73
74 /*
75  * If this system has in_addr6, rather than in6_addr, ISC_PLATFORM_HAVEINADDR6
76  * will be defined.
77  */
78 #undef ISC_PLATFORM_HAVEINADDR6
79
80 /*
81  * If this system needs inet_ntop(), ISC_PLATFORM_NEEDNTOP will be defined.
82  */
83 #undef ISC_PLATFORM_NEEDNTOP
84
85 /*
86  * If this system needs inet_pton(), ISC_PLATFORM_NEEDPTON will be defined.
87  */
88 #define ISC_PLATFORM_NEEDPTON 1
89
90 /*
91  * If this system needs inet_aton(), ISC_PLATFORM_NEEDATON will be defined.
92  */
93 #undef ISC_PLATFORM_NEEDATON
94
95 /*
96  * If this system needs in_port_t, ISC_PLATFORM_NEEDPORTT will be defined.
97  */
98 #undef ISC_PLATFORM_NEEDPORTT
99
100 /*
101  * If the system needs strsep(), ISC_PLATFORM_NEEDSTRSEP will be defined.
102  */
103 #undef ISC_PLATFORM_NEEDSTRSEP
104
105 /*
106  * Define either ISC_PLATFORM_BSD44MSGHDR or ISC_PLATFORM_BSD43MSGHDR.
107  */
108 #define ISC_NET_BSD44MSGHDR 1
109
110 /*
111  * Define if PTHREAD_ONCE_INIT should be surrounded by braces to
112  * prevent compiler warnings (such as with gcc on Solaris 2.8).
113  */
114 #undef ISC_PLATFORM_BRACEPTHREADONCEINIT
115
116 /*
117  * Define on some UnixWare systems to fix erroneous definitions of various
118  * IN6_IS_ADDR_* macros.
119  */
120 #undef ISC_PLATFORM_FIXIN6ISADDR
121
122 /***
123  *** Printing.
124  ***/
125
126 /*
127  * If this system needs vsnprintf() and snprintf(), ISC_PLATFORM_NEEDVSNPRINTF
128  * will be defined.
129  */
130 #undef ISC_PLATFORM_NEEDVSNPRINTF
131
132 /*
133  * The printf format string modifier to use with isc_uint64_t values.
134  */
135 #define ISC_PLATFORM_QUADFORMAT "ll"
136
137 /*
138  * Defined if we are using threads.
139  */
140 #undef ISC_PLATFORM_USETHREADS
141
142 /*
143  * Defined if unistd.h does not cause fd_set to be delared.
144  */
145 #undef ISC_PLATFORM_NEEDSYSSELECTH
146
147 /*
148  * Type used for resource limits.
149  */
150 #define ISC_PLATFORM_RLIMITTYPE rlim_t
151
152 /*
153  * Define if your compiler supports "long long int".
154  */
155 #define ISC_PLATFORM_HAVELONGLONG 1
156
157 /*
158  * Used to control how extern data is linked; needed for Win32 platforms.
159  */
160 #undef ISC_PLATFORM_USEDECLSPEC
161
162 #ifndef ISC_PLATFORM_USEDECLSPEC
163 #define LIBISC_EXTERNAL_DATA
164 #define LIBDNS_EXTERNAL_DATA
165 #define LIBISCCC_EXTERNAL_DATA
166 #define LIBISCCFG_EXTERNAL_DATA
167 #else /* ISC_PLATFORM_USEDECLSPEC */
168 #ifdef LIBISC_EXPORTS
169 #define LIBISC_EXTERNAL_DATA __declspec(dllexport)
170 #else
171 #define LIBISC_EXTERNAL_DATA __declspec(dllimport)
172 #endif
173 #ifdef LIBDNS_EXPORTS
174 #define LIBDNS_EXTERNAL_DATA __declspec(dllexport)
175 #else
176 #define LIBDNS_EXTERNAL_DATA __declspec(dllimport)
177 #endif
178 #ifdef LIBISCCC_EXPORTS
179 #define LIBISCCC_EXTERNAL_DATA __declspec(dllexport)
180 #else
181 #define LIBISCCC_EXTERNAL_DATA __declspec(dllimport)
182 #endif
183 #ifdef LIBISCCFG_EXPORTS
184 #define LIBISCCFG_EXTERNAL_DATA __declspec(dllexport)
185 #else
186 #define LIBISCCFG_EXTERNAL_DATA __declspec(dllimport)
187 #endif
188 #endif /* ISC_PLATFORM_USEDECLSPEC */
189
190 /*
191  * Tell emacs to use C mode for this file.
192  *
193  * Local Variables:
194  * mode: c
195  * End:
196  */
197
198 #endif /* ISC_PLATFORM_H */