Remove duplicate variables
multiple definition of `g_ESEasySetupResource'
multiple definition of `g_ESDevConfResource'
multiple definition of `g_ESCoapCloudConfResource'
multiple definition of `g_ESWiFiConfResource'
https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/281
(cherry picked from commit
0cbbcfa65ff14d751dd1193f75b7c20269e26991)
Change-Id: If5f4a7d87e95350d70187cb21e070c5193130487
Signed-off-by: Oleg Ogurtsov <o.ogurtsov@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
help_vars.Add(BoolVariable('SIMULATOR', 'Build with simulator module', False))
help_vars.Add(BoolVariable('WITH_RA_IBB', 'Build with Remote Access module(workssys)', False))
+help_vars.Add(BoolVariable('WITH_ASAN', 'Build with Address Sanitizer support', False))
if target_os in targets_disallow_multitransport:
mbedtls_env.AppendUnique(CPPPATH = [mbedtls_dir+'include/'])
mbedtls_env.AppendUnique(CFLAGS = ['-fPIC', '-Wall'])
+asan_build = env.get('WITH_ASAN')
+print 'Asan build: {}'.format(asan_build)
+if asan_build:
+ mbedtls_env.AppendUnique(CFLAGS = ['-UMBEDTLS_HAVE_ASM'])
+
######################################################################
# Source files and Target(s)
######################################################################
#define MBEDTLS_CONFIG_H
/* System support */
+#if !defined(__SANITIZE_ADDRESS__)
#define MBEDTLS_HAVE_ASM
+#endif
#define MBEDTLS_HAVE_TIME
/* mbed TLS feature support */
#define MBEDTLS_CONFIG_H
/* System support */
+#if !defined(__SANITIZE_ADDRESS__)
#define MBEDTLS_HAVE_ASM
+#endif
#define MBEDTLS_HAVE_TIME
/* mbed TLS feature support */
#define MBEDTLS_CONFIG_H
/* System support */
+#if !defined(__SANITIZE_ADDRESS__)
#define MBEDTLS_HAVE_ASM
+#endif
#define MBEDTLS_HAVE_TIME
/* mbed TLS feature support */
#define MBEDTLS_CONFIG_H
/* System support */
+#if !defined(__SANITIZE_ADDRESS__)
#define MBEDTLS_HAVE_ASM
+#endif
/* mbed TLS feature support */
#define MBEDTLS_AES_ROM_TABLES
* \{
*/
+#if !defined(__SANITIZE_ADDRESS__)
/**
* \def MBEDTLS_HAVE_ASM
*
* Comment to disable the use of assembly code.
*/
#define MBEDTLS_HAVE_ASM
+#endif
/**
* \def MBEDTLS_HAVE_SSE2
* \{
*/
+#if !defined(__SANITIZE_ADDRESS__)
/**
* \def MBEDTLS_AESNI_C
*
* This modules adds support for the AES-NI instructions on x86-64
*/
#define MBEDTLS_AESNI_C
+#endif
/**
* \def MBEDTLS_AES_C
*/
#define MBEDTLS_OID_C
+#if !defined(__SANITIZE_ADDRESS__)
/**
* \def MBEDTLS_PADLOCK_C
*
* This modules adds support for the VIA PadLock on x86.
*/
#define MBEDTLS_PADLOCK_C
+#endif
/**
* \def MBEDTLS_PEM_PARSE_C
*/
#define SC_ENROLLEE_TAG "ES_SC_ENROLLEE"
-EasySetupResource g_ESEasySetupResource;
-WiFiConfResource g_ESWiFiConfResource;
-CoapCloudConfResource g_ESCoapCloudConfResource;
-DevConfResource g_ESDevConfResource;
-
SCProperties g_SCProperties;
static void ReadAccountData(OCRepPayload* payload,void** userdata);
static NSSubscribeRequestCallback g_subscribeRequestCb = NULL;\r
static NSProviderSyncInfoCallback g_syncCb = NULL;\r
\r
-pthread_mutex_t nsInitMutex;\r
+extern pthread_mutex_t nsInitMutex;\r
\r
void NSRegisterSubscribeRequestCb(NSSubscribeRequestCallback subscribeRequestCb)\r
{\r
} \\r
}\r
\r
+pthread_mutex_t NSCacheMutex;\r
+pthread_mutexattr_t NSCacheMutexAttr;\r
+\r
NSCacheList * NSProviderStorageCreate()\r
{\r
pthread_mutex_lock(&NSCacheMutex);\r
NSResult NSProviderDeleteConsumerTopic(NSCacheList * conTopicList,\r
NSCacheTopicSubData * topicSubData);\r
\r
-pthread_mutex_t NSCacheMutex;\r
-pthread_mutexattr_t NSCacheMutexAttr;\r
+extern pthread_mutex_t NSCacheMutex;\r
+extern pthread_mutexattr_t NSCacheMutexAttr;\r
\r
#endif /* _NS_PROVIDER_CACHEADAPTER__H_ */\r
#include "NSProviderSubscription.h"\r
#include "NSProviderListener.h"\r
\r
+NSCacheList * consumerSubList;\r
+\r
NSResult NSInitSubscriptionList()\r
{\r
NS_LOG(DEBUG, "NSInitSubscriptionList - IN");\r
#include "oic_malloc.h"\r
#include <stdbool.h>\r
\r
-NSCacheList * consumerSubList;\r
+extern NSCacheList * consumerSubList;\r
\r
NSResult NSInitSubscriptionList();\r
NSResult NSSetSubscriptionAccessPolicy(bool policy);\r
#include "oic_malloc.h"
#include <pthread.h>
+NSCacheList * consumerTopicList;
+NSCacheList * registeredTopicList;
+
NSResult NSSendTopicUpdation();
NSResult NSInitTopicList()
NSResult result;\r
} NSTopicSyncResult;\r
\r
-NSCacheList * consumerTopicList;\r
-NSCacheList * registeredTopicList;\r
+extern NSCacheList * consumerTopicList;\r
+extern NSCacheList * registeredTopicList;\r
\r
NSResult NSInitTopicList();\r
NSTopicList * NSGetTopics(char *consumerId);\r