Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13442 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1349 invoked by uid 1010); 22 Oct 2004 08:53:15 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 1268 invoked from network); 22 Oct 2004 08:53:15 -0000 Received: from unknown (HELO mproxy.gmail.com) (216.239.56.241) by pb1.pair.com with SMTP; 22 Oct 2004 08:53:15 -0000 Received: by mproxy.gmail.com with SMTP id w67so23630cwb for ; Fri, 22 Oct 2004 01:53:14 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=R8ZF7ObcwMq1iznAeYh/0gOw7fDZpBjBhjvzo2BIrV4PZXCHkJyGUU6Ni9RxGTRbkU+a48OeCN1Ik8jvPosyPQbsKWHlrGQddm6MYGrqGts+okKmD6o04DZA4tvo6MyHRwVBDMHrHpolJoFhCa3kg7WipglKC4xW5dgNSRxIjDY= Received: by 10.11.119.61 with SMTP id r61mr292416cwc; Fri, 22 Oct 2004 01:53:14 -0700 (PDT) Received: by 10.11.117.13 with HTTP; Fri, 22 Oct 2004 01:53:14 -0700 (PDT) Message-ID: <4e89b426041022015310a5165f@mail.gmail.com> Date: Fri, 22 Oct 2004 09:53:14 +0100 Reply-To: Wez Furlong To: internals@lists.php.net In-Reply-To: <20041022062249.GA8983@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20041022062249.GA8983@redhat.com> Subject: Re: [PHP-DEV] _FILE_OFFSET_BITS=64 considered harmful From: kingwez@gmail.com (Wez Furlong) What I planned to do with the streams API for 5.1 was define php_stream_off_t to be a 64-bit type (regardless of LFS support), adjust the API where it is needed, and handle the LFS stuff centrally, using the transitional LFS functions you mentioned if they are present. I confess that I haven't delved in to LFS on *nix very deeply at this point, so if you have any tips, I'd welcome your opinion. --Wez. On Fri, 22 Oct 2004 07:22:49 +0100, Joe Orton wrote: > 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.