Add support for <xti.h>
Add support for <xti.h>
От:
Pete Forman <gsez020@kryten.bedford.waii.com>
Дата:
============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================
Your name : Pete Forman
Your email address : pete.forman@westgeo.com
System Configuration
---------------------
Architecture (example: Intel Pentium) : SGI MIPS 8000
Operating System (example: Linux 2.0.26 ELF) : IRIX 6.5.5m
PostgreSQL version (example: PostgreSQL-7.1): PostgreSQL-7.1
Compiler used (example: gcc 2.8.0) : MIPSPro 7.3
NB: I expect that the same problem would arise on AIX and Solaris.
Please enter a FULL description of your problem:
------------------------------------------------
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.)
Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
$ configure
...
checking for netinet/tcp.h... no
...
$ make
...
cc-1020 cc: ERROR File = pqcomm.c, Line = 346
The identifier "TCP_NODELAY" is undefined.
if (setsockopt(port->sock, IPPROTO_TCP, TCP_NODELAY,
^
1 error detected in the compilation of "pqcomm.c".
...
If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
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 .
Patches follow.
*** configure.in.orig Mon Oct 9 20:15:39 2000
--- configure.in Fri Oct 13 08:50:15 2000
***************
*** 658,664 ****
## 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([readline/readline.h readline.h], [break])
AC_CHECK_HEADERS([readline/history.h history.h], [break])
--- 658,664 ----
## 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 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])
*** src/include/config.h.in.orig Sun Oct 8 08:00:18 2000
--- src/include/config.h.in Fri Oct 13 09:57:13 2000
***************
*** 330,335 ****
--- 330,338 ----
/* 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
*** src/backend/libpq/pqcomm.c.orig Fri Oct 6 08:00:14 2000
--- src/backend/libpq/pqcomm.c Fri Oct 13 08:48:47 2000
***************
*** 69,74 ****
--- 69,77 ----
#include
#include
#include
+ #ifdef HAVE_XTI_H
+ # include
+ #endif
#ifdef HAVE_NETINET_TCP_H
# include
#endif
*** src/interfaces/libpq/fe-connect.c.orig Wed Oct 4 08:00:15 2000
--- src/interfaces/libpq/fe-connect.c Fri Oct 13 09:01:17 2000
***************
*** 31,36 ****
--- 31,39 ----
#include
#include
#include
+ #ifdef HAVE_XTI_H
+ # include
+ #endif
#ifdef HAVE_NETINET_TCP_H
# include
#endif
--
Pete Forman -./\.- Disclaimer: This post is originated
Western Geophysical -./\.- by myself and does not represent
pete.forman@westgeo.com -./\.- the opinion of Baker Hughes or
http://www.crosswinds.net/~petef -./\.- its divisions.
Re: Add support for <xti.h>
От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
Applied. > ============================================================================ > POSTGRESQL BUG REPORT TEMPLATE > ============================================================================ > > > Your name : Pete Forman > Your email address : pete.forman@westgeo.com > > > System Configuration > --------------------- > Architecture (example: Intel Pentium) : SGI MIPS 8000 > > Operating System (example: Linux 2.0.26 ELF) : IRIX 6.5.5m > > PostgreSQL version (example: PostgreSQL-7.1): PostgreSQL-7.1 > > Compiler used (example: gcc 2.8.0) : MIPSPro 7.3 > > NB: I expect that the same problem would arise on AIX and Solaris. > > Please enter a FULL description of your problem: > ------------------------------------------------ > > 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.) > > > Please describe a way to repeat the problem. Please try to provide a > concise reproducible example, if at all possible: > ---------------------------------------------------------------------- > > $ configure > ... > checking for netinet/tcp.h... no > ... > > $ make > ... > cc-1020 cc: ERROR File = pqcomm.c, Line = 346 > The identifier "TCP_NODELAY" is undefined. > > if (setsockopt(port->sock, IPPROTO_TCP, TCP_NODELAY, > ^ > > 1 error detected in the compilation of "pqcomm.c". > ... > > > If you know how this problem might be fixed, list the solution below: > --------------------------------------------------------------------- > > 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 . > > Patches follow. > > *** configure.in.orig Mon Oct 9 20:15:39 2000 > --- configure.in Fri Oct 13 08:50:15 2000 > *************** > *** 658,664 **** > ## 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([readline/readline.h readline.h], [break]) > AC_CHECK_HEADERS([readline/history.h history.h], [break]) > --- 658,664 ---- > ## 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 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]) > *** src/include/config.h.in.orig Sun Oct 8 08:00:18 2000 > --- src/include/config.h.in Fri Oct 13 09:57:13 2000 > *************** > *** 330,335 **** > --- 330,338 ---- > /* 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 > > *** src/backend/libpq/pqcomm.c.orig Fri Oct 6 08:00:14 2000 > --- src/backend/libpq/pqcomm.c Fri Oct 13 08:48:47 2000 > *************** > *** 69,74 **** > --- 69,77 ---- > #include > #include > #include > + #ifdef HAVE_XTI_H > + # include > + #endif > #ifdef HAVE_NETINET_TCP_H > # include > #endif > *** src/interfaces/libpq/fe-connect.c.orig Wed Oct 4 08:00:15 2000 > --- src/interfaces/libpq/fe-connect.c Fri Oct 13 09:01:17 2000 > *************** > *** 31,36 **** > --- 31,39 ---- > #include > #include > #include > + #ifdef HAVE_XTI_H > + # include > + #endif > #ifdef HAVE_NETINET_TCP_H > # include > #endif > > > > > > -- > Pete Forman -./\.- Disclaimer: This post is originated > Western Geophysical -./\.- by myself and does not represent > pete.forman@westgeo.com -./\.- the opinion of Baker Hughes or > http://www.crosswinds.net/~petef -./\.- its divisions. > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026