Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17301 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34191 invoked by uid 1010); 18 Jul 2005 02:39:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 34176 invoked from network); 18 Jul 2005 02:39:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jul 2005 02:39:53 -0000 X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.4/2.6 Received: from ([204.11.219.139:48997] helo=colo.lerdorf.com) by pb1.pair.com (ecelerity HEAD r(6212)) with SMTP id 42/43-05256-8761BD24 for ; Sun, 17 Jul 2005 22:39:53 -0400 Received: from [192.168.2.106] (c-24-6-1-160.hsd1.ca.comcast.net [24.6.1.160]) (authenticated bits=0) by colo.lerdorf.com (8.13.4/8.13.4/Debian-3) with ESMTP id j6I2dlHg024165 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 17 Jul 2005 19:39:48 -0700 Message-ID: <42DB1673.6020505@lerdorf.com> Date: Sun, 17 Jul 2005 19:39:47 -0700 User-Agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Olivier Hill CC: internals References: <42DAE15D.5010501@lerdorf.com> In-Reply-To: X-Enigmail-Version: 0.91.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Need to inherit apxs compiler flags From: rasmus@lerdorf.com (Rasmus Lerdorf) Olivier Hill wrote: > On 7/17/05, Rasmus Lerdorf wrote: > >>3:47pm colo:~> apxs -q CFLAGS >>-DLINUX=22 -DEAPI -DTARGET="apache" -DHAVE_SET_DUMPABLE >>-DDB_DBM_HSEARCH=1 -DDEV_RANDOM=/dev/random -DUSE_HSREGEX -O1 -g -Wall >>-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 >> >>Anybody see a better way to solve this? > > > IIRC, Gentoo devs added those flags (-D_LARGEFILE_SOURCE > -D_FILE_OFFSET_BITS=64) on PHP ebuilds because it caused > incompatibilities with Apache that was compiled with those flags. > Besides, I can use to be able to open >2G files from PHP where Apache > can. > > I'm +1 on this. Anybody can anticipate a problem doing that sort of > change? Could it break with some libs that were not compiled with 64 > bits FPs or am I missing something? Yeah, there are problems doing this. We do actually inherit the flags, but only to the sapi build. Which makes sense. But that also means that the Apache sapi and the cli sapi built at the same time could have different ideas of the size of a stat struct. I don't see any way around this. I think what we need to do is abstract the sapi_get_stat() call to the point where it returns our own version of the stat struct that is always known. The sapi itself can work out how to convert the native stat struct to the php version. That way extensions won't be sapi-dependant. -Rasmus