Miloslav Trmac <mi...@re...> writes:
> Hello,
> recently some code changed in svn from
> | #if ...
> | printf(...);
> | #endif
> to
> | printf(...
> | #if ...
> | ...
> | #endif
> | );
>
> printf () may be a macro (and it actually is a macro e.g. with recent
> glibc and -D_FORTIFY_SOURCE=2) and preprocessor directives within
> macros are not permitted.
What is this _FORTIFY_SOURCE about? I have it in my include files, but
ZERO documentation, and all I found out is that it remaps to ominuous
builtins. So there must be recent gcc as well as it appears.
If this is supposed to be a security helper/feature/whatever and it's
not documented, it's useless.
> gcc currently compiles the code, but it complains loudly
> and it seems prudent to fix it before gcc tightens the rules again ;)
> The attached patch does that.
Thanks for reporting the problem.
I have modified your patch a little bit, mostly to maintain consistency
with the rest of the code (fputs rather than puts).
I think I'll be doing -pre9 shortly to have other cleanups and fixups
tested that I cannot test in my setup.
--
Matthias Andree
|