]> Savannah Git Hosting - gnulib.git/commitdiff
* m4/byteswap.m4: Add comment about broken C libraries.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 20 May 2024 16:08:27 +0000 (09:08 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 20 May 2024 16:08:27 +0000 (09:08 -0700)
m4/byteswap.m4

index 3f5ef45cfe6896b1f14c4705e80d3efe47ddca83..3185bab763cb10262349b2fa284376f9658a6cb7 100644 (file)
@@ -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 <byteswap.h>