[Patch] fixincludes: fix solaris_complex_cxx rule syntax

Tristan Gingold gingold@adacore.com
Mon May 16 13:41:00 GMT 2011


Hi,

this rule (and only this one) uses the c function of sed.  According to man, the syntax should be:

     [2addr]c\
     text

(Note the trailing back-slash).
But as currently written, there is no backslash in it.  As a consequence 'make check' fails at least on Darwin (BSD derived sed
command).  I think it would be better to stick with the common syntax, as done by this patch.

Tested with 'make check'.

Ok for trunk ?

Tristan.

fixincludes/
2011-05-16  Tristan Gingold  <gingold@adacore.com>

	* inclhack.def (solaris_complex_cxx): Fix syntax.
	* fixincl.x: Regenerate.

diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index ac8f795..a20ab9d 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -3315,9 +3315,9 @@ fix = {
     hackname  = solaris_complex_cxx;
     mach      = "*-*-solaris2.*";
     files     = complex.h;
-    sed	      = "/#if[ \t]*!defined(__cplusplus)/c"
+    sed	      = "/#if[ \t]*!defined(__cplusplus)/c\\\n"
     		"#ifdef\t__cplusplus\\\nextern \"C\" {\\\n#endif";
-    sed	      = "/#endif[ \t]*\\/\\* !defined(__cplusplus) \\*\\//c"
+    sed	      = "/#endif[ \t]*\\/\\* !defined(__cplusplus) \\*\\//c\\\n"
 		"#ifdef\t__cplusplus\\\n}\\\n#endif";
     test_text = "#if !defined(__cplusplus)\n"
 		"#endif	/* !defined(__cplusplus) */";



More information about the Gcc-patches mailing list