00001 /* 00002 * Copyright (C) 2004-2010, 2013, 2014 Internet Systems Consortium, Inc. ("ISC") 00003 * Copyright (C) 1999-2003 Internet Software Consortium. 00004 * 00005 * Permission to use, copy, modify, and/or distribute this software for any 00006 * purpose with or without fee is hereby granted, provided that the above 00007 * copyright notice and this permission notice appear in all copies. 00008 * 00009 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 00010 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 00011 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 00012 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 00013 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 00014 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00015 * PERFORMANCE OF THIS SOFTWARE. 00016 */ 00017 00018 /* $Id: platform.h.in,v 1.56 2010/12/18 01:56:23 each Exp $ */ 00019 00020 #ifndef ISC_PLATFORM_H 00021 #define ISC_PLATFORM_H 1 00022 00023 /*! \file */ 00024 00025 /***** 00026 ***** Platform-dependent defines. 00027 *****/ 00028 00029 /*** 00030 *** Network. 00031 ***/ 00032 00033 /*! \brief 00034 * Define if this system needs the <netinet/in6.h> header file included 00035 * for full IPv6 support (pretty much only UnixWare). 00036 */ 00037 #undef ISC_PLATFORM_NEEDNETINETIN6H 00038 00039 /*! \brief 00040 * Define if this system needs the <netinet6/in6.h> header file included 00041 * to support in6_pkinfo (pretty much only BSD/OS). 00042 */ 00043 #undef ISC_PLATFORM_NEEDNETINET6IN6H 00044 00045 /*! \brief 00046 * If sockaddrs on this system have an sa_len field, ISC_PLATFORM_HAVESALEN 00047 * will be defined. 00048 */ 00049 #define ISC_PLATFORM_HAVESALEN 1 00050 00051 /*! \brief 00052 * If this system has the IPv6 structure definitions, ISC_PLATFORM_HAVEIPV6 00053 * will be defined. 00054 */ 00055 #define ISC_PLATFORM_HAVEIPV6 1 00056 00057 /*! \brief 00058 * If this system is missing in6addr_any, ISC_PLATFORM_NEEDIN6ADDRANY will 00059 * be defined. 00060 */ 00061 #undef ISC_PLATFORM_NEEDIN6ADDRANY 00062 00063 /*! \brief 00064 * If this system is missing in6addr_loopback, ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 00065 * will be defined. 00066 */ 00067 #undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 00068 00069 /*! \brief 00070 * If this system has in6_pktinfo, ISC_PLATFORM_HAVEIN6PKTINFO will be 00071 * defined. 00072 */ 00073 #define ISC_PLATFORM_HAVEIN6PKTINFO 1 00074 00075 /*! \brief 00076 * If this system has in_addr6, rather than in6_addr, ISC_PLATFORM_HAVEINADDR6 00077 * will be defined. 00078 */ 00079 #undef ISC_PLATFORM_HAVEINADDR6 00080 00081 /*! \brief 00082 * If this system has sin6_scope_id, ISC_PLATFORM_HAVESCOPEID will be defined. 00083 */ 00084 #define ISC_PLATFORM_HAVESCOPEID 1 00085 00086 /*! \brief 00087 * If this system needs inet_ntop(), ISC_PLATFORM_NEEDNTOP will be defined. 00088 */ 00089 #undef ISC_PLATFORM_NEEDNTOP 00090 00091 /*! \brief 00092 * If this system needs inet_pton(), ISC_PLATFORM_NEEDPTON will be defined. 00093 */ 00094 #undef ISC_PLATFORM_NEEDPTON 00095 00096 /*! \brief 00097 * If this system needs in_port_t, ISC_PLATFORM_NEEDPORTT will be defined. 00098 */ 00099 #undef ISC_PLATFORM_NEEDPORTT 00100 00101 /*! \brief 00102 * Define if the system has struct lifconf which is a extended struct ifconf 00103 * for IPv6. 00104 */ 00105 #undef ISC_PLATFORM_HAVELIFCONF 00106 00107 /*! \brief 00108 * Define if the system has struct if_laddrconf which is a extended struct 00109 * ifconf for IPv6. 00110 */ 00111 #undef ISC_PLATFORM_HAVEIF_LADDRCONF 00112 00113 /*! \brief 00114 * Define if the system has struct if_laddrreq. 00115 */ 00116 #undef ISC_PLATFORM_HAVEIF_LADDRREQ 00117 00118 /*! \brief 00119 * Define either ISC_PLATFORM_BSD44MSGHDR or ISC_PLATFORM_BSD43MSGHDR. 00120 */ 00121 #define ISC_NET_BSD44MSGHDR 1 00122 00123 /*! \brief 00124 * Define if the system supports if_nametoindex. 00125 */ 00126 #define ISC_PLATFORM_HAVEIFNAMETOINDEX 1 00127 00128 /*! \brief 00129 * Define on some UnixWare systems to fix erroneous definitions of various 00130 * IN6_IS_ADDR_* macros. 00131 */ 00132 #undef ISC_PLATFORM_FIXIN6ISADDR 00133 00134 /*! \brief 00135 * Define if the system has struct sockaddr_storage. 00136 */ 00137 #define ISC_PLATFORM_HAVESOCKADDRSTORAGE 1 00138 00139 /*! \brief 00140 * Define if the system supports kqueue multiplexing 00141 */ 00142 #define ISC_PLATFORM_HAVEKQUEUE 1 00143 00144 /*! \brief 00145 * Define if the system supports epoll multiplexing 00146 */ 00147 #undef ISC_PLATFORM_HAVEEPOLL 00148 00149 /*! \brief 00150 * Define if the system supports /dev/poll multiplexing 00151 */ 00152 #undef ISC_PLATFORM_HAVEDEVPOLL 00153 00154 /*! \brief 00155 * Define if we want to log backtrace 00156 */ 00157 #define ISC_PLATFORM_USEBACKTRACE 1 00158 00159 /* 00160 *** Printing. 00161 ***/ 00162 00163 /*! \brief 00164 * If this system needs vsnprintf() and snprintf(), ISC_PLATFORM_NEEDVSNPRINTF 00165 * will be defined. 00166 */ 00167 #undef ISC_PLATFORM_NEEDVSNPRINTF 00168 00169 /*! \brief 00170 * If this system need a modern sprintf() that returns (int) not (char*). 00171 */ 00172 #undef ISC_PLATFORM_NEEDSPRINTF 00173 00174 /*! \brief 00175 * The printf format string modifier to use with isc_uint64_t values. 00176 */ 00177 #define ISC_PLATFORM_QUADFORMAT "ll" 00178 00179 /*** 00180 *** String functions. 00181 ***/ 00182 /* 00183 * If the system needs strsep(), ISC_PLATFORM_NEEDSTRSEP will be defined. 00184 */ 00185 #undef ISC_PLATFORM_NEEDSTRSEP 00186 00187 /* 00188 * If the system needs strlcpy(), ISC_PLATFORM_NEEDSTRLCPY will be defined. 00189 */ 00190 #undef ISC_PLATFORM_NEEDSTRLCPY 00191 00192 /* 00193 * If the system needs strlcat(), ISC_PLATFORM_NEEDSTRLCAT will be defined. 00194 */ 00195 #undef ISC_PLATFORM_NEEDSTRLCAT 00196 00197 /* 00198 * Define if this system needs strtoul. 00199 */ 00200 #undef ISC_PLATFORM_NEEDSTRTOUL 00201 00202 /* 00203 * Define if this system needs memmove. 00204 */ 00205 #undef ISC_PLATFORM_NEEDMEMMOVE 00206 00207 /* 00208 * Define if this system needs strcasestr. 00209 */ 00210 #undef ISC_PLATFORM_NEEDSTRCASESTR 00211 00212 /*** 00213 *** Miscellaneous. 00214 ***/ 00215 00216 /* 00217 * Defined if we are using threads. 00218 */ 00219 #undef ISC_PLATFORM_USETHREADS 00220 00221 /* 00222 * Defined if unistd.h does not cause fd_set to be delared. 00223 */ 00224 #undef ISC_PLATFORM_NEEDSYSSELECTH 00225 00226 /* 00227 * Defined to <gssapi.h> or <gssapi/gssapi.h> for how to include 00228 * the GSSAPI header. 00229 */ 00230 #define ISC_PLATFORM_GSSAPIHEADER <gssapi/gssapi.h> 00231 00232 /* 00233 * Defined to <gssapi_krb5.h> or <gssapi/gssapi_krb5.h> for how to 00234 * include the GSSAPI KRB5 header. 00235 */ 00236 #define ISC_PLATFORM_GSSAPI_KRB5_HEADER <gssapi/gssapi_krb5.h> 00237 00238 /* 00239 * Defined to <krb5.h> or <krb5/krb5.h> for how to include 00240 * the KRB5 header. 00241 */ 00242 #define ISC_PLATFORM_KRB5HEADER <krb5/krb5.h> 00243 00244 /* 00245 * Type used for resource limits. 00246 */ 00247 #define ISC_PLATFORM_RLIMITTYPE rlim_t 00248 00249 /* 00250 * Define if your compiler supports "long long int". 00251 */ 00252 #define ISC_PLATFORM_HAVELONGLONG 1 00253 00254 /* 00255 * Define if PTHREAD_ONCE_INIT should be surrounded by braces to 00256 * prevent compiler warnings (such as with gcc on Solaris 2.8). 00257 */ 00258 #undef ISC_PLATFORM_BRACEPTHREADONCEINIT 00259 00260 /* 00261 * Used to control how extern data is linked; needed for Win32 platforms. 00262 */ 00263 #undef ISC_PLATFORM_USEDECLSPEC 00264 00265 /* 00266 * Define if the platform has <sys/un.h>. 00267 */ 00268 #define ISC_PLATFORM_HAVESYSUNH 1 00269 00270 /* 00271 * If the "xadd" operation is available on this architecture, 00272 * ISC_PLATFORM_HAVEXADD will be defined. 00273 */ 00274 #define ISC_PLATFORM_HAVEXADD 1 00275 00276 /* 00277 * If the "xaddq" operation (64bit xadd) is available on this architecture, 00278 * ISC_PLATFORM_HAVEXADDQ will be defined. 00279 */ 00280 #undef ISC_PLATFORM_HAVEXADDQ 00281 00282 /* 00283 * If the "atomic swap" operation is available on this architecture, 00284 * ISC_PLATFORM_HAVEATOMICSTORE" will be defined. 00285 */ 00286 #define ISC_PLATFORM_HAVEATOMICSTORE 1 00287 00288 /* 00289 * If the "compare-and-exchange" operation is available on this architecture, 00290 * ISC_PLATFORM_HAVECMPXCHG will be defined. 00291 */ 00292 #define ISC_PLATFORM_HAVECMPXCHG 1 00293 00294 /* 00295 * Define if gcc ASM extension is available 00296 */ 00297 #define ISC_PLATFORM_USEGCCASM 1 00298 00299 /* 00300 * Define if Tru64 style ASM syntax must be used. 00301 */ 00302 #undef ISC_PLATFORM_USEOSFASM 00303 00304 /* 00305 * Define if the standard __asm function must be used. 00306 */ 00307 00308 00309 /* 00310 * Define if the platform has <strings.h>. 00311 */ 00312 #define ISC_PLATFORM_HAVESTRINGSH 1 00313 00314 /* 00315 * Define if the hash functions must be provided by OpenSSL. 00316 */ 00317 #undef ISC_PLATFORM_OPENSSLHASH 00318 00319 /* 00320 * Define if AES support is wanted 00321 */ 00322 #undef ISC_PLATFORM_WANTAES 00323 00324 /* 00325 * Defines for the noreturn attribute. 00326 */ 00327 #define ISC_PLATFORM_NORETURN_PRE 00328 #define ISC_PLATFORM_NORETURN_POST __attribute__((noreturn)) 00329 00330 /* 00331 * Defined if we are enabling SIT (Source Identity Token). 00332 */ 00333 #undef ISC_PLATFORM_USESIT 00334 00335 /*** 00336 *** Windows dll support. 00337 ***/ 00338 00339 /* 00340 * Define if MacOS style of PPC assembly must be used. 00341 * e.g. "r6", not "6", for register six. 00342 */ 00343 00344 00345 #ifndef ISC_PLATFORM_USEDECLSPEC 00346 #define LIBISC_EXTERNAL_DATA 00347 #define LIBDNS_EXTERNAL_DATA 00348 #define LIBISCCC_EXTERNAL_DATA 00349 #define LIBISCCFG_EXTERNAL_DATA 00350 #define LIBBIND9_EXTERNAL_DATA 00351 #define LIBTESTS_EXTERNAL_DATA 00352 #else /*! \brief ISC_PLATFORM_USEDECLSPEC */ 00353 #ifdef LIBISC_EXPORTS 00354 #define LIBISC_EXTERNAL_DATA __declspec(dllexport) 00355 #else 00356 #define LIBISC_EXTERNAL_DATA __declspec(dllimport) 00357 #endif 00358 #ifdef LIBDNS_EXPORTS 00359 #define LIBDNS_EXTERNAL_DATA __declspec(dllexport) 00360 #else 00361 #define LIBDNS_EXTERNAL_DATA __declspec(dllimport) 00362 #endif 00363 #ifdef LIBISCCC_EXPORTS 00364 #define LIBISCCC_EXTERNAL_DATA __declspec(dllexport) 00365 #else 00366 #define LIBISCCC_EXTERNAL_DATA __declspec(dllimport) 00367 #endif 00368 #ifdef LIBISCCFG_EXPORTS 00369 #define LIBISCCFG_EXTERNAL_DATA __declspec(dllexport) 00370 #else 00371 #define LIBISCCFG_EXTERNAL_DATA __declspec(dllimport) 00372 #endif 00373 #ifdef LIBBIND9_EXPORTS 00374 #define LIBBIND9_EXTERNAL_DATA __declspec(dllexport) 00375 #else 00376 #define LIBBIND9_EXTERNAL_DATA __declspec(dllimport) 00377 #endif 00378 #ifdef LIBTESTS_EXPORTS 00379 #define LIBTESTS_EXTERNAL_DATA __declspec(dllexport) 00380 #else 00381 #define LIBTESTS_EXTERNAL_DATA __declspec(dllimport) 00382 #endif 00383 #endif /*! \brief ISC_PLATFORM_USEDECLSPEC */ 00384 00385 /* 00386 * Tell emacs to use C mode for this file. 00387 * 00388 * Local Variables: 00389 * mode: c 00390 * End: 00391 */ 00392 00393 #endif /* ISC_PLATFORM_H */