aboutsummaryrefslogtreecommitdiff
path: root/devel/distorm/files/patch-src__config.h
blob: 715f125ce75ecc861e14721d37e3476269535da3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
--- src/config.h.orig	2011-06-14 14:58:29.000000000 -0400
+++ src/config.h	2011-12-28 00:17:59.000000000 -0500
@@ -133,27 +133,51 @@
  * These functions can read from the stream safely!
  * Swap endianity of input to little endian.
  */
+#ifdef __GNUC__
+_INLINE_ int16_t RSHORT(const uint8_t *s)
+#else
 static _INLINE_ int16_t RSHORT(const uint8_t *s)
+#endif
 {
 	return s[0] | (s[1] << 8);
 }
+#ifdef __GNUC__
+_INLINE_ uint16_t RUSHORT(const uint8_t *s)
+#else
 static _INLINE_ uint16_t RUSHORT(const uint8_t *s)
+#endif
 {
 	return s[0] | (s[1] << 8);
 }
+#ifdef __GNUC__
+_INLINE_ int32_t RLONG(const uint8_t *s)
+#else
 static _INLINE_ int32_t RLONG(const uint8_t *s)
+#endif
 {
 	return s[0] | (s[1] << 8) | (s[2] << 16) | (s[3] << 24);
 }
+#ifdef __GNUC__
+_INLINE_ uint32_t RULONG(const uint8_t *s)
+#else
 static _INLINE_ uint32_t RULONG(const uint8_t *s)
+#endif
 {
 	return s[0] | (s[1] << 8) | (s[2] << 16) | (s[3] << 24);
 }
+#ifdef __GNUC__
+_INLINE_ int64_t RLLONG(const uint8_t *s)
+#else
 static _INLINE_ int64_t RLLONG(const uint8_t *s)
+#endif
 {
 	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);
 }
+#ifdef __GNUC__
+_INLINE_ uint64_t RULLONG(const uint8_t *s)
+#else
 static _INLINE_ uint64_t RULLONG(const uint8_t *s)
+#endif
 {
 	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);
 }