This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: New fixincludes patches for SCO systems
- From: Bruce Korb <bkorb at gnu dot org>
- To: jkj at sco dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 22 Nov 2005 05:42:17 -0800
- Subject: Re: New fixincludes patches for SCO systems
- References: <4381FDCC.5080407@sco.com>
On Monday 21 November 2005 09:03 am, Kean Johnston wrote:
> Based on input from teh fixincludes maintainer, please find attached
> an updated patch for fixincludes for SCO systems. This is based on
> head but needs to go into the 4.0 and 4.1 branches as well.
>
> PS. Bruce, I didnt get a reply to my other mail to you, and in fact
> got a bounce, so I hope you are getting this. I didnt want to
> convert any of the fixes from sed, as I am the one that has to
> maintain this stuff for SCO platforms, and I dont "get" the c_fix
> stuff. I know you say sed is "dog slow" but considering that the
> whole fixincludes process accounts for 26 seconds out of a 3 hour
> build, I dont think speed is much of an issue :)
Hi Kean,
Times have changed. When I first started futzing with this, the
fixinclude step for UW7 was just over 1/2 hour and I trimmed it to
a few minutes. I've been half tempted a few times to link the
sed program into the fixinclude binary, but best not tell our
Cygwin friends about that. I've already been accused of being
overly Unix-centric. :-D
RE: "c_fix" it shouldn't make anyone's head hurt. Heck, if you want
to talk about pain, consider your looping sed script! ;) Anyway,
as long as the fixes are constrained to SCO platforms, you're free
to do as you like. Nevertheless, I'll show the difference for the
"sco_cfront" fix, as an example:
+ select = '#ifndef _CFRONT_3_0';
+ sed = "s/#ifndef _CFRONT_3_0/"
+ "#if !defined(_CFRONT_3_0) \\&\\& !defined(__GNUC__)/";
vs.
+ select = '#ifndef _CFRONT_3_0';
+ c_fix = format;
+ c_fix_arg = "#if defined(_CFRONT_3_0) && !defined(__GNUC__)";
"format" says, "Use the first c_fix_arg as a format string. Replace
any '%0' in it with the selection text and any '%1' with any subexpression
found in the selection text." In this case, we are completely replacing
the selected text with the c_fix_arg as there are no '%n' expressions.
So, I'll basic sanity check that your patch doesn't break my Linux
and Solaris builds & then commit it.
Cheers - Bruce