summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorAndreas Enge <andreas@enge.fr>2015-02-20 21:53:07 +0100
committerAndreas Enge <andreas@enge.fr>2015-02-21 10:17:10 +0100
commita34816ef6e0abc91530701afe9d112da54edd499 (patch)
tree6ad41a24bc6d488545015fd41d18d6667decfe9c /gnu/packages/patches
parentcc9b70d3ea708e4364b0a090d8a6efebabd8c0e9 (diff)
downloadguix-a34816ef6e0abc91530701afe9d112da54edd499.tar.gz
gnu: chmlib: Patch for compilation on mips.
* gnu/packages/patches/chmlib-inttypes.patch: New file.
* gnu-system.am (dist_patch_DATA): Register patch.
* gnu/packages/ebook.scm (chmlib): Apply patch.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/chmlib-inttypes.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/gnu/packages/patches/chmlib-inttypes.patch b/gnu/packages/patches/chmlib-inttypes.patch
new file mode 100644
index 0000000000..033e808792
--- /dev/null
+++ b/gnu/packages/patches/chmlib-inttypes.patch
@@ -0,0 +1,60 @@
+Taken from Debian, necessary for compilation on mips.
+
+Patch to fix integer types problem by Goswin von Brederlow
+<brederlo@informatik.uni-tuebingen.de> (#258444)
+--- chmlib-0.39.orig/src/chm_lib.c
++++ chmlib-0.39/src/chm_lib.c
+@@ -56,6 +56,7 @@
+ 
+ #include "lzx.h"
+ 
++#include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #ifdef CHM_DEBUG
+@@ -149,22 +150,9 @@
+ typedef __int64                 Int64;
+ typedef unsigned __int64        UInt64;
+ 
+-/* I386, 32-bit, non-Windows */
+-/* Sparc        */
+-/* MIPS         */
+-/* PPC          */
+-#elif __i386__ || __sun || __sgi || __ppc__
+-typedef unsigned char           UChar;
+-typedef short                   Int16;
+-typedef unsigned short          UInt16;
+-typedef long                    Int32;
+-typedef unsigned long           UInt32;
+-typedef long long               Int64;
+-typedef unsigned long long      UInt64;
+-
+ /* x86-64 */
+ /* Note that these may be appropriate for other 64-bit machines. */
+-#elif __x86_64__ || __ia64__
++#elif defined(__LP64__)
+ typedef unsigned char           UChar;
+ typedef short                   Int16;
+ typedef unsigned short          UInt16;
+@@ -173,10 +161,18 @@
+ typedef long                    Int64;
+ typedef unsigned long           UInt64;
+ 
++/* I386, 32-bit, non-Windows */
++/* Sparc        */
++/* MIPS         */
++/* PPC          */
+ #else
+-
+-/* yielding an error is preferable to yielding incorrect behavior */
+-#error "Please define the sized types for your platform in chm_lib.c"
++typedef unsigned char           UChar;
++typedef short                   Int16;
++typedef unsigned short          UInt16;
++typedef long                    Int32;
++typedef unsigned long           UInt32;
++typedef long long               Int64;
++typedef unsigned long long      UInt64;
+ #endif
+ 
+ /* GCC */