diff lib/stdnoreturn.in.h @ 16388:d0e332889b10

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.
author Paul Eggert <eggert@cs.ucla.edu>
date Fri, 24 Feb 2012 13:52:45 -0800
parents
children 72cfe53065d1
line wrap: on
line diff
new file mode 100644
--- /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 */