From a64f669549a2ed455e99e313d6207a3711e5e5bd Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 12 Jul 2011 01:00:20 -0700 Subject: [PATCH] stdnoreturn: new module * MODULES.html.sh (Noreturn ): 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(+) create mode 100644 m4/stdnoreturn.m4 create mode 100644 modules/stdnoreturn diff --git a/ChangeLog b/ChangeLog index d7a62cd586..0e4bc308ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2011-07-12 Paul Eggert + stdnoreturn: new module + * MODULES.html.sh (Noreturn ): 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 464f1d8920..5a2e22b6da 100755 --- a/MODULES.html.sh +++ b/MODULES.html.sh @@ -2321,6 +2321,16 @@ func_all_modules () func_module _Noreturn func_end_table + element="_Noreturn " + 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 0000000000..1a44069363 --- /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 0000000000..1778862f51 --- /dev/null +++ b/modules/stdnoreturn @@ -0,0 +1,34 @@ +Description: +A that conforms to C1X. + +Files: +m4/stdnoreturn.m4 + +Depends-on: +_Noreturn + +configure.ac: +gl_STDNORETURN_H + +Makefile.am: +BUILT_SOURCES += $(STDNORETURN_H) + +# Create 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: + + +License: +LGPLv2+ + +Maintainer: +all -- 2.30.2