Skip site navigation (1) Skip section navigation (2)

Re: [Fwd: DBD::Pg on HP-UX 11.31 64bit]

From: "H(dot)Merijn Brand" <h(dot)m(dot)brand(at)xs4all(dot)nl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Simon Riggs <simon(at)2ndQuadrant(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: [Fwd: DBD::Pg on HP-UX 11.31 64bit]
Date: 2010-12-16 17:42:57
Message-ID: 20101216184257.2d19fa5a@pc09.procura.nl (view raw or flat)
Thread:
Lists: pgsql-bugs
On Thu, 16 Dec 2010 12:31:21 -0500, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> I wrote:
> > "H.Merijn Brand" <h(dot)m(dot)brand(at)xs4all(dot)nl> writes:
> >> the includes tell me
> >> src/include/pg_config.h:#define ACCEPT_TYPE_ARG3 size_t
> 
> > Hmm, that suggests that configure was already seeing the socklen_t
> > variant ...
> 
> Actually, the reason that happens is probably that src/template/hpux
> forcibly adds -D_XOPEN_SOURCE_EXTENDED to CPPFLAGS.  At least on my
> old HPUX box, that's sufficient to select the more modern prototype
> for accept and getsockopt; probably the same on yours.
> 
> So what I'm thinking is happening is that libpq expects size_t as
> the argument type, but it's getting linked against a libc that
> expects int as the argument type, and whatever HP is doing under
> the hood fails to cope with that case.  You might try removing
> -D_XOPEN_SOURCE_EXTENDED from the template file --- I don't know if
> that will have any bad side-effects, but it's worth a try to build
> libpq that way.

I'll try that first after cleaning up my environment.

I always compile with -Ae:

      -Ae            In aC++, invokes aCC as an ANSI-C compiler, with
                     additional support for HP-C language extensions.  Refer
                     to the HP-C compiler documentation for details of the
                     HP-C language extensions.
                     In C, this is the default, Extended ANSI C99 mode.
                     Which is almost the same as -Aa -D_HPUX_SOURCE -ext.
                     This would define the names (macros and typedefs)
                     provided by the HP-UX Operating System and, in
                     addition, allows extensions such as C99 features in
                     this release (complex and imaginary data types, STDC
                     pragmas), $ characters in identifier names, sized
                     enums, and sized bit-fields, and 64-bit integral types.
                     Additional extensions may be added to this option in
                     the future.

-
      -Aa            For aC++, turns on newly supported ANSI C++ Standard
                     features like Koenig lookup and correct scoping for
                     variables declared in conditional statements like for-
                     loops.  Additional features may be enabled by this
                     option in the future.
                     For C, compile under strict ANSI mode (ANSI programming
                     language C standard ISO 9899:1990).  When compiling
                     under ANSI mode, the header files would define only
                     those names (macros and typedefs) specified by the
                     Standard.  To access macros and typedefs that are not
                     defined by the ANSI Standard but are provided by the
                     HP-UX Operating System, define the symbol _HPUX_SOURCE;
                     or use the extension option, -Ae described below.
      -ext           Allow various C/C++ extensions.  Currently -ext enables
                     the 64 bit integer (long long) data type.  This is a
                     synonym for the +e option.

-- 
H.Merijn Brand  http://tux.nl      Perl Monger  http://amsterdam.pm.org/
using 5.00307 through 5.12 and porting perl5.13.x on HP-UX 10.20, 11.00,
11.11, 11.23 and 11.31, OpenSuSE 10.1, 11.0 .. 11.3 and AIX 5.2 and 5.3.
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2010-12-16 17:56:12
Subject: Re: [Fwd: DBD::Pg on HP-UX 11.31 64bit]
Previous:From: H.Merijn BrandDate: 2010-12-16 17:39:02
Subject: Re: [Fwd: DBD::Pg on HP-UX 11.31 64bit]

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group