On 11 October 2010 17:04, Frans Meulenbroeks
<fransmeulenbro...@gmail.com> 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

_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Reply via email to