NCBI C++ ToolKit
config.h
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef DBAPI_DRIVER_FTDS100_FREETDS___CONFIG__H
2 #define DBAPI_DRIVER_FTDS100_FREETDS___CONFIG__H
3 
4 /* $Id: config.h 102158 2024-04-09 14:05:55Z ucko $
5  *
6  * Config file for FreeTDS 1.0 (supporting TDS versions up to 7.4).
7  *
8  * NOTE: Instead of being generated by FreeTDS's own configure script,
9  * it just uses the NCBI C++ Toolkit config file <ncbiconf.h>.
10  */
11 
12 #define TDS74 1
13 #define VERSION "1.0"
14 
15 /* ODBC settings */
16 #define UNIXODBC 1
17 #define TDS_NO_DM 1
18 #define ENABLE_ODBC_WIDE 1
19 
20 /* Some upstream unit tests need this definition to find their data. */
21 #ifdef NEED_FREETDS_SRCDIR
22 # define FREETDS_SRCDIR "."
23 #endif
24 
25 #include <ncbiconf.h>
26 
27 #ifndef NCBI_FTDS_RENAME_SYBDB
28 # define NCBI_FTDS_RENAME_SYBDB 1
29 #endif
30 
31 #ifdef _DEBUG
32 # define DEBUG 1
33 /* Should we leave the extra checks off? */
34 # define ENABLE_EXTRA_CHECKS 1
35 #endif
36 
37 #ifdef NCBI_HAVE_GETHOSTBYADDR_R
38 # if NCBI_HAVE_GETHOSTBYADDR_R == 5
39 # define HAVE_FUNC_GETHOSTBYADDR_R_5 1
40 # elif NCBI_HAVE_GETHOSTBYADDR_R == 7
41 # define HAVE_FUNC_GETHOSTBYADDR_R_7 1
42 # elif NCBI_HAVE_GETHOSTBYADDR_R == 8
43 # define HAVE_FUNC_GETHOSTBYADDR_R_8 1
44 # else
45 # error "Unexpected number of arguments detected for gethostbyaddr_r()"
46 # endif
47 #endif
48 
49 #ifdef NCBI_HAVE_GETHOSTBYNAME_R
50 # if NCBI_HAVE_GETHOSTBYNAME_R == 3
51 # define HAVE_FUNC_GETHOSTBYNAME_R_3 1
52 # elif NCBI_HAVE_GETHOSTBYNAME_R == 5
53 # define HAVE_FUNC_GETHOSTBYNAME_R_5 1
54 # elif NCBI_HAVE_GETHOSTBYNAME_R == 6
55 # define HAVE_FUNC_GETHOSTBYNAME_R_6 1
56 # else
57 # error "Unexpected number of arguments detected for gethostbyname_r()"
58 # endif
59 #endif
60 
61 
62 #ifdef NCBI_HAVE_GETPWUID_R
63 # define HAVE_GETPWUID_R 1
64 # if NCBI_HAVE_GETPWUID_R == 4
65 # define HAVE_FUNC_GETPWUID_R_4 1
66 # define HAVE_FUNC_GETPWUID_R_4_PW 1
67 # elif NCBI_HAVE_GETPWUID_R == 5
68 # define HAVE_FUNC_GETPWUID_R_5 1
69 # else
70 # error "Unexpected number of arguments detected for getpwuid_r()"
71 # endif
72 #endif
73 
74 #ifdef NCBI_HAVE_GETSERVBYNAME_R
75 # if NCBI_HAVE_GETSERVBYNAME_R == 4
76 # define HAVE_FUNC_GETSERVBYNAME_R_4 1
77 # elif NCBI_HAVE_GETSERVBYNAME_R == 5
78 # define HAVE_FUNC_GETSERVBYNAME_R_5 1
79 # elif NCBI_HAVE_GETSERVBYNAME_R == 6
80 # define HAVE_FUNC_GETSERVBYNAME_R_6 1
81 # else
82 # error "Unexpected number of arguments detected for getservbyname_r()"
83 # endif
84 #endif
85 
86 #if defined(HAVE_LIBICONV) && !defined(NCBI_OS_SOLARIS)
87 # define HAVE_ICONV 1
88 #endif
89 
90 #if SIZEOF_LONG == 8 || SIZEOF_LONG_LONG == 8 || SIZEOF___INT64 == 8
91 # define HAVE_INT64 1
92 #endif
93 
94 #ifndef HAVE_SOCKLEN_T
95 typedef int socklen_t;
96 #endif
97 
98 #if 0 /* Avoid extra dependencies, not needed in-house */
99 # ifdef HAVE_LIBGNUTLS
100 # define HAVE_GNUTLS 1
101 # endif
102 
103 # ifdef HAVE_LIBOPENSSL
104 # define HAVE_OPENSSL 1
105 # endif
106 #endif
107 
108 #ifdef NCBI_HAVE_READDIR_R
109 # define HAVE_READDIR_R 1
110 #endif
111 
112 #ifndef SIZEOF_SQLWCHAR
113 # ifdef SQL_WCHART_CONVERT
114 # define SIZEOF_SQLWCHAR SIZEOF_WCHAR_T
115 # else
116 # define SIZEOF_SQLWCHAR SIZEOF_SHORT
117 # endif
118 #endif
119 
120 
121 #define SIZEOF_VOID_P SIZEOF_VOIDP
122 
123 #ifdef HAVE_ATTRIBUTE_DESTRUCTOR
124 # define TDS_ATTRIBUTE_DESTRUCTOR 1
125 #endif
126 
127 #if defined(HAVE_DECL_CLOCK_MONOTONIC) && HAVE_DECL_CLOCK_MONOTONIC
128 # define TDS_GETTIMEMILLI_CONST CLOCK_MONOTONIC
129 #elif defined(HAVE_DECL_CLOCK_SGI_CYCLE) && HAVE_DECL_CLOCK_SGI_CYCLE
130 # define TDS_GETTIMEMILLI_CONST CLOCK_SGI_CYCLE
131 #elif defined(HAVE_DECL_CLOCK_REALTIME) && HAVE_DECL_CLOCK_REALTIME
132 # define TDS_GETTIMEMILLI_CONST CLOCK_REALTIME
133 #endif
134 
135 #ifdef NCBI_POSIX_THREADS
136 # define HAVE_PTHREAD 1
137 #endif
138 #ifdef HAVE_PTHREAD_MUTEX
139 # define TDS_HAVE_PTHREAD_MUTEX 1
140 #endif
141 
142 #ifdef NCBI_HAVE_STDIO_LOCKED
143 # define TDS_HAVE_STDIO_LOCKED 1
144 #endif
145 
146 #ifdef NCBI_SQLCOLATTRIBUTE_SQLLEN
147 # define TDS_SQLCOLATTRIBUTE_SQLLEN 1
148 #endif
149 
150 #ifdef NCBI_COMPILER_MSVC
151 # if _MSC_VER < 1900 /* Visual Studio 2015 */
152 # define snprintf _snprintf
153 # endif
154 # define TDS_I64_PREFIX "I64"
155 # define inline __inline
156 /* Defined here rather than via ncbiconf(_msvc).h because Microsoft's
157  * implementation is too barebones for the connect tree, lacking in
158  * particular EAI_SYSTEM.
159  */
160 # define HAVE_GETADDRINFO 1
161 #endif
162 
163 #ifdef NCBI_COMPILER_MSVC
164 # define HAVE_SSPI 1
165 #elif HAVE_LIBKRB5
166 # define ENABLE_KRB5 1
167 #endif
168 
169 #ifndef _THREAD_SAFE
170 # define TDS_NO_THREADSAFE 1
171 #endif
172 
173 #include "../impl/rename_ftds_replacements.h"
174 #include "../impl/rename_ftds_tds.h"
175 
176 #endif /* DBAPI_DRIVER_FTDS100_FREETDS___CONFIG__H */
int socklen_t
Definition: config.h:95
Front end for a platform-specific configuration summary.
Modified on Fri Sep 20 14:57:43 2024 by modify_doxy.py rev. 669887