Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 241137 Details for
Bug 222301
app-arch/unace-2.5-r1 - unace segfaults on HPPA
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix endianness detection
unace-2.5-endianness.patch (text/plain), 1.02 KB, created by
Guy Martin (RETIRED)
on 2010-08-02 18:45:42 UTC
(
hide
)
Description:
Fix endianness detection
Filename:
MIME Type:
Creator:
Guy Martin (RETIRED)
Created:
2010-08-02 18:45:42 UTC
Size:
1.02 KB
patch
obsolete
>diff -uNr unace-2.5.orig/source/base/all/all.h unace-2.5/source/base/all/all.h >--- unace-2.5.orig/source/base/all/all.h 2010-08-02 18:38:29.332234367 +0000 >+++ unace-2.5/source/base/all/all.h 2010-08-02 18:40:49.050795154 +0000 >@@ -6,6 +6,8 @@ > #include <unistd.h> > #endif > >+#include <endian.h> >+ > #define SETALIGNMENT > #include "base/all/packprag.h" > >@@ -61,7 +63,7 @@ > #define put_unaligned(ptr, val) ((void)( *(ptr) = (val) )) > #endif /* __EMULATE_UNALIGNED__ */ > >-#ifdef __BIG_ENDIAN__ >+#if BYTE_ORDER == BIG_ENDIAN > #define ADJUST_ENDIANNESS16(Ptr) {\ > USHORT x = get_unaligned((USHORT*) (Ptr));\ > put_unaligned((USHORT*) (Ptr), x >> 8 | x << 8);\ >@@ -78,10 +80,12 @@ > x2 = x2 >> 16 | x2 << 16;\ > put_unaligned(((ULONG*) (Ptr)), (x2&0xff00ff00) >> 8 | (x2&0x00ff00ff) << 8);\ > } >-#else >+#elif BYTE_ORDER == LITTLE_ENDIAN > #define ADJUST_ENDIANNESS16(Ptr) > #define ADJUST_ENDIANNESS32(Ptr) >-#define ADJUST_ENDIANNESS64(Ptr) >+#define ADJUST_ENDIANNESS64(Ptr) >+#else >+#error Please define system endianness > #endif > > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 222301
:
241137
|
241249
|
241251