1 /* 2 * Copyright (C) 2004, 2005, 2007-2009 Internet Systems Consortium, Inc. ("ISC") 3 * Copyright (C) 2001 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,v 1.19 2009/09/29 23:48:04 tbox Exp $ */ 19 20 #ifndef ISC_PLATFORM_H 21 #define ISC_PLATFORM_H 1 22 23 /***** 24 ***** Platform-dependent defines. 25 *****/ 26 27 #define ISC_PLATFORM_USETHREADS 28 29 /*** 30 *** Network. 31 ***/ 32 33 #if _MSC_VER > 1200 34 #define ISC_PLATFORM_HAVEIPV6 35 #define ISC_PLATFORM_HAVEIN6PKTINFO 36 #define ISC_PLATFORM_HAVESCOPEID 37 #endif 38 #define ISC_PLATFORM_NEEDPORTT 39 #undef MSG_TRUNC 40 #define ISC_PLATFORM_NEEDNTOP 41 #define ISC_PLATFORM_NEEDPTON 42 43 #ifndef ISC_PLATFORM_QUADFORMAT 44 #define ISC_PLATFORM_QUADFORMAT "I64" 45 #endif 46 47 #define ISC_PLATFORM_NEEDSTRSEP 48 #define ISC_PLATFORM_NEEDSTRLCPY 49 #define ISC_PLATFORM_NEEDSTRLCAT 50 #define ISC_PLATFORM_NEEDSTRLCPY 51 52 /* 53 * Used to control how extern data is linked; needed for Win32 platforms. 54 */ 55 #define ISC_PLATFORM_USEDECLSPEC 1 56 57 /* 58 * Define this here for now as winsock2.h defines h_errno 59 * and we don't want to redeclare it. 60 */ 61 #define ISC_PLATFORM_NONSTDHERRNO 62 63 /* 64 * Define if the platform has <sys/un.h>. 65 */ 66 #undef ISC_PLATFORM_HAVESYSUNH 67 68 /* 69 * Defines for the noreturn attribute. 70 */ 71 #define ISC_PLATFORM_NORETURN_PRE __declspec(noreturn) 72 #define ISC_PLATFORM_NORETURN_POST 73 74 /* 75 * Set up a macro for importing and exporting from the DLL 76 * 77 * To build static libraries on win32, #define ISC_STATIC_WIN 78 */ 79 #ifndef ISC_STATIC_WIN 80 #define ISC_DLLEXP __declspec(dllexport) 81 #define ISC_DLLIMP __declspec(dllimport) 82 #else 83 #define ISC_DLLEXP 84 #define ISC_DLLIMP 85 #endif 86 87 #ifdef LIBISC_EXPORTS 88 #define LIBISC_EXTERNAL_DATA ISC_DLLEXP 89 #else 90 #define LIBISC_EXTERNAL_DATA ISC_DLLIMP 91 #endif 92 93 #ifdef LIBISCCFG_EXPORTS 94 #define LIBISCCFG_EXTERNAL_DATA ISC_DLLEXP 95 #else 96 #define LIBISCCFG_EXTERNAL_DATA ISC_DLLIMP 97 #endif 98 99 #ifdef LIBISCCC_EXPORTS 100 #define LIBISCCC_EXTERNAL_DATA ISC_DLLEXP 101 #else 102 #define LIBISCCC_EXTERNAL_DATA ISC_DLLIMP 103 #endif 104 105 #ifdef LIBDNS_EXPORTS 106 #define LIBDNS_EXTERNAL_DATA ISC_DLLEXP 107 #else 108 #define LIBDNS_EXTERNAL_DATA ISC_DLLIMP 109 #endif 110 111 #ifdef LIBBIND9_EXPORTS 112 #define LIBBIND9_EXTERNAL_DATA ISC_DLLEXP 113 #else 114 #define LIBBIND9_EXTERNAL_DATA ISC_DLLIMP 115 #endif 116 117 #endif /* ISC_PLATFORM_H */ 118