-#line 7398 "configure"
+#line 7524 "configure"
#include "confdefs.h"
#include
struct { char filler; double field; } mystruct;
exit(0);
}
EOF
-if { (eval echo configure:7410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
pgac_cv_alignof_double=`cat conftestval`
else
echo $ac_n "checking for POSIX signal interface""... $ac_c" 1>&6
-echo "configure:7448: checking for POSIX signal interface" >&5
+echo "configure:7574: checking for POSIX signal interface" >&5
if eval "test \"`echo '$''{'pgac_cv_func_posix_signals'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
-#line 7453 "configure"
+#line 7579 "configure"
#include "confdefs.h"
#include
sigaction(0, &act, &oact);
; return 0; }
EOF
-if { (eval echo configure:7464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
pgac_cv_func_posix_signals=yes
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7494: checking for $ac_word" >&5
+echo "configure:7620: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
done
echo $ac_n "checking for tclConfig.sh""... $ac_c" 1>&6
-echo "configure:7530: checking for tclConfig.sh" >&5
+echo "configure:7656: checking for tclConfig.sh" >&5
# Let user override test
if test -z "$TCL_CONFIG_SH"; then
pgac_test_dirs="$with_tclconfig"
# Check for Tk configuration script tkConfig.sh
if test "$with_tk" = yes; then
echo $ac_n "checking for tkConfig.sh""... $ac_c" 1>&6
-echo "configure:7563: checking for tkConfig.sh" >&5
+echo "configure:7689: checking for tkConfig.sh" >&5
# Let user override test
if test -z "$TK_CONFIG_SH"; then
pgac_test_dirs="$with_tkconfig $with_tclconfig"
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7602: checking for $ac_word" >&5
+echo "configure:7728: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NSGMLS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7638: checking for $ac_word" >&5
+echo "configure:7764: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_JADE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for DocBook V3.1""... $ac_c" 1>&6
-echo "configure:7669: checking for DocBook V3.1" >&5
+echo "configure:7795: checking for DocBook V3.1" >&5
if eval "test \"`echo '$''{'pgac_cv_check_docbook'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for DocBook stylesheets""... $ac_c" 1>&6
-echo "configure:7702: checking for DocBook stylesheets" >&5
+echo "configure:7828: checking for DocBook stylesheets" >&5
if eval "test \"`echo '$''{'pgac_cv_path_stylesheets'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7741: checking for $ac_word" >&5
+echo "configure:7867: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_SGMLSPL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
dnl Check whether declares fdatasync().
AC_EGREP_HEADER(fdatasync, unistd.h, AC_DEFINE(HAVE_FDATASYNC_DECL))
+dnl Check whether declares optarg
+AC_EGREP_HEADER(optarg, unistd.h, AC_DEFINE(HAVE_OPTARG_DECL))
+
AC_CACHE_CHECK([for PS_STRINGS], [pgac_cv_var_PS_STRINGS],
[AC_TRY_LINK(
[#include
AC_CHECK_FUNCS([strtoll strtoq], [break])
AC_CHECK_FUNCS([strtoull strtouq], [break])
+dnl psql needs atexit() or on_exit()
+AC_CHECK_FUNC(atexit,
+ [AC_DEFINE(HAVE_ATEXIT)],
+ [AC_CHECK_FUNCS(on_exit,
+ [AC_DEFINE(HAVE_ON_EXIT)],
+ [AC_MSG_ERROR([atexi() nor on_exit() found])])])
dnl Need a #define for the size of Datum (unsigned long)
# -*-makefile-*-
-# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.119 2001/02/20 19:20:28 petere Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.120 2001/02/27 08:13:29 ishii Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
STRERROR = @STRERROR@
SNPRINTF = @SNPRINTF@
STRDUP = @STRDUP@
+STRTOUL = @STRTOUL@
##########################################################################
# Copyright (c) 1998, Regents of the University of California
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.45 2001/02/20 19:20:28 petere Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.46 2001/02/27 08:13:29 ishii Exp $
#
#-------------------------------------------------------------------------
SHLIB_LINK += -lm -lc
endif
+ifeq ($(PORTNAME), sunos4)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ LINK.shared = $(LD) -assert pure-text -Bdynamic
+endif
+
ifeq ($(PORTNAME), osf)
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LINK.shared = $(LD) -shared -expect_unresolved '*'
/* -----------------------------------------------------------------------
* formatting.c
*
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.32 2001/02/12 12:52:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.33 2001/02/27 08:13:28 ishii Exp $
*
*
* Portions Copyright (c) 1999-2000, PostgreSQL Global Development Group
{
char b[16];
- return sprintf(b, "%d", num);
+ return snprintf(b, sizeof(b), "%d", num);
}
/* ----------
fill_str(result, '#', 15);
return result;
}
- len = sprintf(numstr, "%d", number);
+ len = snprintf(numstr, sizeof(numstr), "%d", number);
for (p = numstr; *p != '\0'; p++, --len)
{
Np->inout_p += strlen(Np->inout_p) - 1;
}
else
- Np->inout_p += sprintf(Np->inout_p, "%15s", Np->number_p) - 1;
+ Np->inout_p += snprintf(Np->inout_p, plen - (Np->inout_p - Np->inout), "%15s", Np->number_p) - 1;
break;
case NUM_rn:
Np->inout_p += strlen(Np->inout_p) - 1;
}
else
- Np->inout_p += sprintf(Np->inout_p, "%15s", str_tolower(Np->number_p)) - 1;
+ Np->inout_p += snprintf(Np->inout_p, plen - (Np->inout_p - Np->inout), "%15s", str_tolower(Np->number_p)) - 1;
break;
case NUM_th:
# Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.29 2001/02/20 19:20:28 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.30 2001/02/27 08:13:28 ishii Exp $
#
#-------------------------------------------------------------------------
include $(top_builddir)/src/Makefile.global
OBJS= pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o pg_backup_files.o \
- pg_backup_null.o pg_backup_tar.o $(STRDUP)
+ pg_backup_null.o pg_backup_tar.o
+
+ifdef STRDUP
+OBJS+=$(top_builddir)/src/utils/strdup.o
+
+$(top_builddir)/src/utils/strdup.o:
+ $(MAKE) -C $(top_builddir)/src/utils strdup.o
+endif
+
+ifdef STRTOUL
+OBJS+=$(top_builddir)/src/backend/port/strtoul.o
+
+$(top_builddir)/src/backend/port/strtoul.o:
+ $(MAKE) -C $(top_builddir)/src/backend/port strtoul.o
+endif
override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
pg_restore: pg_restore.o $(OBJS) $(libpq_builddir)/libpq.a
$(CC) $(CFLAGS) pg_restore.o $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@
-../../utils/strdup.o:
- $(MAKE) -C ../../utils strdup.o
-
pg_dumpall: pg_dumpall.sh
sed -e 's,@VERSION@,$(VERSION),g' \
-e 's,@MULTIBYTE@,$(MULTIBYTE),g' \
#ifdef HAVE_GETOPT_H
#include
#else
+#ifdef HAVE_OPTARG_DECL
#include
-#endif
+#else
+extern char *optarg;
+extern int optind, opterr, optopt;
+#endif /* HAVE_OPTARG_DECL */
+#endif /* HAVE_GETOPT_H */
/* Forward decls */
static void usage(const char *progname);
*
* Copyright (C) 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.17 2001/02/10 02:31:27 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.18 2001/02/27 08:13:28 ishii Exp $
*/
#include "postgres_fe.h"
#ifdef HAVE_GETOPT_H
#include
-#endif
+#else
+#ifdef HAVE_OPTARG_DECL
+#include
+#else
+extern char *optarg;
+extern int optind, opterr, optopt;
+#endif /* HAVE_OPTARG_DECL */
+#endif /* HAVE_GETOPT_H */
+
#include
#include
# Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.29 2001/02/20 19:20:29 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.30 2001/02/27 08:13:27 ishii Exp $
#
#-------------------------------------------------------------------------
$(MAKE) -C $(top_builddir)/src/backend/port snprintf.o
endif
+ifdef STRTOUL
+OBJS+=$(top_builddir)/src/backend/port/strtoul.o
+
+$(top_builddir)/src/backend/port/strtoul.o:
+ $(MAKE) -C $(top_builddir)/src/backend/port strtoul.o
+endif
+
# End of hacks for picking up backend 'port' modules
psql: $(OBJS) $(libpq_builddir)/libpq.a
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.15 2001/02/10 02:31:28 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.16 2001/02/27 08:13:27 ishii Exp $
*/
#include "postgres_fe.h"
#include "input.h"
}
#endif
+#ifdef HAVE_ATEXIT
atexit(finishInput);
+#else
+ on_exit(finishInput);
+#endif
}
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.15 2001/02/10 02:31:28 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.16 2001/02/27 08:13:27 ishii Exp $
*/
#include "postgres_fe.h"
#include "print.h"
#include "pqsignal.h"
#include "libpq-fe.h"
+#include "settings.h"
+
#ifndef __CYGWIN__
#define DEFAULT_PAGER "more"
#else
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.27 2001/02/10 02:31:28 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.28 2001/02/27 08:13:27 ishii Exp $
*/
#include "postgres_fe.h"
#include "stringutils.h"
+#include "settings.h"
#include
* 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.158 2001/02/18 04:39:42 tgl Exp $
+ * $Id: config.h.in,v 1.159 2001/02/27 08:13:27 ishii Exp $
*/
#ifndef CONFIG_H
/* Set to 1 if you have getopt_long() (GNU long options) */
#undef HAVE_GETOPT_LONG
+/* Set to 1 if optarg is declared in unistd.h */
+#undef HAVE_OPTARG_DECL
+
/* Set to 1 if you have union semun */
#undef HAVE_UNION_SEMUN
# define HAVE_STRTOULL 1
#endif
+/* Define if you have atexit() */
+#undef HAVE_ATEXIT
+
+/* Define if you have on_exit() */
+#undef HAVE_ON_EXIT
/*
*------------------------------------------------------------------------
#ifdef HAVE_GETOPT_H
#include "getopt.h"
+#else
+extern char *optarg;
+extern int optind, opterr, optopt;
#endif
#include "extern.h"
DLSUFFIX = .so
ifeq ($(GCC), yes)
-CFLAGS_SL = -fPIC
+CFLAGS_SL = -fpic
else
CFLAGS_SL = -PIC
endif
endif
%.so: %.o
- $(LD) -dc -dp -Bdynamic -o $@ $<
+ $(LD) -assert pure-text -Bdynamic -o $@ $<
+