2
* $Id: db_config.h,v 11.33 2001/07/06 20:40:47 bostic Exp $
5
/* Define if you are building a version for running the test suite. */
6
/* #undef CONFIG_TEST */
8
/* Define if you want a debugging version. */
16
/* Define if you want a version that logs read operations. */
17
/* #undef DEBUG_ROP */
19
/* Define if you want a version that logs write operations. */
20
/* #undef DEBUG_WOP */
22
/* Define if you want a version with run-time diagnostic checking. */
23
/* #undef DIAGNOSTIC */
25
/* Define if you have the <dirent.h> header file, and it defines `DIR'. */
26
/* #undef HAVE_DIRENT_H */
28
/* Define if you have the <dlfcn.h> header file. */
29
/* #undef HAVE_DLFCN_H */
31
/* Define if you have EXIT_SUCCESS/EXIT_FAILURE #defines. */
32
#define HAVE_EXIT_SUCCESS 1
34
/* Define if fcntl/F_SETFD denies child access to file descriptors. */
35
/* #undef HAVE_FCNTL_F_SETFD */
37
/* Define if allocated filesystem blocks are not zeroed. */
38
#define HAVE_FILESYSTEM_NOTZERO 1
40
/* Define if you have the `getcwd' function. */
43
/* Define if you have the `getopt' function. */
44
/* #undef HAVE_GETOPT */
46
/* Define if you have the `getuid' function. */
47
/* #undef HAVE_GETUID */
49
/* Define if you have the <inttypes.h> header file. */
50
/* #undef HAVE_INTTYPES_H */
52
/* Define if you have the `nsl' library (-lnsl). */
53
/* #undef HAVE_LIBNSL */
55
/* Define if you have the `memcmp' function. */
58
/* Define if you have the `memcpy' function. */
61
/* Define if you have the `memmove' function. */
62
#define HAVE_MEMMOVE 1
64
/* Define if you have the <memory.h> header file. */
65
#define HAVE_MEMORY_H 1
67
/* Define if you have the `mlock' function. */
68
/* #undef HAVE_MLOCK */
70
/* Define if you have the `mmap' function. */
71
/* #undef HAVE_MMAP */
73
/* Define if you have the `munlock' function. */
74
/* #undef HAVE_MUNLOCK */
76
/* Define if you have the `munmap' function. */
77
/* #undef HAVE_MUNMAP */
79
/* Define to use the GCC compiler and 68K assembly language mutexes. */
80
/* #undef HAVE_MUTEX_68K_GCC_ASSEMBLY */
82
/* Define to use the AIX _check_lock mutexes. */
83
/* #undef HAVE_MUTEX_AIX_CHECK_LOCK */
85
/* Define to use the GCC compiler and Alpha assembly language mutexes. */
86
/* #undef HAVE_MUTEX_ALPHA_GCC_ASSEMBLY */
88
/* Define to use the GCC compiler and PaRisc assembly language mutexes. */
89
/* #undef HAVE_MUTEX_HPPA_GCC_ASSEMBLY */
91
/* Define to use the msem_XXX mutexes on HP-UX. */
92
/* #undef HAVE_MUTEX_HPPA_MSEM_INIT */
94
/* Define to use the GCC compiler and IA64 assembly language mutexes. */
95
/* #undef HAVE_MUTEX_IA64_GCC_ASSEMBLY */
97
/* Define to use the msem_XXX mutexes on systems other than HP-UX. */
98
/* #undef HAVE_MUTEX_MSEM_INIT */
100
/* Define to use the GCC compiler and PowerPC assembly language mutexes. */
101
/* #undef HAVE_MUTEX_PPC_GCC_ASSEMBLY */
103
/* Define to use POSIX 1003.1 pthread_XXX mutexes. */
104
/* #undef HAVE_MUTEX_PTHREADS */
106
/* Define to use Reliant UNIX initspin mutexes. */
107
/* #undef HAVE_MUTEX_RELIANTUNIX_INITSPIN */
109
/* Define to use the SCO compiler and x86 assembly language mutexes. */
110
/* #undef HAVE_MUTEX_SCO_X86_CC_ASSEMBLY */
112
/* Define to use the obsolete POSIX 1003.1 sema_XXX mutexes. */
113
/* #undef HAVE_MUTEX_SEMA_INIT */
115
/* Define to use the SGI XXX_lock mutexes. */
116
/* #undef HAVE_MUTEX_SGI_INIT_LOCK */
118
/* Define to use the Solaris _lock_XXX mutexes. */
119
/* #undef HAVE_MUTEX_SOLARIS_LOCK_TRY */
121
/* Define to use the Solaris lwp threads mutexes. */
122
/* #undef HAVE_MUTEX_SOLARIS_LWP */
124
/* Define to use the GCC compiler and Sparc assembly language mutexes. */
125
/* #undef HAVE_MUTEX_SPARC_GCC_ASSEMBLY */
127
/* Define if fast mutexes available. */
128
#define HAVE_MUTEX_THREADS 1
130
/* Define to use the UNIX International mutexes. */
131
/* #undef HAVE_MUTEX_UI_THREADS */
133
/* Define to use the UTS compiler and assembly language mutexes. */
134
/* #undef HAVE_MUTEX_UTS_CC_ASSEMBLY */
136
/* Define to use VMS mutexes. */
137
/* #undef HAVE_MUTEX_VMS */
139
/* Define to use VxWorks mutexes. */
140
/* #undef HAVE_MUTEX_VXWORKS */
142
/* Define to use Windows mutexes. */
143
#define HAVE_MUTEX_WIN32 1
145
/* Define to use the GCC compiler and x86 assembly language mutexes. */
146
/* #undef HAVE_MUTEX_X86_GCC_ASSEMBLY */
148
/* Define if you have the <ndir.h> header file, and it defines `DIR'. */
149
/* #undef HAVE_NDIR_H */
151
/* Define if you have the `pread' function. */
152
/* #undef HAVE_PREAD */
154
/* Define if you have the `pstat_getdynamic' function. */
155
/* #undef HAVE_PSTAT_GETDYNAMIC */
157
/* Define if you have the `pwrite' function. */
158
/* #undef HAVE_PWRITE */
160
/* Define if building on QNX. */
161
/* #undef HAVE_QNX */
163
/* Define if you have the `qsort' function. */
166
/* Define if you have the `raise' function. */
169
/* Define if building RPC client/server. */
170
/* #undef HAVE_RPC */
172
/* Define if you have the `sched_yield' function. */
173
/* #undef HAVE_SCHED_YIELD */
175
/* Define if you have the `select' function. */
176
/* #undef HAVE_SELECT */
178
/* Define if you have the `shmget' function. */
179
/* #undef HAVE_SHMGET */
181
/* Define if you have the `snprintf' function. */
182
#define HAVE_SNPRINTF 1
184
/* Define if you have the <stdlib.h> header file. */
185
#define HAVE_STDLIB_H 1
187
/* Define if you have the `strcasecmp' function. */
188
/* #undef HAVE_STRCASECMP */
190
/* Define if you have the `strerror' function. */
191
#define HAVE_STRERROR 1
193
/* Define if you have the <strings.h> header file. */
194
#define HAVE_STRINGS_H 1
196
/* Define if you have the <string.h> header file. */
197
#define HAVE_STRING_H 1
199
/* Define if you have the `strtoul' function. */
200
#define HAVE_STRTOUL 1
202
/* Define if `st_blksize' is member of `struct stat'. */
203
/* #undef HAVE_STRUCT_STAT_ST_BLKSIZE */
205
/* Define if you have the `sysconf' function. */
206
/* #undef HAVE_SYSCONF */
208
/* Define if you have the <sys/dir.h> header file, and it defines `DIR'. */
209
/* #undef HAVE_SYS_DIR_H */
211
/* Define if you have the <sys/ndir.h> header file, and it defines `DIR'. */
212
/* #undef HAVE_SYS_NDIR_H */
214
/* Define if you have the <sys/select.h> header file. */
215
/* #undef HAVE_SYS_SELECT_H */
217
/* Define if you have the <sys/time.h> header file. */
218
/* #undef HAVE_SYS_TIME_H */
220
/* Define if you have the <unistd.h> header file. */
221
#define HAVE_UNISTD_H 1
223
/* Define if you have the `vsnprintf' function. */
224
#define HAVE_VSNPRINTF 1
226
/* Define if building VxWorks. */
227
/* #undef HAVE_VXWORKS */
229
/* Define if you have the `yield' function. */
230
/* #undef HAVE_YIELD */
232
/* Define if you have the `_fstati64' function. */
233
#define HAVE__FSTATI64 1
235
/* Define if your sprintf returns a pointer, not a length. */
236
/* #undef SPRINTF_RET_CHARPNT */
238
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
239
/* #undef STAT_MACROS_BROKEN */
241
/* Define if you have the ANSI C header files. */
242
#define STDC_HEADERS 1
244
/* Define if you can safely include both <sys/time.h> and <time.h>. */
245
/* #undef TIME_WITH_SYS_TIME */
247
/* Define to mask harmless unitialized memory read/writes. */
250
/* Define if your processor stores words with the most significant byte first
251
(like Motorola and SPARC, unlike Intel and VAX). */
252
/* #undef WORDS_BIGENDIAN */
254
/* Number of bits in a file offset, on hosts where this is settable. */
255
/* #undef _FILE_OFFSET_BITS */
257
/* Define for large files, on AIX-style hosts. */
258
/* #undef _LARGE_FILES */
260
/* Define to empty if `const' does not conform to ANSI C. */
263
/* Define to `int' if <sys/types.h> does not define. */
266
/* Define to `long' if <sys/types.h> does not define. */
269
/* Define to `int' if <sys/types.h> does not define. */
272
/* Define to `unsigned' if <sys/types.h> does not define. */
276
* Exit success/failure macros.
278
#ifndef HAVE_EXIT_SUCCESS
279
#define EXIT_FAILURE 1
280
#define EXIT_SUCCESS 0
284
* Don't step on the namespace. Other libraries may have their own
285
* implementations of these functions, we don't want to use their
286
* implementations or force them to use ours based on the load order.
289
#define getcwd __db_Cgetcwd
292
#define memcmp __db_Cmemcmp
295
#define memcpy __db_Cmemcpy
298
#define memmove __db_Cmemmove
301
#define raise __db_Craise
303
#ifndef HAVE_SNPRINTF
304
#define snprintf __db_Csnprintf
306
#ifndef HAVE_STRCASECMP
307
#define strcasecmp __db_Cstrcasecmp
309
#ifndef HAVE_STRERROR
310
#define strerror __db_Cstrerror
312
#ifndef HAVE_VSNPRINTF
313
#define vsnprintf __db_Cvsnprintf
318
* The following is not part of the automatic configuration setup, but
319
* provides the information necessary to build Berkeley DB on Windows.
321
#include <sys/types.h>
322
#include <sys/stat.h>
336
#if defined(__cplusplus)
337
#include <iostream.h>
341
* To build Tcl interface libraries, the include path must be configured to
342
* use the directory containing <tcl.h>, usually the include directory in
343
* the Tcl distribution.
345
#ifdef DB_TCL_SUPPORT
349
#define WIN32_LEAN_AND_MEAN
353
* All of the necessary includes have been included, ignore the #includes
354
* in the Berkeley DB source files.
356
#define NO_SYSTEM_INCLUDES
359
* Win32 has fsync, getcwd, snprintf and vsnprintf, but under different names.
361
#define fsync(fd) _commit(fd)
362
#define getcwd(buf, size) _getcwd(buf, size)
363
#define snprintf _snprintf
364
#define vsnprintf _vsnprintf
367
* Win32 does not define getopt and friends in any header file, so we must.
369
#if defined(__cplusplus)
374
extern int getopt(int, char * const *, const char *);
375
#if defined(__cplusplus)
380
* We use DB_WIN32 much as one would use _WIN32, to determine that we're
381
* using an operating system environment that supports Win32 calls
382
* and semantics. We don't use _WIN32 because cygwin/gcc also defines
383
* that, even though it closely emulates the Unix environment.
388
* This is a grievous hack -- once we've included windows.h, we have no choice
389
* but to use ANSI-style varargs (because it pulls in stdarg.h for us). DB's
390
* code decides which type of varargs to use based on the state of __STDC__.
391
* Sensible. Unfortunately, Microsoft's compiler _doesn't_ define __STDC__
392
* unless you invoke it with arguments turning OFF all vendor extensions. Even
393
* more unfortunately, if we do that, it fails to parse windows.h!!!!! So, we
394
* define __STDC__ here, after windows.h comes in. Note: the compiler knows
395
* we've defined it, and starts enforcing strict ANSI compilance from this point