summaryrefslogtreecommitdiff
path: root/fixincludes/inclhack.def
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2008-02-20 04:20:59 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2008-02-20 04:20:59 +0000
commit1b0a9ef1769a7fca36340f1df67f917d7f3e6456 (patch)
treebca251aea4e82b3a8827eaa7b41fff22abb82ee8 /fixincludes/inclhack.def
parente297899b22f48347baae758a753bd6d08efef1ec (diff)
downloadgcc-1b0a9ef1769a7fca36340f1df67f917d7f3e6456.tar.gz
* inclhack.def (solaris_math_10): New.
* tests/base/iso/math_c99.h: Update. * fixincl.x: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132468 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r--fixincludes/inclhack.def24
1 files changed, 24 insertions, 0 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index fd8a694a9f7..e7447d497ae 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -3223,6 +3223,30 @@ fix = {
};
/*
+ * On Solaris 11, if you do isinf(NaN) you'll get a floating point
+ * exception. Provide an alternative using GCC's builtin.
+ */
+
+fix = {
+ hackname = solaris_math_10;
+ select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
+ files = iso/math_c99.h;
+ c_fix = format;
+ c_fix_arg = "#define\tisinf(x) __builtin_isinf(x)";
+ c_fix_arg = "^#define[ \t]+isinf\\(x\\)[ \t]+__extension__\\([ \t]*\\\\\n"
+ "[ \t]*\\{[ \t]*__typeof\\(x\\)[ \t]*__x_i[ \t]*=[ \t]*\\(x\\);[ \t]*\\\\\n"
+ "[ \t]*__x_i[ \t]*==[ \t]*\\(__typeof\\(__x_i\\)\\)[ \t]*INFINITY[ \t]*\\|\\|[ \t]*\\\\\n"
+ "[ \t]*__x_i[ \t]*==[ \t]*\\(__typeof\\(__x_i\\)\\)[ \t]*\\(-INFINITY\\);[ \t]*\\}\\)";
+ test_text =
+ '#pragma ident "@(#)math_c99.h 1.12 07/01/21 SMI"'"\n"
+ "#undef isinf\n"
+ "#define isinf(x) __extension__( \\\\\n"
+ " { __typeof(x) __x_i = (x); \\\\\n"
+ " __x_i == (__typeof(__x_i)) INFINITY || \\\\\n"
+ " __x_i == (__typeof(__x_i)) (-INFINITY); })";
+};
+
+/*
* Sun Solaris 2.5.1, 2.6 defines PTHREAD_{MUTEX|COND}_INITIALIZER
* incorrectly, so we replace them with versions that correspond to
* the definition. We also explicitly name this fix "1" and the next