فهرست منبع

LibC: Implement the _Exit function

libstdc++v3 checks whether this function is available and makes
certain functions available in the std namespace if so.
Gunnar Beutner 4 سال پیش
والد
کامیت
9ffc2fe840
2فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 5 0
      Userland/Libraries/LibC/stdlib.cpp
  2. 1 0
      Userland/Libraries/LibC/stdlib.h

+ 5 - 0
Userland/Libraries/LibC/stdlib.cpp

@@ -1180,3 +1180,8 @@ int unlockpt([[maybe_unused]] int fd)
     return 0;
     return 0;
 }
 }
 }
 }
+
+void _Exit(int status)
+{
+    _exit(status);
+}

+ 1 - 0
Userland/Libraries/LibC/stdlib.h

@@ -61,6 +61,7 @@ int mbtowc(wchar_t*, const char*, size_t);
 int wctomb(char*, wchar_t);
 int wctomb(char*, wchar_t);
 size_t wcstombs(char*, const wchar_t*, size_t);
 size_t wcstombs(char*, const wchar_t*, size_t);
 char* realpath(const char* pathname, char* buffer);
 char* realpath(const char* pathname, char* buffer);
+__attribute__((noreturn)) void _Exit(int status);
 
 
 #define RAND_MAX 32767
 #define RAND_MAX 32767
 int rand();
 int rand();