From: Kevin Z. <kev...@gm...> - 2015-03-27 22:54:56
|
On 03/26/2015 17:31, James Harris wrote: > If I remove AM_CFLAGS+= -D_XOPEN_SOURCE from the non Solaris case the > warnings go. Another way to go is set AM_CFLAGS+= -D_XOPEN_SOURCE=600 as > that will also remove the warning. In other words remove the conditional > and the compile completes without issue. Here's what the Open Group has to say [1]: "An XSI-conforming application should ensure that the feature test macro _XOPEN_SOURCE is defined with the value 600 before inclusion of any header." > So what do we think is safer ? Remove _XOPEN_SOURCE or add || LINUX to > the solaris conditional? I think the standard is pretty clear about unconditionally setting _XOPEN_SOURCE to 600. I've attached a patch that does just that. If there are no objections I'll commit it. Note that this is the only source directory that sets _XOPEN_SOURCE; should the others too? Thanks, Kevin Zheng [1] http://pubs.opengroup.org/onlinepubs/007904875/functions/xsh_chap02_02.html -- Kevin Zheng kev...@gm... | ke...@kd... | PGP: 0xC22E1090 |