From 6dbbada2b05bdc5efd0a5592a7805c92fe0531c6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 20 May 2024 09:08:27 -0700 Subject: [PATCH] * m4/byteswap.m4: Add comment about broken C libraries. --- m4/byteswap.m4 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/m4/byteswap.m4 b/m4/byteswap.m4 index 3f5ef45cfe..3185bab763 100644 --- a/m4/byteswap.m4 +++ b/m4/byteswap.m4 @@ -15,6 +15,10 @@ AC_DEFUN([gl_BYTESWAP], AC_CACHE_CHECK([for working bswap_16, bswap_32, bswap_64], [gl_cv_header_working_byteswap_h], [gl_cv_header_working_byteswap_h=no + dnl Check that floating point arguments work. + dnl This also checks C libraries with implementations like + dnl '#define bswap_16(x) (((x) >> 8 & 0xff) | (((x) & 0xff) << 8))' + dnl that mistakenly evaluate their arguments multiple times. AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include -- 2.40.1