~ubuntu-branches/ubuntu/edgy/rpm/edgy

« back to all changes in this revision

Viewing changes to db/build_win32/db_config.h

  • Committer: Bazaar Package Importer
  • Author(s): Joey Hess
  • Date: 2002-01-22 20:56:57 UTC
  • Revision ID: james.westby@ubuntu.com-20020122205657-l74j50mr9z8ofcl5
Tags: upstream-4.0.3
ImportĀ upstreamĀ versionĀ 4.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $Id: db_config.h,v 11.33 2001/07/06 20:40:47 bostic Exp $
 
3
 */
 
4
 
 
5
/* Define if you are building a version for running the test suite. */
 
6
/* #undef CONFIG_TEST */
 
7
 
 
8
/* Define if you want a debugging version. */
 
9
/* #undef DEBUG */
 
10
#if defined(_DEBUG)
 
11
#if !defined(DEBUG)
 
12
#define DEBUG 1
 
13
#endif
 
14
#endif
 
15
 
 
16
/* Define if you want a version that logs read operations. */
 
17
/* #undef DEBUG_ROP */
 
18
 
 
19
/* Define if you want a version that logs write operations. */
 
20
/* #undef DEBUG_WOP */
 
21
 
 
22
/* Define if you want a version with run-time diagnostic checking. */
 
23
/* #undef DIAGNOSTIC */
 
24
 
 
25
/* Define if you have the <dirent.h> header file, and it defines `DIR'. */
 
26
/* #undef HAVE_DIRENT_H */
 
27
 
 
28
/* Define if you have the <dlfcn.h> header file. */
 
29
/* #undef HAVE_DLFCN_H */
 
30
 
 
31
/* Define if you have EXIT_SUCCESS/EXIT_FAILURE #defines. */
 
32
#define HAVE_EXIT_SUCCESS 1
 
33
 
 
34
/* Define if fcntl/F_SETFD denies child access to file descriptors. */
 
35
/* #undef HAVE_FCNTL_F_SETFD */
 
36
 
 
37
/* Define if allocated filesystem blocks are not zeroed. */
 
38
#define HAVE_FILESYSTEM_NOTZERO 1
 
39
 
 
40
/* Define if you have the `getcwd' function. */
 
41
#define HAVE_GETCWD 1
 
42
 
 
43
/* Define if you have the `getopt' function. */
 
44
/* #undef HAVE_GETOPT */
 
45
 
 
46
/* Define if you have the `getuid' function. */
 
47
/* #undef HAVE_GETUID */
 
48
 
 
49
/* Define if you have the <inttypes.h> header file. */
 
50
/* #undef HAVE_INTTYPES_H */
 
51
 
 
52
/* Define if you have the `nsl' library (-lnsl). */
 
53
/* #undef HAVE_LIBNSL */
 
54
 
 
55
/* Define if you have the `memcmp' function. */
 
56
#define HAVE_MEMCMP 1
 
57
 
 
58
/* Define if you have the `memcpy' function. */
 
59
#define HAVE_MEMCPY 1
 
60
 
 
61
/* Define if you have the `memmove' function. */
 
62
#define HAVE_MEMMOVE 1
 
63
 
 
64
/* Define if you have the <memory.h> header file. */
 
65
#define HAVE_MEMORY_H 1
 
66
 
 
67
/* Define if you have the `mlock' function. */
 
68
/* #undef HAVE_MLOCK */
 
69
 
 
70
/* Define if you have the `mmap' function. */
 
71
/* #undef HAVE_MMAP */
 
72
 
 
73
/* Define if you have the `munlock' function. */
 
74
/* #undef HAVE_MUNLOCK */
 
75
 
 
76
/* Define if you have the `munmap' function. */
 
77
/* #undef HAVE_MUNMAP */
 
78
 
 
79
/* Define to use the GCC compiler and 68K assembly language mutexes. */
 
80
/* #undef HAVE_MUTEX_68K_GCC_ASSEMBLY */
 
81
 
 
82
/* Define to use the AIX _check_lock mutexes. */
 
83
/* #undef HAVE_MUTEX_AIX_CHECK_LOCK */
 
84
 
 
85
/* Define to use the GCC compiler and Alpha assembly language mutexes. */
 
