Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13440 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8637 invoked by uid 1010); 22 Oct 2004 06:22:52 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 8612 invoked from network); 22 Oct 2004 06:22:52 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by pb1.pair.com with SMTP; 22 Oct 2004 06:22:52 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9M6Mqtn016580 for ; Fri, 22 Oct 2004 02:22:52 -0400 Received: from radish.cambridge.redhat.com (radish.cambridge.redhat.com [172.16.18.90]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9M6Mpr20959 for ; Fri, 22 Oct 2004 02:22:51 -0400 Received: from radish.cambridge.redhat.com (localhost.localdomain [127.0.0.1]) by radish.cambridge.redhat.com (8.12.10/8.12.7) with ESMTP id i9M6MoBs008993 for ; Fri, 22 Oct 2004 07:22:50 +0100 Received: (from jorton@localhost) by radish.cambridge.redhat.com (8.12.10/8.12.10/Submit) id i9M6Modq008992 for internals@lists.php.net; Fri, 22 Oct 2004 07:22:50 +0100 Date: Fri, 22 Oct 2004 07:22:49 +0100 To: internals@lists.php.net Message-ID: <20041022062249.GA8983@redhat.com> Mail-Followup-To: internals@lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: _FILE_OFFSET_BITS=64 considered harmful From: jorton@redhat.com (Joe Orton) There are serious problems from enabling LFS support like this in a project like PHP. If I have some library which uses off_t in its API, e.g. zlib, and I happened to not compile it with LFS support, e.g. as in most Linux distributions, I now *cannot* call the zlib functions using off_t from PHP, because the size of off_t when you #include will be different from the size when zlib is compiled. Similar cases for any SAPI module if the server interface exposes off_t. The safe way of doing this which we use in APR 1.0 is to define a wrapper type (e.g php_off_t) which is typedef'd to off64_t when -D_LARGEFILE64_SOURCE is supported, and off_t otherwise, to open files using O_LARGEFILE, and to use the "transitional LFS" functions like lseek64 etc in place of lseek etc when php_off_t is off64_t. ----- Forwarded message from Edin Kadribasic ----- From: "Edin Kadribasic" To: php-cvs@lists.php.net Date: Thu, 21 Oct 2004 23:57:39 -0000 Subject: [PHP-CVS] cvs: php-src(PHP_5_0) / configure.in edink Thu Oct 21 19:57:39 2004 EDT Modified files: (Branch: PHP_5_0) /php-src configure.in Log: MFB: Linux LFS support, fixes 27792 http://cvs.php.net/diff.php/php-src/configure.in?r1=1.514.2.11&r2=1.514.2.12&ty=u Index: php-src/configure.in diff -u php-src/configure.in:1.514.2.11 php-src/configure.in:1.514.2.12 --- php-src/configure.in:1.514.2.11 Tue Sep 28 05:13:32 2004 +++ php-src/configure.in Thu Oct 21 19:57:37 2004 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.514.2.11 2004/09/28 09:13:32 wez Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.514.2.12 2004/10/21 23:57:37 edink Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -196,6 +196,13 @@ LIBS="$LIBS -lbe -lroot";; *mips*) CPPFLAGS="$CPPFLAGS -D_XPG_IV";; +*linux*) + AC_MSG_CHECKING([for Linux LFS_CFLAGS]) + LFS_LINUX_CFLAGS=`getconf LFS_CFLAGS` + if test "x$LFS_LINUX_CFLAGS" != "x"; then + CFLAGS="$CFLAGS $LFS_LINUX_CFLAGS" + fi + AC_MSG_RESULT([$LFS_LINUX_CFLAGS]) esac -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ----- End forwarded message -----