com32: make _Exit just an ordinary symbol
authorH. Peter Anvin <hpa@zytor.com>
Wed, 15 Oct 2008 01:05:28 +0000 (18:05 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 15 Oct 2008 01:05:28 +0000 (18:05 -0700)
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>
com32/include/stdlib.h
com32/lib/sys/exit.S

index e0fe7e3..24cf602 100644 (file)
 #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;
index c2949fc..2ab8012 100644 (file)
@@ -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: