zydis: build static lib
* for GCC2 build with a modern GCC as suggested by waddlesplash * make the headers compatible with GCC2 Change-Id: Ice74eeddbe10bc8f9cf9ae90baa833a46bb3c676 Reviewed-on: https://review.haiku-os.org/c/haiku/+/7848 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
cb130a72e8
commit
06b1eff6ec
@@ -61,10 +61,12 @@ ZYAN_INLINE ZyanU64 ZyanAbsI64(ZyanI64 x)
|
||||
// INT_MIN special case. Can't use the value directly because GCC thinks
|
||||
// it's too big for an INT64 literal, however is perfectly happy to accept
|
||||
// this expression. This is also hit INT64_MIN is defined in `stdint.h`.
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
if (x == (-0x7fffffffffffffff - 1))
|
||||
{
|
||||
return 0x8000000000000000u;
|
||||
}
|
||||
#endif
|
||||
|
||||
return (ZyanU64)(x < 0 ? -x : x);
|
||||
}
|
||||
|
||||
@@ -127,7 +127,9 @@ typedef ZyanU8 ZydisTokenType;
|
||||
/* Token */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
#if !defined(__HAIKU__) || (defined(__GNUC__) && (__GNUC__ >= 4))
|
||||
#pragma pack(push, 1)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Defines the `ZydisFormatterToken` struct.
|
||||
@@ -147,7 +149,9 @@ typedef struct ZydisFormatterToken_
|
||||
ZyanU8 next;
|
||||
} ZydisFormatterToken;
|
||||
|
||||
#if !defined(__HAIKU__) || (defined(__GNUC__) && (__GNUC__ >= 4))
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Defines the `ZydisFormatterTokenConst` data-type.
|
||||
|
||||
@@ -44,7 +44,7 @@ extern "C" {
|
||||
/* Enums and types */
|
||||
/* ============================================================================================== */
|
||||
|
||||
#if !defined(ZYAN_APPLE)
|
||||
#if !defined(ZYAN_APPLE) && (!defined(__HAIKU__) || (defined(__GNUC__) && (__GNUC__ >= 4)))
|
||||
# pragma pack(push, 1)
|
||||
#endif
|
||||
|
||||
@@ -68,7 +68,7 @@ typedef struct ZydisShortString_
|
||||
ZyanU8 size;
|
||||
} ZydisShortString;
|
||||
|
||||
#if !defined(ZYAN_APPLE)
|
||||
#if !defined(ZYAN_APPLE) && (!defined(__HAIKU__) || (defined(__GNUC__) && (__GNUC__ >= 4)))
|
||||
# pragma pack(pop)
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user