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 bbeee46299bf80887a07ef0dcfb90ad5e41441ad..8144929c0772787d99c741d5787747bcae190a23 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 84fca0cab5bf2c8cd47b2684c48fb5aa130c2b2f..c933fc9592f3b1a934221bf0cb61cae66bd64bc6 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 dccd1acc01540f1b373e9a1248d8538a0e1c2d34..9620103474c4b7782a379918f4da1bc870e19b3e 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 aa9e9479ecdd20c9cc951e297d74d1735e37002e..dc646dceb3e810436705e17aed4490cc470386da 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 a4f69da486e6d8d1b27387abdd1c67504281fdd9..1a98990b5010d4a1d01cb9085d65e23b37b765a5 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 f909d764061453e36b26404e1bb74435dda489a3..659b2e47caf8d7e6fac2ad117464af1a8d7b42ef 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 9893820b784fa85322af249ffc027e38e3a65fd0..882bee180d5cfbf68c40950eb355db4c1413d243 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 09a9eb4b1e32aa9ec7ddc46c115d8ebb95303010..7f5b6bbf070552720d1cecd6dafef1d1c6cfa605 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__ */