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]

Re: fixincl recently broken, char_macro_def/char_macro_use don't work


"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 */

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