From 7c4725edef366e997ccb6dfdb6bbdcb02ab14c32 Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sun, 16 Jun 2024 23:18:52 +0100 Subject: [PATCH] Add shell_utils --- src/common/shell/utils/shell_utils.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/common/shell/utils/shell_utils.h diff --git a/src/common/shell/utils/shell_utils.h b/src/common/shell/utils/shell_utils.h new file mode 100644 index 0000000..718e2b0 --- /dev/null +++ b/src/common/shell/utils/shell_utils.h @@ -0,0 +1,16 @@ +#ifndef SHELL_UTILS_H +#define SHELL_UTILS_H + +#include "platform.h" + +// clang-format off +#ifdef WAPP_PLATFORM_WINDOWS + #define wapp_shell_utils_popen _popen + #define wapp_shell_utils_pclose _pclose +#else + #define wapp_shell_utils_popen popen + #define wapp_shell_utils_pclose pclose +#endif /* ifdef WAPP_PLATFORM_WINDOWS */ +// clang-format on + +#endif // !SHELL_UTILS_H