On 12 December 2014 at 07:48, Maxim Uvarov <[email protected]> wrote: > > On 12/12/2014 03:38 PM, Bill Fischofer wrote: > >> Are we really ready to do this? I thought the idea was we were going to >> have each routine that needed it include the BSD/POSIX #defines so that >> they document their need for this on a case-by-case basis. >> > > Might be it was better to send this as RFC as discussion patch. >
I think we need to wait until the code catches up and this CI job <https://ci.linaro.org/view/odp-ci/job/odp-api-check-native-c99/buildhw=x86_64,label=build/19/console> runs clean, then turning on c99 will enforce it going forward. If we want to change what our future flags will be, lets add them to this job first. Obviously -std=c99 is a no brainer addition and it there already, however the blanket adding of _BSD_SOURCE may not be the best idea. I think I saw a way on a forum somewhere that we can add this flags effect per API used - that way we would better document what we depend on for linux-generic - if there is no such mechanism lets add _BSD_SOURCE to the CI job. > Most of linux-generic implementation will need posix defines. I'm not sure > if that 2 options overlap each other or not. But I think all code should > follow the same posix standard. > > Maxim. > > >> On Fri, Dec 12, 2014 at 6:31 AM, Maxim Uvarov <[email protected] >> <mailto:[email protected]>> wrote: >> >> Define _POSIX_C_SOURCE and _BSD_SOURCE to make gcc accept >> system calls and turn on -std=c99. >> >> Signed-off-by: Maxim Uvarov <[email protected] >> <mailto:[email protected]>> >> --- >> configure.ac <http://configure.ac> | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/configure.ac <http://configure.ac> b/configure.ac >> <http://configure.ac> >> index 2f27261..d9167a5 100644 >> --- a/configure.ac <http://configure.ac> >> +++ b/configure.ac <http://configure.ac> >> @@ -179,6 +179,8 @@ ODP_CFLAGS="$ODP_CFLAGS -Wmissing-declarations >> -Wold-style-definition -Wpointer- >> ODP_CFLAGS="$ODP_CFLAGS -Wcast-align -Wnested-externs -Wcast-qual >> -Wformat-nonliteral" >> ODP_CFLAGS="$ODP_CFLAGS -Wformat-security -Wundef -Wwrite-strings" >> >> +ODP_CFLAGS="$ODP_CFLAGS -std=c99 -D_BSD_SOURCE >> -D_POSIX_C_SOURCE=200809L" >> + >> ############################################################ >> ############## >> # Default include setup >> ############################################################ >> ############## >> -- >> 1.8.5.1.163.gd7aced9 >> >> >> _______________________________________________ >> lng-odp mailing list >> [email protected] <mailto:[email protected]> >> http://lists.linaro.org/mailman/listinfo/lng-odp >> >> > > _______________________________________________ > lng-odp mailing list > [email protected] > http://lists.linaro.org/mailman/listinfo/lng-odp > -- *Mike Holmes* Linaro Sr Technical Manager LNG - ODP
_______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
