diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cli_objects.h | 8 | ||||
-rw-r--r-- | src/cli_path_utils.h | 8 | ||||
-rw-r--r-- | src/cli_val.h | 9 | ||||
-rw-r--r-- | src/commit2.cpp (renamed from src/commit2.c) | 2 |
4 files changed, 26 insertions, 1 deletions
diff --git a/src/cli_objects.h b/src/cli_objects.h index 889c772..e9ae12e 100644 --- a/src/cli_objects.h +++ b/src/cli_objects.h @@ -3,6 +3,10 @@ #include "cli_val.h" +#ifdef __cplusplus +extern "C" { +#endif + /* names of VYATTA env vars */ #define ENV_EDIT_LEVEL "VYATTA_EDIT_LEVEL" #define ENV_TEMPLATE_LEVEL "VYATTA_TEMPLATE_LEVEL" @@ -43,4 +47,8 @@ const char* get_tmpp(void); void init_paths(boolean for_commit); +#ifdef __cplusplus +} +#endif + #endif /* CLI_OBJ_H */ diff --git a/src/cli_path_utils.h b/src/cli_path_utils.h index 6fcceb8..39ac990 100644 --- a/src/cli_path_utils.h +++ b/src/cli_path_utils.h @@ -35,6 +35,10 @@ #if !defined(__CLI_PATH_UTILS__) #define __CLI_PATH_UTILS__ +#ifdef __cplusplus +extern "C" { +#endif + /******************* * Type definitions * @@ -68,4 +72,8 @@ int clind_file_exists(const char* dir,const char* file); char *clind_unescape(const char *name); char* clind_quote(const char* s); +#ifdef __cplusplus +} +#endif + #endif /* __CLI_PATH_UTILS__ */ diff --git a/src/cli_val.h b/src/cli_val.h index dd5a52c..cd19471 100644 --- a/src/cli_val.h +++ b/src/cli_val.h @@ -4,6 +4,10 @@ #include <cli_cstore.h> +#ifdef __cplusplus +extern "C" { +#endif + #ifndef FALSE #define FALSE 0 #endif @@ -120,4 +124,9 @@ int restore_output(void); #else #define DPRINT(fmt, arg...) while (0) { printf(fmt, ##arg); } #endif + +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/commit2.c b/src/commit2.cpp index cc6e9b4..b0a57f4 100644 --- a/src/commit2.c +++ b/src/commit2.cpp @@ -19,7 +19,7 @@ boolean g_old_print_output = FALSE; #define g_num_actions 5 -extern void g_type_init(); +extern "C" void g_type_init(); const int ActionOrder[g_num_actions] = { // 4, //syntax |