[polyml] 02/10: Fix FTBFS on x32

James Clarke jrtc27 at moszumanska.debian.org
Mon Mar 20 19:16:09 UTC 2017


This is an automated email from the git hooks/post-receive script.

jrtc27 pushed a commit to branch debian/experimental
in repository polyml.

commit cbb89e725962ba8a13a5a7da5f5b5ffe17bcfb33
Author: James Clarke <jrtc27 at debian.org>
Date:   Wed Feb 22 19:20:10 2017 +0000

    Fix FTBFS on x32
---
 debian/patches/series   |  2 +-
 debian/patches/x32.diff | 42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/debian/patches/series b/debian/patches/series
index 6928140..fde71a1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-# No patches
+x32.diff
diff --git a/debian/patches/x32.diff b/debian/patches/x32.diff
new file mode 100644
index 0000000..b56582c
--- /dev/null
+++ b/debian/patches/x32.diff
@@ -0,0 +1,42 @@
+Description: Always include long long Make_fixed_precision
+ One of the users of this function is getStatInfo in unix_specific, which
+ converts a struct stat's st_nlink. However, on x32, st_nlink is a 64-bit
+ quantity (the system call ABI is 64-bit), so there are two problems. Firstly,
+ it will be truncated; secondly, since the long and int overloads involve a
+ cast to an integer of the same width, compilation fails with an ambiguous
+ call.
+Author: James Clarke <jrtc27 at jrtc27.com>
+Forwarded: https://github.com/polyml/polyml/pull/78
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/libpolyml/run_time.cpp
++++ b/libpolyml/run_time.cpp
+@@ -380,7 +380,6 @@ Handle Make_fixed_precision(TaskData *ta
+     return taskData->saveVec.push(TAGGED(uval));
+ }
+ 
+-#if (SIZEOF_LONG_LONG != 0) && (SIZEOF_LONG_LONG <= SIZEOF_VOIDP)
+ Handle Make_fixed_precision(TaskData *taskData, long long val)
+ {
+     if (val > MAXTAGGED || val < -MAXTAGGED-1)
+@@ -394,7 +393,6 @@ Handle Make_fixed_precision(TaskData *ta
+         raise_exception0(taskData, EXC_overflow);
+     return taskData->saveVec.push(TAGGED(uval));
+ }
+-#endif
+ 
+ Handle Make_sysword(TaskData *taskData, uintptr_t p)
+ {
+--- a/libpolyml/run_time.h
++++ b/libpolyml/run_time.h
+@@ -86,10 +86,8 @@ extern Handle Make_fixed_precision(TaskD
+ extern Handle Make_fixed_precision(TaskData *taskData, int);
+ extern Handle Make_fixed_precision(TaskData *taskData, unsigned);
+ 
+-#if (SIZEOF_LONG_LONG != 0) && (SIZEOF_LONG_LONG <= SIZEOF_VOIDP)
+ extern Handle Make_fixed_precision(TaskData *taskData, long long);
+ extern Handle Make_fixed_precision(TaskData *taskData, unsigned long long);
+-#endif
+ 
+ extern Handle Make_sysword(TaskData *taskData, uintptr_t p);
+ 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/polyml.git



More information about the debian-science-commits mailing list