diff --git a/0001-don-t-stutter-static-on-BigEndian.patch b/0001-don-t-stutter-static-on-BigEndian.patch index 355a312..b5fdae3 100644 --- a/0001-don-t-stutter-static-on-BigEndian.patch +++ b/0001-don-t-stutter-static-on-BigEndian.patch @@ -10,15 +10,59 @@ Subject: [PATCH] don't stutter static on BigEndian --- a/src/config.h +++ b/src/config.h -@@ -57,7 +57,7 @@ This library is licensed under the BSD l - - #define _DLLEXPORT_ - #define _FASTCALL_ --#define _INLINE_ static -+#define _INLINE_ - /* GCC ignores this directive... */ - /*#define _FASTCALL_ __attribute__((__fastcall__))*/ +@@ -128,34 +128,45 @@ This library is licensed under the BSD l + /* Define stream read functions for big endian systems. */ + #ifdef BE_SYSTEM ++ ++/* Avoid defining 'static static' for GCC. */ ++#ifndef __GNUC__ ++#define STATIC_INLINE static _INLINE_ ++#else ++#define STATIC_INLINE static ++#endif ++ + /* +- * These functions can read from the stream safely! ++ * Assumption: These functions can read from the stream safely! + * Swap endianity of input to little endian. + */ +-static _INLINE_ int16_t RSHORT(const uint8_t *s) ++STATIC_INLINE int16_t RSHORT(const uint8_t *s) + { + return s[0] | (s[1] << 8); + } +-static _INLINE_ uint16_t RUSHORT(const uint8_t *s) ++STATIC_INLINE uint16_t RUSHORT(const uint8_t *s) + { + return s[0] | (s[1] << 8); + } +-static _INLINE_ int32_t RLONG(const uint8_t *s) ++STATIC_INLINE int32_t RLONG(const uint8_t *s) + { + return s[0] | (s[1] << 8) | (s[2] << 16) | (s[3] << 24); + } +-static _INLINE_ uint32_t RULONG(const uint8_t *s) ++STATIC_INLINE uint32_t RULONG(const uint8_t *s) + { + return s[0] | (s[1] << 8) | (s[2] << 16) | (s[3] << 24); + } +-static _INLINE_ int64_t RLLONG(const uint8_t *s) ++STATIC_INLINE int64_t RLLONG(const uint8_t *s) + { + return s[0] | (s[1] << 8) | (s[2] << 16) | (s[3] << 24) | ((uint64_t)s[4] << 32) | ((uint64_t)s[5] << 40) | ((uint64_t)s[6] << 48) | ((uint64_t)s[7] << 56); + } +-static _INLINE_ uint64_t RULLONG(const uint8_t *s) ++STATIC_INLINE uint64_t RULLONG(const uint8_t *s) + { + return s[0] | (s[1] << 8) | (s[2] << 16) | (s[3] << 24) | ((uint64_t)s[4] << 32) | ((uint64_t)s[5] << 40) | ((uint64_t)s[6] << 48) | ((uint64_t)s[7] << 56); + } ++ ++#undef STATIC_INLINE ++ + #else + /* Little endian macro's will just make the cast. */ + #define RSHORT(x) *(int16_t *)x --- a/src/prefix.c +++ b/src/prefix.c @@ -116,7 +116,7 @@ uint16_t prefixes_set_unused_mask(_Prefi diff --git a/python-distorm3.changes b/python-distorm3.changes index 32bb0ea..91105e9 100644 --- a/python-distorm3.changes +++ b/python-distorm3.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Nov 9 11:37:56 UTC 2018 - Matej Cepl + +- Updated 0001-don-t-stutter-static-on-BigEndian.patch from personal + communication with the upstream developer to make test suite pass + completely on Big Endian machines. + ------------------------------------------------------------------- Thu Jul 26 10:38:47 UTC 2018 - jengelh@inai.de diff --git a/python-distorm3.spec b/python-distorm3.spec index 5446b55..dc677b4 100644 --- a/python-distorm3.spec +++ b/python-distorm3.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ #