]> git.saurik.com Git - apple/libc.git/blobdiff - stdlib/FreeBSD/exit.c
Libc-1044.40.1.tar.gz
[apple/libc.git] / stdlib / FreeBSD / exit.c
index aa23703ec0c6e0489716829f65c310baee6a198c..e61834e1e368600da72dcf017632591fd29ab60e 100644 (file)
@@ -41,18 +41,17 @@ __FBSDID("$FreeBSD: src/lib/libc/stdlib/exit.c,v 1.9 2007/01/09 00:28:09 imp Exp
 #include "atexit.h"
 #include "libc_private.h"
 
+#include <TargetConditionals.h>
+
 void (*__cleanup)(void);
-extern void __exit(int);
+extern void __exit(int) __attribute__((noreturn));
+#if !TARGET_IPHONE_SIMULATOR && (__i386__ || __x86_64__)
+extern void _tlv_exit();
+#endif
 
 /*
  * Exit, flushing stdio buffers if necessary.
  */
 void
-exit(status)
-       int status;
+exit(int status)
 {
-       __cxa_finalize(NULL);
-       if (__cleanup)
-               (*__cleanup)();
-       __exit(status);
-}