1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-21 10:09:57 +01:00

build: Don't remove --disable-endian-check.

* configure.ac (WORDS_BIGENDIAN): Use the autoconf macro,
instead of our own BIG_ENDIAN_HOST.
(DISABLED_ENDIAN_CHECK): Keep --disable-endian-check supported.
* g10/rmd160.c (transform): Use WORDS_BIGENDIAN.

--

Fixes-commit: f8bf5e01f76620cc550253cc2575754872cf64aa
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2024-10-16 11:41:46 +09:00
parent 71840b57f4
commit 347ab07c62
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054
2 changed files with 23 additions and 5 deletions

View File

@ -544,6 +544,19 @@ AH_BOTTOM([
#endif
/* If the configure check for endianness has been disabled, get it from
OS macros. This is intended for making fat binary builds on OS X. */
#ifdef DISABLED_ENDIAN_CHECK
# if defined(__BIG_ENDIAN__)
# define WORDS_BIGENDIAN 1
# elif defined(__LITTLE_ENDIAN__)
# undef WORDS_BIGENDIAN
# else
# error "No endianness found"
# endif
#endif /*DISABLED_ENDIAN_CHECK*/
/* Hack used for W32: ldap.m4 also tests for the ASCII version of
ldap_start_tls_s because that is the actual symbol used in the
library. winldap.h redefines it to our commonly used value,
@ -1319,10 +1332,15 @@ AC_MSG_NOTICE([checking for system characteristics])
AC_C_CONST
AC_C_INLINE
AC_C_VOLATILE
AC_C_BIGENDIAN([AC_DEFINE(BIG_ENDIAN_HOST,1,
[Defined if the host has big endian byte ordering])],
[AC_DEFINE(LITTLE_ENDIAN_HOST,1,
[Defined if the host has little endian byte ordering])])
AC_ARG_ENABLE(endian-check,
AS_HELP_STRING([--disable-endian-check],
[disable the endian check and trust the OS provided macros]),
endiancheck=$enableval,endiancheck=yes)
if test x"$endiancheck" = xyes ; then
AC_C_BIGENDIAN
else
AC_DEFINE(DISABLED_ENDIAN_CHECK,1,[configure did not test for endianness])
fi
AC_TYPE_SIZE_T
AC_TYPE_MODE_T
AC_CHECK_FUNCS([sigdescr_np])

View File

@ -86,7 +86,7 @@ static void
transform (rmd160_context_t *hd, const unsigned char *data)
{
u32 a,b,c,d,e,aa,bb,cc,dd,ee,t;
#ifdef BIG_ENDIAN_HOST
#ifdef WORDS_BIGENDIAN
u32 x[16];
{
int i;