File: ftbfs-armel.patch

package info (click to toggle)
virtuoso-opensource 7.2.5.1%2Bdfsg1-0.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 284,752 kB
  • sloc: ansic: 641,220; sql: 490,413; xml: 269,570; java: 83,893; javascript: 79,900; cpp: 36,927; sh: 31,648; cs: 25,702; php: 12,690; yacc: 10,227; lex: 7,601; makefile: 7,127; jsp: 4,523; awk: 1,697; perl: 1,013; ruby: 1,003; python: 326
file content (48 lines) | stat: -rw-r--r-- 1,355 bytes parent folder | download | duplicates (2)
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
Description: FTBFS on armel
 Fix fragile memory manipulation preprocessor macros on little endian archs.
Author: Sune Vuorela <debian@pusling.com>
Last-Update: 2010-03-14
--- a/libsrc/Wi/widisk.h
+++ b/libsrc/Wi/widisk.h
@@ -230,12 +230,20 @@ typedef unsigned char * db_buf_t;
 
 #else
 
+// Debian maintainer: armel compatibility
+#if 0
 #define LONG_SET(p, l) \
   *((int32*) (p)) = (l)
+#endif
+static inline void LONG_SET(unsigned char *p, int32 l) { int32 x = l; memcpy(p, &x, 4);  }
 
 
+// Debian maintainer: armel compatibility
+#if 0
 #define LONG_REF(p) \
   (* ((int32*) (p)))
+#endif
+static inline int32 LONG_REF(unsigned char *p) { int32 ret; memcpy(&ret, p, 4); return ret; }
 
 #endif
 
@@ -271,12 +279,20 @@ typedef unsigned char * db_buf_t;
 
 #define UINT32PL(p)  ((unsigned int32*)(p))
 
+// Debian maintainer: armel compatibility
+#if 0
 #define INT64_REF(place) \
   (((int64) (UINT32PL(place)[0])) << 32 | UINT32PL(place)[1])
+#endif
+static inline int64 INT64_REF(unsigned char *p) { int64 ret; memcpy(&ret, p, 8); return ret; }
 
+// Debian maintainer: armel compatibility
+#if 0
 #define INT64_SET(place, v) \
   {((unsigned int32*)(place))[0] = (v) >> 32; \
   ((unsigned int32*)(place))[1] = (int32)(v); }
+#endif
+static inline void INT64_SET(unsigned char *place, int64 v) { int64 x = v; memcpy(place, &x, 8);  }
 
 #endif