This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
fixincludes to avoid: libstdc++-v3 build failure
- To: Bruce Korb <bkorb at allegronetworks dot com>
- Subject: fixincludes to avoid: libstdc++-v3 build failure
- From: Robert Lipe <robertl at sco dot com>
- Date: Fri, 27 Apr 2001 12:06:14 -0500
- Cc: "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>
- References: <B4DFCB7CDE2DD4118F690008C78694160100B642@tahoe.allegronetworks.com>
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