Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (2)
Add patch supposedly fixing builds on mips and arm architectures
· fc274614
Alexandre Mestiashvili
authored
Oct 04, 2018
fc274614
Update changelog
· 42942a2e
Alexandre Mestiashvili
authored
Oct 04, 2018
Gbp-Dch: Ignore
42942a2e
Show whitespace changes
Inline
Side-by-side
debian/changelog
View file @
42942a2e
gmap (2018-09-27-2) experimental; urgency=medium
* Add patch supposedly fixing builds on MIPS and ARM architectures
-- Alexandre Mestiashvili <mestia@debian.org> Thu, 04 Oct 2018 14:43:27 +0000
gmap (2018-09-27-1) experimental; urgency=medium
* New upstream version 2018-09-27
...
...
debian/patches/bigendian.patch
0 → 100644
View file @
42942a2e
Subject: Update bigendian.[c,h] files in attempt to fix builds on arm and mips
Author: Upstream
Forwarded: not-needed
--- gmap.orig/src/bigendian.c
+++ gmap/src/bigendian.c
@@ -18,6 +18,45 @@
return;
}
+
+/************************************************************************
+ * Unsigned short
+ ************************************************************************/
+
+size_t
+Bigendian_fwrite_ushort (unsigned short value, FILE *fp) {
+ unsigned char buf[2];
+
+ buf[1] = value & 0xff;
+ buf[0] = (value >>= 8) & 0xff;
+ if (fwrite(buf,sizeof(unsigned short),2,fp) == 0) {
+ /* Should set error indicator for stream and set errno */
+ return 0;
+ } else {
+ return 1;
+ }
+}
+
+size_t
+Bigendian_fwrite_ushorts (unsigned short *array, int n, FILE *fp) {
+ unsigned char buf[4];
+ unsigned short value;
+ int i;
+
+ for (i = 0; i < n; i++) {
+ value = array[i];
+ buf[1] = value & 0xff;
+ buf[0] = (value >>= 8) & 0xff;
+ if (fwrite(buf,sizeof(unsigned short),2,fp) == 0) {
+ /* Should set error indicator for stream and set errno */
+ return 0;
+ }
+ }
+ return n;
+}
+
+
+
/************************************************************************
* Int
************************************************************************/
--- gmap.orig/src/bigendian.h
+++ gmap/src/bigendian.h
@@ -98,6 +98,9 @@
#define FWRITE_UINT8S(a,n,fp) Bigendian_fwrite_uint8s(a,n,fp)
#endif
+#define FWRITE_USHORT(x,fp) Bigendian_fwrite_ushort(x,fp)
+#define FWRITE_USHORTS(a,n,fp) Bigendian_fwrite_ushorts(a,n,fp)
+
#define FREAD_CHARS(a,n,fp) fread(a,sizeof(char),n,fp)
#define FWRITE_CHARS(a,n,fp) fwrite(a,sizeof(char),n,fp)
debian/patches/series
View file @
42942a2e
bigendian.patch
only-do-cpuid-on-amd64-i386.patch
install-data-local