diff options
-rw-r--r-- | com32/include/stdlib.h | 6 | ||||
-rw-r--r-- | com32/lib/sys/exit.S | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/com32/include/stdlib.h b/com32/include/stdlib.h index e0fe7e39..24cf602a 100644 --- a/com32/include/stdlib.h +++ b/com32/include/stdlib.h @@ -12,11 +12,6 @@ #define EXIT_FAILURE 1 #define EXIT_SUCCESS 0 -static __inline__ __noreturn _Exit(int __n) { - __extern __noreturn _exit(int); - _exit(__n); - for(;;); /* Some gcc versions are stupid */ -} __extern __noreturn abort(void); static __inline__ int abs(int __n) { return (__n < 0) ? -__n : __n; @@ -27,6 +22,7 @@ __extern int atoi(const char *); __extern long atol(const char *); __extern long long atoll(const char *); __extern __noreturn exit(int); +__extern __noreturn _Exit(int); __extern void free(void *); static __inline__ long labs(long __n) { return (__n < 0L) ? -__n : __n; diff --git a/com32/lib/sys/exit.S b/com32/lib/sys/exit.S index c2949fc6..2ab80122 100644 --- a/com32/lib/sys/exit.S +++ b/com32/lib/sys/exit.S @@ -2,6 +2,13 @@ * Implementation of _exit() for com32 based on c32entry.S */ .text + + .globl _Exit + .type _Exit, @function +_Exit: + /* Just fall through to _exit */ + .size _Exit, .-_Exit + .globl _exit .type _exit, @function _exit: |