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]

fixincludes to avoid: libstdc++-v3 build failure


Bruce Korb wrote:

> Anything you like :-).  Once you whack it, the whackery is only visible
> with the matching version of the gcc compiler.  Just strip the CFRONT junk:
> 
>    select = "defined\(_CFRONT[A-Z0-9_]*\)"
>    c_fix  = format;
>    c_fix_arg = "0";
> 
> though you may wish to strip it differently.  :-)


I can't quite get that select string to hit.   I added:

/*
 * SCO/Caldera's UDK, UnixWare, and OpenUNIX compilers have a number
 * of tests around namespaces surrounded by "#if [!]defined(_CFRONT_3_0)".
 * or #if[n]def _CFRONT_3_0".   In no case does it actually appear to be
 * using CFRONT; it's just avoiding namespaces.
 */
fix = {
    hackname  = i_am_not_cfront;
    select    = "defined\(_CFRONT[A-Z0-9_]*\)";
    c_fix     = format;
    c_fix_arg = '(0)';
};

but it doesn't select unless I removed the "defined" from the select
string.  Of course, if I don't get the 'defined' in the select string, I
can't quite keep the expressions true.   Even just 'd\(_CFRONT...' won't
trigger a match.


Ultimately, I need to catch both constructs like:

#ifndef _CFRONT_3_0
#include <ctime> /* for namespace std */
#endif
#endif /*__cplusplus*/

and

#if defined(__cplusplus) && !defined(_CFRONT_3_0)
namespace std {
#endif

but I'm focusing on the latter first.

Any ideas?

RJL


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