[openssh-commits] [openssh] branch master updated: Provide INFINITY if it's not provided.

git+noreply at mindrot.org git+noreply at mindrot.org
Wed Apr 16 22:33:42 AEST 2025


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

The following commit(s) were added to refs/heads/master by this push:
     new 46e52fdae Provide INFINITY if it's not provided.
46e52fdae is described below

commit 46e52fdae08b89264a0b23f94391c2bf637def34
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Wed Apr 16 22:29:17 2025 +1000

    Provide INFINITY if it's not provided.
    
    INFINITY is specified in c99, so define if not provided.
---
 configure.ac | 5 +++++
 defines.h    | 7 +++++++
 2 files changed, 12 insertions(+)

diff --git a/configure.ac b/configure.ac
index bbddca009..69b74add8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2280,6 +2280,11 @@ AC_CHECK_DECLS([offsetof], , , [
 #include <stddef.h>
 	])
 
+AC_CHECK_DECLS([INFINITY], ,
+    AC_CHECK_DECLS(__builtin_inff),
+    [#include <math.h>]
+)
+
 # extra bits for select(2)
 AC_CHECK_DECLS([howmany, NFDBITS], [], [], [[
 #include <sys/param.h>
diff --git a/defines.h b/defines.h
index d2baeb940..3721ae16e 100644
--- a/defines.h
+++ b/defines.h
@@ -986,4 +986,11 @@ struct winsize {
 /* The ML-KEM768 implementation also uses C89 features */
 # define USE_MLKEM768X25519	1
 #endif
+
+#if defined(HAVE_DECL_INFINITY) && HAVE_DECL_INFINITY == 0
+# if defined(HAVE_DECL___BUILTIN_INFF) && HAVE_DECL___BUILTIN_INFF == 1
+#  define INFINITY __builtin_inff()
+# endif
+#endif
+
 #endif /* _DEFINES_H */

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list