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