Re: Re: UUNET socket-file-location patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: UUNET socket-file-location patch
Date: 2000-11-13 21:29:26
Message-ID: 14709.974150966@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> On BSDI, hstrerror is defined in netdb.h. Do you have it anywhere? Is
> that a proper function call?

There is no hstrerror anywhere on HPUX. h_errno is defined in
<netdb.h>, but only with nonstandard compilation options:

#ifdef _XOPEN_SOURCE_EXTENDED
extern int h_errno;
#endif

The man page for gethostbyname() points out that h_errno will be garbage
if the hostname was not resolved via a nameserver, anyway.

On the whole, this code looks much less than portable to me.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message momjian 2000-11-13 21:31:47 pgsql/src/backend/libpq (pqcomm.c)
Previous Message Bruce Momjian 2000-11-13 21:15:20 Re: Re: UUNET socket-file-location patch

Browse pgsql-hackers by date

  From Date Subject
Next Message momjian 2000-11-13 21:31:47 pgsql/src/backend/libpq (pqcomm.c)
Previous Message Peter Eisentraut 2000-11-13 21:29:13 SET SESSION CHARACTERISTICS