1/* 2 * Copyright (C) 2004-2010 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 *** Miscellaneous. 204 ***/ 205 206/* 207 * Defined if we are using threads. 208 */ 209@ISC_PLATFORM_USETHREADS@ 210 211/* 212 * Defined if unistd.h does not cause fd_set to be delared. 213 */ 214@ISC_PLATFORM_NEEDSYSSELECTH@ 215 216/* 217 * Defined to <gssapi.h> or <gssapi/gssapi.h> for how to include 218 * the GSSAPI header. 219 */ 220@ISC_PLATFORM_GSSAPIHEADER@ 221 222/* 223 * Defined to <gssapi_krb5.h> or <gssapi/gssapi_krb5.h> for how to 224 * include the GSSAPI KRB5 header. 225 */ 226@ISC_PLATFORM_GSSAPI_KRB5_HEADER@ 227 228/* 229 * Defined to <krb5.h> or <krb5/krb5.h> for how to include 230 * the KRB5 header. 231 */ 232@ISC_PLATFORM_KRB5HEADER@ 233 234/* 235 * Type used for resource limits. 236 */ 237@ISC_PLATFORM_RLIMITTYPE@ 238 239/* 240 * Define if your compiler supports "long long int". 241 */ 242@ISC_PLATFORM_HAVELONGLONG@ 243 244/* 245 * Define if PTHREAD_ONCE_INIT should be surrounded by braces to 246 * prevent compiler warnings (such as with gcc on Solaris 2.8). 247 */ 248@ISC_PLATFORM_BRACEPTHREADONCEINIT@ 249 250/* 251 * Used to control how extern data is linked; needed for Win32 platforms. 252 */ 253@ISC_PLATFORM_USEDECLSPEC@ 254 255/* 256 * Define if the platform has <sys/un.h>. 257 */ 258@ISC_PLATFORM_HAVESYSUNH@ 259 260/* 261 * If the "xadd" operation is available on this architecture, 262 * ISC_PLATFORM_HAVEXADD will be defined. 263 */ 264@ISC_PLATFORM_HAVEXADD@ 265 266/* 267 * If the "xaddq" operation (64bit xadd) is available on this architecture, 268 * ISC_PLATFORM_HAVEXADDQ will be defined. 269 */ 270@ISC_PLATFORM_HAVEXADDQ@ 271 272/* 273 * If the "atomic swap" operation is available on this architecture, 274 * ISC_PLATFORM_HAVEATOMICSTORE" will be defined. 275 */ 276@ISC_PLATFORM_HAVEATOMICSTORE@ 277 278/* 279 * If the "compare-and-exchange" operation is available on this architecture, 280 * ISC_PLATFORM_HAVECMPXCHG will be defined. 281 */ 282@ISC_PLATFORM_HAVECMPXCHG@ 283 284/* 285 * Define if gcc ASM extension is available 286 */ 287@ISC_PLATFORM_USEGCCASM@ 288 289/* 290 * Define if Tru64 style ASM syntax must be used. 291 */ 292@ISC_PLATFORM_USEOSFASM@ 293 294/* 295 * Define if the standard __asm function must be used. 296 */ 297@ISC_PLATFORM_USESTDASM@ 298 299/* 300 * Define if the platform has <strings.h>. 301 */ 302@ISC_PLATFORM_HAVESTRINGSH@ 303 304/* 305 * Define if the hash functions must be provided by OpenSSL. 306 */ 307@ISC_PLATFORM_OPENSSLHASH@ 308 309/* 310 * Defines for the noreturn attribute. 311 */ 312@ISC_PLATFORM_NORETURN_PRE@ 313@ISC_PLATFORM_NORETURN_POST@ 314 315/*** 316 *** Windows dll support. 317 ***/ 318 319/* 320 * Define if MacOS style of PPC assembly must be used. 321 * e.g. "r6", not "6", for register six. 322 */ 323@ISC_PLATFORM_USEMACASM@ 324 325#ifndef ISC_PLATFORM_USEDECLSPEC 326#define LIBISC_EXTERNAL_DATA 327#define LIBDNS_EXTERNAL_DATA 328#define LIBISCCC_EXTERNAL_DATA 329#define LIBISCCFG_EXTERNAL_DATA 330#define LIBBIND9_EXTERNAL_DATA 331#else /*! \brief ISC_PLATFORM_USEDECLSPEC */ 332#ifdef LIBISC_EXPORTS 333#define LIBISC_EXTERNAL_DATA __declspec(dllexport) 334#else 335#define LIBISC_EXTERNAL_DATA __declspec(dllimport) 336#endif 337#ifdef LIBDNS_EXPORTS 338#define LIBDNS_EXTERNAL_DATA __declspec(dllexport) 339#else 340#define LIBDNS_EXTERNAL_DATA __declspec(dllimport) 341#endif 342#ifdef LIBISCCC_EXPORTS 343#define LIBISCCC_EXTERNAL_DATA __declspec(dllexport) 344#else 345#define LIBISCCC_EXTERNAL_DATA __declspec(dllimport) 346#endif 347#ifdef LIBISCCFG_EXPORTS 348#define LIBISCCFG_EXTERNAL_DATA __declspec(dllexport) 349#else 350#define LIBISCCFG_EXTERNAL_DATA __declspec(dllimport) 351#endif 352#ifdef LIBBIND9_EXPORTS 353#define LIBBIND9_EXTERNAL_DATA __declspec(dllexport) 354#else 355#define LIBBIND9_EXTERNAL_DATA __declspec(dllimport) 356#endif 357#endif /*! \brief ISC_PLATFORM_USEDECLSPEC */ 358 359/* 360 * Tell emacs to use C mode for this file. 361 * 362 * Local Variables: 363 * mode: c 364 * End: 365 */ 366 367#endif /* ISC_PLATFORM_H */ 368