diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-10-14 07:39:35 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2015-10-19 14:09:17 +0200 |
commit | d67f71ab85b242362f59c0d853763a5e8620c6d5 (patch) | |
tree | 1dbe0c385dfcde54ddf25f5a8f6c5a245dca57bf /newlib/libc/include/stdlib.h | |
parent | c98d01ee0cbc6eb7bbca8f2cde4a46b90ded3784 (diff) | |
download | cygnal-d67f71ab85b242362f59c0d853763a5e8620c6d5.tar.gz cygnal-d67f71ab85b242362f59c0d853763a5e8620c6d5.tar.bz2 cygnal-d67f71ab85b242362f59c0d853763a5e8620c6d5.zip |
C11 quick_exit() support for <stdlib.h>
Import some <stdlib.h> function declarations from latest FreeBSD and
implement them. I am not sure if we should call the global reent
cleanup in quick_exit() similar to exit().
newlib/ChangeLog
2015-10-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/include/stdlib.h (at_quick_exit): Declare.
(quick_exit): Likewise.
* libc/stdlib/Makefile.am (GENERAL_SOURCES): Add
quick_exit.c.
* libc/stdlib/Makefile.in: Regenerate.
* libc/stdlib/quick_exit.c: New.
Diffstat (limited to 'newlib/libc/include/stdlib.h')
-rw-r--r-- | newlib/libc/include/stdlib.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h index 38ac29654..859c84494 100644 --- a/newlib/libc/include/stdlib.h +++ b/newlib/libc/include/stdlib.h @@ -280,6 +280,15 @@ extern long double strtold (const char *__restrict, char **__restrict); #endif #endif /* _HAVE_LONG_DOUBLE */ +/* + * If we're in a mode greater than C99, expose C11 functions. + */ +#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L +int at_quick_exit(void (*)(void)); +_Noreturn void + quick_exit(int); +#endif /* __ISO_C_VISIBLE >= 2011 */ + _END_STD_C #endif /* _STDLIB_H_ */ |