From patchwork Thu Mar 13 09:16:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 64 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx20.g.dreamhost.com (caibbdcaaahc.dreamhost.com [208.113.200.72]) by wilcox.dreamhost.com (Postfix) with ESMTP id 2BCF4360154 for ; Thu, 13 Mar 2014 02:16:16 -0700 (PDT) Received: by homiemail-mx20.g.dreamhost.com (Postfix, from userid 14307373) id CBA7B407A4C6D; Thu, 13 Mar 2014 02:16:15 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx20.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-mx20.g.dreamhost.com (Postfix) with ESMTPS id 6FC404085770B for ; Thu, 13 Mar 2014 02:16:15 -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=l1w/6 cGxGnjyO6Ff0XpnxmMOdBM+v2KQ6QbImSf8iKUWT420SGhIQisGUrqXBaq3CEym9 T9TOXP/1lFcpvhumFKflbvCfr1RRobn01/cZFHawDkSbun+koZkk2LjfZGAMMAJC dBbOKXDHcydkeAfrzTvaahLhSPPOoF09nnGWnU= 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=4alx9igZ5Ey UX5ltUcnQQD4Aevo=; b=kjmvghLv2cgF6nhes+/ydW3v24/Yhy+H+DdV5kbvM9O f6/QDIrDW4v+RCrgzOZslJsqOhQO+OZZbBY64vV6kVXtQdSDthwJwUAA8bhytmso 0iUmANKO51VzKNTvn7FSuDfINz9w99C5HciqLFKrhGF9SezF7h4ohnWX8LDQMMRc = Received: (qmail 12222 invoked by alias); 13 Mar 2014 09:16:12 -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 12210 invoked by uid 89); 13 Mar 2014 09:16:11 -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: Thu, 13 Mar 2014 05:16:08 -0400 Message-ID: <26837730.jZzKCPMtpS@vapier> User-Agent: KMail/4.12.3 (Linux/3.13.0; KDE/4.12.3; x86_64; ; ) In-Reply-To: <5239512.EEmGNsN1rx@vapier> References: <1393521776-1102-1-git-send-email-reprofy@etersoft.ru> <20140305091331.GA6031@domone.podge> <5239512.EEmGNsN1rx@vapier> MIME-Version: 1.0 X-DH-Original-To: glibc@patchwork.siddhesh.in this one actually builds ... disassembly on x86_64 is sane before/after -mike commit edf557a5c81eb55ef49cb7a118e008d96f25e5d6 Author: Mike Frysinger Date: Thu Mar 13 05:08:11 2014 -0400 enable _FILE_OFFSET_BITS=64 by default We build glibc itself with _FILE_OFFSET_BITS=32 still, but the exported headers now have the API defaulting to 64bit for everyone. diff --git a/Makeconfig b/Makeconfig index 9078b29..b3ca1ee 100644 --- a/Makeconfig +++ b/Makeconfig @@ -785,7 +785,8 @@ libio-include = -I$(..)libio # Note that we can't use -std=* in CPPFLAGS, because it overrides # the implicit -lang-asm and breaks cpp behavior for .S files--notably # it causes cpp to stop predefining __ASSEMBLER__. -CPPFLAGS = $(CPPUNDEFS) $(CPPFLAGS-config) $($(subdir)-CPPFLAGS) \ +CPPFLAGS = $(CPPUNDEFS) -D_FILE_OFFSET_BITS=32 \ + $(CPPFLAGS-config) $($(subdir)-CPPFLAGS) \ $(+includes) $(defines) \ -include $(..)include/libc-symbols.h $(sysdep-CPPFLAGS) \ $(CPPFLAGS-$(suffix $@)) \ diff --git a/debug/tst-lfschk1.c b/debug/tst-lfschk1.c index f3e6d47..9f04600 100644 --- a/debug/tst-lfschk1.c +++ b/debug/tst-lfschk1.c @@ -1,2 +1,3 @@ +#undef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 #include "tst-chk1.c" diff --git a/debug/tst-lfschk2.c b/debug/tst-lfschk2.c index 95d4db1..34910e7 100644 --- a/debug/tst-lfschk2.c +++ b/debug/tst-lfschk2.c @@ -1,2 +1,3 @@ +#undef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 #include "tst-chk2.c" diff --git a/debug/tst-lfschk3.c b/debug/tst-lfschk3.c index 50a1ae1..7185608 100644 --- a/debug/tst-lfschk3.c +++ b/debug/tst-lfschk3.c @@ -1,2 +1,3 @@ +#undef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 #include "tst-chk3.c" diff --git a/debug/tst-lfschk4.cc b/debug/tst-lfschk4.cc index f3e6d47..9f04600 100644 --- a/debug/tst-lfschk4.cc +++ b/debug/tst-lfschk4.cc @@ -1,2 +1,3 @@ +#undef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 #include "tst-chk1.c" diff --git a/debug/tst-lfschk5.cc b/debug/tst-lfschk5.cc index 95d4db1..34910e7 100644 --- a/debug/tst-lfschk5.cc +++ b/debug/tst-lfschk5.cc @@ -1,2 +1,3 @@ +#undef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 #include "tst-chk2.c" diff --git a/debug/tst-lfschk6.cc b/debug/tst-lfschk6.cc index 50a1ae1..7185608 100644 --- a/debug/tst-lfschk6.cc +++ b/debug/tst-lfschk6.cc @@ -1,2 +1,3 @@ +#undef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 #include "tst-chk3.c" diff --git a/include/features.h b/include/features.h index c3ed81f..aa12c65 100644 --- 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 diff --git a/io/Makefile b/io/Makefile index 8a6562e..77a1907 100644 --- a/io/Makefile +++ b/io/Makefile @@ -99,7 +99,7 @@ CFLAGS-fallocate.c = -fexceptions CFLAGS-fallocate64.c = -fexceptions CFLAGS-sync_file_range.c = -fexceptions -CFLAGS-test-stat.c = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE +CFLAGS-test-stat.c = -U_FILE_OFFSET_BITS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE CFLAGS-test-lfs.c = -D_LARGEFILE64_SOURCE test-stat2-ARGS = Makefile . $(objpfx)test-stat2 diff --git a/malloc/memusagestat.c b/malloc/memusagestat.c index 3e0889e..96d7e28 100644 --- a/malloc/memusagestat.c +++ b/malloc/memusagestat.c @@ -16,6 +16,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, see . */ +#undef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 #include