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