Revert "Generate iotivity_config.h at build time"
authorJaewook Jung <jw0213.jung@samsung.com>
Mon, 5 Sep 2016 05:50:30 +0000 (14:50 +0900)
committerUze Choi <uzchoi@samsung.com>
Mon, 5 Sep 2016 09:52:37 +0000 (09:52 +0000)
This reverts commit dbcc3f47fe5abd2102750cdd3ace7f92619e8dd0.

Change-Id: I1fe54489a0d73940ca74f4abd293608c255fe645
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11393
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
70 files changed:
.gitignore
build_common/SConscript
extlibs/timer/timer.c
extlibs/timer/timer.h
extlibs/tinydtls/tests/dtls-server.c
iotivity.pc.in
resource/c_common/SConscript
resource/c_common/ocrandom/src/ocrandom.c
resource/c_common/oic_time/src/oic_time.c
resource/c_common/windows/SConscript
resource/csdk/connectivity/api/cacommon.h
resource/csdk/connectivity/common/src/camutex_pthreads.c
resource/csdk/connectivity/common/src/cathreadpool_pthreads.c
resource/csdk/connectivity/inc/caadapternetdtls.h
resource/csdk/connectivity/inc/caadapterutils.h
resource/csdk/connectivity/src/adapter_util/caadapternetdtls.c
resource/csdk/connectivity/src/adapter_util/caadapterutils.c
resource/csdk/connectivity/src/caprotocolmessage.c
resource/csdk/connectivity/src/caqueueingthread.c
resource/csdk/connectivity/src/caretransmission.c
resource/csdk/connectivity/src/ip_adapter/caipserver.c
resource/csdk/connectivity/test/camutex_tests.cpp
resource/csdk/connectivity/test/catests.cpp
resource/csdk/logger/src/logger.c
resource/csdk/security/include/securevirtualresourcetypes.h
resource/csdk/security/provisioning/sample/provisioningclient.c
resource/csdk/security/provisioning/sample/sampleserver_justworks.cpp
resource/csdk/security/provisioning/sample/sampleserver_randompin.cpp
resource/csdk/security/provisioning/src/ownershiptransfermanager.c
resource/csdk/security/provisioning/src/pmutility.c
resource/csdk/security/provisioning/src/secureresourceprovider.c
resource/csdk/security/provisioning/unittest/provisioningdatabasemanager.cpp
resource/csdk/security/src/aclresource.c
resource/csdk/security/src/credresource.c
resource/csdk/security/src/directpairing.c
resource/csdk/security/src/doxmresource.c
resource/csdk/security/src/dpairingresource.c
resource/csdk/security/src/iotvticalendar.c
resource/csdk/security/src/pconfresource.c
resource/csdk/security/src/verresource.c
resource/csdk/security/unittest/pstatresource.cpp
resource/csdk/security/unittest/securityresourcemanager.cpp
resource/csdk/stack/include/octypes.h
resource/csdk/stack/samples/linux/SimpleClientServer/occlient.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/occlientbasicops.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/occlientcoll.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/occlientslow.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/ocserver.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/ocserverbasicops.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/ocservercoll.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/ocserverslow.cpp
resource/csdk/stack/samples/linux/secure/ocamsservice.cpp
resource/csdk/stack/samples/linux/secure/occlientbasicops.cpp
resource/csdk/stack/samples/linux/secure/occlientdirectpairing.cpp
resource/csdk/stack/samples/linux/secure/ocserverbasicops.cpp
resource/csdk/stack/samples/tizen/build/packaging/com.oic.ri.spec
resource/csdk/stack/src/occlientcb.c
resource/csdk/stack/src/ocpayload.c
resource/csdk/stack/src/ocresource.c
resource/csdk/stack/src/ocstack.c
resource/csdk/stack/src/oicgroup.c
resource/csdk/stack/src/oicresourcedirectory.c
resource/examples/lightserver.cpp
resource/examples/presenceserver.cpp
resource/examples/simpleclient.cpp
resource/examples/simpleclientHQ.cpp
resource/examples/simpleserver.cpp
resource/examples/simpleserverHQ.cpp
resource/examples/threadingsample.cpp
resource/src/OCResource.cpp

