]> granicus.if.org Git - postgresql/blob - src/include/config.h.in
Another round of those unportable config/build changes :-/
[postgresql] / src / include / config.h.in
1 /*
2  * PostgreSQL configuration-settings file.
3  *
4  * config.h.in is processed by configure to produce config.h.
5  *
6  * If you want to modify any of the tweakable settings in Part 2
7  * of this file, you can do it in config.h.in before running configure,
8  * or in config.h afterwards.  Of course, if you edit config.h, then your
9  * changes will be overwritten the next time you run configure.
10  *
11  * $Id: config.h.in,v 1.124 2000/07/09 13:14:13 petere Exp $
12  */
13
14 #ifndef CONFIG_H
15 #define CONFIG_H
16
17
18 /*
19  *------------------------------------------------------------------------
20  * Part 1: feature symbols and limits that are set by configure based on
21  * user-supplied switches.  This is first so that stuff in Part 2 can
22  * depend on these values.
23  *
24  * Beware of "fixing" configure-time mistakes by editing these values,
25  * since configure may have inserted the settings in other files as well
26  * as here.  Best to rerun configure if you forgot --enable-multibyte
27  * or whatever.
28  *------------------------------------------------------------------------
29  */
30
31 /* The version number is actually hard-coded into configure.in */
32 #undef PG_VERSION
33 /* A canonical string containing the version number, platform, and C compiler */
34 #undef PG_VERSION_STR
35
36 /* Set to 1 if you want LOCALE support (--enable-locale) */
37 #undef USE_LOCALE
38
39 /* Set to 1 if you want cyrillic recode (--enable-recode) */
40 #undef CYR_RECODE
41
42 /* Set to 1 if you want to use multibyte characters (--enable-multibyte) */
43 #undef MULTIBYTE
44
45 /* Set to 1 if you want ASSERT checking (--enable-cassert) */
46 #undef USE_ASSERT_CHECKING
47
48 /* Set to 1 to use syslog() to write postmaster log (--enable-syslog) */
49 /* (CAUTION: large log entries confuse syslog on many platforms!) */
50 #undef ENABLE_SYSLOG
51
52 /* Define to build with Kerberos 4 support (--with-krb4[=DIR]) */
53 #undef KRB4
54
55 /* Define to build with Kerberos 5 support (--with-krb5[=DIR]) */
56 #undef KRB5
57
58 /* Kerberos name of the Postgres service principal (--with-krb-srvnam=NAME) */
59 #undef PG_KRB_SRVNAM
60
61 /* Define to build with (Open)SSL support (--with-openssl[=DIR]) */
62 #undef USE_SSL
63
64 /* 
65  * DEF_PGPORT is the TCP port number on which the Postmaster listens and
66  * which clients will try to connect to.  This is just a default value;
67  * it can be overridden at postmaster or client startup.  It's awfully
68  * convenient if your clients have the right default compiled in, though.
69  * (--with-pgport=PORTNUM)
70  */ 
71 #undef DEF_PGPORT
72 /* ... and once more as a string constant instead */
73 #undef DEF_PGPORT_STR
74
75 /*
76  * Default soft limit on number of backend server processes per postmaster;
77  * this is just the default setting for the postmaster's -N switch.
78  * (--with-maxbackends=N)
79  */
80 #undef DEF_MAXBACKENDS
81
82
83 /*
84  *------------------------------------------------------------------------
85  * Part 2: feature symbols and limits that are user-configurable, but
86  * only by editing this file ... there's no configure support for them.
87  *
88  * Editing this file and doing a full rebuild (and an initdb if noted)
89  * should be sufficient to change any of these.
90  *------------------------------------------------------------------------
91  */
92
93 /*
94  * Hard limit on number of backend server processes per postmaster.
95  * Increasing this costs about 32 bytes per process slot as of v 6.5.
96  */
97 #define MAXBACKENDS     (DEF_MAXBACKENDS > 1024 ? DEF_MAXBACKENDS : 1024)
98
99 /*
100  * Default number of buffers in shared buffer pool (each of size BLCKSZ).
101  * This is just the default setting for the postmaster's -B switch.
102  * Perhaps it ought to be configurable from a configure switch.
103  * NOTE: default setting corresponds to the minimum number of buffers
104  * that postmaster.c will allow for the default MaxBackends value.
105  */
106 #define DEF_NBUFFERS (DEF_MAXBACKENDS > 8 ? DEF_MAXBACKENDS * 2 : 16)
107
108 /*
109  * Size of a disk block --- currently, this limits the size of a tuple.
110  * You can set it bigger if you need bigger tuples.
111  *
112  * CAUTION: changing BLCKSZ requires an initdb.
113  *
114  * currently must be <= 32k bjm
115  */
116 #define BLCKSZ  8192
117
118 /*
119  * RELSEG_SIZE is the maximum number of blocks allowed in one disk file.
120  * Thus, the maximum size of a single file is RELSEG_SIZE * BLCKSZ;
121  * relations bigger than that are divided into multiple files.
122  *
123  * CAUTION: RELSEG_SIZE * BLCKSZ must be less than your OS' limit on file
124  * size.  This is typically 2Gb or 4Gb in a 32-bit operating system.  By
125  * default, we make the limit 1Gb to avoid any possible integer-overflow
126  * problems within the OS.  A limit smaller than necessary only means we
127  * divide a large relation into more chunks than necessary, so it seems
128  * best to err in the direction of a small limit.  (Besides, a power-of-2
129  * value saves a few cycles in md.c.)
130  *
131  * CAUTION: changing RELSEG_SIZE requires an initdb.
132  */
133 #define RELSEG_SIZE     (0x40000000 / BLCKSZ)
134
135 /*
136  * Maximum number of columns in an index and maximum number of arguments
137  * to a function. They must be the same value.
138  *
139  * The minimum value is 8 (index creation uses 8-argument functions).
140  * There is no specific upper limit, although large values will waste
141  * system-table space and processing time.
142  *
143  * CAUTION: changing these requires an initdb.
144  *
145  * BTW: if you need to call dynamically-loaded old-style C functions that
146  * have more than 16 arguments, you will also need to add cases to the
147  * switch statement in fmgr_oldstyle() in src/backend/utils/fmgr/fmgr.c.
148  * But consider converting such functions to new-style instead...
149  */
150 #define INDEX_MAX_KEYS          16
151 #define FUNC_MAX_ARGS           INDEX_MAX_KEYS
152
153 /*
154  * Define this to make libpgtcl's "pg_result -assign" command process C-style
155  * backslash sequences in returned tuple data and convert Postgres array
156  * attributes into Tcl lists.  CAUTION: this conversion is *wrong* unless
157  * you install the routines in contrib/string/string_io to make the backend
158  * produce C-style backslash sequences in the first place.
159  */
160 /* #define TCL_ARRAYS */
161
162 /*
163  * User locks are handled totally on the application side as long term
164  * cooperative locks which extend beyond the normal transaction boundaries.
165  * Their purpose is to indicate to an application that someone is `working'
166  * on an item.  Define this flag to enable user locks.  You will need the
167  * loadable module user-locks.c to use this feature.
168  */
169 #define USER_LOCKS
170
171 /*
172  * Define this if you want psql to _always_ ask for a username and a password
173  * for password authentication.
174  */
175 /* #define PSQL_ALWAYS_GET_PASSWORDS */
176
177 /*
178  * Define this if you want to allow the lo_import and lo_export SQL functions
179  * to be executed by ordinary users.  By default these functions are only
180  * available to the Postgres superuser.  CAUTION: these functions are
181  * SECURITY HOLES since they can read and write any file that the Postgres
182  * backend has permission to access.  If you turn this on, don't say we
183  * didn't warn you.
184  */
185 /* #define ALLOW_DANGEROUS_LO_FUNCTIONS */
186
187 /*
188  * Use btree bulkload code: 
189  * this code is moderately slow (~10% slower) compared to the regular
190  * btree (insertion) build code on sorted or well-clustered data.  on
191  * random data, however, the insertion build code is unusable -- the
192  * difference on a 60MB heap is a factor of 15 because the random
193  * probes into the btree thrash the buffer pool.
194  *
195  * Great thanks to Paul M. Aoki (aoki@CS.Berkeley.EDU)
196  */
197 #define FASTBUILD /* access/nbtree/nbtsort.c */
198
199 /*
200  * MAXPGPATH: standard size of a pathname buffer in Postgres (hence,
201  * maximum usable pathname length is one less).
202  *
203  * We'd use a standard system header symbol for this, if there weren't
204  * so many to choose from: MAXPATHLEN, _POSIX_PATH_MAX, MAX_PATH, PATH_MAX
205  * are all defined by different "standards", and often have different
206  * values on the same platform!  So we just punt and use a reasonably
207  * generous setting here.
208  */
209 #define MAXPGPATH               1024
210
211 /*
212  * DEFAULT_MAX_EXPR_DEPTH: default value of max_expr_depth SET variable.
213  */
214 #define DEFAULT_MAX_EXPR_DEPTH  10000
215
216 /*
217  *------------------------------------------------------------------------
218  * These hand-configurable symbols are for enabling debugging code,
219  * not for controlling user-visible features or resource limits.
220  *------------------------------------------------------------------------
221  */
222
223 /* Define this to cause pfree()'d memory to be cleared immediately,
224  * to facilitate catching bugs that refer to already-freed values.
225  * XXX For 7.1 development, define this automatically if --enable-cassert.
226  * In the long term it probably doesn't need to be on by default.
227  */
228 #ifdef USE_ASSERT_CHECKING
229 #define CLOBBER_FREED_MEMORY
230 #endif
231
232 /* Define this to force all parse and plan trees to be passed through
233  * copyObject(), to facilitate catching errors and omissions in copyObject().
234  * XXX For 7.1 development, define this automatically if --enable-cassert.
235  * In the long term it probably doesn't need to be on by default.
236  */
237 #ifdef USE_ASSERT_CHECKING
238 #define COPY_PARSE_PLAN_TREES
239 #endif
240
241 /* Enable debugging print statements in the date/time support routines. */
242 /* #define DATEDEBUG */
243
244 /*
245  * Other debug #defines (documentation, anyone?)
246  */
247 /* #define IPORTAL_DEBUG  */
248 /* #define HEAPDEBUGALL  */
249 /* #define ISTRATDEBUG  */
250 /* #define FASTBUILD_DEBUG */
251 /* #define ACLDEBUG */
252 /* #define RTDEBUG */
253 /* #define GISTDEBUG */
254 /* #define OMIT_PARTIAL_INDEX */
255 /* #define NO_SECURITY        */
256 /* #define LOCK_DEBUG */
257
258 /*
259  * defining unsafe floats's will make float4 and float8
260  * ops faster at the cost of safety, of course!        
261  */
262 /* #define UNSAFE_FLOATS */
263
264
265 /*
266  *------------------------------------------------------------------------
267  * Part 3: system configuration information that is auto-detected by
268  * configure.  In theory you shouldn't have to touch any of this stuff
269  * by hand.  In the real world, configure might get it wrong...
270  *------------------------------------------------------------------------
271  */
272
273 /* Define const as empty if your compiler doesn't grok const. */
274 #undef const
275
276 /* Define as your compiler's spelling of "inline", or empty if no inline. */
277 #undef inline
278
279 /* Define signed as empty if your compiler doesn't grok "signed char" etc */
280 #undef signed
281
282 /* Define volatile as empty if your compiler doesn't grok volatile. */
283 #undef volatile
284
285 /* Define if your cpp understands the ANSI stringizing operators in macros */
286 #undef HAVE_STRINGIZE
287
288 /* Set to 1 if you have <arpa/inet.h> */
289 #undef HAVE_ARPA_INET_H
290
291 /* Set to 1 if you have <crypt.h> */
292 #undef HAVE_CRYPT_H
293
294 /* Set to 1 if you have <dld.h> */
295 #undef HAVE_DLD_H
296
297 /* Set to 1 if you have <endian.h> */
298 #undef HAVE_ENDIAN_H
299
300 /* Set to 1 if you have <float.h> */
301 #undef HAVE_FLOAT_H
302
303 /* Set to 1 if you have <fp_class.h> */
304 #undef HAVE_FP_CLASS_H
305
306 /* Set to 1 if you have <getopt.h> */
307 #undef HAVE_GETOPT_H
308
309 /* Set to 1 if you have <history.h> */
310 #undef HAVE_HISTORY_H
311
312 /* Set to 1 if you have <ieeefp.h> */
313 #undef HAVE_IEEEFP_H
314
315 /* Set to 1 if you have <limits.h> */
316 #undef HAVE_LIMITS_H
317
318 /* Set to 1 if you have <netdb.h> */
319 #undef HAVE_NETDB_H
320
321 /* Set to 1 if you have <netinet/in.h> */
322 #undef HAVE_NETINET_IN_H
323
324 /* Set to 1 if you have <readline.h> */
325 #undef HAVE_READLINE_H
326
327 /* Set to 1 if you have <readline/history.h> */
328 #undef HAVE_READLINE_HISTORY_H
329
330 /* Set to 1 if you have <readline/readline.h> */
331 #undef HAVE_READLINE_READLINE_H
332
333 /* Set to 1 if  you have <sys/select.h> */
334 #undef HAVE_SYS_SELECT_H
335
336 /* Set to 1 if you have <termios.h> */
337 #undef HAVE_TERMIOS_H
338
339 /* Set to 1 if  you have <values.h> */
340 #undef HAVE_VALUES_H
341
342 /* Set to 1 if you have <sys/exec.h> */
343 #undef HAVE_SYS_EXEC_H
344
345 /* Set to 1 if you have <sys/pstat.h> */
346 #undef HAVE_SYS_PSTAT_H
347
348 /* Set to 1 if you have <machine/vmparam.h> */
349 #undef HAVE_MACHINE_VMPARAM_H
350
351 /* Define if you have the ANSI C header files.  */
352 #undef STDC_HEADERS
353
354 /* Define if you have the setproctitle function.  */
355 #undef HAVE_SETPROCTITLE
356
357 /* Define if you have the pstat function. */
358 #undef HAVE_PSTAT
359
360 /* Define if the PS_STRINGS thing exists. */
361 #undef HAVE_PS_STRINGS
362
363 /* Define if you have the stricmp function.  */
364 #undef HAVE_STRICMP
365
366 /* Set to 1 if you have libreadline and it includes history functions */
367 #undef HAVE_HISTORY_IN_READLINE
368
369 /* Set to 1 if you have <pwd.h> */
370 #undef HAVE_PWD_H
371
372 /* Define if you have the <sys/param.h> header file.  */
373 #undef HAVE_SYS_PARAM_H
374
375 /* Set to 1 if you gettimeofday(a,b) vs gettimeofday(a) */
376 #undef GETTIMEOFDAY_1ARG
377 #ifdef GETTIMEOFDAY_1ARG
378 # define gettimeofday(a,b) gettimeofday(a)
379 #endif
380
381 /* Set to 1 if you have snprintf() in the C library */
382 #undef HAVE_SNPRINTF
383
384 /* Set to 1 if your standard system headers declare snprintf() */
385 #undef HAVE_SNPRINTF_DECL
386
387 /* Set to 1 if you have vsnprintf() in the C library */
388 #undef HAVE_VSNPRINTF
389
390 /* Set to 1 if your standard system headers declare vsnprintf() */
391 #undef HAVE_VSNPRINTF_DECL
392
393 /* Set to 1 if you have strerror() */
394 #undef HAVE_STRERROR
395
396 /* Set to 1 if you have isinf() */
397 #undef HAVE_ISINF
398 #ifndef HAVE_ISINF
399 extern int isinf(double x);
400 #endif
401
402 /*
403  *      These are all related to port/isinf.c 
404  */
405 #undef HAVE_FPCLASS
406 #undef HAVE_FP_CLASS
407 #undef HAVE_FP_CLASS_H
408 #undef HAVE_FP_CLASS_D
409 #undef HAVE_CLASS
410
411 /* Set to 1 if you have gethostname() */
412 #undef HAVE_GETHOSTNAME
413 #ifndef HAVE_GETHOSTNAME
414 extern int gethostname(char *name, int namelen);
415 #endif
416
417 /* Set to 1 if struct tm has a tm_zone member */
418 #undef HAVE_TM_ZONE
419
420 /* Set to 1 if you have int timezone.
421  * NOTE: if both tm_zone and a global timezone variable exist,
422  * using the tm_zone field should probably be preferred,
423  * since global variables are inherently not thread-safe.
424  */
425 #undef HAVE_INT_TIMEZONE
426
427 /* Set to 1 if you have cbrt() */
428 #undef HAVE_CBRT
429
430 /* Set to 1 if you have inet_aton() */
431 #undef HAVE_INET_ATON
432 #ifndef HAVE_INET_ATON
433 # ifdef HAVE_ARPA_INET_H
434 #  ifdef HAVE_NETINET_IN_H
435 #   include <sys/types.h>
436 #   include <netinet/in.h>
437 #  endif
438 #  include <arpa/inet.h>
439 # endif
440 extern int inet_aton(const char *cp, struct in_addr * addr);
441 #endif
442
443 /* Set to 1 if you have fcvt() */
444 #undef HAVE_FCVT
445
446 /* Set to 1 if you have rint() */
447 #undef HAVE_RINT 
448
449 /* Set to 1 if you have finite() */
450 #undef HAVE_FINITE
451
452 /* Set to 1 if you have memmove() */
453 #undef HAVE_MEMMOVE
454
455 /* Set to 1 if you have sigsetjmp() */
456 #undef HAVE_SIGSETJMP
457
458 /*
459  * When there is no sigsetjmp, its functionality is provided by plain
460  * setjmp. Incidentally, nothing provides setjmp's functionality in
461  * that case.
462  */
463 #ifndef HAVE_SIGSETJMP
464 # define sigjmp_buf jmp_buf
465 # define sigsetjmp(x,y) setjmp(x)
466 # define siglongjmp longjmp
467 #endif
468
469 /* Set to 1 if you have sysconf() */
470 #undef HAVE_SYSCONF
471
472 /* Set to 1 if you have getrusage() */
473 #undef HAVE_GETRUSAGE
474
475 /* Set to 1 if you have waitpid() */
476 #undef HAVE_WAITPID
477
478 /* Set to 1 if you have setsid() */
479 #undef HAVE_SETSID
480
481 /* Set to 1 if you have sigprocmask() */
482 #undef HAVE_SIGPROCMASK
483
484 /* Set to 1 if you have sigprocmask() */
485 #undef HAVE_STRCASECMP
486 #ifndef HAVE_STRCASECMP
487 extern int strcasecmp(char *s1, char *s2);
488 #endif
489
490 /* Set to 1 if you have strtol() */
491 #undef HAVE_STRTOL
492
493 /* Set to 1 if you have strtoul() */
494 #undef HAVE_STRTOUL
495
496 /* Set to 1 if you have strdup() */
497 #undef HAVE_STRDUP
498 #ifndef HAVE_STRDUP
499 extern char *strdup(char const *);
500 #endif
501
502 /* Set to 1 if you have random() */
503 #undef HAVE_RANDOM
504 #ifndef HAVE_RANDOM
505 extern long random(void);
506 #endif
507
508 /* Set to 1 if you have srandom() */
509 #undef HAVE_SRANDOM
510 #ifndef HAVE_SRANDOM
511 extern void srandom(unsigned int seed);
512 #endif
513
514 /* Set to 1 if you have libz.a */
515 #undef HAVE_LIBZ
516
517 /* Set to 1 if you have libreadline.a */
518 #undef HAVE_LIBREADLINE
519
520 /* Set to 1 if you have libhistory.a */
521 #undef HAVE_LIBHISTORY
522
523 /* Set to 1 if your libreadline defines rl_completion_append_character */
524 #undef HAVE_RL_COMPLETION_APPEND_CHARACTER
525
526 /* Set to 1 if your libreadline has filename_completion_function */
527 #undef HAVE_FILENAME_COMPLETION_FUNCTION
528
529 /* Set to 1 if your readline headers actually declare the above */
530 #undef HAVE_FILENAME_COMPLETION_FUNCTION_DECL
531
532 /* Set to 1 if you have getopt_long() (GNU long options) */
533 #undef HAVE_GETOPT_LONG
534
535 /* Set to 1 if you have union semun */
536 #undef HAVE_UNION_SEMUN
537
538 /* Set to 1 if you have F_SETLK option for fcntl() */
539 #undef HAVE_FCNTL_SETLK
540
541 /* Set to 1 if type "long int" works and is 64 bits */
542 #undef HAVE_LONG_INT_64
543
544 /* Set to 1 if type "long long int" works and is 64 bits */
545 #undef HAVE_LONG_LONG_INT_64
546
547 /* Define this as the appropriate snprintf format for 64-bit ints, if any */
548 #undef INT64_FORMAT
549
550 /*
551  * These must be defined as the alignment requirement (NOT the size) of
552  * each of the basic C data types (except char, which we assume has align 1).
553  * MAXIMUM_ALIGNOF is the largest alignment requirement for any C data type.
554  * ALIGNOF_LONG_LONG_INT need only be defined if HAVE_LONG_LONG_INT_64 is.
555  */
556 #undef ALIGNOF_SHORT
557 #undef ALIGNOF_INT
558 #undef ALIGNOF_LONG
559 #undef ALIGNOF_LONG_LONG_INT
560 #undef ALIGNOF_DOUBLE
561 #undef MAXIMUM_ALIGNOF
562
563 /* Define as the type of the 3rd argument to accept() */
564 #undef ACCEPT_TYPE_ARG3
565
566 /* Define if POSIX signal interface is available */
567 #undef HAVE_POSIX_SIGNALS
568
569 /* Define if C++ compiler accepts "using namespace std" */
570 #undef HAVE_NAMESPACE_STD
571
572 /* Define if C++ compiler accepts "#include <string>" */
573 #undef HAVE_CXX_STRING_HEADER
574
575
576 /*
577  *------------------------------------------------------------------------
578  * Part 4: pull in system-specific declarations.
579  *
580  * This is still configure's responsibility, because it picks where
581  * the "os.h" symlink points...
582  *------------------------------------------------------------------------
583  */
584
585 /*
586  * Pull in OS-specific declarations (using link created by configure)
587  */
588
589 #include "os.h"
590
591 /*
592  * The following is used as the arg list for signal handlers.  Any ports
593  * that take something other than an int argument should override this in
594  * the port-specific os.h file.  Note that variable names are required
595  * because it is used in both the prototypes as well as the definitions.
596  * Note also the long name.  We expect that this won't collide with
597  * other names causing compiler warnings.
598  */ 
599
600 #ifndef SIGNAL_ARGS
601 #define SIGNAL_ARGS  int postgres_signal_arg
602 #endif
603
604
605 #endif /* CONFIG_H */