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 4f34ee3600af02ad1ca972d38e3ad4f629196b2f..62afd32e00f91e91845d3d1313f86ea74297ee17 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 0264e6ace4b98679448ecc42a8967327a62f3001..f71d250bcd906b5826a93fd47dbee4cfeea5d949 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 08b9a6efb0364a71d7a8f934ad96e64abd5e9f19..3dda84bafe10e7862b66ba858ff74074f9fc09a0 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 ffa304ca0c425585d911f8a7816c1a2f27c58cb0..3ad432ac8156485ebc4a479beaccb44f2218fb72 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 07acd18eb1cd661d53e8f85a3da88e078a437d72..9a8918a7e7f3fd471163e2d5bdf355b8925543e6 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 f5c06c931514bf7fd7d8affb84c2d87e3136ba88..7bf7c455e58a2cffcb1fbcf04579ed59f8f698ff 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 31f7ecaa72961877c1a8d582b30f37fc18483014..f412655cf49e521fcdae9cc63e69d47ef7b93db2 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 32c4b4b0341bdd921bd1a85451c303976407d524..118aeeeb3a424421b3ea5a3a9dea9964c51b004c 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 e01e6fb8db8fbccf9611cfbab9308e6cf2ace0f1..0b094f5d2541a1ec0b2986ae4dd4dac7bb220da6 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 63ccb458976de3d1bdc61dfbfddb19e671dbdbe5..a2e0e51c089e5034521a49e2e243fcf770cd76a1 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 cedc763e195ad948114d14ff74a0d49d49aec760..87d1174479864ff25607e8bb38dcce6fd2f6be8b 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 55f85365e4cb575174b9b6e93e597503c06f0b3c..db790ec7ee9a5fc20d9243ebc8296238317ca76f 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 3865df6dcfcecd6bf6f809277c7914aa2b17076e..d17af9c3ec69b399c5d6875ccdd51909f229a2f2 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 dcc23662e0e4e90160967f3b4cfb49cc9879b5c0..6d03c7e8cfbfc7a654cb47e4201653b6e666f398 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 5c2dcc77cae0b0d89f5abe653adb240ba870d574..5f8c248786d2e95fa606f0d62536c79c94c21d6b 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 571878e6087b9a9d98bf96fe207146195bf3b804..f960fab1c22f87d162062e0e040b06c7a5ca8b87 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 83558865fe464b62b61add57f368769a215993dd..888885bee4e72ae248c03277df368a913c16369d 100644 (file)
@@ -18,7 +18,6 @@
  *
  ******************************************************************/
 
-#include "iotivity_config.h"
 #include "caadapterutils.h"
 
 #include <string.h>
index 94810ca885f780b73ae39c7e92006e529939c08b..03eca3bfb3287541d6b52868a75c721be985c8fc 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 e03416109c59d790ce64972f4dc146a156ed26ac..3e10065c682d254389aa29adf3ef599ed74960ad 100644 (file)
@@ -18,7 +18,6 @@
  *
  ******************************************************************/
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 7101b4c226d45b8fed2b87d578125274edf12313..a3cb02f219243b82890f0c7296548e6e3ad23683 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 f953689feb8821cb4cb0773a8848044c7b7650b4..313d2f6a55b3f3c34e6e2f8d3240939e7401cf85 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 9a8e6f69d7fba49182b59da65e9e4c4fda8f4759..54d9fb83d62482b5cdf9cd09c0176fb5e831c1f7 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 69eaa14b2064b7e9dc52e68baa606428f1f2be05..c701a2e4c8e9f4de2d1c9425a6196f33f7fe897f 100644 (file)
@@ -18,7 +18,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #include "gtest/gtest.h"
 
 #ifdef HAVE_PTHREAD_H
