aboutsummaryrefslogtreecommitdiff
path: root/include/stdlib.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-09-06 23:12:27 -0400
committerRich Felker <dalias@aerifal.cx>2012-09-06 23:12:27 -0400
commitc8ea985748a6857ac5db9ef50f9c92e2966c04d5 (patch)
tree813479016d8106b6b7e8da8630754d8a8b1deff7 /include/stdlib.h
parentac5d085691e5a797a21ae36111aa0b274e1cf4ba (diff)
downloadmusl-c8ea985748a6857ac5db9ef50f9c92e2966c04d5.zip
musl-c8ea985748a6857ac5db9ef50f9c92e2966c04d5.tar.gz
musl-c8ea985748a6857ac5db9ef50f9c92e2966c04d5.tar.bz2
add _Noreturn function attribute, with fallback for pre-C11 GNUC
Diffstat (limited to 'include/stdlib.h')
-rw-r--r--include/stdlib.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index 14cc71b..86cf017 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -11,6 +11,13 @@ extern "C" {
#define __restrict
#endif
+#if __STDC_VERSION__ >= 201112L
+#elif defined(__GNUC__)
+#define _Noreturn __attribute__((__noreturn__))
+#else
+#define _Noreturn
+#endif
+
#undef NULL
#ifdef __cplusplus
#define NULL 0
@@ -46,12 +53,12 @@ void *realloc (void *, size_t);
void free (void *);
void *aligned_alloc(size_t alignment, size_t size);
-void abort (void);
+_Noreturn void abort (void);
int atexit (void (*) (void));
-void exit (int);
-void _Exit (int);
+_Noreturn void exit (int);
+_Noreturn void _Exit (int);
int at_quick_exit (void (*) (void));
-void quick_exit (int);
+_Noreturn void quick_exit (int);
char *getenv (const char *);