Hi, On Tue, Nov 3, 2015 at 2:52 PM, Jon A. Cruz <jonc at osg.samsung.com> wrote: > > On 11/03/2015 04:08 PM, Schulhof, Gabriel wrote: > > On Tue, Nov 3, 2015 at 10:52 PM, Jon A. Cruz <jonc at osg.samsung.com> > wrote: > >> I'm actually chasing down a bit of a solution now... > >> > >> there is an immediate issue in that libcoap added a generated config.h. > >> Problem is... the details only apply to the platform it was generated > >> on, not on most platforms. So that really needs to be replaced with some > >> dynamic generation. > > > > If you think your solution obsoletes > > https://gerrit.iotivity.org/gerrit/#/c/3973/6, then please feel free > > to abandon it. I only ask that you please remember that stdassert.h is > > not available on darwin, even though __STDC_VERSION__ >= 201112L when > > XCode >= 7.0. > > > > Yes... that is one thing to keep in mind. > > *However* scons does give us things like SConf.CheckCXXHeader() that we > should be using. > > CheckCXXHeader('stdassert.h') will check for that file to actually be > present and usable in cpp files. Checking against other things that give > us false positives should no longer be needed.
On a related note, why are attempting to include <stdassert.h>? AFAIK, that's not a standard header. Isn't the C11 static_assert() macro is define in <assert.h>? Furthermore, IoTivity shouldn't be checking the value of the __STDC_VERSION__ preprocessor symbol. It is an internal implementation detail. Checking if the non-standard _ISOC11_SOURCE preprocessor symbol is defined would be cleaner (see the feature_test_macros(7) <http://man7.org/linux/man-pages/man7/feature_test_macros.7.html> man page). -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20151104/26d5502e/attachment.html>
