changeset 15394:531043057add

stdnoreturn: new module * MODULES.html.sh (Noreturn <stdnoreturn.h>): New section. * m4/stdnoreturn.m4, modules/stdnoreturn: New files.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 12 Jul 2011 01:00:20 -0700
parents c83adc7c9665
children 69de4b27fa31
files ChangeLog MODULES.html.sh m4/stdnoreturn.m4 modules/stdnoreturn
diffstat 4 files changed, 70 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2011-07-12  Paul Eggert  <eggert@cs.ucla.edu>
 
+	stdnoreturn: new module
+	* MODULES.html.sh (Noreturn <stdnoreturn.h>): New section.
+	* m4/stdnoreturn.m4, modules/stdnoreturn: New files.
+
 	_Noreturn-tests: new module
 	* modules/_Noreturn-tests, tests/test-_Noreturn.c: New files.
 
--- a/MODULES.html.sh
+++ b/MODULES.html.sh
@@ -2321,6 +2321,16 @@
   func_module _Noreturn
   func_end_table
 
+  element="_Noreturn <stdnoreturn.h>"
+  element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
+  func_section_wrap c1x_sup_stdnoreturn
+  func_wrap H3
+  func_echo "$element"
+
+  func_begin_table
+  func_module stdnoreturn
+  func_end_table
+
   element="Support for obsolete systems lacking POSIX:2008"
   func_section_wrap posix_sup_obsolete
   func_wrap H2
new file mode 100644
--- /dev/null
+++ b/m4/stdnoreturn.m4
@@ -0,0 +1,22 @@
+# Check for stdnoreturn.h.
+
+dnl Copyright 2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_STDNORETURN_H],
+[
+  dnl Assume that a system-supplied stdnoreturn.h works if it exists.
+  AC_CHECK_HEADERS_ONCE([stdnoreturn.h])
+
+  if test "$ac_cv_header_stdnoreturn_h" = yes; then
+    STDNORETURN_H=''
+  else
+    STDNORETURN_H='stdnoreturn.h'
+  fi
+  AC_SUBST([STDNORETURN_H])
+
+  AM_CONDITIONAL([GL_GENERATE_STDNORETURN_H],
+    [test $ac_cv_header_stdnoreturn_h != yes])
+])
new file mode 100644
--- /dev/null
+++ b/modules/stdnoreturn
@@ -0,0 +1,34 @@
+Description:
+A <stdnoreturn.h> that conforms to C1X.
+
+Files:
+m4/stdnoreturn.m4
+
+Depends-on:
+_Noreturn
+
+configure.ac:
+gl_STDNORETURN_H
+
+Makefile.am:
+BUILT_SOURCES += $(STDNORETURN_H)
+
+# Create <stdnoreturn.h> when the system doesn't have one that works.
+if GL_GENERATE_STDNORETURN_H
+stdnoreturn.h: $(top_builddir)/config.status $(_NORETURN_H)
+	{ cat $(_NORETURN_H) && echo '#define noreturn _Noreturn'; } > $@-t
+	mv $@-t $@
+else
+stdnoreturn.h: $(top_builddir)/config.status
+	rm -f $@
+endif
+MOSTLYCLEANFILES += stdnoreturn.h
+
+Include:
+<stdnoreturn.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all