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