? [CRT] Add _Exit

This is a workaround for ros process.h being included from GCC headers, which is not the case for other crt headers like stdlib.h for some reason.
- #include GCC c++ header
- #include <cstdlib> // from GCC
- #include_next <stdlib.h> // from GCC (due to next?)
- #include <process.h> // from ros
This commit is contained in:
Timo Kreuzer 2024-03-08 16:45:47 +02:00
parent 4933c95e8a
commit b35c1cc4b8

View file

@ -55,6 +55,15 @@ extern "C" {
__declspec(noreturn) void __cdecl exit(_In_ int _Code);
_CRTIMP __declspec(noreturn) void __cdecl _exit(_In_ int _Code);
#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
/* C99 function name */
void __cdecl _Exit(int) __MINGW_ATTRIB_NORETURN;
#ifndef __CRT__NO_INLINE
__CRT_INLINE __MINGW_ATTRIB_NORETURN void __cdecl _Exit(int status)
{ _exit(status); }
#endif /* !__CRT__NO_INLINE */
#endif /* Not __NO_ISOCEXT */
#if __MINGW_GNUC_PREREQ(4,4)
#pragma push_macro("abort")
#undef abort