Re: Compiling on HP-UX 10.20 fails

From: Andrew Chernow <ac(at)esilo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Compiling on HP-UX 10.20 fails
Date: 2008-11-16 05:31:00
Message-ID: 491FB014.80100@esilo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Andrew Chernow <ac(at)esilo(dot)com> writes:
>> I am trying to compile libpq on HP-UX 10.20 using gcc 2.95.3, cpu is a
>> 400MHz PA8500. I'm using the 8.3.5 tarball.
>
> Yeah, 10.20 is a bit old and creaky, and the system headers are shy of a
> load in a few places. I currently use the attached fixes.
>
> regards, tom lane
>

That got rid of all warnings. Although, it still fails to compile due
to gethostbyname_r:

thread.c:141: too many arguments to function `gethostbyname_r'

hpux 10.20, hpux 11 and aix (maybe more) use a 3 argument version, not 5:

int
gethostbyname_r(const char *name, struct hostent *result,
struct hostent_data *buffer);

I supplied a patch that includes a configure check. NOTE: the hpux
platform check at the top of thread.c may not be cross-compiler, I think
they are from gcc. Does the postgresql config system define platform
somewhere so I can #ifdef PG_HPUX?

--
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/

Attachment Content-Type Size
gethostbyname_r.patch text/plain 3.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-11-16 05:41:38 Re: Compiling on HP-UX 10.20 fails
Previous Message Jaime Casanova 2008-11-16 05:26:39 CVS can't be built on mingw