This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug other/52168] fixinclude test failure for complex.h on netbsd


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52168

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-09 00:37:58 UTC ---
The problem is that netbsd's sed doesn't put a newline after a 'c' command, so
the two 'endif' here (from fixincl.x) don't get newlines after them:

/*
 *  Fix Command Arguments for Solaris_Complex_Cxx
 */
static const char* apzSolaris_Complex_CxxPatch[] = { sed_cmd_z,
    "-e", "/#if[ \t]*!defined(__cplusplus)/c\\\n\
#ifdef\t__cplusplus\\\n\
extern \"C\" {\\\n\
#endif",
    "-e", "/#endif[ \t]*\\/\\* !defined(__cplusplus) \\*\\//c\\\n\
#ifdef\t__cplusplus\\\n\
}\\\n\
#endif",
    (char*)NULL };


With GNU sed:

$ { echo foo ; echo bar ; }  | sed '/foo/c\                              
baz'
baz                                                                           
bar

But with netbsd sed:

$ { echo foo ; echo bar ; } | sed '/foo/c\
baz'
bazbar


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