diff --git a/configure b/configure index 7a96295d1d..9515829a9e 100755 --- a/configure +++ b/configure @@ -10637,7 +10637,7 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then _ACEOF else - SNPRINTF='snprintf.o' + SNPRINTF='$(top_builddir)/src/backend/port/snprintf.o' fi done @@ -10715,7 +10715,7 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then _ACEOF else - SNPRINTF='snprintf.o' + SNPRINTF='$(top_builddir)/src/backend/port/snprintf.o' fi done @@ -11465,7 +11465,7 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then _ACEOF else - STRERROR='strerror.o' + STRERROR='$(top_builddir)/src/backend/port/strerror.o' fi done @@ -11544,7 +11544,7 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then _ACEOF else - STRDUP='../../utils/strdup.o' + STRDUP='$(top_builddir)/src/utils/strdup.o' fi done @@ -12657,7 +12657,7 @@ echo $ECHO_N "checking whether snprintf handles 'long long int' as %lld... $ECHO echo "$as_me:$LINENO: result: assuming not on target machine" >&5 echo "${ECHO_T}assuming not on target machine" >&6 # Force usage of our own snprintf, since we cannot test foreign snprintf - SNPRINTF='snprintf.o' + SNPRINTF='$(top_builddir)/src/backend/port/snprintf.o' INT64_FORMAT='"%lld"' else @@ -12717,7 +12717,7 @@ echo $ECHO_N "checking whether snprintf handles 'long long int' as %qd... $ECHO_ echo "$as_me:$LINENO: result: assuming not on target machine" >&5 echo "${ECHO_T}assuming not on target machine" >&6 # Force usage of our own snprintf, since we cannot test foreign snprintf - SNPRINTF='snprintf.o' + SNPRINTF='$(top_builddir)/src/backend/port/snprintf.o' INT64_FORMAT='"%lld"' else @@ -12772,7 +12772,7 @@ cat conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 # Force usage of our own snprintf, since system snprintf is broken - SNPRINTF='snprintf.o' + SNPRINTF='$(top_builddir)/src/backend/port/snprintf.o' INT64_FORMAT='"%lld"' fi diff --git a/configure.in b/configure.in index 479c300cd8..3e96614af5 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -dnl $Header: /cvsroot/pgsql/configure.in,v 1.187 2002/07/07 20:28:24 momjian Exp $ +dnl $Header: /cvsroot/pgsql/configure.in,v 1.188 2002/07/15 21:34:04 momjian Exp $ dnl dnl Developers, please strive to achieve this order: dnl @@ -870,8 +870,8 @@ fi # have working "long long int" support -- see below. SNPRINTF='' -AC_CHECK_FUNCS(snprintf, [], SNPRINTF='snprintf.o') -AC_CHECK_FUNCS(vsnprintf, [], SNPRINTF='snprintf.o') +AC_CHECK_FUNCS(snprintf, [], SNPRINTF='$(top_builddir)/src/backend/port/snprintf.o') +AC_CHECK_FUNCS(vsnprintf, [], SNPRINTF='$(top_builddir)/src/backend/port/snprintf.o') AC_SUBST(SNPRINTF) @@ -913,9 +913,9 @@ AC_CHECK_FUNCS(random, [], MISSING_RANDOM='random.o') AC_SUBST(MISSING_RANDOM) AC_CHECK_FUNCS(inet_aton, [], INET_ATON='inet_aton.o') AC_SUBST(INET_ATON) -AC_CHECK_FUNCS(strerror, [], STRERROR='strerror.o') +AC_CHECK_FUNCS(strerror, [], STRERROR='$(top_builddir)/src/backend/port/strerror.o') AC_SUBST(STRERROR) -AC_CHECK_FUNCS(strdup, [], STRDUP='../../utils/strdup.o') +AC_CHECK_FUNCS(strdup, [], STRDUP='$(top_builddir)/src/utils/strdup.o') AC_SUBST(STRDUP) AC_CHECK_FUNCS(strtol, [], STRTOL='strtol.o') AC_SUBST(STRTOL) @@ -1093,17 +1093,17 @@ main() { ], [ AC_MSG_RESULT(no) # Force usage of our own snprintf, since system snprintf is broken - SNPRINTF='snprintf.o' + SNPRINTF='$(top_builddir)/src/backend/port/snprintf.o' INT64_FORMAT='"%lld"' ], [ AC_MSG_RESULT(assuming not on target machine) # Force usage of our own snprintf, since we cannot test foreign snprintf - SNPRINTF='snprintf.o' + SNPRINTF='$(top_builddir)/src/backend/port/snprintf.o' INT64_FORMAT='"%lld"' ]) ], [ AC_MSG_RESULT(assuming not on target machine) # Force usage of our own snprintf, since we cannot test foreign snprintf - SNPRINTF='snprintf.o' + SNPRINTF='$(top_builddir)/src/backend/port/snprintf.o' INT64_FORMAT='"%lld"' ]) else diff --git a/doc/FAQ_Solaris b/doc/FAQ_Solaris index f3703fda82..06f1525067 100644 --- a/doc/FAQ_Solaris +++ b/doc/FAQ_Solaris @@ -3,7 +3,7 @@ Frequently Asked Questions (FAQ) for PostgreSQL 7.2 Sun Solaris specific to be read in conjunction with the installation instructions ============================================================ -last updated: $Date: 2002/03/04 17:47:11 $ +last updated: $Date: 2002/07/15 21:34:04 $ current maintainer: Peter Eisentraut @@ -94,7 +94,7 @@ produced by configure: (1) In src/Makefile.global, change the line SNPRINTF = to read - SNPRINTF = snprintf.o + SNPRINTF = $(top_builddir)/src/backend/port/snprint.o (2) In src/backend/port/Makefile, add "snprintf.o" to OBJS. (Skip this step if you see "$(SNPRINTF)" already listed in OBJS.) diff --git a/src/backend/libpq/be-secure.c b/src/backend/libpq/be-secure.c index 5f63e61c5d..bfd5ffde15 100644 --- a/src/backend/libpq/be-secure.c +++ b/src/backend/libpq/be-secure.c @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.10 2002/06/20 20:29:28 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.11 2002/07/15 21:34:04 momjian Exp $ * * Since the server static private key ($DataDir/server.key) * will normally be stored unencrypted so that the database @@ -41,7 +41,7 @@ * * ... * - * Because the risk of cryptanalysis increases as large + * Because the risk of cryptanalysis increases as large * amounts of data are sent with the same session key, the * session keys are periodically renegotiated. * @@ -50,7 +50,7 @@ * [*] existing SSL code pulled out of existing files. * [*] SSL_get_error() after SSL_read() and SSL_write(), * SSL_shutdown(), default to TLSv1. - * + * * milestone 2: provide endpoint authentication (server) * [*] client verifies server cert * [*] client verifies server hostname @@ -100,7 +100,6 @@ #include #endif - #ifndef HAVE_STRDUP #include "strdup.h" #endif @@ -153,20 +152,20 @@ static SSL_CTX *SSL_context = NULL; * As discussed above, EDH protects the confidentiality of * sessions even if the static private key is compromised, * so we are *highly* motivated to ensure that we can use - * EDH even if the DBA... or an attacker... deletes the + * EDH even if the DBA... or an attacker... deletes the * $DataDir/dh*.pem files. * * We could refuse SSL connections unless a good DH parameter * file exists, but some clients may quietly renegotiate an * unsecured connection without fully informing the user. - * Very uncool. + * Very uncool. * * Alternately, the backend could attempt to load these files * on startup if SSL is enabled - and refuse to start if any * do not exist - but this would tend to piss off DBAs. * * If you want to create your own hardcoded DH parameters - * for fun and profit, review "Assigned Number for SKIP + * for fun and profit, review "Assigned Number for SKIP * Protocols" (http://www.skip-vpn.org/spec/numbers.html) * for suggestions. */ @@ -241,7 +240,7 @@ secure_destroy (void) /* * Attempt to negotiate secure session. */ -int +int secure_open_server (Port *port) { int r = 0; @@ -373,7 +372,7 @@ secure_write (Port *port, const void *ptr, size_t len) * Load precomputed DH parameters. * * To prevent "downgrade" attacks, we perform a number of checks - * to verify that the DBA-generated DH parameters file contains + * to verify that the DBA-generated DH parameters file contains * what we expect it to contain. */ static DH * @@ -415,7 +414,7 @@ load_dh_file (int keylength) elog(LOG, "DH error (%s): p is not prime", fnbuf); return NULL; } - if ((codes & DH_NOT_SUITABLE_GENERATOR) && + if ((codes & DH_NOT_SUITABLE_GENERATOR) && (codes & DH_CHECK_P_NOT_SAFE_PRIME)) { elog(LOG, @@ -520,7 +519,7 @@ tmp_dh_cb (SSL *s, int is_export, int keylength) elog(DEBUG1, "DH: generating parameters (%d bits)....", keylength); r = DH_generate_parameters(keylength, DH_GENERATOR_2, NULL, NULL); } - + return r; } @@ -585,7 +584,7 @@ initialize_SSL (void) { char fnbuf[2048]; struct stat buf; - + if (!SSL_context) { SSL_library_init(); @@ -648,7 +647,7 @@ initialize_SSL (void) fnbuf, SSLerrmessage()); ExitPostmaster(1); } - SSL_CTX_set_verify(SSL_context, + SSL_CTX_set_verify(SSL_context, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE, verify_cb); return 0; diff --git a/src/backend/port/Makefile b/src/backend/port/Makefile index 6979cf1973..c176a727b7 100644 --- a/src/backend/port/Makefile +++ b/src/backend/port/Makefile @@ -13,7 +13,7 @@ # be converted to Method 2. # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/backend/port/Makefile,v 1.13 2002/05/05 16:02:37 tgl Exp $ +# $Header: /cvsroot/pgsql/src/backend/port/Makefile,v 1.14 2002/07/15 21:34:04 momjian Exp $ # #------------------------------------------------------------------------- @@ -21,25 +21,22 @@ subdir = src/backend/port top_builddir = ../../.. include $(top_builddir)/src/Makefile.global -OBJS = dynloader.o pg_sema.o pg_shmem.o +OBJS=dynloader.o pg_sema.o pg_shmem.o -OBJS += $(GETHOSTNAME) $(GETRUSAGE) $(INET_ATON) $(ISINF) $(MEMCMP) \ - $(MISSING_RANDOM) $(SNPRINTF) $(SRANDOM) $(STRCASECMP) $(STRERROR) \ - $(STRTOL) $(STRTOUL) +OBJS+=$(GETHOSTNAME) $(GETRUSAGE) $(INET_ATON) $(ISINF) $(MEMCMP) \ + $(MISSING_RANDOM) $(SNPRINTF) $(SRANDOM) $(STRCASECMP) $(STRDUP) \ + $(STRERROR) $(STRTOL) $(STRTOUL) -OBJS += $(TAS) +OBJS+=$(TAS) -ifdef STRDUP -OBJS += $(top_builddir)/src/utils/strdup.o -endif ifeq ($(PORTNAME), qnx4) -OBJS += getrusage.o qnx4/SUBSYS.o +OBJS+=getrusage.o qnx4/SUBSYS.o endif ifeq ($(PORTNAME), beos) -OBJS += beos/SUBSYS.o +OBJS+=beos/SUBSYS.o endif ifeq ($(PORTNAME), darwin) -OBJS += darwin/SUBSYS.o +OBJS+=darwin/SUBSYS.o endif all: SUBSYS.o @@ -47,9 +44,6 @@ all: SUBSYS.o SUBSYS.o: $(OBJS) $(LD) $(LDREL) $(LDOUT) $@ $^ -$(top_builddir)/src/utils/strdup.o: - $(MAKE) -C $(top_builddir)/src/utils strdup.o - qnx4/SUBSYS.o: qnx4.dir qnx4.dir: diff --git a/src/bin/pg_dump/Makefile b/src/bin/pg_dump/Makefile index 3df5ff6d4a..1a19c71fc2 100644 --- a/src/bin/pg_dump/Makefile +++ b/src/bin/pg_dump/Makefile @@ -5,7 +5,7 @@ # Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.34 2002/07/06 20:12:30 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.35 2002/07/15 21:34:05 momjian Exp $ # #------------------------------------------------------------------------- @@ -14,21 +14,8 @@ top_builddir = ../../.. 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 sprompt.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 + pg_backup_files.o pg_backup_null.o pg_backup_tar.o sprompt.o \ + $(STRDUP) $(STRTOUL) override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) diff --git a/src/bin/psql/Makefile b/src/bin/psql/Makefile index 8a7416a89c..5baa463bbc 100644 --- a/src/bin/psql/Makefile +++ b/src/bin/psql/Makefile @@ -5,7 +5,7 @@ # Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.33 2002/07/06 20:12:30 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.34 2002/07/15 21:34:05 momjian Exp $ # #------------------------------------------------------------------------- @@ -17,42 +17,13 @@ REFDOCDIR= $(top_srcdir)/doc/src/sgml/ref override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) -OBJS=command.o common.o help.o input.o stringutils.o mainloop.o \ - copy.o startup.o prompt.o variables.o large_obj.o print.o describe.o \ - sprompt.o tab-complete.o mbprint.o +OBJS=command.o common.o help.o input.o stringutils.o mainloop.o copy.o \ + startup.o prompt.o variables.o large_obj.o print.o describe.o \ + sprompt.o tab-complete.o mbprint.o $(SNPRINTF) $(STRDUP) \ + $(STRERROR) $(STRTOUL) all: submake psql -ifdef STRDUP -OBJS+=$(top_builddir)/src/utils/strdup.o - -$(top_builddir)/src/utils/strdup.o: - $(MAKE) -C $(top_builddir)/src/utils strdup.o -endif - -# Move these to the utils directory? - -ifdef STRERROR -OBJS+=$(top_builddir)/src/backend/port/strerror.o - -$(top_builddir)/src/backend/port/strerror.o: - $(MAKE) -C $(top_builddir)/src/backend/port strerror.o -endif - -ifdef SNPRINTF -OBJS+=$(top_builddir)/src/backend/port/snprintf.o - -$(top_builddir)/src/backend/port/snprintf.o: - $(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 diff --git a/src/interfaces/ecpg/preproc/Makefile b/src/interfaces/ecpg/preproc/Makefile index 823ace5929..212b3cc8a6 100644 --- a/src/interfaces/ecpg/preproc/Makefile +++ b/src/interfaces/ecpg/preproc/Makefile @@ -1,4 +1,4 @@ -# $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.83 2002/03/11 12:56:02 meskes Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.84 2002/07/15 21:34:05 momjian Exp $ subdir = src/interfaces/ecpg/preproc top_builddir = ../../../.. @@ -18,24 +18,11 @@ override CFLAGS += -Wno-error endif OBJS=preproc.o pgc.o type.o ecpg.o ecpg_keywords.o output.o\ - keywords.o c_keywords.o ../lib/typename.o descriptor.o variable.o + keywords.o c_keywords.o ../lib/typename.o descriptor.o variable.o \ + $(SNPRINTF) $(STRDUP) all: ecpg -ifdef SNPRINTF -OBJS+=$(top_builddir)/src/backend/port/snprintf.o - -$(top_builddir)/src/backend/port/snprintf.o: - $(MAKE) -C $(top_builddir)/src/backend/port snprintf.o -endif - -ifdef STRDUP -OBJS+=$(top_builddir)/src/utils/strdup.o - -$(top_builddir)/src/utils/strdup.o: - $(MAKE) -C $(top_builddir)/src/utils strdup.o -endif - ecpg: $(OBJS) $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@ diff --git a/src/utils/Makefile b/src/utils/Makefile index dc2c2b4908..95a0fc11c6 100644 --- a/src/utils/Makefile +++ b/src/utils/Makefile @@ -2,7 +2,7 @@ # # Makefile for utils # -# $Header: /cvsroot/pgsql/src/utils/Attic/Makefile,v 1.9 2000/08/31 16:12:35 petere Exp $ +# $Header: /cvsroot/pgsql/src/utils/Attic/Makefile,v 1.10 2002/07/15 21:34:05 momjian Exp $ # # About strdup: Some systems have strdup in their standard library, others # don't. Ones that don't will use this make file to compile the strdup.c @@ -22,6 +22,8 @@ top_builddir = ../.. include $(top_builddir)/src/Makefile.global all: + # Nothing required here. These C files are compiled in + # directories as needed. clean distclean maintainer-clean: rm -f dllinit.o getopt.o strdup.o