Commit d6eeed0e authored by Ole Streicher's avatar Ole Streicher
Browse files

Drop don-t-try-to-use-128-bit-types-on-32-bit-platforms.patch

Applied upstream
parent 8a68371a
......@@ -7,7 +7,7 @@ Subject: Don't copy demo files to examples
1 file changed, 1 deletion(-)
diff --git a/Makefile b/Makefile
index a54fcff..e258119 100644
index a8878f2..391c2d5 100644
--- a/Makefile
+++ b/Makefile
@@ -157,7 +157,6 @@ install-core:
......
......@@ -7,7 +7,7 @@ Subject: Don't fail during 'make clean'
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 2e00d91..a54fcff 100644
index add4fd8..a8878f2 100644
--- a/Makefile
+++ b/Makefile
@@ -345,9 +345,7 @@ clean:
......
......@@ -7,7 +7,7 @@ Subject: Fix shared lib flags so that the package can be built on s390x
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/util/makefile.common b/util/makefile.common
index 5837c49..e65c38f 100644
index 76adf8f..35116e1 100644
--- a/util/makefile.common
+++ b/util/makefile.common
@@ -171,9 +171,8 @@ FLAGS_DEF += $(shell $(CCTEST))
......
......@@ -7,7 +7,7 @@ Subject: Remove errornous generation of net/client.py
1 file changed, 7 deletions(-)
diff --git a/Makefile b/Makefile
index dcf7a59..2e00d91 100644
index aa17acb..add4fd8 100644
--- a/Makefile
+++ b/Makefile
@@ -165,13 +165,6 @@ install-core:
......
From: Dustin Lang <dstndstn@gmail.com>
Date: Mon, 17 Jan 2022 07:47:26 -0500
Subject: don't try to use 128-bit types on 32-bit platforms
---
libkd/kdint_ttype_l.h | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/libkd/kdint_ttype_l.h b/libkd/kdint_ttype_l.h
index 475064c..a407074 100644
--- a/libkd/kdint_ttype_l.h
+++ b/libkd/kdint_ttype_l.h
@@ -5,15 +5,27 @@
typedef u64 ttype;
+// https://stackoverflow.com/questions/16088282/is-there-a-128-bit-integer-in-gcc
+// gcc: 128-bit ints only available on 64-bit platforms, not 32-bit
+#ifdef __SIZEOF_INT128__
// GCC only??
typedef __int128 int128_t;
typedef unsigned __int128 uint128_t;
static const uint128_t UINT128_MAX = (uint128_t)((int128_t)(-1L));
-
#define BIGTTYPE uint128_t
#define BIGTTYPE_MAX UINT128_MAX
typedef uint128_t bigttype;
+#else
+// Fall back to using just 64-bit types. This *should* still work okay, because
+// we're careful to check the max possible value before using BIGT types; search
+// for "use_tmath" in the code.
+#define BIGTTYPE uint64_t
+#define BIGTTYPE_MAX UINT64_MAX
+typedef uint64_t bigttype;
+
+#endif
+
#define TTYPE_INTEGER 1
#define TTYPE_MIN 0
......@@ -6,4 +6,3 @@ Fix-shared-lib-flags-so-that-the-package-can-be-built-on-.patch
Remove-errornous-generation-of-net-client.py.patch
Don-t-fail-on-rm-during-make-clean.patch
Don-t-copy-demo-files-to-examples.patch
don-t-try-to-use-128-bit-types-on-32-bit-platforms.patch
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment