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
12 * The following is set using configure.
15 /* Set to 1 if you have <termios.h> */
16 #define HAVE_TERMIOS_H 0
18 /* Set to 1 if you have <limits.h> */
19 #define HAVE_LIMITS_H 0
21 /* Set to 1 if you have <values.h> */
22 #define HAVE_VALUES_H 0
24 /* Set to 1 if you have isinf() */
27 /* Set to 1 if you have tzset() */
30 /* Set to 1 if you have cbrt() */
34 * Code below this point should not require changes
37 #if defined(HAVE_TERMIOS_H)
38 # define TERMIOS_H_LOCATION <termios.h>
40 # define TERMIOS_H_LOCATION <sys/termios.h>
43 /* Temporary: Need to change source files from USE_VALUES_H to HAVE_VALUES_H */
44 #if defined(HAVE_VALUES_H)
48 /* Temporary: Need to change source files from USE_LIMITS_H to HAVE_LIMITS_H */
49 #if defined(HAVE_LIMITS_H)
53 #if !defined(HAVE_ISINF)
57 #if !defined(HAVE_CBRT)
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;
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;
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
91 typedef unsigned char slock_t;
96 # define NEED_I386_TAS_ASM
99 # define NEED_SPARC_TAS_ASM
101 # if defined(PRE_BSDI_2_1)
102 # define NEED_UNION_SEMUN
104 # define USE_POSIX_TIME
105 # define HAS_TEST_AND_SET
106 typedef unsigned char slock_t;
112 # define NEED_UNION_SEMUN
113 # define USE_POSIX_SIGNALS
118 # define USE_POSIX_TIME
120 # define NEED_UNION_SEMUN
121 # define HAS_TEST_AND_SET
122 typedef struct { int sem[4]; } slock_t;
125 #if defined(i386_solaris)
126 # define USE_POSIX_TIME
127 # define USE_POSIX_SIGNALS
129 # define NO_EMPTY_STMTS
130 # define NEED_UNION_SEMUN
132 # define HAS_TEST_AND_SET
133 typedef unsigned char slock_t;
137 # define USE_POSIX_TIME
138 # define USE_POSIX_SIGNALS
139 # define NO_EMPTY_STMTS
142 # define HAS_TEST_AND_SET
143 # include <abi_mutex.h>
144 typedef abilock_t slock_t;
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
155 # define USE_POSIX_TIME
156 # define NEED_I386_TAS_ASM
157 # define HAS_TEST_AND_SET
158 typedef unsigned char slock_t;
161 #if defined(nextstep)
162 # include <sys/ioctl.h>
163 # if defined(__STRICT_ANSI__)
164 # define isascii(c) ((unsigned)(c)<=0177)
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
175 # define NO_SIGPROCMASK
176 # define NEED_SIG_JMP
181 typedef struct mutex slock_t;
185 # define NEED_UNION_SEMUN
188 #if defined(sparc_solaris)
189 # define USE_POSIX_TIME
190 # define USE_POSIX_SIGNALS
192 # define NO_EMPTY_STMTS
193 # define USE_POSIX_TIME
194 # define NEED_UNION_SEMUN
196 # define HAS_TEST_AND_SET
197 typedef unsigned char slock_t;
201 # define USE_POSIX_TIME
206 # define USE_POSIX_TIME
207 # define USE_POSIX_SIGNALS
209 # define NO_EMPTY_STMTS
210 # define NEED_UNION_SEMUN
216 # define NEED_SIG_JMP
218 # define USES_WINSOCK
220 # define NEED_UNION_SEMUN
222 # define MAXPATHLEN 250
227 # define USE_POSIX_TIME
228 # define NEED_UNION_SEMUN
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.
237 * Used in: src/backend/tcop/aclchk.c
238 * Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
240 #define ACLGROUP_PATCH
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.
253 # define SIGNAL_ARGS int postgres_signal_arg
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.
262 #define DEF_PGPORT "5432"
264 /* turn this on if you prefer European style dates instead of American
267 /* #define EUROPEAN_DATES */
270 * If you do not plan to use Host based authentication,
271 * comment out the following line
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.
282 /* Debug and various "defines" that should be documented */
284 /* found in function aclparse() in src/backend/utils/adt/acl.c */
285 /* #define ACLDEBUG */
287 /* found in src/backend/utils/adt/arrayfuncs.c
288 code seems broken without it, Bruce Momjian */
289 /* #define LOARRAY */
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).
295 * Low numbers are not recommended as they will tend to cause
296 * false aborts if many transactions are long-lived.
298 #define DEADLOCK_TIMEOUT 60
301 * This flag enables the use of idexes in plans generated for function
302 * executions which normally are always executed with sequential scans.
304 #define INDEXSCAN_PATCH
306 /* #define DATEDEBUG */
309 * Define this if you want to use date constants with a short year
312 /* #define USE_SHORT_YEAR */
315 * defining unsafe floats's will make float4 and float8
316 * ops faster at the cost of safety, of course!
318 /* #define UNSAFE_FLOATS */
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.
328 #define FUNC_UTIL_PATCH
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"}}.
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.
344 #define UNSIGNED_CHAR_TEXT
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.
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.
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.
370 /* #define IPORTAL_DEBUG */
371 /* #define HEAPDEBUGALL */
372 /* #define ISTRATDEBUG */
373 /* #define FASTBUILD_DEBUG */
376 /* #define PURGEDEBUG */
377 /* #define DEBUG_RECIPE */
378 /* #define ASYNC_DEBUG */
379 /* #define COPY_DEBUG */
380 /* #define VACUUM_DEBUG */
381 /* #define NBTINSERT_PATCH_DEBUG */
384 /* The following don't have any apparent purpose, but are in the
385 * code. someday, will take them out altogether, but for now,
388 /* #define OMIT_PARTIAL_INDEX */
389 /* #define NO_BUFFERISVALID */
390 /* #define NO_SECURITY */
392 /* #define OLD_REWRITE */
396 /* Undocumented "features"? */
397 #define FASTBUILD /* access/nbtree/nbtsort.c */
404 #endif /* CONFIG_H */