diff options
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/crt/base_exception.hxx | 9 | ||||
| -rw-r--r-- | dev/crt/exit.hxx | 21 |
2 files changed, 23 insertions, 7 deletions
diff --git a/dev/crt/base_exception.hxx b/dev/crt/base_exception.hxx index 9d3fd20..bb15eb4 100644 --- a/dev/crt/base_exception.hxx +++ b/dev/crt/base_exception.hxx @@ -7,18 +7,13 @@ #pragma once #include <crt/defines.hxx> +#include <crt/exit.hxx> -/// @brief CRT exit, with exit code (!!! exits all threads. !!!) -/// @param code -/// @return -extern "C" int __exit(int code); - -/// @brief Standard C++ namespace namespace std { inline void __throw_general(void) { - __exit(33); + exit(33); } inline void __throw_domain_error(const char* error) diff --git a/dev/crt/exit.hxx b/dev/crt/exit.hxx new file mode 100644 index 0000000..62278ad --- /dev/null +++ b/dev/crt/exit.hxx @@ -0,0 +1,21 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#pragma once + +/// @brief CRT exit, with exit code (!!! exits all threads. !!!) +/// @param code +/// @return +extern "C" int exit(int code); + +/// @brief Standard C++ namespace +namespace std +{ + inline int exit(int code) + { + exit(code); + } +} // namespace std |
