From patchwork Tue Aug 29 17:58:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yaakov Selkowitz X-Patchwork-Id: 111238 Delivered-To: patch@linaro.org Received: by 10.140.95.112 with SMTP id h103csp1708117qge; Tue, 29 Aug 2017 10:59:23 -0700 (PDT) X-Received: by 10.99.143.23 with SMTP id n23mr1101930pgd.119.1504029563655; Tue, 29 Aug 2017 10:59:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504029563; cv=none; d=google.com; s=arc-20160816; b=NNuTPqdgJ3n2pwdiCb4DjVXrUu1gmbO2ZpbwY+vhVt6EAMT3cdtT+MgHiK5Mplp3vk Ll/vGtPw8hiSWU84qmMmnL+imG7Vy/1sAu1Qse2f3vMe65Sfx9thllAk12HXbk57Tc1y PIVpAI3okWxBGgbNCy+TDFMk5ufN7fnOLoHu7jqcPj3RVsU/hCGAmj8kVbeHyIYDXMui 8t3Rt02hG31luYtbTAUJMQuLHLhTmSRmyweHIERQ50mlGdHwgrM5S4kzQ31B8goIKD/u FgZXeT6rJfyHvbkon6ZgEIUgvie0ElpqTnT2DQ+NG2iLtm1N5zFtcRHs9K8uMxZQVmLX qfsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from:dmarc-filter :delivered-to:sender:list-help:list-post:list-archive:list-subscribe :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature:arc-authentication-results; bh=CtZCQ8/a+2sALgYz8A7i1qsrJyXGv+BIvQ5Mm74p5Lk=; b=ntW6eF8Fg9YB/PkMSa9ofr4GgJp52qtyDFG7QVBLrpz2IRtkm18o9FNzboxzGKIFYu /orWhzFzFYeZBPNpFn5iQBtJnC4tE46AJEOmNQBAf8q5rWjzIbEGrN8BB/czVSoNXg4i cg9xn3Of1pgVmtAnwi+5G/v+envDq8OFDQDGZ/RcDmMCofk/C7oDrPnAV47ENRgYUMdU CD4qo2RCPaiIpcZKMO56Gy0WADmTvq5lzU2E66AOZ04dowRjrf82EdN4NPb5NN4vhPZJ t/3i1aJI9o0awmT00d4zVzp8zo6OBey5URlVBLa3f6ARGOcHhZdwAopTPMrQKeKre+Z8 e+/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=l///yVzm; spf=pass (google.com: domain of newlib-return-15149-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=newlib-return-15149-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id f3si2931525plb.107.2017.08.29.10.59.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Aug 2017 10:59:23 -0700 (PDT) Received-SPF: pass (google.com: domain of newlib-return-15149-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=l///yVzm; spf=pass (google.com: domain of newlib-return-15149-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=newlib-return-15149-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=rUqTsAtdZZOkjNScmsBIrgGoqRsxX5R KHG57Zv6K6chuVdi24Vq1BuXsHVUjUHdbntj25o5DNl4QB7QO8eVkfRDW1m03dir dCQHNB+rj3hZlxKbaH1qG9HqU0HG1vxT/VnU9ZFRtkhqBvNUBsECtqEbj8RAdsrL NBvSlC89A5MU= 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:subject:date:message-id:in-reply-to :references; s=default; bh=MdociT2mY6whC8R8w8ILrl23FXg=; b=l///y VzmMjW/YtgFmKjfO0DYDSWThB6C6G+9FJipyJGd6QxHXf8+PTWEx2OiOrZp0Nz3h uvyK/rNWYYrjnNN02gORETFHfnW21BHLKO2cjrcXAaMW1VHyAKb9sr+CC3SYm5T9 ad8upSmJuICAjk5+A1dsW2wcl7B6dwt1MQWymQ= Received: (qmail 19889 invoked by alias); 29 Aug 2017 17:59:15 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Delivered-To: mailing list newlib@sourceware.org Received: (qmail 19839 invoked by uid 89); 29 Aug 2017 17:59:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=fls X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 29 Aug 2017 17:59:04 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6F2BF4DD4B for ; Tue, 29 Aug 2017 17:59:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6F2BF4DD4B Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=yselkowi@redhat.com Received: from localhost.localdomain (ovpn-120-61.rdu2.redhat.com [10.10.120.61]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0B81F5C472 for ; Tue, 29 Aug 2017 17:59:02 +0000 (UTC) From: Yaakov Selkowitz To: newlib@sourceware.org Subject: [PATCH] include: fix ffs, fls guards Date: Tue, 29 Aug 2017 12:58:52 -0500 Message-Id: <20170829175852.6280-1-yselkowi@redhat.com> In-Reply-To: References: Signed-off-by: Yaakov Selkowitz --- newlib/libc/include/strings.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.14.1 diff --git a/newlib/libc/include/strings.h b/newlib/libc/include/strings.h index 35fcdc092..122f2fcd6 100644 --- a/newlib/libc/include/strings.h +++ b/newlib/libc/include/strings.h @@ -50,12 +50,14 @@ void bzero(void *, size_t); /* LEGACY */ #if __BSD_VISIBLE void explicit_bzero(void *, size_t); #endif -#if __XSI_VISIBLE +#if __MISC_VISIBLE || __POSIX_VISIBLE < 200809 || __XSI_VISIBLE >= 700 int ffs(int) __pure2; #endif -#if __BSD_VISIBLE +#if __GNU_VISIBLE int ffsl(long) __pure2; int ffsll(long long) __pure2; +#endif +#if __BSD_VISIBLE int fls(int) __pure2; int flsl(long) __pure2; int flsll(long long) __pure2;