[Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

Matt Turner mattst88 at gmail.com
Sun Nov 26 00:46:21 UTC 2017


On Sat, Nov 25, 2017 at 4:11 PM, Andres Gomez <agomez at igalia.com> wrote:
> On Sat, 2017-11-25 at 16:00 -0800, Matt Turner wrote:
>> On Sat, Nov 25, 2017 at 1:58 PM, Jon Turney <jon.turney at dronecode.org.uk> wrote:
>> > On 25/11/2017 04:24, Matt Turner wrote:
>> > >
>> > > diff --git a/src/util/u_endian.h b/src/util/u_endian.h
>> > > index 7bbd7dc215..3d5c006f35 100644
>> > > --- a/src/util/u_endian.h
>> > > +++ b/src/util/u_endian.h
>> > > @@ -67,4 +67,7 @@
>> > >
>> > >   #endif
>> > >
>> > > +#warn Unknown Endianness for this platform. Assuming little endian
>> > > +#define PIPE_ARCH_LITTLE_ENDIAN
>> > > +
>> > >   #endif
>> >
>> >
>> > I'm wondering what compiler this issues a warning on. gcc only seems to
>> > support #warning, not #warn, but that's not portable to msvc...
>> >
>> > > ./util/u_endian.h:70:2: error: invalid preprocessing directive #warn
>> > >  #warn Unknown Endianness for this platform. Assuming little endian
>> > >   ^
>>
>> Sigh. Was supposed to be #warning. Strangely vim even syntax
>> highlights #warn. Committed a brown bag fix.
>
> As Jon was commenting, #warning is neither portable to MSVC 😕
>
> AppVeyor error:
> https://ci.appveyor.com/project/mesa3d/mesa/build/6251

Bizarre. I've never known about that MSVC annoyance. We even use
#warning multiple other places in Gallium.

I've committed what I hope is the final fix.


More information about the mesa-dev mailing list