Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdlib/exit.c')
-rw-r--r--newlib/libc/stdlib/exit.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/newlib/libc/stdlib/exit.c b/newlib/libc/stdlib/exit.c
index 195b72454..1dc56944a 100644
--- a/newlib/libc/stdlib/exit.c
+++ b/newlib/libc/stdlib/exit.c
@@ -54,11 +54,16 @@ Supporting OS subroutines required: <<_exit>>.
* Exit, flushing stdio buffers if necessary.
*/
-void
+void
_DEFUN (exit, (code),
int code)
{
- __call_exitprocs (code, NULL);
+#ifdef _LITE_EXIT
+ /* Refer to comments in __atexit.c for more details of lite exit. */
+ void __call_exitprocs _PARAMS ((int, _PTR)) __attribute__((weak));
+ if (__call_exitprocs)
+#endif
+ __call_exitprocs (code, NULL);
if (_GLOBAL_REENT->__cleanup)
(*_GLOBAL_REENT->__cleanup) (_GLOBAL_REENT);