summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-03-27 21:45:10 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-03-27 21:45:10 +0200
commitca97d03abffc90c248d14b7f01f843de52b0d5d3 (patch)
treef86f8b716b0e08fcfecc3ec1853cc1e99416398b /debian/patches
parentdb6f1f397f45ccd3c11d16352ed46a9c1eae3442 (diff)
new upstream release
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/float-endian-detection.patch63
-rw-r--r--debian/patches/series1
2 files changed, 64 insertions, 0 deletions
diff --git a/debian/patches/float-endian-detection.patch b/debian/patches/float-endian-detection.patch
new file mode 100644
index 0000000..d094516
--- /dev/null
+++ b/debian/patches/float-endian-detection.patch
@@ -0,0 +1,63 @@
+Description: Fix detection of floating point endianness
+ See https://lists.gnu.org/archive/html/bug-gnulib/2013-12/msg00104.html
+Author: Alan Modra <amodra@gmail.com>
+Author: Colin Watson <cjwatson@ubuntu.com>
+Forwarded: no
+Last-Update: 2013-12-18
+
+--- a/tests/test-isnanl.h
++++ b/tests/test-isnanl.h
+@@ -24,6 +24,12 @@
+ #include "nan.h"
+ #include "macros.h"
+
++#ifdef __FLOAT_WORD_ORDER__
++# define FLOAT_BIG_ENDIAN (__FLOAT_WORD_ORDER__ != __ORDER_LITTLE_ENDIAN__)
++#else
++# define FLOAT_BIG_ENDIAN (LDBL_EXPBIT0_WORD < NWORDS / 2)
++#endif
++
+ int
+ main ()
+ {
+@@ -65,10 +71,10 @@
+ # if LDBL_EXPBIT0_BIT > 0
+ m.word[LDBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (LDBL_EXPBIT0_BIT - 1);
+ # else
+- m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
++ m.word[LDBL_EXPBIT0_WORD + (FLOAT_BIG_ENDIAN ? 1 : - 1)]
+ ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
+ # endif
+- m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
++ m.word[LDBL_EXPBIT0_WORD + (FLOAT_BIG_ENDIAN ? 1 : - 1)]
+ |= (unsigned int) 1 << LDBL_EXPBIT0_BIT;
+ ASSERT (isnanl (m.value));
+ }
+--- a/tests/test-signbit.c
++++ b/tests/test-signbit.c
+@@ -36,6 +36,12 @@
+ double zerod = 0.0;
+ long double zerol = 0.0L;
+
++#ifdef __FLOAT_WORD_ORDER__
++# define FLOAT_BIG_ENDIAN (__FLOAT_WORD_ORDER__ != __ORDER_LITTLE_ENDIAN__)
++#else
++# define FLOAT_BIG_ENDIAN (LDBL_EXPBIT0_WORD < NWORDS / 2)
++#endif
++
+ static void
+ test_signbitf ()
+ {
+@@ -166,10 +172,10 @@
+ # if LDBL_EXPBIT0_BIT > 0
+ m.word[LDBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (LDBL_EXPBIT0_BIT - 1);
+ # else
+- m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
++ m.word[LDBL_EXPBIT0_WORD + (FLOAT_BIG_ENDIAN ? 1 : - 1)]
+ ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
+ # endif
+- m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
++ m.word[LDBL_EXPBIT0_WORD + (FLOAT_BIG_ENDIAN ? 1 : - 1)]
+ |= (unsigned int) 1 << LDBL_EXPBIT0_BIT;
+ (void) signbit (m.value);
+ #undef NWORDS
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..c1d7c66
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+float-endian-detection.patch