From patchwork Thu May 1 20:35:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland McGrath X-Patchwork-Id: 344807 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id 4565D1400EE for ; Fri, 2 May 2014 06:35:27 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:from:to:subject:message-id:date; q= dns; s=default; b=poMgW9FaLuyuNFOYuLFDCyexJx481dcfE4EvnEout0Xv/A EHlPcYnScsYYRScTaP1jZrU7o94iUkGTA7Y/1JQbf/c/vETF9o3QvsEAXoTMyEjO b5TNx3hee2JgCi9pSnoaHDjU3/iL/hAEAwTqvjvwE7fN11H9DW/kL5cpeoIXI= 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:mime-version:content-type :content-transfer-encoding:from:to:subject:message-id:date; s= default; bh=ILTc70hkuBHcklBMC8+iZT9unHY=; b=jRVxiTrormt4yHNrGCa4 ZxbxQTlYIxOgJ9BXg1v8EiyRO9j9LN8EucKvPBWeQwu2PIKXtNTFL1u3Yt4HxaER kh1u3tIg3KxpwzKSgTCpJhMBripWP0WnmqV20TsZCi7NYDI9XVfdFhlObJawcdg8 BrPbQ39bHRMMRz4xydgJT3c= Received: (qmail 13399 invoked by alias); 1 May 2014 20:35:21 -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 13385 invoked by uid 89); 1 May 2014 20:35:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: topped-with-meat.com MIME-Version: 1.0 From: Roland McGrath To: "GNU C. Library" Subject: [COMMITTED PATCH] Fix -Wundef warnings for _IO_JUMPS_OFFSET. Message-Id: <20140501203518.B66D42C3A18@topped-with-meat.com> Date: Thu, 1 May 2014 13:35:18 -0700 (PDT) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=J405smXS c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=14OXPxybAAAA:8 a=ETapX3Llyx4A:10 a=Z6MIti7PxpgA:10 a=kj9zAlcOel0A:10 a=hOe2yjtxAAAA:8 a=htRS65ZBYYnHz6RYaDwA:9 a=CjuIK1q_8ugA:10 This does as the subject says. I briefly held hope that there was really only one setting we were using and I would be able to remove a lot of dead code all over libio. But it turns out _IO_JUMPS_OFFSET is set or not differently for different configurations (ones that support the GLIBC_2.0 version set and ones that don't). Thanks, Roland * libio/libioP.h [!_IO_USE_OLD_IO_FILE && !_G_IO_NO_BACKWARD_COMPAT] (_IO_JUMPS_OFFSET): Define to 0. --- a/libio/libioP.h +++ b/libio/libioP.h @@ -100,6 +100,8 @@ extern "C" { #if (!defined _IO_USE_OLD_IO_FILE \ && (!defined _G_IO_NO_BACKWARD_COMPAT || _G_IO_NO_BACKWARD_COMPAT == 0)) # define _IO_JUMPS_OFFSET 1 +#else +# define _IO_JUMPS_OFFSET 0 #endif #define _IO_JUMPS(THIS) (THIS)->vtable