From patchwork Tue Apr 29 18:07:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 343963 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 E1897140106 for ; Wed, 30 Apr 2014 04:07:36 +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:from:date:to:cc:subject:mime-version :content-type:content-transfer-encoding:message-id; q=dns; s= default; b=sA4eLUyzERzf7pNlUV9qQ62zg58FKpwi/8zZAKGTIdRUh/TPq0IWF TLGS+o9HBKjzFQdih/MGfkarXiapqxKXJ9FNAT3GsD2iuDYkBuChP0XWpFogq4/C NIM9cm3EykveyEpVbZXK1zA/H/XLgNmemN+U6JiP3hTBVbvzPrqnr4= 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:date:to:cc:subject:mime-version :content-type:content-transfer-encoding:message-id; s=default; bh=KWA0A0I+bBOewyojT8XAc7t2D1M=; b=R02RDz2PLQJXDG+Rj3g3Z2vCaeg8 0R8f/xqzFJSsd0hqaGoOHGf6HO/BaYefIKIWhgcP6dzwAVF6F4t24Q41YZO3U4ES Xw61MAH3tq89bqVJKu2SK784SIMlUmmNcz/nrPCWZefz2TFcSY3/faV5LJJCzG7N 6kE3LX16PiD3CbA= Received: (qmail 18964 invoked by alias); 29 Apr 2014 18:07:30 -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 18952 invoked by uid 89); 29 Apr 2014 18:07:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com From: "Steve Ellcey " Date: Tue, 29 Apr 2014 11:07:15 -0700 To: CC: Subject: [Patch] Fix __mips16 undef macro warnings. User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Message-ID: This is a change to stdlib/longlong.h to fix the undefined macro warning for __mips16. The GCC compiler defines __mips16 when compiling in mips16 mode and does not define it othewise. So this patch just changes the #if check to a #if defined(). stdlib/longlong.h is also in the GCC and binutils trees as include/longlong.h. If this patch is approved I will submit it to those groups for checkin as well. Right now it looks like the GCC and glibc files are in sync but the last change for clz on ARM did not make it into binutils for some reason. Tested with mips-mti-linux-gnu to verify that no object files were changed due to this patch. OK to checkin? Steve Ellcey sellcey@mips.com 2014-04-29 Steve Ellcey * stdlib/longlong.h: Use 'defined()' to check __mips16. diff --git a/stdlib/longlong.h b/stdlib/longlong.h index d45dbe2..070b40c 100644 --- a/stdlib/longlong.h +++ b/stdlib/longlong.h @@ -848,7 +848,7 @@ extern UDItype __umulsidi3 (USItype, USItype); #define UMUL_TIME 10 #define UDIV_TIME 100 -#if (__mips == 32 || __mips == 64) && ! __mips16 +#if (__mips == 32 || __mips == 64) && ! defined (__mips16) #define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X)) #define COUNT_LEADING_ZEROS_0 32 #endif