index edeb16749f497d719591d0de2ddd0d6dc7acfa72..cc7f303e6935c9018565e9f4a8b76675a314f38a 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 77af258da288bee89ca2dce3dace530332e94307..bc0efb46f5d3894b7c1d2309df05cb2e420eca33 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 c742e1be005ae54d9e116de35e68c6720b71c65d..b0454ee4127767718ab9b6bd7ceacfd02c55d06a 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 fcf752dda25481d1bb096431fe2e2f392d895252..adec06f1481175fa0fdcd46d905435042b44970f 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 56156bad7a04368d51cd24096f1c1f31aa4195fe..06a55127916e3511e06bcbac8c4e43c5293edf93 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 eec02f3ef67ce2e90f7e747b37c903a4bf49a7a8..6499e03947bdf4297a06d4cc693412d61840105d 100644 (file)
@@ -30,7 +30,6 @@
 #define _POSIX_C_SOURCE 200809L
 #endif
 
-#include "iotivity_config.h"
 #ifdef HAVE_TIME_H
 #include <time.h>
 #endif
index ee4c607834b65af06184d218e5ba1b78dbb68fe1..f67938899de28e87f3c4d7863b4ab3f653c6b817 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 fcf6536edc708e6c0295aefb1e48bcd32300b2bc..0b14334414e681b294f83f091c51f2fc80195579 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  *
  * *****************************************************************/
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <string.h>
 #include <stdint.h>
index 14338f22702b52fe458b601dcfe1019cf4cff949..92c67b73945000c797ca422e351f0a69b4f058eb 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  *
  * *****************************************************************/
-#include "iotivity_config.h"
 #include "gtest/gtest.h"
 #include "provisioningdatabasemanager.h"
 
index 450123fc454422b43a5056aa3c49df457305cabc..3aaefeb3dc99dd6e3b55bf75e27331d38dcf0ddc 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 24371b88247f52a2ed0894f3f9d8391b0bbf8f06..2e2bba54f15d5b6d5d394841feadbec1f346ba2e 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 af7cbad5960f8530022d7f4e6c561a89bd6b99cf..e7ef882daffe2cf5a1388992fbd6acdbb167b2b8 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 44b22becbe86c1a94a3b386e7b79d4590768b56f..9aac585188beefe49664ee32cb38b69bab9b56ca 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 534dcea1d0babce3620d208471439cb39a7c6d5d..820021a8e731ad8b8dbbe7900f0dbff4f9d59422 100644 (file)
@@ -18,7 +18,6 @@
  *
  * *****************************************************************/
 
-#include "iotivity_config.h"
 #include <stdlib.h>
 #include <string.h>
 #include "ocstack.h"
index acb44f1df34db3a5c3c27176dfb858655f142e5d..dc16f4b2144c86157e86f4a052f3d50d7acddfc7 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 b216e62049f9bef9713899e08495c0a06dcddba5..84bbf480d96295222f8e0514e88c456492e5911d 100644 (file)
@@ -18,7 +18,6 @@
  *
  * *****************************************************************/
 
-#include "iotivity_config.h"
 #include <stdlib.h>
 #include <string.h>
 #include "ocstack.h"
index 78725a7c380940dc3352d917d0f8f6136d795b52..96afaccf91dafeb1e2baa327cc23373982a0c0bf 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 df46f2752153cde4f30771363263fa11ea8652fb..90f189db446faf87b7acfa4caddc5ec9ec99e436 100644 (file)
@@ -18,7 +18,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 9a38f484153ffb97e6ef5ad362c497c484dcec4a..29177095ec2c132e0066e6669f1a2fa1046e2e76 100644 (file)
@@ -18,7 +18,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #include "gtest/gtest.h"
 #ifdef HAVE_PWD_H
 #include <pwd.h>
