diff --git a/src/core/os/shell/commander/commander.h b/src/core/os/shell/commander/commander.h index f7e6e0c..3a54657 100644 --- a/src/core/os/shell/commander/commander.h +++ b/src/core/os/shell/commander/commander.h @@ -11,10 +11,18 @@ #include #include +#ifdef WAPP_PLATFORM_CPP +BEGIN_C_LINKAGE +#endif // !WAPP_PLATFORM_CPP + #define CMD_NO_EXIT(ERR) ((CMDResult){.exited = false, .exit_code = EXIT_FAILURE, .error = ERR}) CMDResult wapp_shell_commander_execute(CMDOutHandling out_handling, Str8 *out_buf, const Str8List *cmd); external CMDError get_output_status(FILE *fp, i32 *status_out); +#ifdef WAPP_PLATFORM_CPP +END_C_LINKAGE +#endif // !WAPP_PLATFORM_CPP + #endif // !COMMANDER_H diff --git a/src/core/os/shell/commander/commander_output.h b/src/core/os/shell/commander/commander_output.h index d24577a..32b2b12 100644 --- a/src/core/os/shell/commander/commander_output.h +++ b/src/core/os/shell/commander/commander_output.h @@ -7,6 +7,10 @@ #include "../../../../common/platform/platform.h" #include +#ifdef WAPP_PLATFORM_CPP +BEGIN_C_LINKAGE +#endif // !WAPP_PLATFORM_CPP + typedef enum { SHELL_OUTPUT_DISCARD, SHELL_OUTPUT_PRINT, @@ -34,4 +38,8 @@ struct commander_result { #endif // !WAPP_PLATFORM_WINDOWS }; +#ifdef WAPP_PLATFORM_CPP +END_C_LINKAGE +#endif // !WAPP_PLATFORM_CPP + #endif // !COMMANDER_OUTPUT_H diff --git a/src/core/os/shell/termcolour/termcolour.h b/src/core/os/shell/termcolour/termcolour.h index e443532..e720092 100644 --- a/src/core/os/shell/termcolour/termcolour.h +++ b/src/core/os/shell/termcolour/termcolour.h @@ -8,9 +8,17 @@ #include "../../../../common/platform/platform.h" #include "../../../../primitives/strings/str8/str8.h" +#ifdef WAPP_PLATFORM_CPP +BEGIN_C_LINKAGE +#endif // !WAPP_PLATFORM_CPP + void wapp_shell_termcolour_print_text(Str8RO *text, TerminalColour colour); void wapp_shell_termcolour_clear_colour(void); external void print_coloured_text(Str8RO *text, TerminalColour colour); +#ifdef WAPP_PLATFORM_CPP +END_C_LINKAGE +#endif // !WAPP_PLATFORM_CPP + #endif // !TERM_COLOUR_H diff --git a/src/core/os/shell/termcolour/terminal_colours.h b/src/core/os/shell/termcolour/terminal_colours.h index 92f468b..197b234 100644 --- a/src/core/os/shell/termcolour/terminal_colours.h +++ b/src/core/os/shell/termcolour/terminal_colours.h @@ -5,6 +5,10 @@ #include "../../../../common/platform/platform.h" +#ifdef WAPP_PLATFORM_CPP +BEGIN_C_LINKAGE +#endif // !WAPP_PLATFORM_CPP + typedef enum { WAPP_TERM_COLOUR_FG_BLACK, WAPP_TERM_COLOUR_FG_RED, @@ -27,4 +31,8 @@ typedef enum { COUNT_TERM_COLOUR, } TerminalColour; +#ifdef WAPP_PLATFORM_CPP +END_C_LINKAGE +#endif // !WAPP_PLATFORM_CPP + #endif // !TERMINAL_COLOURS_H diff --git a/src/core/os/shell/utils/shell_utils.h b/src/core/os/shell/utils/shell_utils.h index 315d21d..b5899d7 100644 --- a/src/core/os/shell/utils/shell_utils.h +++ b/src/core/os/shell/utils/shell_utils.h @@ -6,6 +6,10 @@ #include "../../../../common/platform/platform.h" #include +#ifdef WAPP_PLATFORM_CPP +BEGIN_C_LINKAGE +#endif // !WAPP_PLATFORM_CPP + #ifdef WAPP_PLATFORM_WINDOWS #define wapp_shell_utils_popen _popen #define wapp_shell_utils_pclose _pclose @@ -14,4 +18,8 @@ #define wapp_shell_utils_pclose pclose #endif /* ifdef WAPP_PLATFORM_WINDOWS */ +#ifdef WAPP_PLATFORM_CPP +END_C_LINKAGE +#endif // !WAPP_PLATFORM_CPP + #endif // !SHELL_UTILS_H