forked from pool/python-distorm3
Accepting request 647595 from devel:languages:python
- 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. OBS-URL: https://build.opensuse.org/request/show/647595 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-distorm3?expand=0&rev=14
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 9 11:37:56 UTC 2018 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- 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
|
||||
|
||||
|
||||
@@ -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/
|
||||
#
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user