Remove a bunch of unused configure tests, in particular cases where

* the result is not recorded anywhere
* the result is not used anywhere
* the result is only used in some places, whereas others have been getting away with it
* the result is used improperly

Also make command line options handling a little better (e.g., --disable-locale,
while redundant, should really still *dis*able).
This commit is contained in:
Peter Eisentraut 2000-07-12 22:59:15 +00:00
parent dce43d22f0
commit cb292206c5
20 changed files with 788 additions and 2136 deletions

2486
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -224,107 +224,124 @@ if test "$LIBRARY_DIRS" -o "$SRCH_LIB"; then
done
fi
##
## Command line options
##
AC_MSG_CHECKING(whether to support locale)
AC_ARG_ENABLE(
locale,
[ --enable-locale enable locale support ],
[AC_DEFINE(USE_LOCALE) AC_MSG_RESULT(enabled)],
AC_MSG_RESULT(disabled)
)
dnl We exclude cyrillic recode support unless we override it with
dnl --enable-recode to explicitly enable it
dnl It defaults to disabled
AC_MSG_CHECKING(whether to support cyrillic recode)
AC_ARG_ENABLE(
recode,
[ --enable-recode enable cyrillic recode support ],
[AC_DEFINE(CYR_RECODE) AC_MSG_RESULT(enabled)],
AC_MSG_RESULT(disabled)
)
#
# Locale (--enable-locale)
#
AC_MSG_CHECKING([whether to build with locale support])
AC_ARG_ENABLE(locale, [ --enable-locale enable locale support],
[if test x"$enable_locale" != x"no" ; then
enable_locale=yes
AC_DEFINE(USE_LOCALE, [], [Set to 1 if you want LOCALE support (--enable-locale)])
fi],
[enable_locale=no])
AC_MSG_RESULT([$enable_locale])
dnl Multibyte support
AC_MSG_CHECKING(whether to support multibyte)
AC_ARG_ENABLE(multibyte,
[ --enable-multibyte enable multibyte character support ],
[
MULTIBYTE=SQL_ASCII
if test "$enableval" != "yes"; then
case "$enableval" in
SQL_ASCII|EUC_JP|EUC_CN|EUC_KR|EUC_TW|UNICODE|MULE_INTERNAL|LATIN1|LATIN2|LATIN3|LATIN4|LATIN5|KOI8|WIN|ALT)
# ok
;;
*)
AC_MSG_ERROR(
[Argument to --enable-multibyte must be one of:
#
# Cyrillic recode (--enable-recode)
#
AC_MSG_CHECKING([whether to build with Cyrillic recode support])
AC_ARG_ENABLE(recode, [ --enable-recode enable cyrillic recode support],
[if test x"$enable_recode" != x"no" ; then
enable_recode=yes
AC_DEFINE(CYR_RECODE, [], [Set to 1 if you want cyrillic recode support (--enable-recode)])
fi],
[enable_recode=no])
AC_MSG_RESULT([$enable_recode])
#
# Multibyte support
#
MULTIBYTE=
AC_MSG_CHECKING([whether to build with multibyte character support])
AC_ARG_ENABLE(multibyte, [ --enable-multibyte enable multibyte character support],
[
case $enableval in
no) enable_multibyte=no;;
yes) enable_multibyte=yes; MULTIBYTE=SQL_ASCII;;
SQL_ASCII|EUC_JP|EUC_CN|EUC_KR|EUC_TW|UNICODE|MULE_INTERNAL|LATIN1|LATIN2|LATIN3|LATIN4|LATIN5|KOI8|WIN|ALT)
enable_multibyte=yes; MULTIBYTE=$enableval;;
*) AC_MSG_ERROR(
[argument to --enable-multibyte must be one of:
SQL_ASCII, EUC_JP, EUC_CN, EUC_KR, EUC_TW,
UNICODE, MULE_INTERNAL,
LATIN1, LATIN2, LATIN3, LATIN4, LATIN5,
KOI8, WIN, ALT
Or do not specify an argument to the option to use the default.])
esac
MULTIBYTE=$enableval
fi
AC_DEFINE(MULTIBYTE)
AC_MSG_RESULT(enabled)
],
AC_MSG_RESULT("disabled")
)
Or do not specify an argument to the option to use the default.]) ;;
esac
],
[enable_multibyte=no])
dnl Old option variant
if test "${with_mb}"; then
AC_MSG_ERROR([--with-mb is not supported anymore. Use --enable-multibyte instead.])
AC_SUBST(MULTIBYTE)
if test "$enable_multibyte" = yes ; then
AC_DEFINE(MULTIBYTE, [], [Set to 1 if you want to use multibyte characters (--enable-multibyte)])
AC_MSG_RESULT([yes, default $MULTIBYTE])
else
AC_MSG_RESULT(no)
fi
dnl We use the default value of 5432 for the DEF_PGPORT value. If
dnl we over-ride it with --with-pgport=port then we bypass this piece
AC_MSG_CHECKING(setting DEF_PGPORT)
AC_ARG_WITH(
pgport,
[ --with-pgport=PORTNUM change default postmaster port ],
[default_port="$withval"],
[default_port=5432]
)
dnl Need both of these because backend wants an integer and frontend a string
#
# Default port number (--with-pgport), default 5432
#
AC_MSG_CHECKING([for default port number])
AC_ARG_WITH(pgport, [ --with-pgport=PORTNUM change default port number [5432]],
[case $withval in
yes|no) AC_MSG_ERROR([You must supply an argument to the --with-pgport option]);;
*) default_port=$withval;;
esac
],
[default_port=5432])
# Need both of these because backend wants an integer and frontend a string
AC_DEFINE_UNQUOTED(DEF_PGPORT, ${default_port})
AC_DEFINE_UNQUOTED(DEF_PGPORT_STR, "${default_port}")
AC_MSG_RESULT(${default_port})
AC_MSG_RESULT([$default_port])
dnl DEF_MAXBACKENDS can be set by --with-maxbackends. Default value is 32.
AC_MSG_CHECKING(setting DEF_MAXBACKENDS)
AC_ARG_WITH(
maxbackends,
[ --with-maxbackends=N set default maximum number of server processes ],
AC_DEFINE_UNQUOTED(DEF_MAXBACKENDS, ${withval}) AC_MSG_RESULT($with_maxbackends),
AC_DEFINE_UNQUOTED(DEF_MAXBACKENDS, 32) AC_MSG_RESULT(32)
)
#
# Maximum number of allowed connections (--with-maxbackends), default 32
#
AC_MSG_CHECKING([for default soft limit on number of connections])
AC_ARG_WITH(maxbackends, [ --with-maxbackends=N set default maximum number of connections [32]],
[case $withval in
yes|no) AC_MSG_ERROR([You must supply an argument to the --with-maxbackends option]);;
esac],
[with_maxbackends=32])
AC_MSG_RESULT([$with_maxbackends])
AC_DEFINE_UNQUOTED(DEF_MAXBACKENDS, [$with_maxbackends], [The default soft limit on the number of concurrent connections, i.e., the default for the postmaster -N switch (--with-maxbackends)])
dnl Check for C support (allow override if needed)
dnl Note: actually, setting CC environment variable works just as well.
AC_ARG_WITH(CC,
[ --with-CC=compiler use specific C compiler],
[
case "$withval" in
"" | y | ye | yes | n | no)
AC_MSG_ERROR([*** You must supply an argument to the --with-CC option.])
;;
esac
CC="$withval"
])
#
# For historical reasons you can also use --with-CC to specify the C compiler
# to use, although the standard way to do this is to set the CC environment
# variable.
#
if test "${with_CC+set}" = set; then
case $with_CC in
yes | no) AC_MSG_ERROR([You must supply an argument to the --with-CC option.]);;
*) CC=$with_CC;;
esac
fi
dnl Find a compiler if CC is not already set.
#
# C compiler
#
AC_PROG_CC
dnl Find CPP, then check traditional.
dnl Caution: these macros must be called in this order...
AC_PROG_CPP
AC_PROG_GCC_TRADITIONAL
AC_SUBST(GCC)
#
# Create compiler version string
#
if test x"$GCC" = x"yes" ; then
cc_string="GCC `${CC} --version`"
else
@ -671,7 +688,6 @@ AC_SUBST(DL_LIB)
AC_SUBST(USE_TCL)
AC_SUBST(USE_TK)
AC_SUBST(WISH)
AC_SUBST(MULTIBYTE)
dnl
@ -748,6 +764,10 @@ AC_PROG_YACC
AC_SUBST(YFLAGS)
##
## Libraries
##
AC_CHECK_LIB(sfio, main)
AC_CHECK_LIB(ncurses, main, [], [AC_CHECK_LIB(curses, main)])
AC_CHECK_LIB(termcap, main)
@ -795,31 +815,14 @@ if test "$with_openssl" = yes ; then
fi
dnl
dnl Checks for header files.
dnl
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(arpa/inet.h)
AC_CHECK_HEADERS(crypt.h)
AC_CHECK_HEADERS(dld.h)
AC_CHECK_HEADERS(endian.h)
AC_CHECK_HEADERS(float.h)
AC_CHECK_HEADERS(fp_class.h)
AC_CHECK_HEADERS(getopt.h)
AC_CHECK_HEADERS(ieeefp.h)
AC_CHECK_HEADERS(limits.h)
AC_CHECK_HEADERS(netdb.h)
AC_CHECK_HEADERS(netinet/in.h)
##
## Header files
##
dnl sys/socket.h and sys/types.h are required by AC_FUNC_ACCEPT_ARGTYPES
AC_CHECK_HEADERS([crypt.h dld.h endian.h fp_class.h getopt.h ieeefp.h pwd.h sys/pstat.h sys/select.h sys/socket.h sys/types.h termios.h values.h])
AC_CHECK_HEADERS([readline/readline.h readline.h], [break])
AC_CHECK_HEADERS([readline/history.h history.h], [break])
AC_CHECK_HEADERS(sys/select.h)
AC_CHECK_HEADERS(termios.h)
AC_CHECK_HEADERS(unistd.h)
AC_CHECK_HEADERS(values.h)
AC_CHECK_HEADERS(sys/pstat.h)
AC_CHECK_HEADERS(sys/types.h sys/socket.h)
AC_CHECK_HEADERS(sys/param.h pwd.h)
if test "$with_krb4" = yes ; then
AC_CHECK_HEADER(krb.h, [], [AC_MSG_ERROR([header file <krb.h> is required for Kerberos 4])])
@ -836,27 +839,25 @@ if test "$with_openssl" = yes ; then
fi
dnl
dnl Checks for typedefs, structures, and compiler characteristics.
dnl
##
## Types, structures, compiler characteristics
##
AC_C_CONST
AC_C_INLINE
AC_C_STRINGIZE
AC_TYPE_UID_T
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_STRUCT_TIMEZONE
PGAC_C_SIGNED
PGAC_C_VOLATILE
AC_FUNC_ACCEPT_ARGTYPES
PGAC_VAR_INT_TIMEZONE
PGAC_FUNC_GETTIMEOFDAY_1ARG
AC_STRUCT_TIMEZONE
PGAC_UNION_SEMUN
##
## Functions, global variables
##
PGAC_VAR_INT_TIMEZONE
AC_FUNC_ACCEPT_ARGTYPES
PGAC_FUNC_GETTIMEOFDAY_1ARG
AC_MSG_CHECKING(for fcntl(F_SETLK))
if test "$os" != linux ; then
AC_TRY_LINK([#include <stdio.h>
@ -871,13 +872,7 @@ else
AC_MSG_RESULT([broken on Linux])
fi
dnl Checks for library functions.
AC_FUNC_MEMCMP
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(memmove sysconf)
AC_CHECK_FUNCS(sigprocmask waitpid setsid fcvt)
AC_CHECK_FUNCS(setproctitle pstat)
AC_CHECK_FUNCS([fcvt getopt_long memmove pstat setproctitle setsid sigprocmask sysconf waitpid])
AC_CACHE_CHECK([for PS_STRINGS], [pgac_cv_var_PS_STRINGS],
[AC_TRY_LINK(
@ -892,7 +887,6 @@ if test "$pgac_cv_var_PS_STRINGS" = yes ; then
AC_DEFINE([HAVE_PS_STRINGS], [], [Define if the PS_STRINGS thing exists.])
fi
AC_CHECK_FUNCS(fpclass fp_class fp_class_d class)
dnl We use our snprintf.c emulation if either snprintf() or vsnprintf()
dnl is missing. Yes, there are machines that have only one.
dnl We may also decide to use snprintf.c if snprintf() is present but does
@ -914,24 +908,26 @@ dnl declares vsnprintf() but not snprintf(). Hopefully there are no
dnl systems that are *that* brain-damaged...
AC_EGREP_HEADER(snprintf, stdio.h, AC_DEFINE(HAVE_SNPRINTF_DECL))
AC_EGREP_HEADER(vsnprintf, stdio.h, AC_DEFINE(HAVE_VSNPRINTF_DECL))
dnl
dnl do this one the hard way in case isinf() is a macro
AC_MSG_CHECKING(for isinf)
AC_CACHE_VAL(ac_cv_func_or_macro_isinf,
# do this one the hard way in case isinf() is a macro
AC_CACHE_CHECK([for isinf], ac_cv_func_isinf,
[AC_TRY_LINK(
[#include <math.h>],
[#include <math.h>
],
[double x = 0.0; int res = isinf(x);],
[ac_cv_func_or_macro_isinf=yes],
[ac_cv_func_or_macro_isinf=no])])
if [[ $ac_cv_func_or_macro_isinf = yes ]]; then
AC_MSG_RESULT(yes)
[ac_cv_func_isinf=yes],
[ac_cv_func_isinf=no])])
if test $ac_cv_func_isinf = yes ; then
AC_DEFINE(HAVE_ISINF)
ISINF=''
ISINF=
else
AC_MSG_RESULT(no)
ISINF='isinf.o'
# Look for a way to implement a substitute for isinf()
AC_CHECK_FUNCS([fpclass fp_class fp_class_d class], [break])
fi
AC_SUBST(ISINF)
AC_CHECK_FUNC(getrusage,
AC_DEFINE(HAVE_GETRUSAGE),
GETRUSAGE='getrusage.o')
@ -1011,8 +1007,6 @@ AC_CHECK_FUNCS(filename_completion_function,
AC_SUBST(HAVE_FILENAME_COMPLETION_FUNCTION)
AC_SUBST(HAVE_FILENAME_COMPLETION_FUNCTION_DECL)
dnl Check for GNU style long options support (getopt_long)
AC_CHECK_FUNCS(getopt_long)
dnl Cannot use AC_CHECK_FUNC because finite may be a macro
AC_MSG_CHECKING(for finite)

View File

@ -1,3 +1,5 @@
#include "postgres.h"
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
@ -6,17 +8,15 @@
#include <math.h>
#include "postgres.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
#ifndef MAXINT
#define MAXINT INT_MAX
#endif
#else
#ifdef HAVE_VALUES_H
#include <values.h>
#endif
#endif
#include "fmgr.h"
#include "utils/timestamp.h"
#include "utils/builtins.h"

View File

@ -1,5 +1,5 @@
/*
* $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.4 2000/05/29 05:44:29 tgl Exp $
* $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.5 2000/07/12 22:58:57 petere Exp $
*
* pgbench: a simple TPC-B like benchmark program for PostgreSQL
* written by Tatsuo Ishii
@ -30,9 +30,7 @@
#include "win32.h"
#else
#include <sys/time.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_GETOPT_H
#include <getopt.h>

View File

@ -9,7 +9,7 @@
* Dec 17, 1997 - Todd A. Brandys
* Orignal Version Completed.
*
* $Id: crypt.c,v 1.27 2000/07/04 16:31:53 petere Exp $
* $Id: crypt.c,v 1.28 2000/07/12 22:58:59 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -23,7 +23,7 @@
#include "utils/nabstime.h"
#ifdef HAVE_CRYPT_H
#include "crypt.h"
#include <crypt.h>
#endif
char **pwd_cache = NULL;

View File

@ -16,7 +16,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: pqformat.c,v 1.14 2000/07/08 05:30:33 tgl Exp $
* $Id: pqformat.c,v 1.15 2000/07/12 22:58:59 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -48,9 +48,7 @@
#include "postgres.h"
#include <errno.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#include "libpq/libpq.h"
#include "libpq/pqformat.h"
@ -58,7 +56,7 @@
#include "mb/pg_wchar.h"
#endif
#ifdef HAVE_ENDIAN_H
#include "endian.h"
#include <endian.h>
#endif
#ifndef BYTE_ORDER

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo_eval.c,v 1.51 2000/06/28 03:31:45 tgl Exp $
* $Id: geqo_eval.c,v 1.52 2000/07/12 22:59:01 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -22,13 +22,10 @@
#include "postgres.h"
#include <math.h>
#ifdef HAVE_LIMITS_H
#include <limits.h>
#else
#ifdef HAVE_VALUES_H
#include <values.h>
#endif
#endif
#include "optimizer/geqo.h"
#include "optimizer/pathnode.h"

View File

@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.155 2000/07/12 17:38:42 petere Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.156 2000/07/12 22:59:04 petere Exp $
*
* NOTES
*
@ -49,17 +49,12 @@
#include <sys/param.h>
/* moved here to prevent double define */
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef HAVE_LIMITS_H
#include <limits.h>
#else
#ifdef HAVE_VALUES_H
#include <values.h>
#endif
#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
@ -87,10 +82,6 @@
#include "utils/guc.h"
#if !defined(MAXINT)
#define MAXINT INT_MAX
#endif
#define INVALID_SOCK (-1)
#define ARGV_SIZE 64
@ -166,7 +157,7 @@ int MaxBackends = DEF_MAXBACKENDS;
* semaphores, even if you never actually use that many backends.
*/
static int NextBackendTag = MAXINT; /* XXX why count down not up? */
static int NextBackendTag = INT_MAX; /* XXX why count down not up? */
static char *progname = (char *) NULL;
static char **real_argv;
static int real_argc;

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.48 2000/06/19 03:54:27 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.49 2000/07/12 22:59:08 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -17,9 +17,7 @@
#include <limits.h>
#include <time.h>
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
#include "access/hash.h"
#include "miscadmin.h"

View File

@ -8,22 +8,20 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.50 2000/06/14 18:17:42 petere Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.51 2000/07/12 22:59:08 petere Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include <ctype.h>
#include <math.h>
#include <sys/types.h>
#include <errno.h>
#include "postgres.h"
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifndef USE_POSIX_TIME
#include <sys/timeb.h>
#endif

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.63 2000/07/06 05:48:11 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.64 2000/07/12 22:59:08 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -53,16 +53,10 @@
#include "postgres.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
#ifndef MAXINT
#define MAXINT INT_MAX
#endif
#else
#ifdef HAVE_VALUES_H
#include <values.h>
#endif
#endif
/* for finite() on Solaris */
#ifdef HAVE_IEEEFP_H

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.39 2000/07/03 23:09:52 wieck Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.40 2000/07/12 22:59:08 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -27,13 +27,10 @@
* intmod, int4fac
*/
#include <ctype.h>
#include "postgres.h"
#ifdef HAVE_LIMITS_H
#include <ctype.h>
#include <limits.h>
#endif
#include "utils/builtins.h"

View File

@ -7,20 +7,17 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int8.c,v 1.22 2000/07/03 23:09:52 wieck Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int8.c,v 1.23 2000/07/12 22:59:09 petere Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include <ctype.h>
#include <time.h>
#include <math.h>
#include <float.h>
#include "postgres.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#include "utils/int8.h"

View File

@ -9,32 +9,24 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.71 2000/07/03 23:09:52 wieck Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.72 2000/07/12 22:59:09 petere Exp $
*
* NOTES
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include <ctype.h>
#include <time.h>
#include <sys/time.h>
#include <sys/types.h>
#include "postgres.h"
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
#ifdef HAVE_LIMITS_H
#include <limits.h>
#ifndef MAXINT
#define MAXINT INT_MAX
#endif
#else
#ifdef HAVE_VALUES_H
#include <values.h>
#endif
#endif
#ifndef USE_POSIX_TIME
#include <sys/timeb.h>

View File

@ -11,17 +11,16 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.40 2000/04/12 17:15:51 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.41 2000/07/12 22:59:09 petere Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include <errno.h>
#include <math.h>
#include "postgres.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#include "utils/builtins.h"
#ifndef INT_MAX

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.32 2000/07/05 23:11:35 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.33 2000/07/12 22:59:09 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -19,12 +19,9 @@
#include <math.h>
#include <errno.h>
#include <sys/types.h>
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifndef USE_POSIX_TIME
#include <sys/timeb.h>
#endif

View File

@ -4,33 +4,27 @@
* Functions for the built-in type bit() and varying bit().
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.4 2000/07/03 23:09:53 wieck Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.5 2000/07/12 22:59:09 petere Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
/* Include file list stolen from float.c.
* Can probably get rid of some of these.
* - thomas 2000-04-07
*/
#include <ctype.h>
#include <errno.h>
#include <float.h> /* faked on sunos4 */
#include <math.h>
#include "postgres.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
#ifndef MAXINT
#define MAXINT INT_MAX
#endif
#else
#ifdef HAVE_VALUES_H
#include <values.h>
#endif
#endif
#include "fmgr.h"
#include "utils/builtins.h"
#include "utils/varbit.h"

View File

@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: c.h,v 1.77 2000/07/12 17:38:53 petere Exp $
* $Id: c.h,v 1.78 2000/07/12 22:59:12 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -46,15 +46,12 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/fcntl.h>
#ifdef STDC_HEADERS
#include <stddef.h>
#include <stdarg.h>
#endif
#ifdef __CYGWIN32__
#include <errno.h>

View File

@ -8,7 +8,7 @@
* or in config.h afterwards. Of course, if you edit config.h, then your
* changes will be overwritten the next time you run configure.
*
* $Id: config.h.in,v 1.125 2000/07/11 14:30:30 momjian Exp $
* $Id: config.h.in,v 1.126 2000/07/12 22:59:12 petere Exp $
*/
#ifndef CONFIG_H
@ -291,9 +291,6 @@
/* Define if your cpp understands the ANSI stringizing operators in macros */
#undef HAVE_STRINGIZE
/* Set to 1 if you have <arpa/inet.h> */
#undef HAVE_ARPA_INET_H
/* Set to 1 if you have <crypt.h> */
#undef HAVE_CRYPT_H
@ -303,9 +300,6 @@
/* Set to 1 if you have <endian.h> */
#undef HAVE_ENDIAN_H
/* Set to 1 if you have <float.h> */
#undef HAVE_FLOAT_H
/* Set to 1 if you have <fp_class.h> */
#undef HAVE_FP_CLASS_H
@ -318,15 +312,6 @@
/* Set to 1 if you have <ieeefp.h> */
#undef HAVE_IEEEFP_H
/* Set to 1 if you have <limits.h> */
#undef HAVE_LIMITS_H
/* Set to 1 if you have <netdb.h> */
#undef HAVE_NETDB_H
/* Set to 1 if you have <netinet/in.h> */
#undef HAVE_NETINET_IN_H
/* Set to 1 if you have <readline.h> */
#undef HAVE_READLINE_H
@ -345,18 +330,9 @@
/* Set to 1 if you have <values.h> */
#undef HAVE_VALUES_H
/* Set to 1 if you have <sys/exec.h> */
#undef HAVE_SYS_EXEC_H
/* Set to 1 if you have <sys/pstat.h> */
#undef HAVE_SYS_PSTAT_H
/* Set to 1 if you have <machine/vmparam.h> */
#undef HAVE_MACHINE_VMPARAM_H
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if you have the setproctitle function. */
#undef HAVE_SETPROCTITLE
@ -375,9 +351,6 @@
/* Set to 1 if you have <pwd.h> */
#undef HAVE_PWD_H
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Set to 1 if you gettimeofday(a,b) vs gettimeofday(a) */
#undef GETTIMEOFDAY_1ARG
#ifdef GETTIMEOFDAY_1ARG

View File

@ -1,19 +1,14 @@
#ifndef VARBIT_H
#define VARBIT_H
#include <math.h>
#include "postgres.h"
#ifdef HAVE_LIMITS_H
#include <math.h>
#include <limits.h>
#ifndef MAXINT
#define MAXINT INT_MAX
#endif
#else
#ifdef HAVE_VALUES_H
#include <values.h>
#endif
#endif
#include "utils/builtins.h"
@ -26,6 +21,7 @@ struct varbita
bits8 vl_dat[1];
};
#undef BITSPERBYTE /* sometimes declared in <values.h> */
#define BITSPERBYTE 8
#define VARBITHDRSZ sizeof(int32)
/* Number of bits in this bit string */