pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: [ADMIN] <pgsql-admin@postgresql.org>
Subject: Re: Fw: Case Insensitive Test
Date: Fri, 26 Sep 2003 09:07:30 -0700 (PDT)
Message-ID: <20030926082241.A4723@megazone.bigpanda.com> (raw)
In-Reply-To: <15846.1064589042@sss.pgh.pa.us>
References: <4.2.2.20030925220310.01955f08@localhost>
	<8975.1064553449@sss.pgh.pa.us>
	<20030925222934.F96784@megazone.bigpanda.com>
	<9396.1064556152@sss.pgh.pa.us>
	<20030926074907.C4723@megazone.bigpanda.com>
	<15846.1064589042@sss.pgh.pa.us>


On Fri, 26 Sep 2003, Tom Lane wrote:

> Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> > However, the immediate problem I have seems to come from the fact that
> > on Linux at least we're basically lying to configure about what's in the
> > system headers when we go to compile. port/linux.h on my system defined
> > _GNU_SOURCE which forces most/all of the extension things to be defined
> > even if they wouldn't by the command line options.
>
> Hm.  I have to plead guilty to putting that #define in there.  It was a
> quick-and-dirty workaround to make plperl compile.  Perhaps a better
> solution would be for template/linux to add the appropriate thing to
> CPPFLAGS, so that configure would see the same environment.  Can you
> try that and see if it fixes your issue?  (What exactly is your issue,
> anyway?)

Configure doesn't find struct addrinfo (because it's in a __USE_POSIX
block) so it looks like we use our own version, but, when we're actually
then compiling getaddrinfo.c, there's a redefinition error because this
time struct addrinfo is found (because _GNU_SOURCE forces __USE_POSIX).

It looks like commenting it out of linux.h and adding it to template/linux
works for the main build, it compiles and links fine both with and without
--std=c89 and the latter also passes regression.  I didn't try to build
plperl however.

Attachments:

gnusource.diff (text/plain, 1.4K) download Index: src/include/port/linux.h =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/include/port/linux.h,v retrieving revision 1.34 diff -c -r1.34 linux.h *** src/include/port/linux.h 14 Sep 2003 20:21:18 -0000 1.34 --- src/include/port/linux.h 26 Sep 2003 15:34:48 -0000 *************** *** 1,9 **** - /* Force _GNU_SOURCE on; plperl is broken with Perl 5.8.0 otherwise */ - #ifndef _GNU_SOURCE - #define _GNU_SOURCE 1 - #endif - - #if defined(__i386__) || defined(__x86_64__) typedef unsigned char slock_t; --- 1,3 ---- Index: src/template/linux =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/template/linux,v retrieving revision 1.14 diff -c -r1.14 linux *** src/template/linux 13 Sep 2003 14:49:51 -0000 1.14 --- src/template/linux 26 Sep 2003 15:34:50 -0000 *************** *** 4,7 **** NEED_REENTRANT_FUNCS=yes # verified glibc 2.1 2003-09-03 THREAD_CFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS" THREAD_LIBS="-lpthread" ! --- 4,7 ---- NEED_REENTRANT_FUNCS=yes # verified glibc 2.1 2003-09-03 THREAD_CFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS" THREAD_LIBS="-lpthread" ! CPPFLAGS="-D_GNU_SOURCE" # Force _GNU_SOURCE on; plperl is broken with Perl 5.8.0 otherwise

view thread (28+ messages)  latest in thread

Message-ID: <20030926082241.A4723@megazone.bigpanda.com>
Permalink:  ../20030926082241.A4723@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20030926082241.A4723@megazone.bigpanda.com

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: sszabo@megazone.bigpanda.com, tgl@sss.pgh.pa.us
  Subject: Re: Fw: Case Insensitive Test
  In-Reply-To: <20030926082241.A4723@megazone.bigpanda.com>
  References: <4.2.2.20030925220310.01955f08@localhost> <8975.1064553449@sss.pgh.pa.us> <20030925222934.F96784@megazone.bigpanda.com> <9396.1064556152@sss.pgh.pa.us> <20030926074907.C4723@megazone.bigpanda.com> <15846.1064589042@sss.pgh.pa.us> <20030926082241.A4723@megazone.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox