1258945Sroberto/* 2280849Scy * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") 3258945Sroberto * Copyright (C) 1999-2003 Internet Software Consortium. 4258945Sroberto * 5258945Sroberto * Permission to use, copy, modify, and/or distribute this software for any 6258945Sroberto * purpose with or without fee is hereby granted, provided that the above 7258945Sroberto * copyright notice and this permission notice appear in all copies. 8258945Sroberto * 9258945Sroberto * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 10258945Sroberto * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 11258945Sroberto * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 12258945Sroberto * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13258945Sroberto * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 14258945Sroberto * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15258945Sroberto * PERFORMANCE OF THIS SOFTWARE. 16258945Sroberto */ 17258945Sroberto 18280849Scy/* $Id: platform.h.in,v 1.56 2010/12/18 01:56:23 each Exp $ */ 19258945Sroberto 20258945Sroberto#ifndef ISC_PLATFORM_H 21258945Sroberto#define ISC_PLATFORM_H 1 22258945Sroberto 23258945Sroberto/*! \file */ 24258945Sroberto 25258945Sroberto/***** 26258945Sroberto ***** Platform-dependent defines. 27258945Sroberto *****/ 28258945Sroberto 29258945Sroberto/*** 30258945Sroberto *** Network. 31258945Sroberto ***/ 32258945Sroberto 33258945Sroberto/*! \brief 34258945Sroberto * Define if this system needs the <netinet/in6.h> header file included 35258945Sroberto * for full IPv6 support (pretty much only UnixWare). 36258945Sroberto */ 37258945Sroberto@ISC_PLATFORM_NEEDNETINETIN6H@ 38258945Sroberto 39258945Sroberto/*! \brief 40258945Sroberto * Define if this system needs the <netinet6/in6.h> header file included 41258945Sroberto * to support in6_pkinfo (pretty much only BSD/OS). 42258945Sroberto */ 43258945Sroberto@ISC_PLATFORM_NEEDNETINET6IN6H@ 44258945Sroberto 45258945Sroberto/*! \brief 46258945Sroberto * If sockaddrs on this system have an sa_len field, ISC_PLATFORM_HAVESALEN 47258945Sroberto * will be defined. 48258945Sroberto */ 49258945Sroberto@ISC_PLATFORM_HAVESALEN@ 50258945Sroberto 51258945Sroberto/*! \brief 52258945Sroberto * If this system has the IPv6 structure definitions, ISC_PLATFORM_HAVEIPV6 53258945Sroberto * will be defined. 54258945Sroberto */ 55258945Sroberto@ISC_PLATFORM_HAVEIPV6@ 56258945Sroberto 57258945Sroberto/*! \brief 58258945Sroberto * If this system is missing in6addr_any, ISC_PLATFORM_NEEDIN6ADDRANY will 59258945Sroberto * be defined. 60258945Sroberto */ 61258945Sroberto@ISC_PLATFORM_NEEDIN6ADDRANY@ 62258945Sroberto 63258945Sroberto/*! \brief 64258945Sroberto * If this system is missing in6addr_loopback, ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 65258945Sroberto * will be defined. 66258945Sroberto */ 67258945Sroberto@ISC_PLATFORM_NEEDIN6ADDRLOOPBACK@ 68258945Sroberto 69258945Sroberto/*! \brief 70258945Sroberto * If this system has in6_pktinfo, ISC_PLATFORM_HAVEIN6PKTINFO will be 71258945Sroberto * defined. 72258945Sroberto */ 73258945Sroberto@ISC_PLATFORM_HAVEIN6PKTINFO@ 74258945Sroberto 75258945Sroberto/*! \brief 76258945Sroberto * If this system has in_addr6, rather than in6_addr, ISC_PLATFORM_HAVEINADDR6 77258945Sroberto * will be defined. 78258945Sroberto */ 79258945Sroberto@ISC_PLATFORM_HAVEINADDR6@ 80258945Sroberto 81258945Sroberto/*! \brief 82258945Sroberto * If this system has sin6_scope_id, ISC_PLATFORM_HAVESCOPEID will be defined. 83258945Sroberto */ 84258945Sroberto@ISC_PLATFORM_HAVESCOPEID@ 85258945Sroberto 86258945Sroberto/*! \brief 87258945Sroberto * If this system needs inet_ntop(), ISC_PLATFORM_NEEDNTOP will be defined. 88258945Sroberto */ 89258945Sroberto@ISC_PLATFORM_NEEDNTOP@ 90258945Sroberto 91258945Sroberto/*! \brief 92258945Sroberto * If this system needs inet_pton(), ISC_PLATFORM_NEEDPTON will be defined. 93258945Sroberto */ 94258945Sroberto@ISC_PLATFORM_NEEDPTON@ 95258945Sroberto 96258945Sroberto/*! \brief 97258945Sroberto * If this system needs in_port_t, ISC_PLATFORM_NEEDPORTT will be defined. 98258945Sroberto */ 99258945Sroberto@ISC_PLATFORM_NEEDPORTT@ 100258945Sroberto 101258945Sroberto/*! \brief 102258945Sroberto * Define if the system has struct lifconf which is a extended struct ifconf 103258945Sroberto * for IPv6. 104258945Sroberto */ 105258945Sroberto@ISC_PLATFORM_HAVELIFCONF@ 106258945Sroberto 107258945Sroberto/*! \brief 108258945Sroberto * Define if the system has struct if_laddrconf which is a extended struct 109258945Sroberto * ifconf for IPv6. 110258945Sroberto */ 111258945Sroberto@ISC_PLATFORM_HAVEIF_LADDRCONF@ 112258945Sroberto 113258945Sroberto/*! \brief 114258945Sroberto * Define if the system has struct if_laddrreq. 115258945Sroberto */ 116258945Sroberto@ISC_PLATFORM_HAVEIF_LADDRREQ@ 117258945Sroberto 118258945Sroberto/*! \brief 119258945Sroberto * Define either ISC_PLATFORM_BSD44MSGHDR or ISC_PLATFORM_BSD43MSGHDR. 120258945Sroberto */ 121258945Sroberto@ISC_PLATFORM_MSGHDRFLAVOR@ 122258945Sroberto 123258945Sroberto/*! \brief 124258945Sroberto * Define if the system supports if_nametoindex. 125258945Sroberto */ 126258945Sroberto@ISC_PLATFORM_HAVEIFNAMETOINDEX@ 127258945Sroberto 128258945Sroberto/*! \brief 129258945Sroberto * Define on some UnixWare systems to fix erroneous definitions of various 130258945Sroberto * IN6_IS_ADDR_* macros. 131258945Sroberto */ 132258945Sroberto@ISC_PLATFORM_FIXIN6ISADDR@ 133258945Sroberto 134258945Sroberto/*! \brief 135258945Sroberto * Define if the system supports kqueue multiplexing 136258945Sroberto */ 137258945Sroberto@ISC_PLATFORM_HAVEKQUEUE@ 138258945Sroberto 139258945Sroberto/*! \brief 140258945Sroberto * Define if the system supports epoll multiplexing 141258945Sroberto */ 142258945Sroberto@ISC_PLATFORM_HAVEEPOLL@ 143258945Sroberto 144258945Sroberto/*! \brief 145258945Sroberto * Define if the system supports /dev/poll multiplexing 146258945Sroberto */ 147258945Sroberto@ISC_PLATFORM_HAVEDEVPOLL@ 148258945Sroberto 149280849Scy/*! \brief 150280849Scy * Define if we want to log backtrace 151280849Scy */ 152280849Scy@ISC_PLATFORM_USEBACKTRACE@ 153280849Scy 154258945Sroberto/* 155258945Sroberto *** Printing. 156258945Sroberto ***/ 157258945Sroberto 158258945Sroberto/*! \brief 159258945Sroberto * If this system needs vsnprintf() and snprintf(), ISC_PLATFORM_NEEDVSNPRINTF 160258945Sroberto * will be defined. 161258945Sroberto */ 162258945Sroberto@ISC_PLATFORM_NEEDVSNPRINTF@ 163258945Sroberto 164258945Sroberto/*! \brief 165258945Sroberto * If this system need a modern sprintf() that returns (int) not (char*). 166258945Sroberto */ 167258945Sroberto@ISC_PLATFORM_NEEDSPRINTF@ 168258945Sroberto 169258945Sroberto/*! \brief 170258945Sroberto * The printf format string modifier to use with isc_uint64_t values. 171258945Sroberto */ 172258945Sroberto@ISC_PLATFORM_QUADFORMAT@ 173258945Sroberto 174258945Sroberto/*** 175258945Sroberto *** String functions. 176258945Sroberto ***/ 177258945Sroberto/* 178258945Sroberto * If the system needs strsep(), ISC_PLATFORM_NEEDSTRSEP will be defined. 179258945Sroberto */ 180258945Sroberto@ISC_PLATFORM_NEEDSTRSEP@ 181258945Sroberto 182258945Sroberto/* 183258945Sroberto * If the system needs strlcpy(), ISC_PLATFORM_NEEDSTRLCPY will be defined. 184258945Sroberto */ 185258945Sroberto@ISC_PLATFORM_NEEDSTRLCPY@ 186258945Sroberto 187258945Sroberto/* 188258945Sroberto * If the system needs strlcat(), ISC_PLATFORM_NEEDSTRLCAT will be defined. 189258945Sroberto */ 190258945Sroberto@ISC_PLATFORM_NEEDSTRLCAT@ 191258945Sroberto 192258945Sroberto/* 193258945Sroberto * Define if this system needs strtoul. 194258945Sroberto */ 195258945Sroberto@ISC_PLATFORM_NEEDSTRTOUL@ 196258945Sroberto 197258945Sroberto/* 198258945Sroberto * Define if this system needs memmove. 199258945Sroberto */ 200258945Sroberto@ISC_PLATFORM_NEEDMEMMOVE@ 201258945Sroberto 202258945Sroberto/*** 203258945Sroberto *** Miscellaneous. 204258945Sroberto ***/ 205258945Sroberto 206258945Sroberto/* 207258945Sroberto * Defined if we are using threads. 208258945Sroberto */ 209258945Sroberto@ISC_PLATFORM_USETHREADS@ 210258945Sroberto 211258945Sroberto/* 212258945Sroberto * Defined if unistd.h does not cause fd_set to be delared. 213258945Sroberto */ 214258945Sroberto@ISC_PLATFORM_NEEDSYSSELECTH@ 215258945Sroberto 216258945Sroberto/* 217258945Sroberto * Defined to <gssapi.h> or <gssapi/gssapi.h> for how to include 218258945Sroberto * the GSSAPI header. 219258945Sroberto */ 220258945Sroberto@ISC_PLATFORM_GSSAPIHEADER@ 221258945Sroberto 222258945Sroberto/* 223280849Scy * Defined to <gssapi_krb5.h> or <gssapi/gssapi_krb5.h> for how to 224280849Scy * include the GSSAPI KRB5 header. 225280849Scy */ 226280849Scy@ISC_PLATFORM_GSSAPI_KRB5_HEADER@ 227280849Scy 228280849Scy/* 229280849Scy * Defined to <krb5.h> or <krb5/krb5.h> for how to include 230280849Scy * the KRB5 header. 231280849Scy */ 232280849Scy@ISC_PLATFORM_KRB5HEADER@ 233280849Scy 234280849Scy/* 235258945Sroberto * Type used for resource limits. 236258945Sroberto */ 237258945Sroberto@ISC_PLATFORM_RLIMITTYPE@ 238258945Sroberto 239258945Sroberto/* 240258945Sroberto * Define if your compiler supports "long long int". 241258945Sroberto */ 242258945Sroberto@ISC_PLATFORM_HAVELONGLONG@ 243258945Sroberto 244258945Sroberto/* 245258945Sroberto * Define if PTHREAD_ONCE_INIT should be surrounded by braces to 246258945Sroberto * prevent compiler warnings (such as with gcc on Solaris 2.8). 247258945Sroberto */ 248258945Sroberto@ISC_PLATFORM_BRACEPTHREADONCEINIT@ 249258945Sroberto 250258945Sroberto/* 251258945Sroberto * Used to control how extern data is linked; needed for Win32 platforms. 252258945Sroberto */ 253258945Sroberto@ISC_PLATFORM_USEDECLSPEC@ 254258945Sroberto 255258945Sroberto/* 256258945Sroberto * Define if the platform has <sys/un.h>. 257258945Sroberto */ 258258945Sroberto@ISC_PLATFORM_HAVESYSUNH@ 259258945Sroberto 260258945Sroberto/* 261258945Sroberto * If the "xadd" operation is available on this architecture, 262258945Sroberto * ISC_PLATFORM_HAVEXADD will be defined. 263258945Sroberto */ 264258945Sroberto@ISC_PLATFORM_HAVEXADD@ 265258945Sroberto 266258945Sroberto/* 267258945Sroberto * If the "xaddq" operation (64bit xadd) is available on this architecture, 268258945Sroberto * ISC_PLATFORM_HAVEXADDQ will be defined. 269258945Sroberto */ 270258945Sroberto@ISC_PLATFORM_HAVEXADDQ@ 271258945Sroberto 272258945Sroberto/* 273258945Sroberto * If the "atomic swap" operation is available on this architecture, 274258945Sroberto * ISC_PLATFORM_HAVEATOMICSTORE" will be defined. 275258945Sroberto */ 276258945Sroberto@ISC_PLATFORM_HAVEATOMICSTORE@ 277258945Sroberto 278258945Sroberto/* 279258945Sroberto * If the "compare-and-exchange" operation is available on this architecture, 280258945Sroberto * ISC_PLATFORM_HAVECMPXCHG will be defined. 281258945Sroberto */ 282258945Sroberto@ISC_PLATFORM_HAVECMPXCHG@ 283258945Sroberto 284258945Sroberto/* 285258945Sroberto * Define if gcc ASM extension is available 286258945Sroberto */ 287258945Sroberto@ISC_PLATFORM_USEGCCASM@ 288258945Sroberto 289258945Sroberto/* 290258945Sroberto * Define if Tru64 style ASM syntax must be used. 291258945Sroberto */ 292258945Sroberto@ISC_PLATFORM_USEOSFASM@ 293258945Sroberto 294258945Sroberto/* 295258945Sroberto * Define if the standard __asm function must be used. 296258945Sroberto */ 297258945Sroberto@ISC_PLATFORM_USESTDASM@ 298258945Sroberto 299258945Sroberto/* 300258945Sroberto * Define if the platform has <strings.h>. 301258945Sroberto */ 302258945Sroberto@ISC_PLATFORM_HAVESTRINGSH@ 303258945Sroberto 304280849Scy/* 305280849Scy * Define if the hash functions must be provided by OpenSSL. 306280849Scy */ 307280849Scy@ISC_PLATFORM_OPENSSLHASH@ 308280849Scy 309280849Scy/* 310280849Scy * Defines for the noreturn attribute. 311280849Scy */ 312280849Scy@ISC_PLATFORM_NORETURN_PRE@ 313280849Scy@ISC_PLATFORM_NORETURN_POST@ 314280849Scy 315258945Sroberto/*** 316258945Sroberto *** Windows dll support. 317258945Sroberto ***/ 318258945Sroberto 319258945Sroberto/* 320258945Sroberto * Define if MacOS style of PPC assembly must be used. 321258945Sroberto * e.g. "r6", not "6", for register six. 322258945Sroberto */ 323258945Sroberto@ISC_PLATFORM_USEMACASM@ 324258945Sroberto 325258945Sroberto#ifndef ISC_PLATFORM_USEDECLSPEC 326258945Sroberto#define LIBISC_EXTERNAL_DATA 327258945Sroberto#define LIBDNS_EXTERNAL_DATA 328258945Sroberto#define LIBISCCC_EXTERNAL_DATA 329258945Sroberto#define LIBISCCFG_EXTERNAL_DATA 330258945Sroberto#define LIBBIND9_EXTERNAL_DATA 331258945Sroberto#else /*! \brief ISC_PLATFORM_USEDECLSPEC */ 332258945Sroberto#ifdef LIBISC_EXPORTS 333258945Sroberto#define LIBISC_EXTERNAL_DATA __declspec(dllexport) 334258945Sroberto#else 335258945Sroberto#define LIBISC_EXTERNAL_DATA __declspec(dllimport) 336258945Sroberto#endif 337258945Sroberto#ifdef LIBDNS_EXPORTS 338258945Sroberto#define LIBDNS_EXTERNAL_DATA __declspec(dllexport) 339258945Sroberto#else 340258945Sroberto#define LIBDNS_EXTERNAL_DATA __declspec(dllimport) 341258945Sroberto#endif 342258945Sroberto#ifdef LIBISCCC_EXPORTS 343258945Sroberto#define LIBISCCC_EXTERNAL_DATA __declspec(dllexport) 344258945Sroberto#else 345258945Sroberto#define LIBISCCC_EXTERNAL_DATA __declspec(dllimport) 346258945Sroberto#endif 347258945Sroberto#ifdef LIBISCCFG_EXPORTS 348258945Sroberto#define LIBISCCFG_EXTERNAL_DATA __declspec(dllexport) 349258945Sroberto#else 350258945Sroberto#define LIBISCCFG_EXTERNAL_DATA __declspec(dllimport) 351258945Sroberto#endif 352258945Sroberto#ifdef LIBBIND9_EXPORTS 353258945Sroberto#define LIBBIND9_EXTERNAL_DATA __declspec(dllexport) 354258945Sroberto#else 355258945Sroberto#define LIBBIND9_EXTERNAL_DATA __declspec(dllimport) 356258945Sroberto#endif 357258945Sroberto#endif /*! \brief ISC_PLATFORM_USEDECLSPEC */ 358258945Sroberto 359258945Sroberto/* 360258945Sroberto * Tell emacs to use C mode for this file. 361258945Sroberto * 362258945Sroberto * Local Variables: 363258945Sroberto * mode: c 364258945Sroberto * End: 365258945Sroberto */ 366258945Sroberto 367258945Sroberto#endif /* ISC_PLATFORM_H */ 368