1/*
2 * Copyright (C) 2004, 2005, 2007-2009, 2013, 2014  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 1
28
29/***
30 *** Network.
31 ***/
32
33#define ISC_PLATFORM_HAVEIPV6
34#if _MSC_VER > 1200
35#define ISC_PLATFORM_HAVEIN6PKTINFO
36#endif
37#define ISC_PLATFORM_HAVESCOPEID
38#define ISC_PLATFORM_NEEDPORTT
39#undef MSG_TRUNC
40#define ISC_PLATFORM_NEEDNTOP
41#define ISC_PLATFORM_NEEDPTON
42#define ISC_PLATFORM_HAVESOCKADDRSTORAGE
43
44#define ISC_PLATFORM_QUADFORMAT "I64"
45
46#define ISC_PLATFORM_NEEDSTRSEP
47#define ISC_PLATFORM_NEEDSTRLCPY
48#define ISC_PLATFORM_NEEDSTRLCAT
49#define ISC_PLATFORM_NEEDSTRLCPY
50
51/*
52 * Used to control how extern data is linked; needed for Win32 platforms.
53 */
54#define ISC_PLATFORM_USEDECLSPEC 1
55
56/*
57 * Define this here for now as winsock2.h defines h_errno
58 * and we don't want to redeclare it.
59 */
60#define ISC_PLATFORM_NONSTDHERRNO
61
62/*
63 * Define if the platform has <sys/un.h>.
64 */
65#undef ISC_PLATFORM_HAVESYSUNH
66
67/*
68 * Define if we want to log backtrace
69 */
70@ISC_PLATFORM_USEBACKTRACE@
71
72/*
73 * Defines for the noreturn attribute.
74 */
75#define ISC_PLATFORM_NORETURN_PRE __declspec(noreturn)
76#define ISC_PLATFORM_NORETURN_POST
77
78/*
79 * Define if the hash functions must be provided by OpenSSL.
80 */
81@ISC_PLATFORM_OPENSSLHASH@
82
83/*
84 * Define if AES support is wanted
85 */
86@ISC_PLATFORM_WANTAES@
87
88/*
89 * If the "xadd" operation is available on this architecture,
90 * ISC_PLATFORM_HAVEXADD will be defined.
91 */
92@ISC_PLATFORM_HAVEXADD@
93
94/*
95 * If the "xaddq" operation (64bit xadd) is available on this architecture,
96 * ISC_PLATFORM_HAVEXADDQ will be defined.
97 */
98@ISC_PLATFORM_HAVEXADDQ@
99
100/*
101 * If the "atomic swap" operation is available on this architecture,
102 * ISC_PLATFORM_HAVEATOMICSTORE" will be defined.
103 */
104@ISC_PLATFORM_HAVEATOMICSTORE@
105
106/*
107 * If the "compare-and-exchange" operation is available on this architecture,
108 * ISC_PLATFORM_HAVECMPXCHG will be defined.
109 */
110@ISC_PLATFORM_HAVECMPXCHG@
111
112/*
113 * If the strcasestr() operation is not available on this platform,
114 * ISC_PLATFORM_NEEDSTRCASESTR will be defined.
115 */
116@ISC_PLATFORM_NEEDSTRCASESTR@
117
118/*
119 * Defined if we are enabling SIT (Source Identity Token).
120 */
121@ISC_PLATFORM_USESIT@
122
123/*
124 * Set up a macro for importing and exporting from the DLL
125 */
126
127#ifdef LIBISC_EXPORTS
128#define LIBISC_EXTERNAL_DATA __declspec(dllexport)
129#else
130#define LIBISC_EXTERNAL_DATA __declspec(dllimport)
131#endif
132
133#ifdef LIBDNS_EXPORTS
134#define LIBDNS_EXTERNAL_DATA __declspec(dllexport)
135#else
136#define LIBDNS_EXTERNAL_DATA __declspec(dllimport)
137#endif
138
139#ifdef LIBISCCC_EXPORTS
140#define LIBISCCC_EXTERNAL_DATA __declspec(dllexport)
141#else
142#define LIBISCCC_EXTERNAL_DATA __declspec(dllimport)
143#endif
144
145#ifdef LIBISCCFG_EXPORTS
146#define LIBISCCFG_EXTERNAL_DATA __declspec(dllexport)
147#else
148#define LIBISCCFG_EXTERNAL_DATA __declspec(dllimport)
149#endif
150
151#ifdef LIBBIND9_EXPORTS
152#define LIBBIND9_EXTERNAL_DATA __declspec(dllexport)
153#else
154#define LIBBIND9_EXTERNAL_DATA __declspec(dllimport)
155#endif
156
157#ifdef LIBTESTS_EXPORTS
158#define LIBTESTS_EXTERNAL_DATA __declspec(dllexport)
159#else
160#define LIBTESTS_EXTERNAL_DATA __declspec(dllimport)
161#endif
162
163#endif /* ISC_PLATFORM_H */
164