Add extern "C" keyword in header files 47/280147/1 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.060712 accepted/tizen/7.0/unified/hotfix/20221116.105738 accepted/tizen/unified/20220919.021606 tizen_7.0_m2_release
authorTaeminYeom <taemin.yeom@samsung.com>
Wed, 24 Aug 2022 09:15:03 +0000 (18:15 +0900)
committerTaeminYeom <taemin.yeom@samsung.com>
Wed, 24 Aug 2022 09:15:03 +0000 (18:15 +0900)
Change-Id: Ie16f5ec1d1c18f5e20cd94d46ad63a3ad7ac58fc
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
src/libcommon/common.h
src/libcommon/file.h
src/libcommon/ini-parser.h
src/libcommon/list.h
src/libgdbus/dbus-iface-system.h
src/libgdbus/libgdbus.h
src/shared/log-macro.h
src/shared/log.h

index bbeee46..8144929 100644 (file)
 
 #include <stdbool.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @brief Check if running on emulator
  *
@@ -39,4 +43,8 @@ bool libsys_is_emulator(void);
  */
 bool libsys_is_container(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __LIBCOMMON_COMMON_H__ */
index 84fca0c..c933fc9 100644 (file)
 
 #include <stdarg.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @brief Open file, read and close
  *
@@ -97,4 +101,8 @@ int sys_set_str(char *fname, char *val);
  */
 int libsys_parse_cmdline_scanf(const char *format, ...);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __LIBCOMMON_FILE_H__ */
index dccd1ac..9620103 100644 (file)
 #define MATCH(a, b)     (!strncmp(a, b, strlen(a)))
 #define SET_CONF(a, b)      (a = (b > 0.0 ? b : a))
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct parse_result {
        char *section;
        union {
@@ -66,4 +70,9 @@ int config_parse(const char *file_name, int cb(struct parse_result *result,
  * @return 0 on success, negative if failed
  */
 int libsys_config_parse_by_section(const char *file_name, int cb(const struct parse_result *,  void *), void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
index aa9e947..dc646dc 100644 (file)
 
 #include <glib.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define SYS_G_LIST_PREPEND(a, b)       \
        a = g_list_prepend(a, (gpointer)b)
 #define SYS_G_LIST_APPEND(a, b)        \
@@ -60,5 +64,9 @@
 #define SYS_G_LIST_NEXT(a)     \
        g_list_next(a)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 
index a4f69da..1a98990 100644 (file)
 #ifndef __DBUS_SYSTEM_IFACE_H__
 #define __DBUS_SYSTEM_IFACE_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Template
  *
 /* End of the Experimental for Specific device */
 /***********************************************/
 
+#ifdef __cplusplus
+}
+#endif
 
 #endif
index f909d76..659b2e4 100644 (file)
 
 #include "dbus-iface-system.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct {
        const unsigned char *data;
        int size;
@@ -274,6 +278,8 @@ GVariant *gdbus_make_simple_array   (const char *sig,
 
 int check_systemd_active                       (void);
 
-
+#ifdef __cplusplus
+}
+#endif
 
 #endif
index 9893820..882bee1 100644 (file)
 #ifndef __LOG_MACRO_H__
 #define __LOG_MACRO_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifdef ENABLE_DLOG
 #include <dlog.h>
 #define _D(fmt, arg...) \
@@ -51,4 +55,9 @@
 #define _SW(...)   do { } while (0)
 #define _SE(...)   do { } while (0)
 #endif
+
+#ifdef __cplusplus
+}
 #endif
+
+#endif /* __LOG_MACRO_H__ */
index 09a9eb4..7f5b6bb 100644 (file)
 #ifndef __LOG_H__
 #define __LOG_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifdef ENABLE_LIBDEVICED_DLOG
 #define ENABLE_DLOG
 #endif
@@ -30,4 +34,8 @@
 #define LOG_TAG "LIBSYSCOMMON"
 #include "shared/log-macro.h"
 
+#ifdef __cplusplus
+}
 #endif
+
+#endif /* __LOG_H__ */