summaryrefslogtreecommitdiff
path: root/Build/source/texk/gregorio/gregorio-PATCHES/patch-04-alignof
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/gregorio/gregorio-PATCHES/patch-04-alignof')
-rw-r--r--Build/source/texk/gregorio/gregorio-PATCHES/patch-04-alignof42
1 files changed, 42 insertions, 0 deletions
diff --git a/Build/source/texk/gregorio/gregorio-PATCHES/patch-04-alignof b/Build/source/texk/gregorio/gregorio-PATCHES/patch-04-alignof
new file mode 100644
index 00000000000..d1a1fe86dea
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-PATCHES/patch-04-alignof
@@ -0,0 +1,42 @@
+Index: configure.ac
+===================================================================
+--- configure.ac (revision 41690)
++++ configure.ac (working copy)
+@@ -97,6 +97,8 @@
+ AC_CHECK_HEADERS([stdint.h])
+ AC_CHECK_HEADERS([stdalign.h])
+
++AC_CHECK_ALIGNOF(uint32_t)
++
+ AC_C_BIGENDIAN
+
+ AC_SUBST([GREGORIO_TREE], [gregorio-src])
+Index: gregorio-src/src/sha1.c
+===================================================================
+--- gregorio-src/src/sha1.c (revision 41690)
++++ gregorio-src/src/sha1.c (working copy)
+@@ -37,15 +37,6 @@
+ #include <stdlib.h>
+ #include <string.h>
+
+-#ifdef HAVE_STDALIGN_H
+-#include <stdalign.h>
+-#ifdef __clang__
+-#pragma clang diagnostic ignored "-Wc11-extensions"
+-#endif
+-#else
+-#define alignof(x) sizeof(x)
+-#endif
+-
+ #ifdef WORDS_BIGENDIAN
+ #define SWAP(n) (n)
+ #else
+@@ -167,7 +158,7 @@
+ if (len >= 64) {
+ /* architecture and data-specific; LCOV_EXCL_START */
+ #if !_STRING_ARCH_unaligned
+-#define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) != 0)
++#define UNALIGNED_P(p) ((uintptr_t) (p) % ALIGNOF_UINT32_T != 0)
+ if (UNALIGNED_P(buffer)) {
+ while (len > 64) {
+ sha1_process_block(memcpy(ctx->buffer, buffer, 64), 64, ctx);