From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 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 dcvr.yhbt.net (Postfix) with ESMTPS id 5A4E920248 for ; Wed, 27 Feb 2019 11:21:08 +0000 (UTC) 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; q=dns; s=default; b=YaZGe1pZk2puCQZ0bOXOa6IaW6sr/1z vuJFf5TMrodVq5zr1ctDzjOsxqQLHc09W/XZmxnzbwLnuTO7cSLiNZRLN1CCStlZ Aw2cnH8GxIYxkIgY31wGwz3x2+Jsdu45gBfg0vFp3nWciHXBjV8TIJTHk1uRUz62 dBtX670MzfPg= 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; s=default; bh=wJXMWGol29UVqOVbfQY8AplQGBE=; b=b/kcw 0jdvEJsI1GgeA83P4ukHUcsPZcfNkHtW+vimXgym2cEwez/zYe28IEhpROKBFkg8 EPWWsxZNVUvwazLEewnC3Jj+Zy9ywnfC9fd1At9aIvGZIYhIy9eyCbOewvb04+cU M7MrqwM/mLWK+MNtg1KH6OEtOHZ7YQa2boI7rA= Received: (qmail 61723 invoked by alias); 27 Feb 2019 11:21:05 -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 Received: (qmail 61709 invoked by uid 89); 27 Feb 2019 11:21:05 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-out.m-online.net From: Lukasz Majewski To: libc-alpha@sourceware.org Cc: Paul Eggert , Joseph Myers Subject: [PATCH v2 2/2] Fix time/mktime.c and time/gmtime.c for gnulib compatibility Date: Wed, 27 Feb 2019 12:20:42 +0100 Message-Id: <20190227112042.1794-2-lukma@denx.de> In-Reply-To: <20190227112042.1794-1-lukma@denx.de> References: <20190227112042.1794-1-lukma@denx.de> From: Paul Eggert Tested with 'make check' on x86_64-linux-gnu and i686-linux.gnu. * time/mktime.c (__mktime64): Guard weak_alias with #ifdef (__mktime64): Guard libc_hidden_def with #if _LIBC (__mktime64): Guard libc_hidden_weak with #if _LIBC (mktime): Only build when _LIBC is defined * time/timegm.c: (timegm): Only build when _LIBC is defined --- time/mktime.c | 15 +++------------ time/timegm.c | 2 +- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/time/mktime.c b/time/mktime.c index 5d3644e213..89293a76fb 100644 --- a/time/mktime.c +++ b/time/mktime.c @@ -549,18 +549,14 @@ __mktime64 (struct tm *tp) return mktime (tp); # endif } -#endif /* _LIBC || NEED_MKTIME_WORKING || NEED_MKTIME_WINDOWS */ -#ifdef weak_alias weak_alias (__mktime64, __timelocal64) -#endif - -#ifdef _LIBC libc_hidden_def (__mktime64) libc_hidden_weak (__timelocal64) -#endif -#if __TIMESIZE != 64 +#endif /* _LIBC || NEED_MKTIME_WORKING || NEED_MKTIME_WINDOWS */ + +#if defined _LIBC && __TIMESIZE != 64 /* The 32-bit-time wrapper. */ time_t @@ -573,13 +569,8 @@ mktime (struct tm *tp) return -1; } -#ifdef weak_alias weak_alias (mktime, timelocal) -#endif - -#ifdef _LIBC libc_hidden_def (mktime) libc_hidden_weak (timelocal) -#endif #endif diff --git a/time/timegm.c b/time/timegm.c index 0cbe60a7fe..f04428d032 100644 --- a/time/timegm.c +++ b/time/timegm.c @@ -35,7 +35,7 @@ __timegm64 (struct tm *tmp) return __mktime_internal (tmp, __gmtime64_r, &gmtime_offset); } -#if __TIMESIZE != 64 +#if defined _LIBC && __TIMESIZE != 64 time_t timegm (struct tm *tmp) -- 2.11.0