Commit b53fe4f1 authored by Jaehyun Cho's avatar Jaehyun Cho Committed by Kishen Maloor

Change config.h files to oc_config.h

config.h is finde of common naming. So some RTOS environments
can be conflict with same name of different header file.
To avoid this, our config.h is changed to oc_config.h

Change-Id: Ie32e476d5e5573c388f729f7ab48aab1c4df3c04
Signed-off-by: default avatarJaehyun Cho <jaehyun3.cho@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/27241Tested-by: default avatarIoTivity Jenkins <jenkins-daemon@iotivity.org>
Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
Reviewed-by: default avatarJaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Kishen Maloor's avatarKishen Maloor <kishen.maloor@intel.com>
parent 49317252
......@@ -184,8 +184,8 @@ will be updated imminently. Please watch for further updates on this matter.
Framework configuration
-----------------------
Build-time configuration options for an application are set in ``config.h``.
Build-time configuration options for an application are set in ``oc_config.h``.
This needs to be present in one of the include paths.
Pre-populated (sample) configurations for the sample applications for all
targets are present in ``port/<OS>/config.h``.
targets are present in ``port/<OS>/oc_config.h``.
......@@ -15,7 +15,7 @@
*/
#include "port/oc_connectivity.h"
#include <config.h>
#include <oc_config.h>
#ifdef OC_BLOCK_WISE
#include "oc_blockwise.h"
#include "oc_endpoint.h"
......
......@@ -28,8 +28,8 @@
#include "security/oc_tls.h"
#endif /* OC_SECURITY */
#include "config.h"
#include "oc_buffer.h"
#include "oc_config.h"
#include "oc_events.h"
OC_PROCESS(message_buffer_handler, "OC Message Buffer Handler");
......
......@@ -15,7 +15,7 @@
*/
#include "oc_rep.h"
#include "config.h"
#include "oc_config.h"
#include "port/oc_assert.h"
#include "port/oc_log.h"
#include "util/oc_memb.h"
......
......@@ -15,7 +15,7 @@
*/
#include "oc_session_events.h"
#include "config.h"
#include "oc_config.h"
#include "oc_api.h"
#include "oc_buffer.h"
......
......@@ -23,7 +23,7 @@
#include <stdio.h>
#include <gtest/gtest.h>
#include "port/linux/config.h"
#include "port/linux/oc_config.h"
#include "oc_api.h"
#include "oc_ri.h"
#include "oc_helpers.h"
......
......@@ -20,7 +20,7 @@
#include "deps/tinycbor/src/cbor.h"
#include "oc_helpers.h"
#include "util/oc_memb.h"
#include <config.h>
#include <oc_config.h>
#include <stdbool.h>
#include <stdint.h>
......
......@@ -17,7 +17,7 @@
#ifndef OC_RI_H
#define OC_RI_H
#include "config.h"
#include "oc_config.h"
#include "oc_endpoint.h"
#include "oc_rep.h"
#include "oc_uuid.h"
......
......@@ -53,8 +53,8 @@
#include <stddef.h> /* for size_t */
#include <stdint.h>
#include "config.h"
#include "oc_buffer.h"
#include "oc_config.h"
#include "port/oc_connectivity.h"
#include "port/oc_log.h"
#include "port/oc_random.h"
......
......@@ -48,8 +48,8 @@
#ifndef CONF_H
#define CONF_H
#include "config.h"
#include "constants.h"
#include "oc_config.h"
#ifdef __cplusplus
extern "C"
......
......@@ -45,7 +45,7 @@
* This file is part of the Contiki operating system.
*/
#include "config.h"
#include "oc_config.h"
#ifdef OC_SERVER
......
......@@ -45,7 +45,7 @@
* This file is part of the Contiki operating system.
*/
#include "config.h"
#include "oc_config.h"
#ifdef OC_SERVER
......
......@@ -561,7 +561,7 @@ index 79eedffd..b218ab04 100644
- * security risk. We recommend considering stronger ciphers instead.
- */
-//#define MBEDTLS_ENABLE_WEAK_CIPHERSUITES
+#include <config.h>
+#include <oc_config.h>
+#include "port/oc_connectivity.h"
+#include "port/oc_assert.h"
......
......@@ -99,7 +99,7 @@ ifeq ($(shell if [ ${ANDROID_API} -gt 23 ]; then echo gt; fi),gt)
endif
HEADERS = $(wildcard ../../include/*.h)
HEADERS += ../../port/android/config.h
HEADERS += ../../port/android/oc_config.h
HEADERS_COAP = $(wildcard ../../messaging/coap/*.h)
HEADERS_UTIL = $(wildcard ../../util/*.h)
......
#ifndef CONFIG_H
#define CONFIG_H
#ifndef OC_CONFIG_H
#define OC_CONFIG_H
/* Time resolution */
#include <stdint.h>
#include <time.h>
#ifdef __cplusplus
extern "C"
{
extern "C" {
#endif
typedef uint64_t oc_clock_time_t;
......@@ -91,4 +90,4 @@ typedef uint64_t oc_clock_time_t;
}
#endif
#endif /* CONFIG_H */
#endif /* OC_CONFIG_H */
......@@ -14,14 +14,13 @@
// limitations under the License.
*/
#ifndef CONFIG_H
#define CONFIG_H
#ifndef OC_CONFIG_H
#define OC_CONFIG_H
#include <contiki-conf.h>
#ifdef __cplusplus
extern "C"
{
extern "C" {
#endif
/* Time resolution */
......@@ -66,4 +65,4 @@ typedef uint64_t oc_clock_time_t;
}
#endif
#endif /* CONFIG_H */
#endif /* OC_CONFIG_H */
......@@ -50,7 +50,7 @@ SRC_COMMON=$(wildcard ${topdir}/util/*.c) ${CBOR}
SRC=$(wildcard ${topdir}/messaging/coap/*.c ${topdir}/api/*.c ${portdir}/*.c)
HEADERS = $(wildcard ${topdir}/include/*.h)
HEADERS += ${portdir}/config.h
HEADERS += ${portdir}/oc_config.h
HEADERS_COAP = $(wildcard ${topdir}/messaging/coap/*.h)
HEADERS_UTIL = $(wildcard ${topdir}/util/*.h)
......
......@@ -15,15 +15,14 @@
// limitations under the License.
*/
#ifndef CONFIG_H
#define CONFIG_H
#ifndef OC_CONFIG_H
#define OC_CONFIG_H
/* Time resolution */
#include <stdint.h>
#ifdef __cplusplus
extern "C"
{
extern "C" {
#endif
typedef uint64_t oc_clock_time_t;
......@@ -94,4 +93,4 @@ typedef uint64_t oc_clock_time_t;
}
#endif
#endif /* CONFIG_H */
#endif /* OC_CONFIG_H */
......@@ -68,7 +68,7 @@ SRC_COMMON=$(wildcard ../../util/*.c) ${CBOR}
SRC=$(wildcard ../../messaging/coap/*.c ../../api/*.c ../../port/linux/*.c)
HEADERS = $(wildcard ../../include/*.h)
HEADERS += ../../port/linux/config.h
HEADERS += ../../port/linux/oc_config.h
HEADERS_COAP = $(wildcard ../../messaging/coap/*.h)
HEADERS_UTIL = $(wildcard ../../util/*.h)
......
#ifndef CONFIG_H
#define CONFIG_H
#ifndef OC_CONFIG_H
#define OC_CONFIG_H
/* Time resolution */
#include <stdint.h>
#include <time.h>
#ifdef __cplusplus
extern "C"
{
extern "C" {
#endif
typedef uint64_t oc_clock_time_t;
......@@ -93,4 +92,4 @@ typedef uint64_t oc_clock_time_t;
}
#endif
#endif /* CONFIG_H */
#endif /* OC_CONFIG_H */
......@@ -50,7 +50,7 @@
#ifndef OC_CLOCK_H
#define OC_CLOCK_H
#include "config.h"
#include "oc_config.h"
#include <stdint.h>
#ifdef __cplusplus
......@@ -64,7 +64,7 @@ extern "C"
* \hideinitializer
*/
#ifndef OC_CLOCK_CONF_TICKS_PER_SECOND
#error "Please define OC_CLOCK_CONF_TICKS_PER_SECOND in config.h"
#error "Please define OC_CLOCK_CONF_TICKS_PER_SECOND in oc_config.h"
#else
#define OC_CLOCK_SECOND OC_CLOCK_CONF_TICKS_PER_SECOND
#endif
......
......@@ -17,8 +17,8 @@
#ifndef OC_CONNECTIVITY_H
#define OC_CONNECTIVITY_H
#include "config.h"
#include "messaging/coap/conf.h"
#include "oc_config.h"
#include "oc_endpoint.h"
#include "oc_network_events.h"
#include "oc_session_events.h"
......@@ -33,7 +33,7 @@ extern "C"
#ifndef OC_DYNAMIC_ALLOCATION
#ifndef OC_MAX_APP_DATA_SIZE
#error "Set OC_MAX_APP_DATA_SIZE in config.h"
#error "Set OC_MAX_APP_DATA_SIZE in oc_config.h"
#endif /* !OC_MAX_APP_DATA_SIZE */
#ifdef OC_BLOCK_WISE_SET_MTU
......
......@@ -14,16 +14,16 @@
// limitations under the License.
*/
#ifndef CONFIG_H
#define CONFIG_H
#ifndef OC_CONFIG_H
#define OC_CONFIG_H
/* Time resolution */
#include <stdint.h>
#ifdef __cplusplus
extern "C"
{
extern "C" {
#endif
/* Time resolution */
#include <stdint.h>
typedef uint64_t oc_clock_time_t;
/* 1 clock tick = 1ms */
#define OC_CLOCK_CONF_TICKS_PER_SECOND (1000)
......@@ -62,7 +62,7 @@ typedef uint64_t oc_clock_time_t;
#define OC_DTLS_INACTIVITY_TIMEOUT (10)
#ifdef __cplusplus
}
} // extern "C"
#endif
#endif /* CONFIG_H */
#endif /* OC_CONFIG_H */
......@@ -14,16 +14,15 @@
// limitations under the License.
*/
#ifndef CONFIG_H
#define CONFIG_H
/* Time resolution */
#include <stdint.h>
#ifndef OC_CONFIG_H
#define OC_CONFIG_H
#ifdef __cplusplus
extern "C" {
#endif
/* Time resolution */
#include <stdint.h>
typedef uint64_t oc_clock_time_t;
/* 1 clock tick = 1ms */
#define OC_CLOCK_CONF_TICKS_PER_SECOND (1000)
......@@ -62,7 +61,7 @@ typedef uint64_t oc_clock_time_t;
#define OC_DTLS_INACTIVITY_TIMEOUT (10)
#ifdef __cplusplus
} // extern "C"
}
#endif
#endif /* CONFIG_H */
#endif /* OC_CONFIG_H */
......@@ -55,7 +55,7 @@ SRC_COMMON=$(wildcard ${topdir}/util/*.c) ${CBOR}
SRC=$(wildcard ${topdir}/messaging/coap/*.c ${topdir}/api/*.c ${portdir}/*.c)
HEADERS = $(wildcard ${topdir}/include/*.h)
HEADERS += ${portdir}/config.h
HEADERS += ${portdir}/oc_config.h
HEADERS_COAP = $(wildcard ${topdir}/messaging/coap/*.h)
HEADERS_UTIL = $(wildcard ${topdir}/util/*.h)
......
......@@ -15,8 +15,8 @@
// limitations under the License.
*/
#ifndef CONFIG_H
#define CONFIG_H
#ifndef OC_CONFIG_H
#define OC_CONFIG_H
/* Time resolution */
#include <stdint.h>
......@@ -93,7 +93,7 @@ typedef uint64_t oc_clock_time_t;
#endif /* !OC_DYNAMIC_ALLOCATION */
#ifdef __cplusplus
} // extern "C"
} // extern "C"
#endif
#endif /* CONFIG_H */
#endif /* OC_CONFIG_H */
#ifndef CONFIG_H
#define CONFIG_H
#ifndef OC_CONFIG_H
#define OC_CONFIG_H
/* Time resolution */
#include <stdint.h>
#ifdef __cplusplus
extern "C"
{
extern "C" {
#endif
typedef uint64_t oc_clock_time_t;
......@@ -32,4 +31,4 @@ typedef uint64_t oc_clock_time_t;
}
#endif
#endif /* CONFIG_H */
#endif /* OC_CONFIG_H */
......@@ -266,7 +266,7 @@
<ClInclude Include="..\..\oc_network_events_mutex.h" />
<ClInclude Include="..\..\oc_random.h" />
<ClInclude Include="..\..\oc_storage.h" />
<ClInclude Include="..\config.h" />
<ClInclude Include="..\oc_config.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\api\oc_base64.c" />
......
......@@ -486,7 +486,7 @@
<ClInclude Include="..\..\..\security\oc_tls.h">
<Filter>Core</Filter>
</ClInclude>
<ClInclude Include="..\config.h">
<ClInclude Include="..\oc_config.h">
<Filter>Port</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\oc_session_events.h">
......
......@@ -14,8 +14,8 @@
// limitations under the License.
*/
#ifndef CONFIG_H
#define CONFIG_H
#ifndef OC_CONFIG_H
#define OC_CONFIG_H
/* Time resolution */
#include <stdint.h>
......@@ -58,4 +58,4 @@ typedef uint64_t oc_clock_time_t;
/* Max inactivity timeout before tearing down DTLS connection */
#define OC_DTLS_INACTIVITY_TIMEOUT (10)
#endif /* CONFIG_H */
#endif /* OC_CONFIG_H */
......@@ -17,8 +17,8 @@
#ifdef OC_SECURITY
#include "oc_acl.h"
#include "config.h"
#include "oc_api.h"
#include "oc_config.h"
#include "oc_core_res.h"
#include "oc_cred.h"
#include "oc_doxm.h"
......
......@@ -17,9 +17,9 @@
#ifdef OC_SECURITY
#include "oc_cred.h"
#include "config.h"
#include "oc_api.h"
#include "oc_base64.h"
#include "oc_config.h"
#include "oc_core_res.h"
#include "oc_doxm.h"
#include "oc_pstat.h"
......
......@@ -23,7 +23,7 @@
#include "oc_pstat.h"
#include "oc_tls.h"
#include "port/oc_storage.h"
#include <config.h>
#include <oc_config.h>
#ifdef OC_DYNAMIC_ALLOCATION
#include <stdlib.h>
......
......@@ -33,10 +33,10 @@
#endif /* OC_DEBUG */
#include "api/oc_events.h"
#include "config.h"
#include "oc_acl.h"
#include "oc_api.h"
#include "oc_buffer.h"
#include "oc_config.h"
#include "oc_core_res.h"
#include "oc_cred.h"
#include "oc_endpoint.h"
......
......@@ -47,7 +47,7 @@
#ifndef OC_MEMB_H
#define OC_MEMB_H
#include "config.h"
#include "oc_config.h"
#ifdef __cplusplus
extern "C"
......
......@@ -33,7 +33,7 @@
*/
#include "oc_mmem.h"
#include "config.h"
#include "oc_config.h"
#include "oc_list.h"
#include "port/oc_log.h"
#include <stdint.h>
......@@ -46,7 +46,7 @@
#ifndef OC_DYNAMIC_ALLOCATION
#if !defined(OC_BYTES_POOL_SIZE) || !defined(OC_INTS_POOL_SIZE) || \
!defined(OC_DOUBLES_POOL_SIZE)
#error "Please define byte, int, double pool sizes in config.h"
#error "Please define byte, int, double pool sizes in oc_config.h"
#endif /* ...POOL_SIZE */
static double doubles[OC_DOUBLES_POOL_SIZE];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment