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