Commit cb1d036a authored by Peter Eisentraut's avatar Peter Eisentraut

Generate pg_config.h.in by autoheader. Separate out manually editable

parts.  Standardize spelling of comments in pg_config.h.
parent d7c333eb
# Macros to detect C compiler features # Macros to detect C compiler features
# $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.6 2003/01/28 21:57:12 petere Exp $ # $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.7 2003/04/06 22:45:22 petere Exp $
# PGAC_C_SIGNED # PGAC_C_SIGNED
...@@ -12,7 +12,7 @@ AC_DEFUN([PGAC_C_SIGNED], ...@@ -12,7 +12,7 @@ AC_DEFUN([PGAC_C_SIGNED],
[pgac_cv_c_signed=yes], [pgac_cv_c_signed=yes],
[pgac_cv_c_signed=no])]) [pgac_cv_c_signed=no])])
if test x"$pgac_cv_c_signed" = xno ; then if test x"$pgac_cv_c_signed" = xno ; then
AC_DEFINE(signed,, [Define empty if the C compiler does not understand signed types]) AC_DEFINE(signed,, [Define to empty if the C compiler does not understand signed types.])
fi])# PGAC_C_SIGNED fi])# PGAC_C_SIGNED
...@@ -62,7 +62,7 @@ AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([], [sizeof($1) == 8])], ...@@ -62,7 +62,7 @@ AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([], [sizeof($1) == 8])],
Ac_define=$Ac_cachevar Ac_define=$Ac_cachevar
if test x"$Ac_cachevar" = xyes ; then if test x"$Ac_cachevar" = xyes ; then
AC_DEFINE(Ac_define,, [Set to 1 if `]$1[' is 64 bits]) AC_DEFINE(Ac_define,, [Define to 1 if `]$1[' works and is 64 bits.])
fi fi
undefine([Ac_define])dnl undefine([Ac_define])dnl
undefine([Ac_cachevar])dnl undefine([Ac_cachevar])dnl
...@@ -92,5 +92,5 @@ else ...@@ -92,5 +92,5 @@ else
fi])dnl fi])dnl
AC_DEFINE_UNQUOTED(AS_TR_CPP(alignof_$1), AC_DEFINE_UNQUOTED(AS_TR_CPP(alignof_$1),
[$AS_TR_SH([pgac_cv_alignof_$1])], [$AS_TR_SH([pgac_cv_alignof_$1])],
[The alignment requirement of a `$1']) [The alignment requirement of a `$1'.])
])# PGAC_CHECK_ALIGNOF ])# PGAC_CHECK_ALIGNOF
# Macros that test various C library quirks # Macros that test various C library quirks
# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.16 2003/04/02 00:49:27 tgl Exp $ # $Header: /cvsroot/pgsql/config/c-library.m4,v 1.17 2003/04/06 22:45:22 petere Exp $
# PGAC_VAR_INT_TIMEZONE # PGAC_VAR_INT_TIMEZONE
...@@ -14,7 +14,7 @@ int res;], ...@@ -14,7 +14,7 @@ int res;],
[pgac_cv_var_int_timezone=yes], [pgac_cv_var_int_timezone=yes],
[pgac_cv_var_int_timezone=no])]) [pgac_cv_var_int_timezone=no])])
if test x"$pgac_cv_var_int_timezone" = xyes ; then if test x"$pgac_cv_var_int_timezone" = xyes ; then
AC_DEFINE(HAVE_INT_TIMEZONE,, [Set to 1 if you have the global variable timezone]) AC_DEFINE(HAVE_INT_TIMEZONE,, [Define to 1 if you have the global variable 'int timezone'.])
fi])# PGAC_VAR_INT_TIMEZONE fi])# PGAC_VAR_INT_TIMEZONE
...@@ -32,8 +32,13 @@ gettimeofday(tp,tzp);], ...@@ -32,8 +32,13 @@ gettimeofday(tp,tzp);],
[pgac_cv_func_gettimeofday_1arg=no], [pgac_cv_func_gettimeofday_1arg=no],
[pgac_cv_func_gettimeofday_1arg=yes])]) [pgac_cv_func_gettimeofday_1arg=yes])])
if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
AC_DEFINE(GETTIMEOFDAY_1ARG,, [Set to 1 if gettimeofday() takes only 1 argument]) AC_DEFINE(GETTIMEOFDAY_1ARG,, [Define to 1 if gettimeofday() takes only 1 argument.])
fi])# PGAC_FUNC_GETTIMEOFDAY_1ARG fi
AH_VERBATIM(GETTIMEOFDAY_1ARG_,
[@%:@ifdef GETTIMEOFDAY_1ARG
@%:@ define gettimeofday(a,b) gettimeofday(a)
@%:@endif])dnl
])# PGAC_FUNC_GETTIMEOFDAY_1ARG
# PGAC_UNION_SEMUN # PGAC_UNION_SEMUN
...@@ -92,7 +97,7 @@ sigaction(0, &act, &oact);], ...@@ -92,7 +97,7 @@ sigaction(0, &act, &oact);],
[pgac_cv_func_posix_signals=yes], [pgac_cv_func_posix_signals=yes],
[pgac_cv_func_posix_signals=no])]) [pgac_cv_func_posix_signals=no])])
if test x"$pgac_cv_func_posix_signals" = xyes ; then if test x"$pgac_cv_func_posix_signals" = xyes ; then
AC_DEFINE(HAVE_POSIX_SIGNALS,, [Set to 1 if you have the POSIX signal interface]) AC_DEFINE(HAVE_POSIX_SIGNALS,, [Define to 1 if you have the POSIX signal interface.])
fi fi
HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
AC_SUBST(HAVE_POSIX_SIGNALS)])# PGAC_FUNC_POSIX_SIGNALS AC_SUBST(HAVE_POSIX_SIGNALS)])# PGAC_FUNC_POSIX_SIGNALS
......
# $Header: /cvsroot/pgsql/config/programs.m4,v 1.10 2002/04/10 22:46:33 petere Exp $ # $Header: /cvsroot/pgsql/config/programs.m4,v 1.11 2003/04/06 22:45:22 petere Exp $
# PGAC_PATH_FLEX # PGAC_PATH_FLEX
...@@ -131,7 +131,7 @@ AC_TRY_LINK([#include <stdio.h> ...@@ -131,7 +131,7 @@ AC_TRY_LINK([#include <stdio.h>
[rl_completion_append_character = 'x';], [rl_completion_append_character = 'x';],
[AC_MSG_RESULT(yes) [AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1, AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1,
[Define if you have rl_completion_append_character])], [Define to 1 if you have the global variable 'rl_completion_append_character'.])],
[AC_MSG_RESULT(no)])])# PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER [AC_MSG_RESULT(no)])])# PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER
...@@ -163,7 +163,7 @@ dnl FIXME: We should probably check for version >=0.10.36. ...@@ -163,7 +163,7 @@ dnl FIXME: We should probably check for version >=0.10.36.
AC_SUBST(localedir) AC_SUBST(localedir)
AC_DEFINE_UNQUOTED(LOCALEDIR, ["$exp_localedir"], AC_DEFINE_UNQUOTED(LOCALEDIR, ["$exp_localedir"],
[location of locale files]) [Define to the location of locale files.])
])# PGAC_CHECK_GETTEXT ])# PGAC_CHECK_GETTEXT
......
...@@ -855,7 +855,6 @@ Optional Packages: ...@@ -855,7 +855,6 @@ Optional Packages:
--with-libraries=DIRS look for additional libraries in DIRS --with-libraries=DIRS look for additional libraries in DIRS
--with-libs=DIRS alternative spelling of --with-libraries --with-libs=DIRS alternative spelling of --with-libraries
--with-pgport=PORTNUM change default port number 5432 --with-pgport=PORTNUM change default port number 5432
--with-maxbackends=N set default maximum number of connections 32
--with-tcl build Tcl and Tk interfaces --with-tcl build Tcl and Tk interfaces
--without-tk do not build Tk interfaces if Tcl is enabled --without-tk do not build Tk interfaces if Tcl is enabled
--with-tclconfig=DIR tclConfig.sh and tkConfig.sh are in DIR --with-tclconfig=DIR tclConfig.sh and tkConfig.sh are in DIR
...@@ -1722,47 +1721,6 @@ _ACEOF ...@@ -1722,47 +1721,6 @@ _ACEOF
#
# Maximum number of allowed connections (--with-maxbackends), default 32
#
echo "$as_me:$LINENO: checking for default soft limit on number of connections" >&5
echo $ECHO_N "checking for default soft limit on number of connections... $ECHO_C" >&6
# Check whether --with-maxbackends or --without-maxbackends was given.
if test "${with_maxbackends+set}" = set; then
withval="$with_maxbackends"
case $withval in
yes)
{ { echo "$as_me:$LINENO: error: argument required for --with-maxbackends option" >&5
echo "$as_me: error: argument required for --with-maxbackends option" >&2;}
{ (exit 1); exit 1; }; }
;;
no)
{ { echo "$as_me:$LINENO: error: argument required for --with-maxbackends option" >&5
echo "$as_me: error: argument required for --with-maxbackends option" >&2;}
{ (exit 1); exit 1; }; }
;;
*)
;;
esac
else
with_maxbackends=32
fi;
echo "$as_me:$LINENO: result: $with_maxbackends" >&5
echo "${ECHO_T}$with_maxbackends" >&6
cat >>confdefs.h <<_ACEOF
#define DEF_MAXBACKENDS $with_maxbackends
_ACEOF
# #
# Option to disable shared libraries # Option to disable shared libraries
# #
...@@ -10146,6 +10104,8 @@ _ACEOF ...@@ -10146,6 +10104,8 @@ _ACEOF
fi fi
# SunOS doesn't handle negative byte comparisons properly with +/- return # SunOS doesn't handle negative byte comparisons properly with +/- return
echo "$as_me:$LINENO: checking for working memcmp" >&5 echo "$as_me:$LINENO: checking for working memcmp" >&5
echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
...@@ -10497,7 +10457,8 @@ fi ...@@ -10497,7 +10457,8 @@ fi
echo "$as_me:$LINENO: result: $ac_cv_func_inet_ntop" >&5 echo "$as_me:$LINENO: result: $ac_cv_func_inet_ntop" >&5
echo "${ECHO_T}$ac_cv_func_inet_ntop" >&6 echo "${ECHO_T}$ac_cv_func_inet_ntop" >&6
if test $ac_cv_func_inet_ntop = yes; then if test $ac_cv_func_inet_ntop = yes; then
cat >>confdefs.h <<\_ACEOF
cat >>confdefs.h <<\_ACEOF
#define HAVE_IPV6 1 #define HAVE_IPV6 1
_ACEOF _ACEOF
...@@ -11809,7 +11770,8 @@ echo "${ECHO_T}$ac_cv_header_syslog_h" >&6 ...@@ -11809,7 +11770,8 @@ echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
fi fi
if test $ac_cv_header_syslog_h = yes; then if test $ac_cv_header_syslog_h = yes; then
cat >>confdefs.h <<\_ACEOF
cat >>confdefs.h <<\_ACEOF
#define HAVE_SYSLOG 1 #define HAVE_SYSLOG 1
_ACEOF _ACEOF
...@@ -12768,7 +12730,7 @@ if test $pgac_need_repl_snprintf = yes; then ...@@ -12768,7 +12730,7 @@ if test $pgac_need_repl_snprintf = yes; then
LIBOBJS="$LIBOBJS snprintf.$ac_objext" LIBOBJS="$LIBOBJS snprintf.$ac_objext"
fi fi
# Need a #define for the size of Datum (unsigned long)
echo "$as_me:$LINENO: checking for unsigned long" >&5 echo "$as_me:$LINENO: checking for unsigned long" >&5
echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
if test "${ac_cv_type_unsigned_long+set}" = set; then if test "${ac_cv_type_unsigned_long+set}" = set; then
...@@ -13132,11 +13094,6 @@ _ACEOF ...@@ -13132,11 +13094,6 @@ _ACEOF
cat >>confdefs.h <<_ACEOF
#define SIZEOF_DATUM $ac_cv_sizeof_unsigned_long
_ACEOF
# Determine memory alignment requirements for the basic C data types. # Determine memory alignment requirements for the basic C data types.
echo "$as_me:$LINENO: checking for short" >&5 echo "$as_me:$LINENO: checking for short" >&5
......
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# Makefile for backend/catalog # Makefile for backend/catalog
# #
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.45 2003/01/14 23:19:34 petere Exp $ # $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.46 2003/04/06 22:45:22 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -38,7 +38,7 @@ POSTGRES_BKI_SRCS := $(addprefix $(top_srcdir)/src/include/catalog/,\ ...@@ -38,7 +38,7 @@ POSTGRES_BKI_SRCS := $(addprefix $(top_srcdir)/src/include/catalog/,\
pg_includes := $(sort -I$(top_srcdir)/src/include -I$(top_builddir)/src/include) pg_includes := $(sort -I$(top_srcdir)/src/include -I$(top_builddir)/src/include)
postgres.bki postgres.description: genbki.sh $(POSTGRES_BKI_SRCS) \ postgres.bki postgres.description: genbki.sh $(POSTGRES_BKI_SRCS) \
$(top_srcdir)/src/include/postgres_ext.h $(top_builddir)/src/include/pg_config.h $(top_srcdir)/src/include/postgres_ext.h $(top_builddir)/src/include/pg_config_manual.h
CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $< $(BKIOPTS) -o postgres $(pg_includes) $(POSTGRES_BKI_SRCS) --set-version=$(VERSION) CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $< $(BKIOPTS) -o postgres $(pg_includes) $(POSTGRES_BKI_SRCS) --set-version=$(VERSION)
.PHONY: install-data .PHONY: install-data
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/catalog/Attic/genbki.sh,v 1.28 2002/07/31 17:19:51 tgl Exp $ # $Header: /cvsroot/pgsql/src/backend/catalog/Attic/genbki.sh,v 1.29 2003/04/06 22:45:22 petere Exp $
# #
# NOTES # NOTES
# non-essential whitespace is removed from the generated file. # non-essential whitespace is removed from the generated file.
...@@ -66,7 +66,7 @@ do ...@@ -66,7 +66,7 @@ do
echo " $CMDNAME [ -D define [...] ] [ -I dir ] --set-version=VERSION -o prefix files..." echo " $CMDNAME [ -D define [...] ] [ -I dir ] --set-version=VERSION -o prefix files..."
echo echo
echo "Options:" echo "Options:"
echo " -I path to postgres_ext.h and pg_config.h files" echo " -I path to postgres_ext.h and pg_config_manual.h files"
echo " -o prefix of output files" echo " -o prefix of output files"
echo " --set-version PostgreSQL version number for initdb cross-check" echo " --set-version PostgreSQL version number for initdb cross-check"
echo echo
...@@ -126,11 +126,11 @@ for dir in $INCLUDE_DIRS; do ...@@ -126,11 +126,11 @@ for dir in $INCLUDE_DIRS; do
fi fi
done done
# Get INDEX_MAX_KEYS from pg_config.h # Get INDEX_MAX_KEYS from pg_config_manual.h
# (who needs consistency?) # (who needs consistency?)
for dir in $INCLUDE_DIRS; do for dir in $INCLUDE_DIRS; do
if [ -f "$dir/pg_config.h" ]; then if [ -f "$dir/pg_config_manual.h" ]; then
INDEXMAXKEYS=`grep '^#define[ ]*INDEX_MAX_KEYS' $dir/pg_config.h | $AWK '{ print $3 }'` INDEXMAXKEYS=`grep '^#define[ ]*INDEX_MAX_KEYS' $dir/pg_config_manual.h | $AWK '{ print $3 }'`
break break
fi fi
done done
...@@ -152,9 +152,10 @@ for dir in $INCLUDE_DIRS; do ...@@ -152,9 +152,10 @@ for dir in $INCLUDE_DIRS; do
done done
export BKIOBJECTID export BKIOBJECTID
# NOTE: we assume here that FUNC_MAX_ARGS has the same value as INDEX_MAX_KEYS, # NOTE: we assume here that FUNC_MAX_ARGS has the same value as
# and don't read it separately from pg_config.h. This is OK because both of them # INDEX_MAX_KEYS, and don't read it separately from
# must be equal to the length of oidvector. # pg_config_manual.h. This is OK because both of them must be equal
# to the length of oidvector.
INDEXMAXKEYS2=`expr $INDEXMAXKEYS '*' 2` || exit INDEXMAXKEYS2=`expr $INDEXMAXKEYS '*' 2` || exit
INDEXMAXKEYS4=`expr $INDEXMAXKEYS '*' 4` || exit INDEXMAXKEYS4=`expr $INDEXMAXKEYS '*' 4` || exit
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.309 2003/03/24 22:40:14 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.310 2003/04/06 22:45:22 petere Exp $
* *
* NOTES * NOTES
* *
...@@ -143,13 +143,12 @@ char *VirtualHost; ...@@ -143,13 +143,12 @@ char *VirtualHost;
/* /*
* MaxBackends is the limit on the number of backends we can start. * MaxBackends is the limit on the number of backends we can start.
* The default is established by configure, but it can be altered at * Note that a larger MaxBackends value will increase the size of the
* postmaster start with the postmaster's -N switch. Note * shared memory area as well as cause the postmaster to grab more
* that a larger MaxBackends value will increase the size of the shared * kernel semaphores, even if you never actually use that many
* memory area as well as cause the postmaster to grab more kernel * backends.
* semaphores, even if you never actually use that many backends.
*/ */
int MaxBackends = DEF_MAXBACKENDS; int MaxBackends;
/* /*
* ReservedBackends is the number of backends reserved for superuser use. * ReservedBackends is the number of backends reserved for superuser use.
...@@ -160,7 +159,7 @@ int MaxBackends = DEF_MAXBACKENDS; ...@@ -160,7 +159,7 @@ int MaxBackends = DEF_MAXBACKENDS;
* can make new connections" --- pre-existing superuser connections don't * can make new connections" --- pre-existing superuser connections don't
* count against the limit. * count against the limit.
*/ */
int ReservedBackends = 2; int ReservedBackends;
static char *progname = (char *) NULL; static char *progname = (char *) NULL;
...@@ -892,7 +891,7 @@ usage(const char *progname) ...@@ -892,7 +891,7 @@ usage(const char *progname)
#ifdef USE_ASSERT_CHECKING #ifdef USE_ASSERT_CHECKING
printf(gettext(" -A 1|0 enable/disable run-time assert checking\n")); printf(gettext(" -A 1|0 enable/disable run-time assert checking\n"));
#endif #endif
printf(gettext(" -B NBUFFERS number of shared buffers (default %d)\n"), DEF_NBUFFERS); printf(gettext(" -B NBUFFERS number of shared buffers\n"));
printf(gettext(" -c NAME=VALUE set run-time parameter\n")); printf(gettext(" -c NAME=VALUE set run-time parameter\n"));
printf(gettext(" -d 1-5 debugging level\n")); printf(gettext(" -d 1-5 debugging level\n"));
printf(gettext(" -D DATADIR database directory\n")); printf(gettext(" -D DATADIR database directory\n"));
...@@ -903,10 +902,9 @@ usage(const char *progname) ...@@ -903,10 +902,9 @@ usage(const char *progname)
#ifdef USE_SSL #ifdef USE_SSL
printf(gettext(" -l enable SSL connections\n")); printf(gettext(" -l enable SSL connections\n"));
#endif #endif
printf(gettext(" -N MAX-CONNECT maximum number of allowed connections (default %d)\n"), printf(gettext(" -N MAX-CONNECT maximum number of allowed connections\n"));
DEF_MAXBACKENDS);
printf(gettext(" -o OPTIONS pass 'OPTIONS' to each backend server\n")); printf(gettext(" -o OPTIONS pass 'OPTIONS' to each backend server\n"));
printf(gettext(" -p PORT port number to listen on (default %d)\n"), DEF_PGPORT); printf(gettext(" -p PORT port number to listen on\n"));
printf(gettext(" -S silent mode (start in background without logging output)\n")); printf(gettext(" -S silent mode (start in background without logging output)\n"));
printf(gettext(" --help show this help, then exit\n")); printf(gettext(" --help show this help, then exit\n"));
printf(gettext(" --version output version information, then exit\n")); printf(gettext(" --version output version information, then exit\n"));
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: c.h,v 1.136 2003/04/04 20:42:13 momjian Exp $ * $Id: c.h,v 1.137 2003/04/06 22:45:23 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -51,6 +51,8 @@ ...@@ -51,6 +51,8 @@
*/ */
#include "pg_config.h" #include "pg_config.h"
#include "pg_config_manual.h"
#include "pg_config_os.h"
#include "postgres_ext.h" #include "postgres_ext.h"
#include <stdio.h> #include <stdio.h>
...@@ -708,8 +710,7 @@ off_t ftello(FILE *stream); ...@@ -708,8 +710,7 @@ off_t ftello(FILE *stream);
/* /*
* Provide prototypes for routines not present in a particular machine's * Provide prototypes for routines not present in a particular machine's
* standard C library. It'd be better to put these in pg_config.h, but * standard C library.
* in pg_config.h we haven't yet included anything that defines size_t...
*/ */
#if !HAVE_DECL_SNPRINTF #if !HAVE_DECL_SNPRINTF
...@@ -727,4 +728,87 @@ extern int vsnprintf(char *str, size_t count, const char *fmt, va_list args); ...@@ -727,4 +728,87 @@ extern int vsnprintf(char *str, size_t count, const char *fmt, va_list args);
#define memmove(d, s, c) bcopy(s, d, c) #define memmove(d, s, c) bcopy(s, d, c)
#endif #endif
#ifndef DLLIMPORT
#define DLLIMPORT /* no special DLL markers on most ports */
#endif
/*
* The following is used as the arg list for signal handlers. Any ports
* that take something other than an int argument should override this in
* their pg_config_os.h file. Note that variable names are required
* because it is used in both the prototypes as well as the definitions.
* Note also the long name. We expect that this won't collide with
* other names causing compiler warnings.
*/
#ifndef SIGNAL_ARGS
#define SIGNAL_ARGS int postgres_signal_arg
#endif
/*
* Default "extern" declarations or macro substitutes for library routines.
* When necessary, these routines are provided by files in src/port/.
*/
#ifndef HAVE_FSEEKO
#define fseeko(a, b, c) fseek((a), (b), (c))
#define ftello(a) ftell((a))
#endif
#ifndef HAVE_ISINF
extern int isinf(double x);
#endif
#ifndef HAVE_GETHOSTNAME
extern int gethostname(char *name, int namelen);
#endif
#ifndef HAVE_INET_ATON
# include <netinet/in.h>
# include <arpa/inet.h>
extern int inet_aton(const char *cp, struct in_addr * addr);
#endif
/*
* When there is no sigsetjmp, its functionality is provided by plain
* setjmp. Incidentally, nothing provides setjmp's functionality in
* that case.
*/
#ifndef HAVE_SIGSETJMP
# define sigjmp_buf jmp_buf
# define sigsetjmp(x,y) setjmp(x)
# define siglongjmp longjmp
#endif
#ifndef HAVE_STRCASECMP
extern int strcasecmp(char *s1, char *s2);
#endif
#ifndef HAVE_STRDUP
extern char *strdup(char const *);
#endif
#ifndef HAVE_RANDOM
extern long random(void);
#endif
#ifndef HAVE_SRANDOM
extern void srandom(unsigned int seed);
#endif
#if defined(HAVE_FDATASYNC) && !HAVE_DECL_FDATASYNC
extern int fdatasync(int fildes);
#endif
/* If strtoq() exists, rename it to the more standard strtoll() */
#if defined(HAVE_LONG_LONG_INT_64) && !defined(HAVE_STRTOLL) && defined(HAVE_STRTOQ)
# define strtoll strtoq
# define HAVE_STRTOLL 1
#endif
/* If strtouq() exists, rename it to the more standard strtoull() */
#if defined(HAVE_LONG_LONG_INT_64) && !defined(HAVE_STRTOULL) && defined(HAVE_STRTOUQ)
# define strtoull strtouq
# define HAVE_STRTOULL 1
#endif
#endif /* C_H */ #endif /* C_H */
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: miscadmin.h,v 1.117 2003/03/20 04:51:44 momjian Exp $ * $Id: miscadmin.h,v 1.118 2003/04/06 22:45:23 petere Exp $
* *
* NOTES * NOTES
* some of the information in this file should be moved to * some of the information in this file should be moved to
...@@ -171,8 +171,10 @@ extern bool NetServer; ...@@ -171,8 +171,10 @@ extern bool NetServer;
extern bool EnableSSL; extern bool EnableSSL;
extern bool SilentMode; extern bool SilentMode;
extern int MaxBackends; extern int MaxBackends;
#define DEF_MAXBACKENDS 32
extern int ReservedBackends; extern int ReservedBackends;
extern DLLIMPORT int NBuffers; extern DLLIMPORT int NBuffers;
#define DEF_NBUFFERS (DEF_MAXBACKENDS > 8 ? DEF_MAXBACKENDS * 2 : 16)
extern int PostPortNumber; extern int PostPortNumber;
extern int Unix_socket_permissions; extern int Unix_socket_permissions;
extern char *Unix_socket_group; extern char *Unix_socket_group;
......
This diff is collapsed.
/*------------------------------------------------------------------------
* PostgreSQL manual configuration settings
*
* This file contains various configuration symbols and limits. In
* all cases, changing them is only useful in very rare situations or
* for developers. If you edit any of these, be sure to do a *full*
* rebuild (and an initdb if noted).
*
* $Id: pg_config_manual.h,v 1.1 2003/04/06 22:45:23 petere Exp $
*------------------------------------------------------------------------
*/
/*
* Size of a disk block --- this also limits the size of a tuple. You
* can set it bigger if you need bigger tuples (although TOAST should
* reduce the need to have large tuples, since fields can be spread
* across multiple tuples).
*
* BLCKSZ must be a power of 2. The maximum possible value of BLCKSZ
* is currently 2^15 (32768). This is determined by the 15-bit widths
* of the lp_off and lp_len fields in ItemIdData (see
* include/storage/itemid.h).
*
* Changing BLCKSZ requires an initdb.
*/
#define BLCKSZ 8192
/*
* RELSEG_SIZE is the maximum number of blocks allowed in one disk
* file. Thus, the maximum size of a single file is RELSEG_SIZE *
* BLCKSZ; relations bigger than that are divided into multiple files.
*
* RELSEG_SIZE * BLCKSZ must be less than your OS' limit on file size.
* This is often 2 GB or 4GB in a 32-bit operating system, unless you
* have large file support enabled. By default, we make the limit 1
* GB to avoid any possible integer-overflow problems within the OS.
* A limit smaller than necessary only means we divide a large
* relation into more chunks than necessary, so it seems best to err
* in the direction of a small limit. (Besides, a power-of-2 value
* saves a few cycles in md.c.)
*
* Changing RELSEG_SIZE requires an initdb.
*/
#define RELSEG_SIZE (0x40000000 / BLCKSZ)
/*
* Maximum number of columns in an index and maximum number of
* arguments to a function. They must be the same value.
*
* The minimum value is 8 (index creation uses 8-argument functions).
* There is no specific upper limit, although large values will waste
* system-table space and processing time.
*
* Changing these requires an initdb.
*/
#define INDEX_MAX_KEYS 32
#define FUNC_MAX_ARGS INDEX_MAX_KEYS
/*
* Define this to make libpgtcl's "pg_result -assign" command process
* C-style backslash sequences in returned tuple data and convert
* PostgreSQL array values into Tcl lists. CAUTION: This conversion
* is *wrong* unless you install the routines in
* contrib/string/string_io to make the server produce C-style
* backslash sequences in the first place.
*/
/* #define TCL_ARRAYS */
/*
* User locks are handled totally on the application side as long term
* cooperative locks which extend beyond the normal transaction
* boundaries. Their purpose is to indicate to an application that
* someone is `working' on an item. Define this flag to enable user
* locks. You will need the loadable module user-locks.c to use this
* feature.
*/
#define USER_LOCKS
/*
* Define this if you want psql to _always_ ask for a username and a
* password for password authentication.
*/
/* #define PSQL_ALWAYS_GET_PASSWORDS */
/*
* Define this if you want to allow the lo_import and lo_export SQL
* functions to be executed by ordinary users. By default these
* functions are only available to the Postgres superuser. CAUTION:
* These functions are SECURITY HOLES since they can read and write
* any file that the PostgreSQL server has permission to access. If
* you turn this on, don't say we didn't warn you.
*/
/* #define ALLOW_DANGEROUS_LO_FUNCTIONS */
/*
* MAXPGPATH: standard size of a pathname buffer in PostgreSQL (hence,
* maximum usable pathname length is one less).
*
* We'd use a standard system header symbol for this, if there weren't
* so many to choose from: MAXPATHLEN, MAX_PATH, PATH_MAX are all
* defined by different "standards", and often have different values
* on the same platform! So we just punt and use a reasonably
* generous setting here.
*/
#define MAXPGPATH 1024
/*
* DEFAULT_MAX_EXPR_DEPTH: default value of max_expr_depth SET variable.
*/
#define DEFAULT_MAX_EXPR_DEPTH 10000
/*
* PG_SOMAXCONN: maximum accept-queue length limit passed to
* listen(2). You'd think we should use SOMAXCONN from
* <sys/socket.h>, but on many systems that symbol is much smaller
* than the kernel's actual limit. In any case, this symbol need be
* twiddled only if you have a kernel that refuses large limit values,
* rather than silently reducing the value to what it can handle
* (which is what most if not all Unixen do).
*/
#define PG_SOMAXCONN 10000
/*
* You can try changing this if you have a machine with bytes of
* another size, but no guarantee...
*/
#define BITS_PER_BYTE 8
/*
* Define this if your operating system supports AF_UNIX family
* sockets.
*/
#if !defined(__QNX__) && !defined(__BEOS__)
# define HAVE_UNIX_SOCKETS 1
#endif
/*
* This is the default directory in which AF_UNIX socket files are
* placed. Caution: changing this risks breaking your existing client
* applications, which are likely to continue to look in the old
* directory. But if you just hate the idea of sockets in /tmp,
* here's where to twiddle it. You can also override this at runtime
* with the postmaster's -k switch.
*/
#define DEFAULT_PGSOCKET_DIR "/tmp"
/*
* Defining this will make float4 and float8 operations faster by
* suppressing overflow/underflow checks.
*/
/* #define UNSAFE_FLOATS */
/*
* The random() function is expected to yield values between 0 and
* MAX_RANDOM_VALUE. Currently, all known implementations yield
* 0..2^31-1, so we just hardwire this constant. We could do a
* configure test if it proves to be necessary. CAUTION: Think not to
* replace this with RAND_MAX. RAND_MAX defines the maximum value of
* the older rand() function, which is often different from --- and
* considerably inferior to --- random().
*/
#define MAX_RANDOM_VALUE (0x7FFFFFFF)
/*
*------------------------------------------------------------------------
* The following symbols are for enabling debugging code, not for
* controlling user-visible features or resource limits.
*------------------------------------------------------------------------
*/
/*
* Define this to cause pfree()'d memory to be cleared immediately, to
* facilitate catching bugs that refer to already-freed values. XXX
* Right now, this gets defined automatically if --enable-cassert. In
* the long term it probably doesn't need to be on by default.
*/
#ifdef USE_ASSERT_CHECKING
#define CLOBBER_FREED_MEMORY
#endif
/*
* Define this to check memory allocation errors (scribbling on more
* bytes than were allocated). Right now, this gets defined
* automatically if --enable-cassert. In the long term it probably
* doesn't need to be on by default.
*/
#ifdef USE_ASSERT_CHECKING
#define MEMORY_CONTEXT_CHECKING
#endif
/*
* Define this to force all parse and plan trees to be passed through
* copyObject(), to facilitate catching errors and omissions in
* copyObject().
*/
/* #define COPY_PARSE_PLAN_TREES */
/*
* Enable debugging print statements for lock-related operations.
*/
/* #define LOCK_DEBUG */
/*
* Other debug #defines (documentation, anyone?)
*/
/* #define IPORTAL_DEBUG */
/* #define HEAPDEBUGALL */
/* #define ISTRATDEBUG */
/* #define ACLDEBUG */
/* #define RTDEBUG */
/* #define GISTDEBUG */
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1995, Regents of the University of California * Portions Copyright (c) 1995, Regents of the University of California
* *
* $Id: postgres.h,v 1.62 2002/10/18 20:33:57 tgl Exp $ * $Id: postgres.h,v 1.63 2003/04/06 22:45:23 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -130,6 +130,7 @@ typedef struct varattrib ...@@ -130,6 +130,7 @@ typedef struct varattrib
*/ */
typedef unsigned long Datum; /* XXX sizeof(long) >= sizeof(void *) */ typedef unsigned long Datum; /* XXX sizeof(long) >= sizeof(void *) */
#define SIZEOF_DATUM SIZEOF_UNSIGNED_LONG
typedef Datum *DatumPtr; typedef Datum *DatumPtr;
#define GET_1_BYTE(datum) (((Datum) (datum)) & 0x000000ff) #define GET_1_BYTE(datum) (((Datum) (datum)) & 0x000000ff)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment