From patchwork Thu Aug 28 06:55:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 383708 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 20AA2140081 for ; Thu, 28 Aug 2014 16:55:24 +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:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=voLp 47EIzMXNiWZEYUJuWRJbMGGW1CtKe3+mTZfzlMPKBuK4lVuQq++CrSsd4OlkffHG 2qhB68nwq6v2V00Cx5ZLiSSARPRkr2RuYS8/VWPPh5ZSVTWzgN0RkkmhQ+GAf6Vr yKQhbv76JUvT4aP7c3+QEIeZnvKaY9oCWQj3S5E= 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:references :mime-version:content-type:in-reply-to; s=default; bh=qB93iFvtje vwZAGIZQOLdCtwZ/k=; b=PU7L5PkQEX66WHap5LTOhqbxVuIODQ2xbxiMtDFBZS qd0vuH9hVUmUjIw14yIJSq7bfxnxA49DNJtdBTF/frfCfYZCsvErwt5kp9trNSlH QGxlmhyfo+r0RIox1W6ayqIkYc2OK3rj+rhMfZdhNA6OuftuibAM/vOB8A4XypPC s= Received: (qmail 3208 invoked by alias); 28 Aug 2014 06:55:18 -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 3195 invoked by uid 89); 28 Aug 2014 06:55:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Date: Thu, 28 Aug 2014 12:25:09 +0530 From: Siddhesh Poyarekar To: libc-alpha@sourceware.org Subject: [PATCH 17/19 v2] Use IS_IN only when _LIBC is defined Message-ID: <20140828065509.GI8020@spoyarek.pnq.redhat.com> References: <1408618663-2281-1-git-send-email-siddhesh@redhat.com> <1408618663-2281-18-git-send-email-siddhesh@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1408618663-2281-18-git-send-email-siddhesh@redhat.com> User-Agent: Mutt/1.5.22.1-rc1 (2013-10-16) Hi, Here's an updated patch that fixes conformtest failures due to IS_IN. The conformtest tests ideally ought to include the headers to be installed, but cannot do so currently and hence does its tests using headers in include/. Due to this it fails because it doesn't include any of the libc headers and consequently does not have a definition for IS_IN. This patch guards instances in such headers with #ifdef _LIBC. There are a couple of installed headers that have this problem too - stdio-lock.h and libc-lock.h. Both headers however never get used in normal applications since they're only included when _IO_MTSAFE_IO is defined, which it isn't in the normal case. I haven't tried to fix these headers because it won't make a difference and ideally they ought to be removed. I intend to do that as a separate patch after 2.20 is released. I have also verified that this does not result in any change in generated code on x86_64. Siddhesh From 00592dd98e35bc9771d17114f9c1da62368f8488 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Mon, 25 Aug 2014 15:58:46 +0530 Subject: [PATCH] Use IS_IN when _LIBC is defined This change is only useful for the conformance tests since the headers changed are not installed. The conformance tests fail due to IS_IN not being defined, so wrap it with a check to make sure that _LIBC is defined. * include/bits/stdlib-float.h: Use IS_IN only if _LIBC is defined. * include/mqueue.h: Likewise. * include/stdlib.h: Likewise. --- include/bits/stdlib-float.h | 6 ++++-- include/mqueue.h | 4 +++- include/stdlib.h | 10 ++++++---- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/include/bits/stdlib-float.h b/include/bits/stdlib-float.h index 3466314..debb364 100644 --- a/include/bits/stdlib-float.h +++ b/include/bits/stdlib-float.h @@ -1,4 +1,6 @@ /* No floating-point inline functions in rtld. */ -#if !IS_IN (rtld) -# include +#ifdef _LIBC +# if !IS_IN (rtld) +# include +# endif #endif diff --git a/include/mqueue.h b/include/mqueue.h index aba788e..e40f3cb 100644 --- a/include/mqueue.h +++ b/include/mqueue.h @@ -1,7 +1,9 @@ #include -#if IS_IN (librt) +#ifdef _LIBC +# if IS_IN (librt) hidden_proto (mq_timedsend) hidden_proto (mq_timedreceive) hidden_proto (mq_setattr) +# endif #endif diff --git a/include/stdlib.h b/include/stdlib.h index 734f251..a884b51 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -226,11 +226,13 @@ extern int __qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len); -# if IS_IN (libc) -# undef MB_CUR_MAX -# define MB_CUR_MAX (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX)) +# if defined _LIBC +# if IS_IN (libc) +# undef MB_CUR_MAX +# define MB_CUR_MAX (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX)) -# define __cxa_atexit(func, arg, d) INTUSE(__cxa_atexit) (func, arg, d) +# define __cxa_atexit(func, arg, d) INTUSE(__cxa_atexit) (func, arg, d) +# endif # endif extern void *__default_morecore (ptrdiff_t) __THROW;