aboutsummaryrefslogtreecommitdiffstats
path: root/community/calcurse/0001-sha1-Fix-checksum-calculation-on-big-endian-systems.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/calcurse/0001-sha1-Fix-checksum-calculation-on-big-endian-systems.patch')
-rw-r--r--community/calcurse/0001-sha1-Fix-checksum-calculation-on-big-endian-systems.patch41
1 files changed, 0 insertions, 41 deletions
diff --git a/community/calcurse/0001-sha1-Fix-checksum-calculation-on-big-endian-systems.patch b/community/calcurse/0001-sha1-Fix-checksum-calculation-on-big-endian-systems.patch
deleted file mode 100644
index c533b9e1fd3..00000000000
--- a/community/calcurse/0001-sha1-Fix-checksum-calculation-on-big-endian-systems.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 89ed42c9174e643f702c65ba0cbb5a8f95629cd9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
-Date: Sat, 16 Oct 2021 02:23:06 +0200
-Subject: [PATCH] sha1: Fix checksum calculation on big-endian systems
-
-Instead of using a custom macro which must be set manually to determine
-host byte order (WORDS_BIGENDIAN) this commit uses the __BYTE_ORDER__
-CPP macro which is commonly available on many systems [1]. If the macro
-is not defined, little endian byte order is silently assumed which is
-what the previous version of this code did anyhow. Alternatively, it
-would also be possible to emit a #warning if __BYTE_ORDER__ is not set
-or rewrite the code in a way that it does not depend on the native host
-byte order in the first place [2].
-
-This fixes the calcurse test suite on s390x.
-
-Fixes #397
-
-[1]: https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
-[2]: https://commandcenter.blogspot.com/2012/04/byte-order-fallacy.html
----
- src/sha1.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/src/sha1.c b/src/sha1.c
-index 3826c76..7a690e4 100644
---- a/src/sha1.c
-+++ b/src/sha1.c
-@@ -47,7 +47,11 @@
-
- #define rol(val, n) (((val) << (n)) | ((val) >> (32 - (n))))
-
--#ifdef WORDS_BIGENDIAN
-+/* We check for host system byte order using the __BYTE_ORDER__
-+ * CPP macro which is available on many platforms but not mandated by
-+ * the POSIX or C standard. As such, if __BYTE_ORDER__ is not set, we
-+ * silently assume little endian byte order. */
-+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
- #define blk0(i) block->l[i]
- #else
- #define blk0(i) (block->l[i] = (rol (block->l[i], 24) & \