From b8166412e2d1d2964e11204af689822a3e38f087 Mon Sep 17 00:00:00 2001 From: QBos07 Date: Thu, 28 Mar 2024 15:19:54 +0000 Subject: [PATCH] Make `itoa` and `setenv` accesable in C++ This is a override header with code similiar to libstdc++-v3 Works with C and C++ --- sdk/include/stdlib.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sdk/include/stdlib.h diff --git a/sdk/include/stdlib.h b/sdk/include/stdlib.h new file mode 100644 index 0000000..da1e73f --- /dev/null +++ b/sdk/include/stdlib.h @@ -0,0 +1,22 @@ +#ifdef __cplusplus +#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS +#include_next +#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS + +#undef setenv +#undef itoa + +extern "C++" +{ +namespace std +{ + using ::setenv; + using ::itoa; +} // namespace std + +using std::setenv; +using std::itoa; +} // extern C++ + +#endif // __cplusplus +#include_next