This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: fixincl recently broken, char_macro_def/char_macro_use don't work
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: fixincl recently broken, char_macro_def/char_macro_use don't work
- From: Bruce Korb <bkorb at sco dot COM>
- Date: Tue, 16 May 2000 08:14:11 -0700
- CC: egcs-bugs at egcs dot cygnus dot com, zack at wolery dot cumb dot org
- Organization: Santa Cruz Operations
- References: <200005161449.KAA10860@caip.rutgers.edu>
"Kaveh R. Ghazi" wrote:
> > > It looks like you rewrote some of this code recently. I wasn't able
> > > to figure out why it broke, but here is the termios.h file from my
> > > box. Please see if you can determine why its not working.
> >
> > I'll take this home and puzzle over it.
> > It probably won't be any more illuminating than the failing
> > tests for these fixes below. Thanks for the report.
> > - Bruce
>
> Okay, thanks for agreeing to take a look. If you can't figure it out,
> I think it would be reasonable to revert this stuff back to a working
> state until we understand what's wrong. At the moment, probably any
> platform needing the char macro fixes retains its traditional style
> definitions.
Too late. I fixed it last night and just checked it in.
The problem was that the "IO" and "CTRL" strings get
passed in as p_fixd->patch_args[1] and the code was indexing
with zero :-(. Also, after focusing on the code for too
long, my itchy fingers rewrote it to use a regex to parse
the #define-s. This also fixed a little problem in that
this:
#ifndef IO_QUOTES_DEF_CHECK
#define BSD43__IOWR(n, x) (('n'<<8)+x)
#endif /* IO_QUOTES_DEF_CHECK */
was not patched into:
#ifndef IO_QUOTES_DEF_CHECK
#define BSD43__IOWR(n, x) ((n<<8)+x)
#endif /* IO_QUOTES_DEF_CHECK */