This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Fix MIPS build failure caused by -Werror=undef


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 <bits/endian.h> directly; include <endian.h> 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  <sellcey@imgtec.com>

	* 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]