86
/* #undef HAVE_MUTEX_ALPHA_GCC_ASSEMBLY */
 
87
 
 
88
/* Define to use the GCC compiler and PaRisc assembly language mutexes. */
 
89
/* #undef HAVE_MUTEX_HPPA_GCC_ASSEMBLY */
 
90
 
 
91
/* Define to use the msem_XXX mutexes on HP-UX. */
 
92
/* #undef HAVE_MUTEX_HPPA_MSEM_INIT */
 
93
 
 
94
/* Define to use the GCC compiler and IA64 assembly language mutexes. */
 
95
/* #undef HAVE_MUTEX_IA64_GCC_ASSEMBLY */
 
96
 
 
97
/* Define to use the msem_XXX mutexes on systems other than HP-UX. */
 
98
/* #undef HAVE_MUTEX_MSEM_INIT */
 
99
 
 
100
/* Define to use the GCC compiler and PowerPC assembly language mutexes. */
 
101
/* #undef HAVE_MUTEX_PPC_GCC_ASSEMBLY */
 
102
 
 
103
/* Define to use POSIX 1003.1 pthread_XXX mutexes. */
 
104
/* #undef HAVE_MUTEX_PTHREADS */
 
105
 
 
106
/* Define to use Reliant UNIX initspin mutexes. */
 
107
/* #undef HAVE_MUTEX_RELIANTUNIX_INITSPIN */
 
108
 
 
109
/* Define to use the SCO compiler and x86 assembly language mutexes. */
 
110
/* #undef HAVE_MUTEX_SCO_X86_CC_ASSEMBLY */
 
111
 
 
112
/* Define to use the obsolete POSIX 1003.1 sema_XXX mutexes. */
 
113
/* #undef HAVE_MUTEX_SEMA_INIT */
 
114
 
 
115
/* Define to use the SGI XXX_lock mutexes. */
 
116
/* #undef HAVE_MUTEX_SGI_INIT_LOCK */
 
117
 
 
118
/* Define to use the Solaris _lock_XXX mutexes. */
 
119
/* #undef HAVE_MUTEX_SOLARIS_LOCK_TRY */
 
120
 
 
121
/* Define to use the Solaris lwp threads mutexes. */
 
122
/* #undef HAVE_MUTEX_SOLARIS_LWP */
 
123
 
 
124
/* Define to use the GCC compiler and Sparc assembly language mutexes. */
 
125
/* #undef HAVE_MUTEX_SPARC_GCC_ASSEMBLY */
 
126
 
 
127
/* Define if fast mutexes available. */
 
128
#define HAVE_MUTEX_THREADS 1
 
129
 
 
130
/* Define to use the UNIX International mutexes. */
 
131
/* #undef HAVE_MUTEX_UI_THREADS */
 
132
 
 
133
/* Define to use the UTS compiler and assembly language mutexes. */
 
134
/* #undef HAVE_MUTEX_UTS_CC_ASSEMBLY */
 
135
 
 
136
/* Define to use VMS mutexes. */
 
137
/* #undef HAVE_MUTEX_VMS */
 
138
 
 
139
/* Define to use VxWorks mutexes. */
 
140
/* #undef HAVE_MUTEX_VXWORKS */
 
141
 
 
142
/* Define to use Windows mutexes. */
 
143
#define HAVE_MUTEX_WIN32 1
 
144
 
 
145
/* Define to use the GCC compiler and x86 assembly language mutexes. */
 
146
/* #undef HAVE_MUTEX_X86_GCC_ASSEMBLY */
 
147
 
 
148
/* Define if you have the <ndir.h> header file, and it defines `DIR'. */
 
149
/* #undef HAVE_NDIR_H */
 
150
 
 
151
/* Define if you have the `pread' function. */
 
152
/* #undef HAVE_PREAD */
 
153
 
 
154
/* Define if you have the `pstat_getdynamic' function. */
 
155
/* #undef HAVE_PSTAT_GETDYNAMIC */
 
156
 
 
157
/* Define if you have the `pwrite' function. */
 
158
/* #undef HAVE_PWRITE */
 
159
 
 
160
/* Define if building on QNX. */
 
161
/* #undef HAVE_QNX */
 
