Code portability cleanup.
Added required #includes and #defines to allow the code to be compiled without
errors in more situations.
Fixed platform and compiler assumptions that would prevent the code from
compiling successfully under different compilers and platforms. This helps
with building with different compilers or even later versions of current ones.
Added comments documenting resons for the #defines and portability info.
Change-Id: Ia4a943af1d2d06509e46669f952b5e7ca80efaf4
Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/532
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Joseph Morrow <joseph.l.morrow@intel.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>