Some systems (Tizen) havent __STDC_IEC_559__ defined
while sizeof(double) = 8, build breaks.
Moving test to run time is more flexible
For the record:
BUILD_ID=tizen-ivi_20170328.2_ivi-target-odroidxu3
gcc -dM -E - < /dev/null | grep 559
#define __GCC_IEC_559_COMPLEX 0
#define __GCC_IEC_559 0
Change-Id: I427188afcb6178e9a5e15c341185eb1b3d951fc8
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18333
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Joseph Morrow <joseph.l.morrow@intel.com>
Tested-by: Joseph Morrow <joseph.l.morrow@intel.com>
// then we are guaranteed that the 'double' type is 64-bit. Otherwise, the
// compilation of this file should fail because we are no longer guaranteed.
#ifndef __STDC_IEC_559__
-#error "Requires IEEE 754 floating point!"
+#warning "Requires IEEE 754 floating point!"
#endif
#include "zigbee_wrapper.h"
PINewResourceFound newResourceCB,
PIObserveNotificationUpdate observeNotificationUpdate)
{
+ if (sizeof(double) != 64/8)
+ {
+ return OC_STACK_ERROR;
+ }
if (!plugin)
{
return OC_STACK_INVALID_PARAM;