summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/setjmp.h9
-rw-r--r--include/stdlib.h15
2 files changed, 19 insertions, 5 deletions
diff --git a/include/setjmp.h b/include/setjmp.h
index 7dc72767..8ec5c6f1 100644
--- a/include/setjmp.h
+++ b/include/setjmp.h
@@ -5,6 +5,13 @@
extern "C" {
#endif
+#if __STDC_VERSION__ >= 201112L
+#elif defined(__GNUC__)
+#define _Noreturn __attribute__((__noreturn__))
+#else
+#define _Noreturn
+#endif
+
#include <bits/setjmp.h>
@@ -29,7 +36,7 @@ void _longjmp (jmp_buf, int);
int setjmp (jmp_buf);
-void longjmp (jmp_buf, int);
+_Noreturn void longjmp (jmp_buf, int);
#define setjmp setjmp
#define longjmp longjmp
diff --git a/include/stdlib.h b/include/stdlib.h
index 14cc71bb..86cf0171 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 *);