diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-10-14 18:05:28 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-10-14 18:05:28 -0700 |
commit | 76a5364b512fdb199576c5d2163801c457aa204c (patch) | |
tree | 4bf705e5468258f8e85ddd47e08c704ca48797a5 | |
parent | d564e93154eb291bcd477868f40fec1701a76e8b (diff) | |
download | syslinux-76a5364b512fdb199576c5d2163801c457aa204c.tar.gz |
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 <hpa@zytor.com>
-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: |