From 76a5364b512fdb199576c5d2163801c457aa204c Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 14 Oct 2008 18:05:28 -0700 Subject: [PATCH] com32: make _Exit just an ordinary symbol Make _Exit just an ordinary symbol which aliases _exit. This avoids some versions of gcc complaining about the inline, which is rather unnecessary anyway. Signed-off-by: H. Peter Anvin --- com32/include/stdlib.h | 6 +----- 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 e0fe7e3..24cf602 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 c2949fc..2ab8012 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: -- 2.7.4