1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-18 17:42:25 +03:00

Substituted new configure test for types of accept()

Interfaced a lot of the custom tests to the config.cache, in the process
made them separate macros and grouped them out into files. Made naming
adjustments.

Removed a couple of useless/unused configure tests.

Disabled C++ by default. C++ is no more special than Perl, Python, and Tcl.
And it breaks equally often. :(
This commit is contained in:
Peter Eisentraut
2000-06-11 11:40:09 +00:00
parent b4182b1327
commit 06cd0f1a32
16 changed files with 1609 additions and 1027 deletions

View File

@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.76 2000/06/10 18:01:36 petere Exp $
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.77 2000/06/11 11:39:47 petere Exp $
#
# NOTES
# Essentially all Postgres make files include this file and use the
@ -99,9 +99,6 @@ ODBCINST= $(POSTGRESDIR)
# To disable a feature, comment out the entire definition
# (that is, prepend '#', don't set it to "0" or "no").
# Compile libpq++
HAVE_Cplusplus=@HAVECXX@
# Comment out ENFORCE_ALIGNMENT if you do NOT want unaligned access to
# multi-byte types to generate a bus error.
ENFORCE_ALIGNMENT= true
@ -170,22 +167,6 @@ INSTL_EXE_OPTS= @INSTL_EXE_OPTS@
INSTL_LIB_OPTS= @INSTL_LIB_OPTS@
INSTL_SHLIB_OPTS= @INSTL_SHLIB_OPTS@
##############################################################################
#
# For building shell scripts:
#
# For many ports, these are overridden below.
# DASH_N is what we put before the text on an echo command when we don't
# want a trailing newline. BACKSLASH_C is what we put at the end of the
# string on a echo command when we don't want a trailing newline. On
# some systems, you do echo -n "no newline after this", while on others
# you do echo "no newline after this\c".
DASH_N= @DASH_N@
BACKSLASH_C= @BACKSLASH_C@
#-------------------------------------------------------------
# See the subdirectory template for default settings for these
@ -193,6 +174,7 @@ BACKSLASH_C= @BACKSLASH_C@
CC= @CC@
CPP= @CPP@
YACC= @YACC@
YFLAGS = @YFLAGS@
LEX= @LEX@
AROPT= @AROPT@
CFLAGS= -I$(SRCDIR)/include @CPPFLAGS@ @CFLAGS@
@ -275,7 +257,9 @@ ifneq ($(CUSTOM_COPT),)
COPT= $(CUSTOM_COPT)
endif
ifeq ($(CC), gcc)
GCC = @GCC@
ifeq ($(GCC), yes)
CFLAGS+= -Wall -Wmissing-prototypes -Wmissing-declarations
endif

View File

@ -29,7 +29,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: pqcomm.c,v 1.96 2000/06/06 16:04:29 petere Exp $
* $Id: pqcomm.c,v 1.97 2000/06/11 11:39:50 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -315,7 +315,7 @@ StreamServerPort(int family, unsigned short portName, int *fdP)
int
StreamConnection(int server_fd, Port *port)
{
SOCKET_SIZE_TYPE addrlen;
ACCEPT_TYPE_ARG3 addrlen;
/* accept connection (and fill in the client (remote) address) */
addrlen = sizeof(port->raddr);

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/pqsignal.c,v 1.14 2000/01/26 05:56:29 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/pqsignal.c,v 1.15 2000/06/11 11:39:50 petere Exp $
*
* NOTES
* This shouldn't be in libpq, but the monitor and some other
@ -17,7 +17,7 @@
*
* A NOTE ABOUT SIGNAL HANDLING ACROSS THE VARIOUS PLATFORMS.
*
* config.h defines the macro USE_POSIX_SIGNALS for some platforms and
* config.h defines the macro HAVE_POSIX_SIGNALS for some platforms and
* not for others. This file and pqsignal.h use that macro to decide
* how to handle signalling.
*
@ -47,7 +47,7 @@
pqsigfunc
pqsignal(int signo, pqsigfunc func)
{
#if !defined(USE_POSIX_SIGNALS)
#if !defined(HAVE_POSIX_SIGNALS)
return signal(signo, func);
#else
struct sigaction act,
@ -61,5 +61,5 @@ pqsignal(int signo, pqsigfunc func)
if (sigaction(signo, &act, &oact) < 0)
return SIG_ERR;
return oact.sa_handler;
#endif /* !USE_POSIX_SIGNALS */
#endif /* !HAVE_POSIX_SIGNALS */
}

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.117 2000/06/09 16:03:07 momjian Exp $
* $Id: config.h.in,v 1.118 2000/06/11 11:39:58 petere Exp $
*/
#ifndef CONFIG_H
@ -322,8 +322,8 @@
*/
/* Set to 1 if you gettimeofday(a,b) vs gettimeofday(a) */
#undef HAVE_GETTIMEOFDAY_2_ARGS
#ifndef HAVE_GETTIMEOFDAY_2_ARGS
#undef GETTIMEOFDAY_1ARG
#ifdef GETTIMEOFDAY_1ARG
# define gettimeofday(a,b) gettimeofday(a)
#endif
@ -512,11 +512,11 @@ extern void srandom(unsigned int seed);
#undef ALIGNOF_DOUBLE
#undef MAXIMUM_ALIGNOF
/* Define as the base type of the last arg to accept */
#undef SOCKET_SIZE_TYPE
/* Define as the type of the type of the 3rd argument to accept() */
#undef ACCEPT_TYPE_ARG3
/* Define if POSIX signal interface is available */
#undef USE_POSIX_SIGNALS
#undef HAVE_POSIX_SIGNALS
/* Define if C++ compiler accepts "using namespace std" */
#undef HAVE_NAMESPACE_STD

View File

@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/interfaces/Attic/Makefile.in,v 1.1 2000/06/10 18:01:48 petere Exp $
# $Header: /cvsroot/pgsql/src/interfaces/Attic/Makefile.in,v 1.2 2000/06/11 11:39:59 petere Exp $
#
#-------------------------------------------------------------------------
@ -16,14 +16,14 @@ top_builddir = ../..
USE_TCL = @USE_TCL@
USE_ODBC = @USE_ODBC@
WITH_CXX = @HAVECXX@
with_CXX = @with_CXX@
with_perl = @with_perl@
with_python = @with_python@
all install clean dep depend:
$(MAKE) -C libpq $@
$(MAKE) -C ecpg $@
ifeq ($(WITH_CXX), true)
ifeq ($(with_CXX), yes)
$(MAKE) -C libpq++ $@
endif
$(MAKE) -C libpgeasy $@
@ -41,12 +41,8 @@ ifeq ($(USE_ODBC), true)
endif
distclean maintainer-clean: clean
ifeq ($(with_perl), yes)
-$(MAKE) -C perl5 $@
endif
ifeq ($(with_python), yes)
-$(MAKE) -C python $@
endif
rm -f Makefile \
libpq/Makefile \
ecpg/lib/Makefile \

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.128 2000/05/31 00:28:41 petere Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.129 2000/06/11 11:40:07 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -1076,7 +1076,7 @@ keep_going: /* We will come back to here until there
{
case CONNECTION_STARTED:
{
SOCKET_SIZE_TYPE laddrlen;
ACCEPT_TYPE_ARG3 laddrlen;
#ifndef WIN32
int optval;
@ -1085,7 +1085,7 @@ keep_going: /* We will come back to here until there
char optval;
#endif
SOCKET_SIZE_TYPE optlen = sizeof(optval);
ACCEPT_TYPE_ARG3 optlen = sizeof(optval);
/*
* Write ready, since we've made it here, so the

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/pqsignal.c,v 1.11 2000/01/26 05:58:46 momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/pqsignal.c,v 1.12 2000/06/11 11:40:07 petere Exp $
*
* NOTES
* This shouldn't be in libpq, but the monitor and some other
@ -25,7 +25,7 @@
pqsigfunc
pqsignal(int signo, pqsigfunc func)
{
#if !defined(USE_POSIX_SIGNALS)
#if !defined(HAVE_POSIX_SIGNALS)
return signal(signo, func);
#else
struct sigaction act,
@ -39,5 +39,5 @@ pqsignal(int signo, pqsigfunc func)
if (sigaction(signo, &act, &oact) < 0)
return SIG_ERR;
return oact.sa_handler;
#endif /* !USE_POSIX_SIGNALS */
#endif /* !HAVE_POSIX_SIGNALS */
}

View File

@ -6,7 +6,7 @@
#define strcasecmp(a,b) stricmp(a,b)
#define strncasecmp(a,b,c) _strnicmp(a,b,c)
#define SOCKET_SIZE_TYPE int
#define ACCEPT_TYPE_ARG3 int
/*
* Some compat functions

View File

@ -7,7 +7,7 @@ LDFLAGS:= -lc $(LDFLAGS)
# On the other hand, if we don't have POSIX signals, we need to use the
# libBSD signal routines. (HPUX 9 and early HPUX 10 releases don't have
# POSIX signals.) Make sure libBSD comes before libc in that case.
ifeq ($(HAVE_POSIX_SIGNALS),)
ifeq ($(HAVE_POSIX_SIGNALS), no)
LDFLAGS:= -lBSD $(LDFLAGS)
endif