[llvm-commits] [PATCH compiler-rt] OpenBSD and Bitrig need machine/endian.h
Eric Christopher
echristo at apple.com
Mon Sep 17 11:37:31 PDT 2012
Must have missed this. It looks fine.
Do you need someone to commit it? If so, please send me the patch as an attachment.
Thanks!
-eric
On Sep 7, 2012, at 6:11 AM, David Hill <dhill at mindcry.org> wrote:
> Ping.
>
> On Wed, Sep 05, 2012 at 09:45:18AM -0400, David Hill wrote:
>> Ping.
>>
>> On Tue, Sep 04, 2012 at 09:21:37AM -0400, David Hill wrote:
>>> Ping.
>>>
>>> On Sat, Sep 01, 2012 at 04:29:03PM -0400, David Hill wrote:
>>>> Ping.
>>>>
>>>> On Fri, Aug 31, 2012 at 12:02:48PM -0400, David Hill wrote:
>>>>> Hello -
>>>>>
>>>>> Attached is a diff for compiler-rt. Both OpenBSD and Bitrig need to
>>>>> include machine/endian.h to get the _BYTE_ORDER define.
>>>>>
>>>>> Please review.
>>>>>
>>>>> Thanks,
>>>>> David
>>>>>
>>>>
>>>>> diff --git a/lib/int_endianness.h b/lib/int_endianness.h
>>>>> index 70bd177..edb58c8 100644
>>>>> --- a/lib/int_endianness.h
>>>>> +++ b/lib/int_endianness.h
>>>>> @@ -31,7 +31,7 @@
>>>>>
>>>>> /* .. */
>>>>>
>>>>> -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__minix)
>>>>> +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__minix)
>>>>> #include <sys/endian.h>
>>>>>
>>>>> #if _BYTE_ORDER == _BIG_ENDIAN
>>>>> @@ -44,6 +44,19 @@
>>>>>
>>>>> #endif /* *BSD */
>>>>>
>>>>> +#if defined(__OpenBSD__) || defined(__Bitrig__)
>>>>> +#include <machine/endian.h>
>>>>> +
>>>>> +#if _BYTE_ORDER == _BIG_ENDIAN
>>>>> +#define _YUGA_LITTLE_ENDIAN 0
>>>>> +#define _YUGA_BIG_ENDIAN 1
>>>>> +#elif _BYTE_ORDER == _LITTLE_ENDIAN
>>>>> +#define _YUGA_LITTLE_ENDIAN 1
>>>>> +#define _YUGA_BIG_ENDIAN 0
>>>>> +#endif /* _BYTE_ORDER */
>>>>> +
>>>>> +#endif /* OpenBSD and Bitrig. */
>>>>> +
>>>>> /* .. */
>>>>>
>>>>> /* Mac OSX has __BIG_ENDIAN__ or __LITTLE_ENDIAN__ automatically set by the compiler (at least with GCC) */
>>>>> diff --git a/test/Unit/endianness.h b/test/Unit/endianness.h
>>>>> index 669e6f1..06c53de 100644
>>>>> --- a/test/Unit/endianness.h
>>>>> +++ b/test/Unit/endianness.h
>>>>> @@ -51,6 +51,21 @@
>>>>>
>>>>> /* .. */
>>>>>
>>>>> +#if defined(__OpenBSD__) || defined(__Bitrig__)
>>>>> +#include <machine/endian.h>
>>>>> +
>>>>> +#if _BYTE_ORDER == _BIG_ENDIAN
>>>>> +#define _YUGA_LITTLE_ENDIAN 0
>>>>> +#define _YUGA_BIG_ENDIAN 1
>>>>> +#elif _BYTE_ORDER == _LITTLE_ENDIAN
>>>>> +#define _YUGA_LITTLE_ENDIAN 1
>>>>> +#define _YUGA_BIG_ENDIAN 0
>>>>> +#endif /* _BYTE_ORDER */
>>>>> +
>>>>> +#endif /* OpenBSD and Bitrig. */
>>>>> +
>>>>> +/* .. */
>>>>> +
>>>>> /* Mac OSX has __BIG_ENDIAN__ or __LITTLE_ENDIAN__ automatically set by the compiler (at least with GCC) */
>>>>> #if defined(__APPLE__) && defined(__MACH__) || defined(__ellcc__ )
>>>>>
>>>>
>>>>> _______________________________________________
>>>>> llvm-commits mailing list
>>>>> llvm-commits at cs.uiuc.edu
>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>>
>>>> _______________________________________________
>>>> llvm-commits mailing list
>>>> llvm-commits at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list