index 4f34ee3..62afd32 100644 (file)
@@ -37,9 +37,6 @@ resource/csdk/stack/samples/linux/SimpleClientServer/release/
 
 resource/csdk/connectivity/build/out/
 
-# Ignore autogenerated files
-resource/c_common/iotivity_config.h
-
 resource/oc_logger/bin/
 resource/oc_logger/lib/
 resource/oc_logger/samples/linux/release/
index 0264e6a..f71d250 100644 (file)
@@ -433,6 +433,52 @@ conf = Configure(env,
 # POSIX_SUPPORTED, 1 if it is supported, 0 otherwise
 conf.CheckPThreadsSupport()
 
+######################################################################
+# Generate macros for presence of headers
+######################################################################
+cxx_headers = ['arpa/inet.h',
+               'fcntl.h',
+               'grp.h',
+               'in6addr.h',
+               'linux/limits.h',
+               'memory.h',
+               'netdb.h',
+               'netinet/in.h',
+               'pthread.h',
+               'pwd.h',
+               'stdlib.h',
+               'string.h',
+               'strings.h',
+               'sys/socket.h',
+               'sys/stat.h',
+               'sys/time.h',
+               'sys/timeb.h',
+               'sys/types.h',
+               'sys/unistd.h',
+               'syslog.h',
+               'time.h',
+               'unistd.h',
+               'uuid/uuid.h',
+               'windows.h',
+               'winsock2.h',
+               'ws2tcpip.h']
+
+if target_os == 'arduino':
+       # Detection of headers on the Arduino platform is currently broken.
+       cxx_headers = []
+
+if target_os == 'msys_nt':
+       # WinPThread provides a pthread.h, but we want to use native threads.
+       cxx_headers.remove('pthread.h')
+
+def get_define_from_header_file(header_file):
+       header_file_converted = header_file.replace("/","_").replace(".","_").upper()
+       return "HAVE_" + header_file_converted
+
+for header_file_name in cxx_headers:
+       if conf.CheckCXXHeader(header_file_name):
+               conf.env.AppendUnique(CPPDEFINES = [get_define_from_header_file(header_file_name)])
+
 env = conf.Finish()
 ######################################################################
 
index 08b9a6e..3dda84b 100755 (executable)
@@ -22,7 +22,6 @@
 
 #define _BSD_SOURCE
 
-#include "iotivity_config.h"
 #ifdef HAVE_WINDOWS_H
 #include <windows.h>
 #endif
@@ -41,6 +40,7 @@
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
+#include "platform_features.h"
 
 #include <stdio.h>
 
index ffa304c..3ad432a 100644 (file)
@@ -21,7 +21,6 @@
 #ifndef TIMER_H_
 #define TIMER_H_
 
-#include "iotivity_config.h"
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
index 07acd18..9a8918a 100644 (file)
@@ -2,7 +2,6 @@
 /* This is needed for apple */
 #define __APPLE_USE_RFC_3542
 
-#include "iotivity_config.h"
 #include <assert.h>
 #include <stdio.h>
 #include <string.h>
index f5c06c9..7bf7c45 100644 (file)
@@ -13,7 +13,6 @@ URL: https://www.iotivity.org
 Requires:
 Libs: -L${libdir} -loc -loc_logger -loc_logger_core -loctbstack -lconnectivity_abstraction
 Cflags: -I${includedir}/resource \
-                       -I${includedir}/c_common \
                        -I${svcincludedir}/resource-encapsulation \
                        -I${svcincludedir}/resource-container \
                        -I${svcincludedir}/resource-hosting \
index 31f7eca..f412655 100644 (file)
 
 Import('env')
 import os
-import datetime
 
 target_os = env.get('TARGET_OS')
-target_arch = env.get('TARGET_ARCH')
 
-######################################################################
-# Generate iotivity_config.h using presence of headers
-######################################################################
-
-config_h_env = env.Clone()
-conf = Configure(config_h_env)
-
-config_h_header = '''
-/* ****************************************************************************
- * iotivity_config.h - IoTivity platform-specific configuration header.
- *
- * Auto-generated code for the %s %s platform.
- *
- * Generated at %s
- *
- *************************************************************************** */
-
-#ifndef IOTIVITY_CONFIG_H__
-#define IOTIVITY_CONFIG_H__
-
-#include "platform_features.h"
-
-''' % (str(target_os), str(target_arch), str(datetime.datetime.utcnow()))
-
-config_h_body = ''
-
-config_h_footer = '''
-
-#endif // IOTIVITY_CONFIG_H__
-
-'''
-
-cxx_headers = ['arpa/inet.h',
-               'fcntl.h',
-               'grp.h',
-               'in6addr.h',
-               'linux/limits.h',
-               'memory.h',
-               'netdb.h',
-               'netinet/in.h',
-               'pthread.h',
-               'pwd.h',
-               'stdlib.h',
-               'string.h',
-               'strings.h',
-               'sys/socket.h',
-               'sys/stat.h',
-               'sys/time.h',
-               'sys/timeb.h',
-               'sys/types.h',
-               'sys/unistd.h',
-               'syslog.h',
-               'time.h',
-               'unistd.h',
-               'uuid/uuid.h',
-               'windows.h',
-               'winsock2.h',
-               'ws2tcpip.h']
-
-if target_os == 'arduino':
-       # Detection of headers on the Arduino platform is currently broken.
-       cxx_headers = []
-
-if target_os == 'msys_nt':
-       # WinPThread provides a pthread.h, but we want to use native threads.
-       cxx_headers.remove('pthread.h')
-
-def get_define_from_header_file(header_file):
-       header_file_converted = header_file.replace("/","_").replace(".","_").upper()
-       return "HAVE_" + header_file_converted
-
-for header_file_name in cxx_headers:
-       if conf.CheckCXXHeader(header_file_name):
-               config_h_body += "#define %s\n\n" % get_define_from_header_file(header_file_name)
-conf.Finish()
-
-# Autoconf feature doesn't work with Jenkins' arduino toolchain, so hardcode it here.
-if target_os == 'arduino':
-       config_h_body += "#define HAVE_ARDUINO_TIME_H\n\n"
-
-# Generate the file
-src_dir = env.get('SRC_DIR')
-config_h_file_path = os.path.join(src_dir, 'resource', 'c_common', 'iotivity_config.h')
-if os.path.exists(config_h_file_path):
-       os.remove(config_h_file_path)
-config_h_file = open(config_h_file_path, "w")
-config_h_file.write(config_h_header + config_h_body + config_h_footer)
-config_h_file.close()
-
-# Sanity check to ensure that the above block created the file.
-if not os.path.exists(config_h_file_path):
-       print "Error: iotivity_config.h file not created!"
-
-# iotivity_config.h should be copied to the build dir
-env.UserInstallTargetHeader(config_h_file_path, 'c_common', 'iotivity_config.h')
-
-# Use the generated file internally
-env.AppendUnique(CPPPATH = [os.path.join(src_dir, 'resource', 'c_common')])
-
-######################################################################
-
-######################################################################
 # Add platform-specific helper library
-######################################################################
-
 if target_os in ['windows', 'msys_nt']:
        SConscript('windows/SConscript')
 
 env.AppendUnique(CPPPATH = [
+            os.path.join(Dir('.').abspath),
             os.path.join(Dir('.').abspath, 'oic_malloc', 'include'),
             os.path.join(Dir('.').abspath, 'oic_string', 'include'),
             os.path.join(Dir('.').abspath, 'oic_time', 'include'),
@@ -150,6 +45,7 @@ if target_os in ['tizen', 'linux']:
        env.ParseConfig("pkg-config --cflags --libs uuid")
 
 common_env = env.Clone()
+common_env.AppendUnique(LIBPATH = [os.path.join(env.get('BUILD_DIR'), 'resource')])
 
 ######################################################################
 # Build flags
@@ -168,9 +64,10 @@ common_src = [
        'oic_time/src/oic_time.c',
        'ocrandom/src/ocrandom.c',
        ]
+
 commonlib = common_env.StaticLibrary('c_common', common_src)
 common_env.InstallTarget(commonlib, 'c_common')
 common_env.UserInstallTargetLib(commonlib, 'c_common')
-common_env.UserInstallTargetHeader('platform_features.h', 'c_common', 'platform_features.h')
+common_env.UserInstallTargetHeader('platform_features.h', 'resource', 'platform_features.h')
 
 env.PrependUnique(LIBS = ['c_common'])
index 32c4b4b..118aeee 100644 (file)
@@ -30,8 +30,7 @@
 #define _POSIX_C_SOURCE 200809L
 #endif
 
-#include "iotivity_config.h"
-
+#include "platform_features.h"
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
index e01e6fb..0b094f5 100644 (file)
@@ -30,7 +30,6 @@
 #define _POSIX_C_SOURCE 200809L
 #endif
 
-#include "iotivity_config.h"
 #include "oic_time.h"
 
 #include <stddef.h>        // For NULL
index 63ccb45..a2e0e51 100644 (file)
@@ -21,9 +21,6 @@ helper_src = [
 static_libwinhelper = env.StaticLibrary('win_helper', helper_src)
 env.InstallTarget(static_libwinhelper, 'win_helper')
 env.UserInstallTargetLib(static_libwinhelper, 'win_helper')
-env.UserInstallTargetHeader('include/win_sleep.h', 'c_common/windows/include', 'win_sleep.h')
-env.UserInstallTargetHeader('include/pthread_create.h', 'c_common/windows/include', 'pthread_create.h')
-env.UserInstallTargetHeader('include/vs12_snprintf.h', 'c_common/windows/include', 'vs12_snprintf.h')
 
 env.AppendUnique(LIBS = ['win_helper'])
 
index cedc763..87d1174 100644 (file)
@@ -26,8 +26,6 @@
 #ifndef CA_COMMON_H_
 #define CA_COMMON_H_
 
-#include "iotivity_config.h"
-
 #ifndef WITH_ARDUINO
 #ifdef TCP_ADAPTER
 #define HAVE_SYS_POLL_H
index 55f8536..db790ec 100644 (file)
@@ -36,7 +36,6 @@
 #define _POSIX_C_SOURCE 200809L
 #endif
 
-#include "iotivity_config.h"
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
@@ -59,6 +58,7 @@
 #include <errno.h>
 #include <assert.h>
 #include <oic_malloc.h>
+#include "platform_features.h"
 #include "camutex.h"
 #include "logger.h"
 
index 3865df6..d17af9c 100644 (file)
@@ -27,7 +27,6 @@
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
 #endif
-#include "iotivity_config.h"
 #include <errno.h>
 #if defined HAVE_PTHREAD_H
 #include <pthread.h>
index dcc2366..6d03c7e 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef CA_ADAPTER_NET_DTLS_H_
 #define CA_ADAPTER_NET_DTLS_H_
 
+#include "platform_features.h"
 #include "dtls.h"
 #include "uarraylist.h"
 #include "camutex.h"
index 5c2dcc7..5f8c248 100644 (file)
@@ -27,8 +27,6 @@
 #ifndef CA_ADAPTER_UTILS_H_
 #define CA_ADAPTER_UTILS_H_
 
-#include "iotivity_config.h"
-
 #include <stdbool.h>
 #ifdef __ANDROID__
 #include <jni.h>
index 571878e..f960fab 100644 (file)
@@ -17,7 +17,7 @@
  * limitations under the License.
  *
  ******************************************************************/
-#include "iotivity_config.h"
+#include "platform_features.h"
 #include "caadapternetdtls.h"
 #include "cacommon.h"
 #include "caipinterface.h"
index 8355886..888885b 100644 (file)
@@ -18,7 +18,6 @@
  *
  ******************************************************************/
 
-#include "iotivity_config.h"
 #include "caadapterutils.h"
 
 #include <string.h>
index 94810ca..03eca3b 100644 (file)
@@ -28,7 +28,6 @@
 // Refer http://www.gnu.org/software/libc/manual/html_node/BSD-Random.html
 #define _DEFAULT_SOURCE
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index e034161..3e10065 100644 (file)
@@ -18,7 +18,6 @@
  *
  ******************************************************************/
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 7101b4c..a3cb02f 100644 (file)
@@ -41,7 +41,6 @@
 #define _POSIX_C_SOURCE 200809L
 #endif
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -56,7 +55,7 @@
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
-#ifdef HAVE_SYS_TIMEB_H
+#if HAVE_SYS_TIMEB_H
 #include <sys/timeb.h>
 #endif
 #ifdef HAVE_TIME_H
index f953689..313d2f6 100644 (file)
@@ -25,7 +25,6 @@
 #define _GNU_SOURCE // for in6_pktinfo
 #endif
 
-#include "iotivity_config.h"
 #include <sys/types.h>
 #if !defined(_WIN32)
 #include <sys/socket.h>
@@ -66,6 +65,7 @@
 #include "camutex.h"
 #include "oic_malloc.h"
 #include "oic_string.h"
+#include "platform_features.h"
 
 #define USE_IP_MREQN
 #if defined(_WIN32)
index 9a8e6f6..54d9fb8 100644 (file)
@@ -33,7 +33,6 @@
 #define _POSIX_C_SOURCE 200809L
 #endif // _POSIX_C_SOURCE
 
-#include "iotivity_config.h"
 #include "gtest/gtest.h"
 
 #include <camutex.h>
@@ -48,6 +47,7 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+#include "platform_features.h"
 #ifdef HAVE_WINDOWS_H
 #include <windows.h>
 #endif
index 69eaa14..c701a2e 100644 (file)
@@ -18,7 +18,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #include "gtest/gtest.h"
 
 #ifdef HAVE_PTHREAD_H
index edeb167..cc7f303 100644 (file)
@@ -30,8 +30,6 @@
 #define _POSIX_C_SOURCE 200809L
 #endif
 
-#include "iotivity_config.h"
-
 // Pull in _POSIX_TIMERS feature test macro to check for
 // clock_gettime() support.
 #ifdef HAVE_UNISTD_H
@@ -54,6 +52,7 @@
 #include "logger.h"
 #include "string.h"
 #include "logger_types.h"
+#include "platform_features.h"
 
 #ifndef __TIZEN__
 static oc_log_ctx_t *logCtx = 0;
index 77af258..bc0efb4 100644 (file)
 #ifndef OC_SECURITY_RESOURCE_TYPES_H
 #define OC_SECURITY_RESOURCE_TYPES_H
 
-#include "iotivity_config.h"
-
 #include <stdint.h> // for uint8_t typedef
 #include <stdbool.h>
 #if defined(__WITH_X509__) || defined(__WITH_TLS__)
 #include "byte_array.h"
 #endif /* __WITH_X509__  or __WITH_TLS__*/
 
+#include "platform_features.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
index c742e1b..b0454ee 100644 (file)
  *
  *****************************************************************/
 
-#include "iotivity_config.h"
-
 #include <stdio.h>
 #include <string.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 
+#include "platform_features.h"
 #include "utlist.h"
 #include "logger.h"
 #include "oic_malloc.h"
index fcf752d..adec06f 100644 (file)
@@ -20,7 +20,6 @@
 ///////////////////////////////////////////////////////////////////////
 //NOTE :  This sample server is generated based on ocserverbasicops.cpp
 ///////////////////////////////////////////////////////////////////////
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
index 56156ba..06a5512 100644 (file)
@@ -20,7 +20,6 @@
 ///////////////////////////////////////////////////////////////////////
 //NOTE :  This sample server is generated based on ocserverbasicops.cpp
 ///////////////////////////////////////////////////////////////////////
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
index ee4c607..f679388 100755 (executable)
@@ -21,8 +21,7 @@
 #define _POSIX_C_SOURCE 200112L
 #endif
 
-#include "iotivity_config.h"
-#ifdef HAVE_UNISTD_H
+#if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 #ifdef HAVE_STRING_H
index fcf6536..0b14334 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  *
  * *****************************************************************/
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <string.h>
 #include <stdint.h>
index 14338f2..92c67b7 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  *
  * *****************************************************************/
-#include "iotivity_config.h"
 #include "gtest/gtest.h"
 #include "provisioningdatabasemanager.h"
 
index 450123f..3aaefeb 100644 (file)
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #ifdef HAVE_STRING_H
 #include <string.h>
-#elif defined(HAVE_STRINGS_H)
+#elif HAVE_STRINGS_H
 #include <strings.h>
 #endif
 #include <stdlib.h>
index 24371b8..2e2bba5 100644 (file)
@@ -20,7 +20,6 @@
 
 #define __STDC_LIMIT_MACROS
 
-#include "iotivity_config.h"
 #include <stdlib.h>
 #ifdef HAVE_STRING_H
 #include <string.h>
index af7cbad..e7ef882 100644 (file)
@@ -20,7 +20,6 @@
 #ifndef _POSIX_C_SOURCE\r
 #define _POSIX_C_SOURCE 200112L\r
 #endif\r
-#include "iotivity_config.h"\r
 #ifdef HAVE_UNISTD_H\r
 #include <unistd.h>\r
 #endif\r
index 44b22be..9aac585 100644 (file)
 // limitations under the License.
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#include "iotivity_config.h"
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef HAVE_STRINGS_H
+#if HAVE_STRINGS_H
 #include <strings.h>
 #endif
 
index 534dcea..820021a 100644 (file)
@@ -18,7 +18,6 @@
  *
  * *****************************************************************/
 
-#include "iotivity_config.h"
 #include <stdlib.h>
 #include <string.h>
 #include "ocstack.h"
index acb44f1..dc16f4b 100644 (file)
@@ -22,7 +22,6 @@
 #if !defined(WITH_ARDUINO)
 
 #define _XOPEN_SOURCE  //Needed by strptime
-#include "iotivity_config.h"
 #include <string.h>
 #include "iotvticalendar.h"
 #include "oic_string.h"
index b216e62..84bbf48 100644 (file)
@@ -18,7 +18,6 @@
  *
  * *****************************************************************/
 
-#include "iotivity_config.h"
 #include <stdlib.h>
 #include <string.h>
 #include "ocstack.h"
index 78725a7..96afacc 100644 (file)
  *
  * *****************************************************************/
 
-#include "iotivity_config.h"
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef HAVE_STRINGS_H
+#if HAVE_STRINGS_H
 #include <strings.h>
 #endif
 
index df46f27..90f189d 100644 (file)
@@ -18,7 +18,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 9a38f48..2917709 100644 (file)
@@ -18,7 +18,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #include "gtest/gtest.h"
 #ifdef HAVE_PWD_H
 #include <pwd.h>
index 5fafce2..2ae83e4 100644 (file)
@@ -28,7 +28,7 @@
 #ifndef OCTYPES_H_
 #define OCTYPES_H_
 
-#include "iotivity_config.h"
+#include "platform_features.h"
 #include "ocstackconfig.h"
 #include <stdbool.h>
 #include <stdint.h>
index 061c94f..fe7c8ae 100644 (file)
@@ -18,7 +18,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -38,6 +37,7 @@
 #include "ocpayload.h"
 #include "payload_logging.h"
 #include "common.h"
+#include "platform_features.h"
 
 #ifdef ROUTING_GATEWAY
 /**
index a37f64a..988ce35 100644 (file)
@@ -17,7 +17,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 5e576b4..375b169 100644 (file)
@@ -18,7 +18,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index aa45b6c..d15fdd4 100644 (file)
@@ -18,7 +18,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 68c592f..970565a 100644 (file)
@@ -19,7 +19,6 @@
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <string.h>
 #include <string>
@@ -42,6 +41,7 @@
 #include "ocpayload.h"
 #include "ocserver.h"
 #include "common.h"
+#include "platform_features.h"
 
 //string length of "/a/light/" + std::numeric_limits<int>::digits10 + '\0'"
 // 9 + 9 + 1 = 19
index e5726c4..84d902c 100644 (file)
@@ -18,7 +18,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
index ed18975..b5408d0 100644 (file)
@@ -19,7 +19,6 @@
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <string.h>
 #include <string>
@@ -39,6 +38,7 @@
 #include <getopt.h>
 #include "ocpayload.h"
 #include "common.h"
+#include "platform_features.h"
 
 #define TAG PCF("ocservercontainer")
 
index 997b789..5f0ba4b 100644 (file)
@@ -18,7 +18,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
index e7262a8..4d0fdf0 100644 (file)
@@ -1,5 +1,5 @@
 
-#include "iotivity_config.h"
+
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
@@ -13,6 +13,7 @@
 #ifdef HAVE_PTHREAD_H
 #include <pthread.h>
 #endif
+#include "platform_features.h"
 #include "ocstack.h"
 #include "logger.h"
 #include "common.h"
index 5e8ca99..714d075 100644 (file)
@@ -18,7 +18,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -36,6 +35,7 @@
 #include <iostream>
 #include <sstream>
 #include <getopt.h>
+#include "platform_features.h"
 #include "ocstack.h"
 #include "logger.h"
 #include "occlientbasicops.h"
index 5ae096b..af344d3 100644 (file)
@@ -18,7 +18,6 @@
 //\r
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r
 \r
-#include "iotivity_config.h"\r
 #include <stdio.h>\r
 #include <stdlib.h>\r
 #include <string.h>\r
@@ -38,6 +37,7 @@
 #undef ERROR\r
 #endif\r
 #endif // defined(HAVE_WINDOWS_H)\r
+#include "platform_features.h"\r
 #include "ocstack.h"\r
 #include "logger.h"\r
 #include "ocpayload.h"\r
index 61db06a..9d83669 100644 (file)
@@ -18,7 +18,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
@@ -32,6 +31,7 @@
 #ifdef HAVE_PTHREAD_H
 #include <pthread.h>
 #endif
+#include "platform_features.h"
 #include "ocstack.h"
 #include "logger.h"
 #include "ocpayload.h"
index 09a9ca4..f86c4c6 100644 (file)
@@ -67,7 +67,6 @@ cp resource/oc_logger/include/targets/oc_ostream_logger.h %{DEST_INC_DIR}
 cp resource/csdk/stack/include/ocpresence.h %{DEST_INC_DIR}
 cp resource/csdk/stack/include/ocpayload.h %{DEST_INC_DIR}
 cp resource/c_common/platform_features.h %{DEST_INC_DIR}
-cp resource/c_common/iotivity_config.h %{DEST_INC_DIR}
 cp resource/c_common/*/include/*.h %{DEST_INC_DIR}
 cp resource/csdk/stack/include/payload_logging.h %{DEST_INC_DIR}
 cp resource/csdk/stack/include/rdpayload.h %{DEST_INC_DIR}
index 42100d6..cc2bfb4 100644 (file)
@@ -18,7 +18,7 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
+
 #include "occlientcb.h"
 #include "utlist.h"
 #include "logger.h"
index 80e9e06..3af571e 100644 (file)
@@ -21,7 +21,6 @@
 // Required for strok_r
 #define _POSIX_C_SOURCE 200112L
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include "ocpayload.h"
 #include "octypes.h"
index 860b27a..e5323e6 100755 (executable)
@@ -29,7 +29,6 @@
 #define _GNU_SOURCE
 #endif
 
-#include "iotivity_config.h"
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
index f11501c..13d595b 100644 (file)
@@ -36,7 +36,6 @@
 #ifndef __STDC_LIMIT_MACROS
 #define __STDC_LIMIT_MACROS
 #endif
-#include "iotivity_config.h"
 #include <inttypes.h>
 #include <string.h>
 #include <ctype.h>
@@ -58,6 +57,7 @@
 #include "cainterface.h"
 #include "ocpayload.h"
 #include "ocpayloadcbor.h"
+#include "platform_features.h"
 
 #if defined (ROUTING_GATEWAY) || defined (ROUTING_EP)
 #include "routingutility.h"
index a2968cd..558f683 100755 (executable)
@@ -20,8 +20,6 @@
 
 #define _POSIX_C_SOURCE 200112L
 
-#include "iotivity_config.h"
-
 #include <string.h>
 
 #include "oicgroup.h"
@@ -34,6 +32,8 @@
 #include "logger.h"
 #include "timer.h"
 
+#include "platform_features.h"
+
 #define TAG "OIC_RI_GROUP"
 
 #define DESC_DELIMITER          "\""
index 8920bde..4a60a77 100644 (file)
@@ -17,7 +17,6 @@
 // limitations under the License.
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#include "iotivity_config.h"
 #include "oicresourcedirectory.h"
 
 #include "rdpayload.h"
index 1ce1e6b..6368e93 100644 (file)
@@ -23,7 +23,6 @@
 /// This sample provides steps to define an interface for a resource
 /// (properties and methods) and host this resource on the server.
 ///
-#include "iotivity_config.h"
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
index 228e6af..5bb8b06 100644 (file)
 /// (properties and methods) and host this resource on the server.
 ///
 
-#include "iotivity_config.h"
 #include <functional>
 
-#ifdef HAVE_PTHREAD_H
 #include <pthread.h>
-#endif
 #include <array>
 #include <mutex>
 #include <condition_variable>
@@ -39,6 +36,7 @@
 #ifdef HAVE_WINDOWS_H
 #include <windows.h>
 #endif
+#include "platform_features.h"
 
 using namespace OC;
 using namespace std;
index a2997bc..f9452af 100644 (file)
@@ -20,7 +20,6 @@
 
 // OCClient.cpp : Defines the entry point for the console application.
 //
-#include "iotivity_config.h"
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 6d631d3..be585fc 100644 (file)
 
 // OCClient.cpp : Defines the entry point for the console application.
 //
-#include "iotivity_config.h"
-
 #include <set>
 #include <string>
 #include <cstdlib>
+#ifdef HAVE_PTHREAD_H
+#include <pthread.h>
+#endif
 #include <mutex>
 #include <condition_variable>
 #include "OCPlatform.h"
 #include "OCApi.h"
 
-#if defined(HAVE_PTHREAD_H)
-#include <pthread.h>
-#endif
 #if defined(HAVE_WINDOWS_H)
 #include <windows.h>
 #endif
+#include "platform_features.h"
 
 using namespace OC;
 
index b005900..13981cb 100644 (file)
@@ -22,9 +22,8 @@
 /// This sample provides steps to define an interface for a resource
 /// (properties and methods) and host this resource on the server.
 ///
-#include "iotivity_config.h"
-
 #include <functional>
+
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
@@ -39,6 +38,7 @@
 #ifdef HAVE_WINDOWS_H
 #include <windows.h>
 #endif
+#include "platform_features.h"
 
 using namespace OC;
 using namespace std;
index 6d641e7..3adef4e 100644 (file)
@@ -23,7 +23,6 @@
 /// (properties and methods) and host this resource on the server.
 ///
 
-#include "iotivity_config.h"
 #include <functional>
 
 #ifdef HAVE_PTHREAD_H
@@ -38,6 +37,7 @@
 #ifdef HAVE_WINDOWS_H
 #include <windows.h>
 #endif
+#include "platform_features.h"
 
 using namespace OC;
 using namespace std;
index 46cfbec..1eaaeba 100644 (file)
@@ -23,7 +23,6 @@
 /// server in a separate thread, and running 2 clients in each thread.
 ///
 
-#include "iotivity_config.h"
 
 #include <memory>
 #include <iostream>
@@ -38,6 +37,7 @@
 #ifdef HAVE_WINDOWS_H
 #include <windows.h>
 #endif
+#include "platform_features.h"
 
 using namespace OC;
 
index 9fd3d5b..b83061f 100644 (file)
@@ -18,7 +18,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #include "OCResource.h"
 #include "OCUtilities.h"