From patchwork Fri Jun 27 18:45:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 365111 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 3745E140087 for ; Sat, 28 Jun 2014 04:44:18 +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:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=NepseFBtYUQv5N4jGMGHLSiJqbUDG Qmqn2ndmDfRR9EqWukH+CgbHDUpAUv/bX95ZWZOD6WbiYGTSAaSOxl8r6/bv05eG fBETp0eQ8iDXIPeIEGXUop84U9/kvo9j6vG4FRE9jKkoVoy/ilfxeGf2yyFphqVQ qVi2T7POuXC4bs= 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:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=dZslqrilO/RM8i0znQAZEaggvCE=; b=F1c 2ubTa+ToI2W6BAp0XOBd82fqhyP91wrQEXe9kvau0lf99k6Fs8DBKmAmwBonduz7 8y6mfEX/GYrHwfYAWYXCkJjj+QHrytBfSKRgghBZWMweUjMDEmjbGPouiqRO7jF2 9KjXLLodTXbid9IICUslUCPm5b7B/zirtSqjVjPM= Received: (qmail 9039 invoked by alias); 27 Jun 2014 18:44:13 -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 9027 invoked by uid 89); 27 Jun 2014 18:44:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Date: Sat, 28 Jun 2014 00:15:36 +0530 From: Siddhesh Poyarekar To: libc-alpha@sourceware.org Subject: [PATCH] Sync up mktime.c after fixing Wundef warning for DEBUG Message-ID: <20140627184536.GJ4477@spoyarek.pnq.redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.22.1-rc1 (2013-10-16) Hi, This is what went into gnulib to fix the Wundef warning for DEBUG in mktime. The idea of defining it to 0 was not acceptable because it breaks being able to build through emacs. In the end a compromise was struck which fixed the warning and also ensured that DEBUG is set and not just defined. Siddhesh 2014-06-27 Paul Eggert mktime: merge #if/#ifdef usage from glibc * lib/mktime.c: Use "#if defined DEBUG && DEBUG", not "#if DEBUG", as that works with both Glibc's and Gnulib's style. See thread starting at Siddhesh Poyarekar's bug report at: http://lists.gnu.org/archive/html/bug-gnulib/2014-06/msg00102.html commit e2646b0c6b5acda25e9ffeb4c12a5513a1e3b5ac Author: Paul Eggert Date: Fri Jun 27 11:35:44 2014 -0700 mktime: merge #if/#ifdef usage from glibc * lib/mktime.c: Use "#if defined DEBUG && DEBUG", not "#if DEBUG", as that works with both Glibc's and Gnulib's style. See thread starting at Siddhesh Poyarekar's bug report at: http://lists.gnu.org/archive/html/bug-gnulib/2014-06/msg00102.html diff --git a/lib/mktime.c b/lib/mktime.c index f10e530..a52933e 100644 --- a/lib/mktime.c +++ b/lib/mktime.c @@ -38,7 +38,7 @@ #include /* For the real memcpy prototype. */ -#if DEBUG +#if defined DEBUG && DEBUG # include # include /* Make it work even if the system's libc has its own mktime routine. */ @@ -600,7 +600,7 @@ libc_hidden_def (mktime) libc_hidden_weak (timelocal) #endif -#if DEBUG +#if defined DEBUG && DEBUG static int not_equal_tm (const struct tm *a, const struct tm *b)