From patchwork Tue Mar 11 10:51:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 33 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx23.g.dreamhost.com (caibbdcaabja.dreamhost.com [208.113.200.190]) by wilcox.dreamhost.com (Postfix) with ESMTP id 2C86836008E for ; Tue, 11 Mar 2014 03:52:01 -0700 (PDT) Received: by homiemail-mx23.g.dreamhost.com (Postfix, from userid 14307373) id D86A262CA0344; Tue, 11 Mar 2014 03:52:00 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx23.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx23.g.dreamhost.com (Postfix) with ESMTPS id C59E462788998 for ; Tue, 11 Mar 2014 03:51:59 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type; q=dns; s=default; b=ODFkn CxIqDt1/bnOhlivEMpRp204k8tZWiZmGUxUoriWG7h9sNaPiohT+IffCphd6+LJt ikeIOgbFCcONu8n0aJ4QxmWo58KTyUETBTRA3w3eixLRdjJYrWEVODQODJDQPUya QLeRp6SeupRVNbfurQ8XUh7sdIN0wAReh3fCTw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type; s=default; bh=e857oIh1k6q wY5SY7Yv9mlgUi88=; b=qDZKfjMkbexBDrFI863/w9Gir3YdvO/SVqembfG7qDT WRYXAV+O28+GPdvnieTShZVzKnYyzTEtTNd9fsIx+cIypkBOZdxKkBWLKO8E28Tj vveE8oNyiTufgWMLqoX8um9KeUkgTN9NcdfQZG7pTXslTT/gfcXzdAXkAKf7VtnM = Received: (qmail 30014 invoked by alias); 11 Mar 2014 10:51:57 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 30002 invoked by uid 89); 11 Mar 2014 10:51:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL, BAYES_00, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtp.gentoo.org From: Mike Frysinger To: libc-alpha@sourceware.org Cc: =?utf-8?B?T25kxZllaiBCw61sa2E=?= , Paul Eggert , Denis Obrezkov Subject: Re: [RFC] Make _FILE_OFFSET_BITS=64 default. Date: Tue, 11 Mar 2014 06:51:55 -0400 Message-ID: <5239512.EEmGNsN1rx@vapier> User-Agent: KMail/4.12.3 (Linux/3.13.0; KDE/4.12.3; x86_64; ; ) In-Reply-To: <20140305091331.GA6031@domone.podge> References: <1393521776-1102-1-git-send-email-reprofy@etersoft.ru> <530F79C1.2040508@cs.ucla.edu> <20140305091331.GA6031@domone.podge> MIME-Version: 1.0 X-DH-Original-To: glibc@patchwork.siddhesh.in On Wed 05 Mar 2014 10:13:31 Ondřej Bílka wrote: > On Thu, Feb 27, 2014 at 09:45:37AM -0800, Paul Eggert wrote: > > Squashing an inode that way has a small chance of introducing what > > could be a serious bug. If glibc is going to squash them, it should > > do so reliably, by maintaining a table of all the inodes it's ever > > seen and making sure there are no collisions. > > > > Why bother to squash them at all, though? Programs that care about > > files should be compiled with _FILE_OFFSET_BITS defined to 64. If > > we're worried about programs that don't define _FILE_OFFSET_BITS, we > > could change glibc to default to _FILE_OFFSET_BITS=64; that's a > > better long-term solution anyway. > > Changing default would be better. I dig while how to do it and can not > find a nonugly solution. How should we do this? isn't it simply: the glibc source files themselves seem to expect default of _FILE_OFFSET_BITS=32 though, so we might have to add that to default CPPFLAGS when building. i kind of feel like deploying this on Gentoo systems to see what breaks ;). -mike --- a/include/features.h +++ b/include/features.h @@ -303,7 +303,7 @@ # define __USE_LARGEFILE64 1 #endif -#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 +#if !defined _FILE_OFFSET_BITS || _FILE_OFFSET_BITS == 64 # define __USE_FILE_OFFSET64 1 #endif