aboutsummaryrefslogtreecommitdiff
path: root/fixincludes/inclhack.def
diff options
context:
space:
mode:
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r--fixincludes/inclhack.def18
1 files changed, 18 insertions, 0 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 8400d0c..7605ac8 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -2283,6 +2283,24 @@ fix = {
};
/*
+ * This hack fixes the declarations of _DINFINITY, _SINFINITY and _SQNAN.
+ */
+fix = {
+ hackname = hpux_math_constexpr;
+ mach = "*-hp-hpux11*";
+ files = math.h;
+ sed = "s@^[ \t]*extern[ \t]*const[ \t]*double[ \t]*_DINFINITY;"
+ "[ \t]*$@# define _DINFINITY (__builtin_inf ())@";
+ sed = "s@^[ \t]*extern[ \t]*const[ \t]*float[ \t]*_SINFINITY;"
+ "[ \t]*$@# define _SINFINITY (__builtin_inff ())@";
+ sed = "s@^[ \t]*extern[ \t]*const[ \t]*float[ \t]*_SQNAN;"
+ "[ \t]*$@# define _SQNAN (__builtin_nanf (\\\"\\\"))@";
+ test_text = " extern const double _DINFINITY;\n"
+ " extern const float _SINFINITY;\n"
+ " extern const float _SQNAN;";
+};
+
+/*
* Fix hpux 10.X missing ctype declarations 1
*/
fix = {