162
 
 
163
/* Define if you have the `qsort' function. */
 
164
#define HAVE_QSORT 1
 
165
 
 
166
/* Define if you have the `raise' function. */
 
167
#define HAVE_RAISE 1
 
168
 
 
169
/* Define if building RPC client/server. */
 
170
/* #undef HAVE_RPC */
 
171
 
 
172
/* Define if you have the `sched_yield' function. */
 
173
/* #undef HAVE_SCHED_YIELD */
 
174
 
 
175
/* Define if you have the `select' function. */
 
176
/* #undef HAVE_SELECT */
 
177
 
 
178
/* Define if you have the `shmget' function. */
 
179
/* #undef HAVE_SHMGET */
 
180
 
 
181
/* Define if you have the `snprintf' function. */
 
182
#define HAVE_SNPRINTF 1
 
183
 
 
184
/* Define if you have the <stdlib.h> header file. */
 
185
#define HAVE_STDLIB_H 1
 
186
 
 
187
/* Define if you have the `strcasecmp' function. */
 
188
/* #undef HAVE_STRCASECMP */
 
189
 
 
190
/* Define if you have the `strerror' function. */
 
191
#define HAVE_STRERROR 1
 
192
 
 
193
/* Define if you have the <strings.h> header file. */
 
194
#define HAVE_STRINGS_H 1
 
195
 
 
196
/* Define if you have the <string.h> header file. */
 
197
#define HAVE_STRING_H 1
 
198
 
 
199
/* Define if you have the `strtoul' function. */
 
200
#define HAVE_STRTOUL 1
 
201
 
 
202
/* Define if `st_blksize' is member of `struct stat'. */
 
203
/* #undef HAVE_STRUCT_STAT_ST_BLKSIZE */
 
204
 
 
205
/* Define if you have the `sysconf' function. */
 
206
/* #undef HAVE_SYSCONF */
 
207
 
 
208
/* Define if you have the <sys/dir.h> header file, and it defines `DIR'. */
 
209
/* #undef HAVE_SYS_DIR_H */
 
210
 
 
211
/* Define if you have the <sys/ndir.h> header file, and it defines `DIR'. */
 
212
/* #undef HAVE_SYS_NDIR_H */
 
213
 
 
214
/* Define if you have the <sys/select.h> header file. */
 
215
/* #undef HAVE_SYS_SELECT_H */
 
216
 
 
217
/* Define if you have the <sys/time.h> header file. */
 
218
/* #undef HAVE_SYS_TIME_H */
 
219
 
 
220
/* Define if you have the <unistd.h> header file. */
 
221
#define HAVE_UNISTD_H 1
 
222
 
 
223
/* Define if you have the `vsnprintf' function. */
 
224
#define HAVE_VSNPRINTF 1
 
225
 
 
226
/* Define if building VxWorks. */
 
227
/* #undef HAVE_VXWORKS */
 
228
 
 
229
/* Define if you have the `yield' function. */
 
230
/* #undef HAVE_YIELD */
 
231
 
 
232
/* Define if you have the `_fstati64' function. */
 
233
#define HAVE__FSTATI64 1
 
234
 
 
235
/* Define if your sprintf returns a pointer, not a length. */
 
236
/* #undef SPRINTF_RET_CHARPNT */
 
237
 
 
238
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
 
239
/* #undef STAT_MACROS_BROKEN */
 
240
 
 
241
/* Define if you have the ANSI C header files. */
 
242
#define STDC_HEADERS 1
 
243
 
 
244
/* Define if you can safely include both <sys/time.h> and <time.h>. */
 
245
/* #undef TIME_WITH_SYS_TIME */
 
246
 
 
247
/* Define to mask harmless unitialized memory read/writes. */
 
248
/* #undef UMRW */
 
249
 
 
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 */
 
253
 
 
254
/* Number of bits in a file offset, on hosts where this is settable. */
 
255
/* #undef _FILE_OFFSET_BITS */
 
256
 
 
257
/* Define for large files, on AIX-style hosts. */
 
258
/* #undef _LARGE_FILES */
 
259
 
 
260
/* Define to empty if `const' does not conform to ANSI C. */
 
261
/* #undef const */
 
