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: bogus fixes


Philipp Thomas wrote:
> 
> Bruce,
> 
> fixinclude does bogus fixes, at least on my Linux glibc2 system.
> /usr/include/net/bpf.h has this code:
> 
> /*
>  * BPF ioctls
>  *
>  * The first set is for compatibility with Sun's pcc style
>  * header files.  If your using gcc, we assume that you
>  * have run fixincludes so the latter set should work.
>  */
> #if (defined(sun) || defined(ibm032)) && !defined(__GNUC__)
> #define BIOCGBLEN       _IOR(B,102, u_int)
> 
> So the header *has* checks for __GNUC__ and defines ioctls with proper
> quoting if gcc compiles it. Still fixincludes produces a header which also
> changes this conditionalized block, which IMO is a bug.
> 
> The other bogus fix is done for /usr/include/rpc/svc.h, where it 'fixes'
> prototypes *in comments*.

I am sorry you find it so painful.  A proposed patch would surely
be welcome.  Actually, a patch for the commentary prototypes is
in the works -- the header has changed so the fixincludes regex
won't match it any more  :-).  In any event, I take it you would
like to see all the IOCTL and CTRL fixes get bypass clauses in
certain cases.  Since the issues you raise do not cause failures
but, instead, are superfluous, the clause must take care to not
select any files that require such a fix.  Perhaps,
	bypass = "^#if.*__GNUC__";
??  Please feel free to propose patches and see if those familiar
with the ports that need this stuff complain.

Regards,
	Bruce

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