This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [v3] build failure from automated checker.....


> > HPUX 10.20 is definitely not C99 conformant.  Should the above inline
> > be removed with fixincl or can you do something with the v3 configuration?
> 
> fixincl please

Here is a first crack at a hack to fix the problem for review.  I have
checked that it blows away the inline.  It's a bit of a pain to to
develop hacks for hpux because of haven't yet been able to build
autogen 5 on it.

Probably, Bruce will have to install it.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

2001-06-13  John David Anglin  <dave@hiauly1.hia.nrc.ca>

	* inclhack.def (hpux10_cpp_pow_inline): New hack.

--- inclhack.def.orig	Sat Jun  9 16:12:03 2001
+++ inclhack.def	Wed Jun 13 18:42:01 2001
@@ -1119,6 +1119,33 @@
 
 
 /*
+ * 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    = "^# +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";
+    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.
  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]