Skip to content

Commit

Permalink
Make itoa and setenv accesable in C++
Browse files Browse the repository at this point in the history
This is a override header with code similiar to libstdc++-v3
Works with C and C++
  • Loading branch information
QBos07 committed Mar 28, 2024
1 parent c325aa0 commit b816641
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions sdk/include/stdlib.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#ifdef __cplusplus
#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
#include_next <stdlib.h>
#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 <stdlib.h>

0 comments on commit b816641

Please sign in to comment.