bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 04/19] stdnoreturn: new module


From: Paul Eggert
Subject: [PATCH 04/19] stdnoreturn: new module
Date: Sun, 10 Jul 2011 22:21:20 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110516 Thunderbird/3.1.10

* MODULES.html.sh (Noreturn <stdnoreturn.h>): New section.
* m4/stdnoreturn.m4, modules/stdnoreturn: New files.
---
 ChangeLog           |    4 ++++
 MODULES.html.sh     |   10 ++++++++++
 m4/stdnoreturn.m4   |   22 ++++++++++++++++++++++
 modules/stdnoreturn |   34 ++++++++++++++++++++++++++++++++++
 4 files changed, 70 insertions(+), 0 deletions(-)
 create mode 100644 m4/stdnoreturn.m4
 create mode 100644 modules/stdnoreturn

diff --git a/ChangeLog b/ChangeLog
index 05ee004..e564098 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2011-07-10  Paul Eggert  <address@hidden>
 
+       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.
 
diff --git a/MODULES.html.sh b/MODULES.html.sh
index 81df44b..05839d1 100755
--- a/MODULES.html.sh
+++ b/MODULES.html.sh
@@ -2325,6 +2325,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
index 0000000..1a44069
--- /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])
+])
diff --git a/modules/stdnoreturn b/modules/stdnoreturn
new file mode 100644
index 0000000..1778862
--- /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'; } > 
address@hidden
+       mv address@hidden $@
+else
+stdnoreturn.h: $(top_builddir)/config.status
+       rm -f $@
+endif
+MOSTLYCLEANFILES += stdnoreturn.h
+
+Include:
+<stdnoreturn.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all
-- 
1.7.4.4



reply via email to

[Prev in Thread] Current Thread [Next in Thread]