index 5fafce2781890f54e488f3084d34b27f5f996059..2ae83e412e166ed1f99e6cb6946eea401fe93c95 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 061c94f3b63d68ec3a1bf9af69f2d3f7e964c25d..fe7c8ae49f9124f3e7c9b013bb1072a7c6ccb6d4 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 a37f64acb1c25134baf41b6985a9b9d0bf923c51..988ce35258380891479e2fa126d27f93e74e7c8d 100644 (file)
@@ -17,7 +17,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 5e576b4003d734793880d6b5e7e6cc83dd7d9ee7..375b169ce66d5afcb13e231bb20742e89be71bd3 100644 (file)
@@ -18,7 +18,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index aa45b6c3476e4d1495791375672d01ed5a135e33..d15fdd41f173412804d459470942b16be03bce20 100644 (file)
@@ -18,7 +18,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 68c592f0c031cb4b7c100616d13f164d6c3bcb9e..970565a7fe865362790a9c615afeb5ce93fad611 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 e5726c4c9d9872f0c3822a08d82c318f84b1428a..84d902ce29a5d57f9369c39bd4808f44f696cfbd 100644 (file)
@@ -18,7 +18,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
index ed1897581ba6566abd3ee1137dcc6ff8a7de1b5a..b5408d0ad87faebad6bcaffac6247318db19908e 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 997b789200dc57f1d77164b37b244fdd856cea85..5f0ba4b6c1c06b10a5a938755eee1945054c3a42 100644 (file)
@@ -18,7 +18,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
index e7262a8de7d44916bcc650ac14bfc4ef798e73be..4d0fdf0aa9169f601c7f39e335e668462633822f 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 5e8ca9963dc5848b09441ee50369279fa92f8436..714d075baa559f4914b0b86a222db6f981bcf1f1 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 5ae096b5f9e68664e2c129488264bbc20e921f85..af344d372bea3c8662bb1d55d9c389e21291fdc3 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 61db06ac9a8169cec2d6cd28473cbb0dcae6537b..9d836693cf9569815fdc469a8ea50bc1b016ecf8 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 09a9ca441a835a6fbed89218de0aecc7b8f05bee..f86c4c617834408e318eac85772284cfce08ae8e 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 42100d6b480bc7b1fbc16d835ef3ed8386e8ba45..cc2bfb40a0f4358758068ec8f0e99c4ada2b0cf3 100644 (file)
@@ -18,7 +18,7 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
+
 #include "occlientcb.h"
 #include "utlist.h"
 #include "logger.h"
index 80e9e064d92bec2737189b33872860b915b9aea2..3af571ea5b28ca60db0f4b1ca6ee11068f7e8fef 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 860b27aca8d2c43af624451369fdbc27991e450a..e5323e630465c63bc31519d2cf2b1898a0459033 100755 (executable)
@@ -29,7 +29,6 @@
 #define _GNU_SOURCE
 #endif
 
-#include "iotivity_config.h"
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
index f11501c723d63c95eb3e5f869c30e6541da22f0c..13d595be32864192921d4e052a5881f01628d66e 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 a2968cd10e3b699d8ddcfed28594b52c7e1f153f..558f683e192f401854901d110da172373f7295d9 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 8920bdea5d355b2a1249523928484ec3c7f6fd31..4a60a772b3d70b6d55cd8e6fbe572a4c8bd5c582 100644 (file)
@@ -17,7 +17,6 @@
 // limitations under the License.
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#include "iotivity_config.h"
 #include "oicresourcedirectory.h"
 
 #include "rdpayload.h"
index 1ce1e6b8c742ce3cd3ca6f92dd2f140ffdc119dc..6368e93dc4e76ca75ed34390f47fe5609a7a76b7 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 228e6af33e711f0d2b98c85e20b9bb054c43a629..5bb8b06e34071d7316255f463948078ff35a28d1 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 a2997bcd0e75a6d7be441a4b03e9d33b63f4fed7..f9452af89b3f49dc72ca2fc342da401416d9f4f7 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 6d631d3d6be078b69cc4faf759ae184cd08ef4b4..be585fca72ae6240ca0d3af59f02b712ef5bd08a 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 b005900ba6ceaf943f942a1dcd7c3b04b2971361..13981cb328393f62e73a932a5f2584be160d1c35 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 6d641e73919ef1cf9adbca9a5f138239ef73aebb..3adef4e6fbe23b5d5ef2cd8f5d19fa1d665db817 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 46cfbec030412f4245cd896f476f955e7cd6c336..1eaaebae87493e3d085c321e1ce48077aac56bdf 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 9fd3d5b706481aea47cfdb9e8acf5ca34febac75..b83061f5227612a0dcbf91e880cfe281eb3a6587 100644 (file)
@@ -18,7 +18,6 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "iotivity_config.h"
 #include "OCResource.h"
 #include "OCUtilities.h"