Codebase list gmap / 1fc4e47
Drop bigendian.patch, as gmap is build for amd64 only Alexandre Mestiashvili 5 years ago
2 changed file(s) with 0 addition(s) and 64 deletion(s). Raw diff Collapse all Expand all
+0
-63
debian/patches/bigendian.patch less more
0 Subject: Update bigendian.[c,h] files in attempt to fix builds on arm and mips
1 Author: Upstream
2 Forwarded: not-needed
3 --- a/src/bigendian.c
4 +++ b/src/bigendian.c
5 @@ -19,6 +19,45 @@ Bigendian_write_char (unsigned char valu
6 }
7
8
9 +
10 +/************************************************************************
11 + * Unsigned short
12 + ************************************************************************/
13 +
14 +size_t
15 +Bigendian_fwrite_ushort (unsigned short value, FILE *fp) {
16 + unsigned char buf[2];
17 +
18 + buf[1] = value & 0xff;
19 + buf[0] = (value >>= 8) & 0xff;
20 + if (fwrite(buf,sizeof(unsigned short),2,fp) == 0) {
21 + /* Should set error indicator for stream and set errno */
22 + return 0;
23 + } else {
24 + return 1;
25 + }
26 +}
27 +
28 +size_t
29 +Bigendian_fwrite_ushorts (unsigned short *array, int n, FILE *fp) {
30 + unsigned char buf[4];
31 + unsigned short value;
32 + int i;
33 +
34 + for (i = 0; i < n; i++) {
35 + value = array[i];
36 + buf[1] = value & 0xff;
37 + buf[0] = (value >>= 8) & 0xff;
38 + if (fwrite(buf,sizeof(unsigned short),2,fp) == 0) {
39 + /* Should set error indicator for stream and set errno */
40 + return 0;
41 + }
42 + }
43 + return n;
44 +}
45 +
46 +
47 +
48 /************************************************************************
49 * Unsigned short
50 ************************************************************************/
51 --- a/src/bigendian.h
52 +++ b/src/bigendian.h
53 @@ -101,6 +101,9 @@ Bigendian_fwrite_double (double value, F
54 #define FWRITE_USHORT(x,fp) Bigendian_fwrite_ushort(x,fp)
55 #define FWRITE_USHORTS(a,n,fp) Bigendian_fwrite_ushorts(a,n,fp)
56
57 +#define FWRITE_USHORT(x,fp) Bigendian_fwrite_ushort(x,fp)
58 +#define FWRITE_USHORTS(a,n,fp) Bigendian_fwrite_ushorts(a,n,fp)
59 +
60 #define FREAD_CHARS(a,n,fp) fread(a,sizeof(char),n,fp)
61 #define FWRITE_CHARS(a,n,fp) fwrite(a,sizeof(char),n,fp)
62
0 bigendian.patch
10 only-do-cpuid-on-amd64-i386.patch
21 install-data-local