Re: Add support for

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Add support for
Дата
Msg-id 17302.972011372@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: Re: Add support for  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Add support for  (Pete Forman <gsez020@kryten.bedford.waii.com>)
Re: Add support for  (Pete Forman <gsez020@mandy.bedford.waii.com>)
Список pgsql-hackers
Pete Forman wrote:
> 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 2 files which conditionally include <netinet/tcp.h> need also to
> conditionally include <xti.h>.

This patch is causing compilation warnings on HPUX 10.20:

gcc -c  -I../../../src/include  -O1 -Wall -Wmissing-prototypes -Wmissing-declarations -g -o pqcomm.o pqcomm.c
In file included from pqcomm.c:76:
/usr/include/netinet/tcp.h:71: warning: `TCP_NODELAY' redefined
/usr/include/sys/xti.h:469: warning: this is the location of the previous definition
/usr/include/netinet/tcp.h:72: warning: `TCP_MAXSEG' redefined
/usr/include/sys/xti.h:470: warning: this is the location of the previous definition

I have never heard of <xti.h> before and am rather dubious that it
should be considered more standard than <tcp.h>.  However, if we are
going to include it then it evidently must be *mutually exclusive*
with including <tcp.h>.  The $64 question is, which one ought to be
included when both are available?  I'd tend to go for <tcp.h> on the
grounds of "don't fix what wasn't broken".

Actually, given your description of the problem, I'm half inclined to
revert the whole patch and instead make configure's test for
availability of <netinet/tcp.h> first include <netinet/in.h>, so that
that configure test will succeed on IRIX etc.  Do you know any platforms
where <tcp.h> doesn't exist at all?
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Kevin O'Gorman"
Дата:
Сообщение: Unable to access CVS server
Следующее
От: Denis Perchine
Дата:
Сообщение: Problems with the latest CVS.