262
 
 
263
/* Define to `int' if <sys/types.h> does not define. */
 
264
/* #undef mode_t */
 
265
 
 
266
/* Define to `long' if <sys/types.h> does not define. */
 
267
/* #undef off_t */
 
268
 
 
269
/* Define to `int' if <sys/types.h> does not define. */
 
270
/* #undef pid_t */
 
271
 
 
272
/* Define to `unsigned' if <sys/types.h> does not define. */
 
273
/* #undef size_t */
 
274
 
 
275
/*
 
276
 * Exit success/failure macros.
 
277
 */
 
278
#ifndef HAVE_EXIT_SUCCESS
 
279
#define EXIT_FAILURE    1
 
280
#define EXIT_SUCCESS    0
 
281
#endif
 
282
 
 
283
/*
 
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.
 
287
 */
 
288
#ifndef HAVE_GETCWD
 
289
#define getcwd          __db_Cgetcwd
 
290
#endif
 
291
#ifndef HAVE_MEMCMP
 
292
#define memcmp          __db_Cmemcmp
 
293
#endif
 
294
#ifndef HAVE_MEMCPY
 
295
#define memcpy          __db_Cmemcpy
 
296
#endif
 
297
#ifndef HAVE_MEMMOVE
 
298
#define memmove         __db_Cmemmove
 
299
#endif
 
300
#ifndef HAVE_RAISE
 
301
#define raise           __db_Craise
 
302
#endif
 
303
#ifndef HAVE_SNPRINTF
 
304
#define snprintf        __db_Csnprintf
 
305
#endif
 
306
#ifndef HAVE_STRCASECMP
 
307
#define strcasecmp      __db_Cstrcasecmp
 
308
#endif
 
309
#ifndef HAVE_STRERROR
 
310
#define strerror        __db_Cstrerror
 
311
#endif
 
312
#ifndef HAVE_VSNPRINTF
 
313
#define vsnprintf       __db_Cvsnprintf
 
314
#endif
 
315
 
 
316
/*
 
317
 * XXX
 
318
 * The following is not part of the automatic configuration setup, but
 
319
 * provides the information necessary to build Berkeley DB on Windows.
 
320
 */
 
321
#include <sys/types.h>
 
322
#include <sys/stat.h>
 
323
 
 
324
#include <direct.h>
 
325
#include <fcntl.h>
 
326
#include <io.h>
 
327
#include <limits.h>
 
328
#include <memory.h>
 
329
#include <process.h>
 
330
#include <signal.h>
 
331
#include <stdio.h>
 
332
#include <stdlib.h>
 
333
#include <time.h>
 
334
#include <errno.h>
 
335
 
 
336
#if defined(__cplusplus)
 
337
#include <iostream.h>
 
338
#endif
 
339
 
 
340
/*
 
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.
 
344
 */
 
345
#ifdef DB_TCL_SUPPORT
 
346
#include <tcl.h>
 
347
#endif
 
348
 
 
349
#define WIN32_LEAN_AND_MEAN
 
350
#include <windows.h>
 
351
 
 
352
/*
 
353
 * All of the necessary includes have been included, ignore the #includes
 
354
 * in the Berkeley DB source files.
 
355
 */
 
356
#define NO_SYSTEM_INCLUDES
 
357
 
 
358
/*
 
359
 * Win32 has fsync, getcwd, snprintf and vsnprintf, but under different names.
 
360
 */
 
361
#define fsync(fd)               _commit(fd)
 
362
#define getcwd(buf, size)       _getcwd(buf, size)
 
363
#define snprintf                _snprintf
 
364
#define vsnprintf               _vsnprintf
 
365
 
 
366
/*
 
367
 * Win32 does not define getopt and friends in any header file, so we must.
 
368
 */
 
369
#if defined(__cplusplus)
 
370
extern "C" {
 
371
#endif
 
372
extern int optind;
 
373
extern char *optarg;
 
374
extern int getopt(int, char * const *, const char *);
 
375
#if defined(__cplusplus)
 
376
}
 
377
#endif
 
378
 
 
379
/*
 
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.
 
384
 */
 
385
#define DB_WIN32 1
 
386
 
 
387
/*
 
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
 
396
 * on.
 
397
 */
 
398
#define __STDC__ 1