From 0f07d644a3542840d14cd27e39495f0f25755d69 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sat, 14 Oct 2000 23:56:59 +0000 Subject: [PATCH] The configure script fails to find . As a result, backend/libpq/pqcomm.c and interfaces/libpq/fe-connect.c fail to compile. The header needs to be preceded by , at least on IRIX, Solaris and AIX. The simple configure test fails. (That header on Linux is idempotent.) The basic problem is that is a BSD header. The correct header for TCP internals such as TCP_NODELAY on a UNIX system is . By UNIX I mean UNIX95 (aka XPG4v2 or SUSv1) or later. The current UNIX standard (UNIX98 aka SUSv2) is available online at . The fix is to add header support for into configure.in and config.h.in. The 2 files which conditionally include need also to conditionally include . Pete Forman --- configure.in | 2 +- src/backend/libpq/pqcomm.c | 5 ++++- src/include/config.h.in | 5 ++++- src/interfaces/libpq/fe-connect.c | 5 ++++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index 0a972690a2..2641ce6d51 100644 --- a/configure.in +++ b/configure.in @@ -654,7 +654,7 @@ fi ## 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 netinet/tcp.h pwd.h sys/ipc.h sys/pstat.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/types.h sys/un.h termios.h kernel/OS.h kernel/image.h SupportDefs.h]) +AC_CHECK_HEADERS([crypt.h dld.h endian.h fp_class.h getopt.h ieeefp.h xti.h netinet/tcp.h pwd.h sys/ipc.h sys/pstat.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/types.h sys/un.h termios.h kernel/OS.h kernel/image.h SupportDefs.h]) AC_CHECK_HEADERS([readline/readline.h readline.h], [break]) AC_CHECK_HEADERS([readline/history.h history.h], [break]) diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c index a3cc6f2412..5cae5b63c7 100644 --- a/src/backend/libpq/pqcomm.c +++ b/src/backend/libpq/pqcomm.c @@ -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.105 2000/10/05 20:18:33 tgl Exp $ + * $Id: pqcomm.c,v 1.106 2000/10/14 23:56:58 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -69,6 +69,9 @@ #include #include #include +#ifdef HAVE_XTI_H +# include +#endif #ifdef HAVE_NETINET_TCP_H # include #endif diff --git a/src/include/config.h.in b/src/include/config.h.in index 1740cf4be6..0b9fb0ecd1 100644 --- a/src/include/config.h.in +++ b/src/include/config.h.in @@ -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.141 2000/10/07 14:39:16 momjian Exp $ + * $Id: config.h.in,v 1.142 2000/10/14 23:56:58 momjian Exp $ */ #ifndef CONFIG_H @@ -330,6 +330,9 @@ /* Set to 1 if you have */ #undef HAVE_IEEEFP_H +/* Set to 1 if you have */ +#undef HAVE_XTI_H + /* Set to 1 if you have */ #undef HAVE_NETINET_TCP_H diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index fe0d6e3f6c..f27686a727 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.137 2000/10/03 19:16:17 petere Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.138 2000/10/14 23:56:59 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -31,6 +31,9 @@ #include #include #include +#ifdef HAVE_XTI_H +# include +#endif #ifdef HAVE_NETINET_TCP_H # include #endif -- GitLab