diff options
author | korbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-06-14 03:51:26 +0000 |
---|---|---|
committer | korbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-06-14 03:51:26 +0000 |
commit | 7b900f1a4c6ae47345a393727bf7756c75231d59 (patch) | |
tree | 4df52aaba8b8d4dae5642b90eb0b616ef23c2c25 /gcc/fixinc/inclhack.def | |
parent | 050fd34009c8a81810a96af0d513d0d8e6318c15 (diff) | |
download | gcc-7b900f1a4c6ae47345a393727bf7756c75231d59.tar.gz |
Blow away a duplicate definition of "pow()" for C++
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43358 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixinc/inclhack.def')
-rw-r--r-- | gcc/fixinc/inclhack.def | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def index 88018d9b3bf..7730cd2970f 100644 --- a/gcc/fixinc/inclhack.def +++ b/gcc/fixinc/inclhack.def @@ -1149,6 +1149,39 @@ fix = { /* + * Delete C++ double pow (double, int) inline function from HP-UX 10 + * math.h to prevent clash with define in c_std/bits/std_cmath.h. + */ +fix = { + hackname = hpux10_cpp_pow_inline; + files = math.h; + select = <<- END_POW_INLINE + ^# +ifdef +__cplusplus + +} + +inline +double +pow\(double +__d,int +__expon\) +{ + [ ]+return +pow\(__d,\(double\)__expon\); + +} + +extern +"C" +{ + #else + # +endif + END_POW_INLINE; + + c_fix = format; + c_fix_arg = ""; + + test_text = + "# ifdef __cplusplus\n" + " }\n" + " inline double pow(double __d,int __expon) {\n" + "\t return pow(__d,(double)__expon);\n" + " }\n" + ' extern "C"' " {\n" + "#else\n" + "# endif"; +}; + + +/* * Keep HP-UX 11 from stomping on C++ math namespace * with defines for fabsf. */ |