From patchwork Tue Feb 17 18:01:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 5138 Received: (qmail 19694 invoked by alias); 17 Feb 2015 18:01:15 -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 19643 invoked by uid 89); 17 Feb 2015 18:01:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com Message-ID: <1424196067.27855.80.camel@ubuntu-sellcey> Subject: Re: [Patch] Fix MIPS build failure caused by -Werror=undef From: Steve Ellcey Reply-To: To: "Maciej W. Rozycki" CC: Date: Tue, 17 Feb 2015 10:01:07 -0800 In-Reply-To: References: <04dee4c5-a06d-447e-8174-ab39f52a4b48@BAMAIL02.ba.imgtec.org> MIME-Version: 1.0 On Sat, 2015-02-14 at 14:33 +0000, Maciej W. Rozycki wrote: > > diff --git a/sysdeps/mips/bits/endian.h b/sysdeps/mips/bits/endian.h > > index 9586104..43ce009 100644 > > --- a/sysdeps/mips/bits/endian.h > > +++ b/sysdeps/mips/bits/endian.h > > @@ -5,7 +5,7 @@ > > # error "Never use directly; include instead." > > #endif > > > > -#if __MIPSEB > > +#ifdef __MIPSEB > > # define __BYTE_ORDER __BIG_ENDIAN > > #endif > > #if __MIPSEL > > ^^^^^^^^^^^^ > Don't we need a complementing change for __MIPSEL here then too? > > Maciej You are right. Apparently, this header is not actually used in the glibc build since it didn't cause a build failure but we should fix it so it doesn't cause an error/warning for users who do include the header file. I will check this in as an obvious fix: 2015-02-17 Steve Ellcey * sysdeps/mips/bits/endian.h (__MIPSEL): Use #ifdef instead of #if. diff --git a/sysdeps/mips/bits/endian.h b/sysdeps/mips/bits/endian.h index 43ce009..92e97c7 100644 --- a/sysdeps/mips/bits/endian.h +++ b/sysdeps/mips/bits/endian.h @@ -8,6 +8,6 @@ #ifdef __MIPSEB # define __BYTE_ORDER __BIG_ENDIAN #endif -#if __MIPSEL +#ifdef __MIPSEL # define __BYTE_ORDER __LITTLE_ENDIAN #endif