stdnoreturn: new module
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 12 Jul 2011 08:00:20 +0000 (01:00 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 12 Jul 2011 08:00:20 +0000 (01:00 -0700)
* MODULES.html.sh (Noreturn <stdnoreturn.h>): New section.
* m4/stdnoreturn.m4, modules/stdnoreturn: New files.

ChangeLog
MODULES.html.sh
m4/stdnoreturn.m4 [new file with mode: 0644]
modules/stdnoreturn [new file with mode: 0644]

index d7a62cd5861785de3ec31adb41524cca4b57198d..0e4bc308ee4d3296f327af677f4c84de044c0c2a 100644 (file)
--- 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.
 
index 464f1d8920ebe89ad036b6a484e5cfc64d92fc7b..5a2e22b6da24483e70ff23df2b5a4a38fbc69990 100755 (executable)
@@ -2321,6 +2321,16 @@ func_all_modules ()
   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
diff --git a/m4/stdnoreturn.m4 b/m4/stdnoreturn.m4
new file mode 100644 (file)
index 0000000..1a44069
--- /dev/null
@@ -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])
+])
diff --git a/modules/stdnoreturn b/modules/stdnoreturn
new file mode 100644 (file)
index 0000000..1778862
--- /dev/null
@@ -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