* lib/isnanf-nolibm.h (HAVE_ISNANF_NOLIBM): New macro.
* lib/isnand-nolibm.h (HAVE_ISNAND_NOLIBM): New macro.
* lib/isnanl-nolibm.h (HAVE_ISNANL_NOLIBM): New macro.
* lib/math.h (isnanf): Don't define via isnan if HAVE_ISNANF_NOLIBM is
defined.
(isnand): Don't define via isnan if HAVE_ISNAND_NOLIBM is defined.
(isnanl): Don't define via isnan if HAVE_ISNANL_NOLIBM is defined.
+2024-06-02 Bruno Haible <bruno@clisp.org>
+
+ isnanf, isnand, isnanl: Fix link errors on AIX 7.1 with xlc.
+ * lib/isnanf-nolibm.h (HAVE_ISNANF_NOLIBM): New macro.
+ * lib/isnand-nolibm.h (HAVE_ISNAND_NOLIBM): New macro.
+ * lib/isnanl-nolibm.h (HAVE_ISNANL_NOLIBM): New macro.
+ * lib/math.h (isnanf): Don't define via isnan if HAVE_ISNANF_NOLIBM is
+ defined.
+ (isnand): Don't define via isnan if HAVE_ISNAND_NOLIBM is defined.
+ (isnanl): Don't define via isnan if HAVE_ISNANL_NOLIBM is defined.
+
2024-05-31 Bruno Haible <bruno@clisp.org>
windows-once: Improve comments.
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2023 Free Software Foundation, Inc.
+ Copyright (C) 2007-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
# define isnand rpl_isnand
extern int isnand (double x);
#endif
+
+/* Tell <math.h> that our isnand does not need libm. */
+#define HAVE_ISNAND_NOLIBM 1
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2023 Free Software Foundation, Inc.
+ Copyright (C) 2007-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
# define isnanf rpl_isnanf
extern int isnanf (float x);
#endif
+
+/* Tell <math.h> that our isnanf does not need libm. */
+#define HAVE_ISNANF_NOLIBM 1
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2023 Free Software Foundation, Inc.
+ Copyright (C) 2007-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
# define isnanl rpl_isnanl
extern int isnanl (long double x);
#endif
+
+/* Tell <math.h> that our isnanl does not need libm. */
+#define HAVE_ISNANL_NOLIBM 1
GCC >= 4.0 also provides __builtin_isnanf, but clang doesn't. */
# undef isnanf
# define isnanf(x) __builtin_isnan ((float)(x))
-# elif defined isnan
+# elif defined isnan && !defined HAVE_ISNANF_NOLIBM
# undef isnanf
# define isnanf(x) isnan ((float)(x))
# endif
/* GCC >= 4.0 and clang provide a type-generic built-in for isnan. */
# undef isnand
# define isnand(x) __builtin_isnan ((double)(x))
-# else
+# elif !defined HAVE_ISNAND_NOLIBM
# undef isnand
# define isnand(x) isnan ((double)(x))
# endif
GCC >= 4.0 also provides __builtin_isnanl, but clang doesn't. */
# undef isnanl
# define isnanl(x) __builtin_isnan ((long double)(x))
-# elif defined isnan
+# elif defined isnan && !defined HAVE_ISNANL_NOLIBM
# undef isnanl
# define isnanl(x) isnan ((long double)(x))
# endif