[libc-commits] [libc] bb5921e - [libc] Include FP_* macros in math.h (#84996)

via libc-commits libc-commits at lists.llvm.org
Tue Mar 12 17:01:38 PDT 2024


Author: Petr Hosek
Date: 2024-03-12T17:01:29-07:00
New Revision: bb5921e2a2da4a87016e623deb8c2eaed7f1f5a8

URL: https://github.com/llvm/llvm-project/commit/bb5921e2a2da4a87016e623deb8c2eaed7f1f5a8
DIFF: https://github.com/llvm/llvm-project/commit/bb5921e2a2da4a87016e623deb8c2eaed7f1f5a8.diff

LOG: [libc] Include FP_* macros in math.h (#84996)

These are used unconditionally by libc++ math.h.

This is related to issue #84879.

Added: 
    

Modified: 
    libc/include/llvm-libc-macros/math-macros.h

Removed: 
    


################################################################################
diff  --git a/libc/include/llvm-libc-macros/math-macros.h b/libc/include/llvm-libc-macros/math-macros.h
index e67fe4d11b4493..db8a4ea65bd69a 100644
--- a/libc/include/llvm-libc-macros/math-macros.h
+++ b/libc/include/llvm-libc-macros/math-macros.h
@@ -11,6 +11,12 @@
 
 #include "limits-macros.h"
 
+#define FP_NAN 0
+#define FP_INFINITE 1
+#define FP_ZERO 2
+#define FP_SUBNORMAL 3
+#define FP_NORMAL 4
+
 #define MATH_ERRNO 1
 #define MATH_ERREXCEPT 2
 


        


More information about the libc-commits mailing list