]> granicus.if.org Git - postgresql/blob - src/include/config.h.in
Slowly building up config.h so that it is pretty much generated by
[postgresql] / src / include / config.h.in
1 /* the purpose of this file is to reduce the use of #ifdef's through
2  * the code base by those porting the software, and to facilitate the
3  * eventual use of autoconf to build the server 
4  */
5
6 #ifndef CONFIG_H
7 #define CONFIG_H
8
9 #define BLCKSZ  8192
10
11 /* 
12  * The following is set using configure.  
13  */
14
15 /* Set to 1 if you have <termios.h> */
16 #define HAVE_TERMIOS_H 0
17
18 /* Set to 1 if you have <limits.h> */
19 #define HAVE_LIMITS_H 0
20
21 /* Set to 1 if  you have <values.h> */
22 #define HAVE_VALUES_H 0
23
24 /* Set to 1 if you have isinf() */
25 #define HAVE_ISINF 0
26
27 /* Set to 1 if you have tzset() */
28 #define HAVE_TZSET 0
29
30 /* Set to 1 if you have cbrt() */
31 #define HAVE_CBRT 0
32
33 /*
34  * Code below this point should not require changes
35  */
36
37 #if defined(HAVE_TERMIOS_H)
38 #  define TERMIOS_H_LOCATION <termios.h>
39 #else
40 #  define TERMIOS_H_LOCATION <sys/termios.h>
41 #endif
42
43 /* Temporary: Need to change source files from USE_VALUES_H to HAVE_VALUES_H */
44 #if defined(HAVE_VALUES_H)
45 #define USE_VALUES_H
46 #endif
47
48 /* Temporary: Need to change source files from USE_LIMITS_H to HAVE_LIMITS_H */
49 #if defined(HAVE_LIMITS_H)
50 #  define USE_LIMITS_H
51 #endif 
52
53 #if !defined(HAVE_ISINF)
54 #  define NEED_ISINF
55 #endif
56
57 #if !defined(HAVE_CBRT)
58 #  define NEED_CBRT
59 #endif
60
61 #define HAVE_MEMMOVE
62
63 #if defined(aix)
64 #  define CLASS_CONFLICT 
65 #  define DISABLE_XOPEN_NLS 
66 #  define NEED_UNION_SEMUN 
67 #  define NEED_SYS_SELECT_H
68 #  define HAVE_ANSI_CPP
69 #  define HAS_TEST_AND_SET
70    typedef unsigned int slock_t;
71 #endif
72
73 #if defined(alpha)
74 #  define USE_POSIX_TIME 
75 #  define USE_POSIX_SIGNALS
76 #  define DISABLE_XOPEN_NLS 
77 #  define HAS_LONG_LONG
78 #  define NEED_UNION_SEMUN 
79 #  define HAS_TEST_AND_SET
80 #  include <sys/mman.h>  /* for msemaphore */
81    typedef msemaphore slock_t;
82 #endif
83
84 #if defined(BSD44_derived)
85 #  define USE_POSIX_TIME
86 #  define NEED_I386_TAS_ASM
87 #  define HAS_TEST_AND_SET
88 #  if defined(__mips__)
89 #    undef HAS_TEST_AND_SET
90 #  endif
91    typedef unsigned char slock_t;
92 #endif
93
94 #if defined(bsdi)
95 #  if defined(i386)
96 #    define NEED_I386_TAS_ASM
97 #  endif
98 #  if defined(sparc)
99 #    define NEED_SPARC_TAS_ASM
100 #  endif
101 #  if defined(PRE_BSDI_2_1)
102 #    define NEED_UNION_SEMUN 
103 #  endif
104 #  define USE_POSIX_TIME
105 #  define HAS_TEST_AND_SET
106    typedef unsigned char slock_t;
107 #endif
108
109
110 #if defined(dgux)
111 #  define LINUX_ELF
112 #  define NEED_UNION_SEMUN 
113 #  define USE_POSIX_SIGNALS
114 #endif
115
116 #if defined(hpux)
117 #  define JMP_BUF
118 #  define USE_POSIX_TIME
119 #  define NEED_RINT
120 #  define NEED_UNION_SEMUN 
121 #  define HAS_TEST_AND_SET
122    typedef struct { int sem[4]; } slock_t;
123 #endif
124
125 #if defined(i386_solaris) 
126 #  define USE_POSIX_TIME 
127 #  define USE_POSIX_SIGNALS
128 #  define NEED_RUSAGE 
129 #  define NO_EMPTY_STMTS
130 #  define NEED_UNION_SEMUN 
131 #  define SYSV_DIRENT
132 #  define HAS_TEST_AND_SET
133    typedef unsigned char slock_t;
134 #endif
135
136 #if defined(irix5)
137 #  define USE_POSIX_TIME 
138 #  define USE_POSIX_SIGNALS
139 #  define NO_EMPTY_STMTS
140 #  define NO_VFORK
141 #  define SYSV_DIRENT
142 #  define HAS_TEST_AND_SET
143 #  include <abi_mutex.h>
144    typedef abilock_t slock_t;
145 #endif
146
147 #if defined(linux)
148 /* __USE_POSIX, __USE_BSD, and __USE_BSD_SIGNAL used to be defined either
149    here or with -D compile options, but __ macros should be set and used by C
150    library macros, not Postgres code.  __USE_POSIX is set by features.h,
151    __USE_BSD is set by bsd/signal.h, and __USE_BSD_SIGNAL appears not to
152    be used.
153 */
154 #  define JMP_BUF
155 #  define USE_POSIX_TIME
156 #  define NEED_I386_TAS_ASM
157 #  define HAS_TEST_AND_SET
158    typedef unsigned char slock_t;
159 #endif
160
161 #if defined(nextstep)
162 # include <sys/ioctl.h>
163 # if defined(__STRICT_ANSI__)
164 #  define isascii(c)  ((unsigned)(c)<=0177)
165 # endif
166   extern char* strdup (const char* string);
167 # ifndef _POSIX_SOURCE
168   typedef unsigned short mode_t;
169   typedef int sigset_t;
170 #  define SIG_BLOCK     00
171 #  define SIG_UNBLOCK   01
172 #  define SIG_SETMASK   02
173 #  define NO_SIGACTION
174 #  define NO_SETSID
175 #  define NO_SIGPROCMASK
176 #  define NEED_SIG_JMP
177 # endif
178
179 # define JMP_BUF
180 # define NO_WAITPID
181   typedef struct mutex slock_t;
182 #endif
183
184 #if defined(sequent) 
185 #  define NEED_UNION_SEMUN 
186 #endif
187
188 #if defined(sparc_solaris)
189 #  define USE_POSIX_TIME 
190 #  define USE_POSIX_SIGNALS
191 #  define NEED_RUSAGE 
192 #  define NO_EMPTY_STMTS
193 #  define USE_POSIX_TIME
194 #  define NEED_UNION_SEMUN 
195 #  define SYSV_DIRENT
196 #  define HAS_TEST_AND_SET
197 typedef unsigned char slock_t;
198 #endif
199
200 #if defined(sunos4)
201 #  define USE_POSIX_TIME
202 #  undef HAVE_MEMMOVE
203 #endif
204
205 #if defined(svr4) 
206 #  define USE_POSIX_TIME 
207 #  define USE_POSIX_SIGNALS
208 #  define NEED_RUSAGE 
209 #  define NO_EMPTY_STMTS
210 #  define NEED_UNION_SEMUN 
211 #  define SYSV_DIRENT
212 #endif
213
214 #if defined(win32)
215 #  define JMP_BUF
216 #  define NEED_SIG_JMP
217 #  define NO_UNISTD_H
218 #  define USES_WINSOCK 
219 #  define NOFILE        100
220 #  define NEED_UNION_SEMUN
221 #  ifndef MAXPATHLEN
222 #  define MAXPATHLEN    250
223 #  endif
224 #endif /* WIN32 */
225
226 #if defined(ultrix4)
227 #  define USE_POSIX_TIME
228 #  define NEED_UNION_SEMUN 
229 #  define NEED_STRDUP
230 #endif
231
232 /* This patch changes the behavior of aclcheck for groups. Currently an user
233  * can access a table only if he has the required permission for ALL the groups
234  * defined for that table. With my patch he can access a table if he has the
235  * permission for ONE of the groups, which seems to me a more useful thing.
236  * 
237  * Used in: src/backend/tcop/aclchk.c
238  * Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
239  */
240 #define ACLGROUP_PATCH
241
242
243 /*
244  * The following is used as the arg list for signal handlers.  Any ports
245  * that take something other than an int argument should change this in
246  * the port specific makefile.  Note that variable names are required
247  * because it is used in both the prototypes as well as the definitions.
248  * Note also the long name.  We expect that this won't collide with
249  * other names causing compiler warnings.
250  */ 
251
252 #ifndef       SIGNAL_ARGS
253 #  define SIGNAL_ARGS int postgres_signal_arg
254 #endif
255
256 /* 
257  * DEF_PGPORT is the TCP port number on which the Postmaster listens by
258  * default.  This can be overriden by command options, environment variables,
259  * and the postconfig hook.
260  */ 
261
262 #define DEF_PGPORT "5432"
263
264 /* turn this on if you prefer European style dates instead of American
265  * style dates
266  */
267 /* #define EUROPEAN_DATES  */
268
269 /*
270  * If you do not plan to use Host based authentication,
271  * comment out the following line
272  */
273 #define HBA
274
275 /*
276  * On architectures for which we have not implemented spinlocks (or
277  * cannot do so), we use System V semaphores.  We also use them for
278  * long locks.  For some reason union semun is never defined in the
279  * System V header files so we must do it ourselves.
280  */
281
282 /*  Debug and various "defines" that should be documented */
283
284 /* found in function aclparse() in src/backend/utils/adt/acl.c */
285 /* #define ACLDEBUG */
286
287 /* found in src/backend/utils/adt/arrayfuncs.c
288    code seems broken without it, Bruce Momjian */
289 /* #define LOARRAY */
290
291 /* This is the time, in seconds, at which a given backend server
292  * will wait on a lock before deciding to abort the transaction
293  * (this is what we do in lieu of deadlock detection).
294  *
295  * Low numbers are not recommended as they will tend to cause
296  * false aborts if many transactions are long-lived.
297  */
298 #define DEADLOCK_TIMEOUT 60
299
300 /*
301  * This flag enables the use of idexes in plans generated for function
302  * executions which normally are always executed with sequential scans.
303  */
304 #define INDEXSCAN_PATCH 
305
306 /* #define DATEDEBUG */
307
308 /*
309  * Define this if you want to use date constants with a short year
310  * like '01/05/96'.
311  */
312 /* #define USE_SHORT_YEAR */
313
314 /*
315  * defining unsafe floats's will make float4 and float8
316  * ops faster at the cost of safety, of course!        
317  */
318 /* #define UNSAFE_FLOATS */
319
320 /*
321  * There is a bug in the function executor. The backend crashes while trying to
322  * execute an sql function containing an utility command (create, notify, ...).
323  * The bug is part in the planner, which returns a number of plans different
324  * than the number of commands if there are utility commands in the query, and
325  * in part in the function executor which assumes that all commands are normal
326  * query commands and causes a SIGSEGV trying to execute commands without plan.
327  */
328 #define FUNC_UTIL_PATCH
329
330 /*
331  * Define this if you want to retrieve arrays attributes as Tcl lists instead
332  * of postgres C-like arrays, for example {{"a1" "a2"} {"b1" "b2"}} instead 
333  * of {{"a1","a2"},{"b1","b2"}}.
334  */
335 #define TCL_ARRAYS
336
337 /*
338  * The comparison routines for text and char data type give incorrect results
339  * if the input data contains characters greater than 127.  As these routines
340  * perform the comparison using signed char variables all character codes
341  * greater than 127 are interpreted as less than 0.  These codes are used to
342  * encode the iso8859 char sets.  Define this flag to correct the problem.
343  */
344 #define UNSIGNED_CHAR_TEXT
345
346 /*
347  * The following flag allows limiting the number of rows returned by a query.
348  * You will need the loadable module utils.c to use this feature.
349  */
350 #define QUERY_LIMIT
351
352 /*
353  * The following flag allows copying tables from files with number of columns
354  * different than the number of attributes setting missing attributes to NULL
355  * and ignoring extra columns.  This also avoids the shift of the attributes
356  * of the rest of the file if one line has a wrong column count.
357  */
358 #define COPY_PATCH
359
360 /*
361  * User locks are handled totally on the application side as long term
362  * cooperative locks which extend beyond the normal transaction boundaries.
363  * Their purpose is to indicate to an application that someone is `working'
364  * on an item.  Define this flag to enable user locks.  You will need the
365  * loadable module user-locks.c to use this feature.
366  */
367 #define USER_LOCKS
368
369 /* Debug #defines */
370 /* #define IPORTAL_DEBUG  */
371 /* #define HEAPDEBUGALL  */
372 /* #define ISTRATDEBUG  */
373 /* #define FASTBUILD_DEBUG */
374 #define RTDEBUG 
375 #define GISTDEBUG 
376 /* #define PURGEDEBUG */
377 /* #define DEBUG_RECIPE */
378 /* #define ASYNC_DEBUG */
379 /* #define COPY_DEBUG */
380 /* #define VACUUM_DEBUG */
381 /* #define NBTINSERT_PATCH_DEBUG */
382
383
384 /* The following don't have any apparent purpose, but are in the
385  * code.  someday, will take them out altogether, but for now, 
386  * document them here
387  */
388 /* #define OMIT_PARTIAL_INDEX */
389 /* #define NO_BUFFERISVALID   */
390 /* #define NO_SECURITY        */
391 /* #define TIOGA              */
392 /* #define OLD_REWRITE        */
393 /* #define NOTYET             */
394
395
396 /* Undocumented "features"? */
397 #define FASTBUILD /* access/nbtree/nbtsort.c */
398
399
400
401
402
403
404 #endif /* CONFIG_H */
405