X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8D802D1B4E3 for ; Fri, 26 Sep 2003 17:58:19 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 83475-10 for ; Fri, 26 Sep 2003 14:58:10 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id AECD7D1B519 for ; Fri, 26 Sep 2003 14:58:08 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id h8QHw16c024983; Fri, 26 Sep 2003 13:58:02 -0400 (EDT) To: Bruce Momjian Cc: Stephan Szabo , "[ADMIN]" Subject: Re: Fw: Case Insensitive Test In-reply-to: <200309261742.h8QHg1013081@candle.pha.pa.us> References: <200309261742.h8QHg1013081@candle.pha.pa.us> Comments: In-reply-to Bruce Momjian message dated "Fri, 26 Sep 2003 13:42:01 -0400" Date: Fri, 26 Sep 2003 13:58:01 -0400 Message-ID: <24982.1064599081@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/443 X-Sequence-Number: 10531 Bruce Momjian writes: > That _GNU_SOURCE has always bothered me. What does it control, exactly? > It seems to control a lot. Well, without it I get (on RHL 8.0) gcc -O2 -g -fpic -I. -I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE -I../../../src/include -c -o plperl.o plperl.c In file included from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/op.h:480, from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/perl.h:2209, from plperl.c:60: /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/reentr.h:602: field `_crypt_struct' has incomplete type /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/reentr.h:747: confused by earlier errors, bailing out make: *** [plperl.o] Error 1 The relevant chunk of that Perl header is #ifdef HAS_CRYPT_R #if CRYPT_R_PROTO == REENTRANT_PROTO_B_CCD CRYPTD* _crypt_data; #else struct crypt_data _crypt_struct; #endif #endif /* HAS_CRYPT_R */ and the problem is that HAS_CRYPT_R has gotten defined but "struct crypt_data" has not. It's been awhile since I looked at this, but I think that Perl configures HAS_CRYPT_R on the basis of a link-only test for crypt_r(), which will succeed regardless of -D symbols. And (in this Linux version, anyway) /usr/include/crypt.h only defines struct crypt_data if __USE_GNU is defined (which comes from _GNU_SOURCE). So we're more or less stuck --- perl.h simply does not compile without _GNU_SOURCE on this platform. This is arguably a configuration bug in Perl; we have hit comparable difficulties in PG, and had to solve them by the expedient of testing for both compile-time and link-time presence of library features. They're not being careful enough. Experimenting, I notice that ecpg also currently fails to compile without _GNU_SOURCE on that box. It looks to me like the system headers have a rather arbitrary set of ideas on what to remove when _GNU_SOURCE isn't defined... regards, tom lane