Enable compilation and functionality on darwin(osx)
authorCharlie Lenahan <charlie.lenahan@intel.com>
Tue, 7 Apr 2015 18:59:58 +0000 (14:59 -0400)
committerErich Keane <erich.keane@intel.com>
Wed, 8 Apr 2015 19:30:10 +0000 (19:30 +0000)
commit40a06b6b0ac304473a6a913953dd2dcb750a1c90
tree54b2867f76d3baa74bf4933edb39ad15a0449fe5
parentde5218513d1393381eab312537c805c2aa08fe19
Enable compilation and functionality on darwin(osx)

Currently, the iotivity project does not support compiling/
running on Apple Darwin platforms.  This patch enables
compilation and minimal sample functionality for darwin.

It accomplishes this by adding 'darwin' as a valid
target_os in all build-scripts.  glib2 compiling/linking
is also added for the darwin build, which was previously
missing and blocking building connectivity-abstraction.

Many positions in the code had #ifdef __linux__, which has
been switched to also recognize __APPLE__.

Finally, the logger time-functionality used linux-specific
clock_gettime, so this functionality has been broken up
into an osalGetTime function, with an implementation for
__APPLE__ included in this patch.

Change-Id: Iddc2462db44198be90a975536e0273f63c521ab6
Signed-off-by: Charlie Lenahan <charlie.lenahan@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/668
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
16 files changed:
SConstruct
build_common/darwin/SConscript
resource/SConscript
resource/csdk/SConscript
resource/csdk/connectivity/SConscript
resource/csdk/connectivity/common/inc/logger.h
resource/csdk/connectivity/lib/libcoap-4.1.1/SConscript
resource/csdk/connectivity/lib/libcoap-4.1.1/net.c
resource/csdk/connectivity/src/SConscript
resource/csdk/connectivity/src/camessagehandler.c
resource/csdk/connectivity/src/ethernet_adapter/SConscript
resource/csdk/connectivity/src/ethernet_adapter/linux/caethernetnwmonitor.c
resource/csdk/logger/src/logger.c
resource/csdk/ocrandom/src/ocrandom.c
resource/csdk/stack/samples/linux/SimpleClientServer/SConscript
service/SConscript