2010/10/11 Graham Gower <[email protected]>: > On 11 October 2010 17:04, Frans Meulenbroeks > <[email protected]> wrote: >> Do you feel this is the preferred way? >> I would probably not have made the patch but add -D_GNU_SOURCE to >> CFLAGS. (I like to compile all the sources with the same flags to >> avoid inconsistencies) >> >> Frans > > To be honest, I didn't really think about it and don't care either > way. But the glibc manual says the following: > "You should define these macros by using ‘#define’ preprocessor > directives at the top of your source code files. These directives must > come before any #include of a system header file. It is best to make > them the very first thing in the file, preceded only by comments. You > could also use the ‘-D’ option to GCC, but it's better if you make the > source files indicate their own meaning in a self-contained way." [1] > > The last sentence is not found in the feature_test_macros(7) man page. > > -Graham > > [1] http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
Ah ok, didn't know that text. My personal perception is to keep changes as small and unintrusive as possible. That is why I generally prefer -D. With a new version the -D will keep working whereas a patch might not (due to a change in the src file). But looking at that text, I'm fine with this change. Acked-by: Frans Meulenbroeks <[email protected]> _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
