]> granicus.if.org Git - postgresql/commitdiff
The configure script fails to find <netinet/tcp.h>.
authorBruce Momjian <bruce@momjian.us>
Sat, 14 Oct 2000 23:56:59 +0000 (23:56 +0000)
committerBruce Momjian <bruce@momjian.us>
Sat, 14 Oct 2000 23:56:59 +0000 (23:56 +0000)
As a result, backend/libpq/pqcomm.c and interfaces/libpq/fe-connect.c
fail to compile.

The <netinet/tcp.h> header needs to be preceded by <netinet/in.h>, at
least on IRIX, Solaris and AIX.  The simple configure test fails.
(That header on Linux is idempotent.)

The basic problem is that <netinet/tcp.h> is a BSD header.  The
correct header for TCP internals such as TCP_NODELAY on a UNIX system
is <xti.h>.  By UNIX I mean UNIX95 (aka XPG4v2 or SUSv1) or later.
The current UNIX standard (UNIX98 aka SUSv2) is available online at
<http://www.opengroup.org/onlinepubs/7908799/>.

The fix is to add header support for <xti.h> into configure.in and
config.h.in.

The 2 files which conditionally include <netinet/tcp.h> need also to
conditionally include <xti.h>.

Pete Forman

configure.in
src/backend/libpq/pqcomm.c
src/include/config.h.in
src/interfaces/libpq/fe-connect.c

index 0a972690a22b2bad3cbd51a61d8b594d24a050a6..2641ce6d513fbc77c2ef6bf0b853b56572b1db5b 100644 (file)
@@ -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])
index a3cc6f24124b6c8f61367bae6dc42808b4429533..5cae5b63c7a92873a437c11a6916324ed62993d8 100644 (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.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 <sys/socket.h>
 #include <netdb.h>
 #include <netinet/in.h>
+#ifdef HAVE_XTI_H
+# include <xti.h>
+#endif
 #ifdef HAVE_NETINET_TCP_H
 # include <netinet/tcp.h>
 #endif
index 1740cf4be654313335d83511493a7a53252b71ad..0b9fb0ecd1489b45f1337434c0558d3316d8acd9 100644 (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.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
 /* Set to 1 if you have <ieeefp.h> */
 #undef HAVE_IEEEFP_H
 
+/* Set to 1 if you have <xti.h> */
+#undef HAVE_XTI_H
+
 /* Set to 1 if you have <netinet/tcp.h> */
 #undef HAVE_NETINET_TCP_H
 
index fe0d6e3f6c6c8275733400e0627410b76d1327a4..f27686a727aafb70dd077b0fb08841f0040128d8 100644 (file)
@@ -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 <unistd.h>
 #include <netdb.h>
 #include <netinet/in.h>
+#ifdef HAVE_XTI_H
+# include <xti.h>
+#endif
 #ifdef HAVE_NETINET_TCP_H
 # include <netinet/tcp.h>
 #endif