summaryrefslogtreecommitdiff
path: root/lib/stdnoreturn.in.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-02-24 13:52:45 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2012-02-24 14:05:19 -0800
commit9a9dd2c085a29b7837437dd8fbf3ccc96d4e71df (patch)
tree6187dc9f3510d6908bcc4ae557e73f248ecf8cff /lib/stdnoreturn.in.h
parent1997177209382391a38d061f234fe04c74b863da (diff)
downloadgnulib-9a9dd2c085a29b7837437dd8fbf3ccc96d4e71df.tar.gz
stdnoreturn: new module
This implements a replacement for C11's <stdnoreturn.h>. * doc/gnulib.texi (Header File Substitutes): Add stdnoreturn. * doc/posix-headers/stdnoreturn.texi, lib/stdnoreturn.in.h: * m4/stdnoreturn.m4, modules/stdnoreturn, modules/stdnoreturn-tests: * tests/test-stdnoreturn.c: New files.
Diffstat (limited to 'lib/stdnoreturn.in.h')
-rw-r--r--lib/stdnoreturn.in.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/stdnoreturn.in.h b/lib/stdnoreturn.in.h
new file mode 100644
index 0000000000..5ca30631fe
--- /dev/null
+++ b/lib/stdnoreturn.in.h
@@ -0,0 +1,38 @@
+/* A substitute for ISO C11 <stdnoreturn.h>.
+
+ Copyright 2012 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+#ifndef noreturn
+
+/* ISO C11 <stdnoreturn.h> for platforms that lack it.
+
+ References:
+ ISO C11 (latest free draft
+ <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>)
+ section 7.23 */
+
+/* The definition of _Noreturn is copied here. */
+
+#define noreturn _Noreturn
+
+/* Did he ever return?
+ No he never returned
+ And his fate is still unlearn'd ...
+ -- Steiner J, Hawes BL. M.T.A. (1949) */
+
+#endif /* noreturn */