stdnoreturn, stdnoreturn-tests: remove modules
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 12 Jul 2011 08:16:08 +0000 (01:16 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 12 Jul 2011 08:16:08 +0000 (01:16 -0700)
They're not needed here and a bit premature for use elsewhere.  See
<http://lists.gnu.org/archive/html/bug-gnulib/2011-07/msg00209.html>.
* m4/stdnoreturn.m4, modules/stdnoreturn, modules/stdnoreturn-tests:
* tests/test-stdnoreturn.c: Remove files.
* MODULES.html.sh (_Noreturn <stdnoreturn.h>): Remove section.
* lib/openat.h, lib/sigpipe-die.h, lib/xalloc.h, lib/xmemdup0.h:
* lib/xstrtol.h: Use _Noreturn rather than including <stdnoreturn.h>
and using noreturn.
* modules/openat, modules/sigpipe-die, modules/xalloc:
* modules/xmemdup0, modules/xstrtol:
Remove dependency on stdnoreturn.

16 files changed:
ChangeLog
MODULES.html.sh
lib/openat.h
lib/sigpipe-die.h
lib/xalloc.h
lib/xmemdup0.h
lib/xstrtol.h
m4/stdnoreturn.m4 [deleted file]
modules/openat
modules/sigpipe-die
modules/stdnoreturn [deleted file]
modules/stdnoreturn-tests [deleted file]
modules/xalloc
modules/xmemdup0
modules/xstrtol
tests/test-stdnoreturn.c [deleted file]

index 2897371..551943d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2011-07-12  Paul Eggert  <eggert@cs.ucla.edu>
 
+       stdnoreturn, stdnoreturn-tests: remove modules
+       They're not needed here and a bit premature for use elsewhere.  See
+       <http://lists.gnu.org/archive/html/bug-gnulib/2011-07/msg00209.html>.
+       * m4/stdnoreturn.m4, modules/stdnoreturn, modules/stdnoreturn-tests:
+       * tests/test-stdnoreturn.c: Remove files.
+       * MODULES.html.sh (_Noreturn <stdnoreturn.h>): Remove section.
+       * lib/openat.h, lib/sigpipe-die.h, lib/xalloc.h, lib/xmemdup0.h:
+       * lib/xstrtol.h: Use _Noreturn rather than including <stdnoreturn.h>
+       and using noreturn.
+       * modules/openat, modules/sigpipe-die, modules/xalloc:
+       * modules/xmemdup0, modules/xstrtol:
+       Remove dependency on stdnoreturn.
+
        _Noreturn: Ignore __STDC_VERSION__; observe _MSC_VER.
        * build-aux/_Noreturn.h (_Noreturn): Ignore __STDC_VERSION__.
        Reparenthesize to avoid GCC warning.
index 5a2e22b..464f1d8 100755 (executable)
@@ -2321,16 +2321,6 @@ 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
index d1e7433..b26571f 100644 (file)
@@ -26,7 +26,6 @@
 #include <dirent.h>
 #include <unistd.h>
 #include <stdbool.h>
-#include <stdnoreturn.h>
 
 #if !HAVE_OPENAT
 
@@ -42,8 +41,8 @@ bool openat_needs_fchdir (void);
 
 #endif
 
-noreturn void openat_restore_fail (int);
-noreturn void openat_save_fail (int);
+_Noreturn void openat_restore_fail (int);
+_Noreturn void openat_save_fail (int);
 
 /* Using these function names makes application code
    slightly more readable than it would be with
index c103099..2e1ac27 100644 (file)
@@ -41,8 +41,6 @@
 #ifndef _SIGPIPE_DIE_H
 #define _SIGPIPE_DIE_H
 
-#include <stdnoreturn.h>
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -50,7 +48,7 @@ extern "C" {
 
 /* Emit an error message indicating a SIGPIPE signal, and terminate the
    process with an error code.  */
-extern noreturn void sigpipe_die (void);
+extern _Noreturn void sigpipe_die (void);
 
 /* Install a SIGPIPE handler that invokes PREPARE_DIE and then emits an
    error message and exits.  PREPARE_DIE may be NULL, meaning a no-op.  */
index 7dbcc79..b792aef 100644 (file)
@@ -19,7 +19,6 @@
 # define XALLOC_H_
 
 # include <stddef.h>
-# include <stdnoreturn.h>
 
 # include "xalloc-oversized.h"
 
@@ -45,7 +44,7 @@ extern "C" {
    or by using gnulib's xalloc-die module.  This is the
    function to call when one wants the program to die because of a
    memory allocation failure.  */
-extern noreturn void xalloc_die (void);
+extern _Noreturn void xalloc_die (void);
 
 void *xmalloc (size_t s)
       _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));
index fe083b7..fa1b2f0 100644 (file)
@@ -19,7 +19,6 @@
 # define XMEMDUP_H_
 
 # include <stddef.h>
-# include <stdnoreturn.h>
 
 
 # ifdef __cplusplus
@@ -31,7 +30,7 @@ extern "C" {
    or by using gnulib's xalloc-die module.  This is the
    function to call when one wants the program to die because of a
    memory allocation failure.  */
-extern noreturn void xalloc_die (void);
+extern _Noreturn void xalloc_die (void);
 
 char *xmemdup0 (void const *p, size_t s);
 
index 171c3ef..ad134ab 100644 (file)
@@ -21,7 +21,6 @@
 
 # include <getopt.h>
 # include <inttypes.h>
-# include <stdnoreturn.h>
 
 # ifndef _STRTOL_ERROR
 enum strtol_error
@@ -67,8 +66,8 @@ _DECLARE_XSTRTOL (xstrtoull, unsigned long long int)
 
    After reporting an error, exit with a failure status.  */
 
-void noreturn xstrtol_fatal (enum strtol_error,
-                             int, char, struct option const *,
-                             char const *);
+void _Noreturn xstrtol_fatal (enum strtol_error,
+                              int, char, struct option const *,
+                              char const *);
 
 #endif /* not XSTRTOL_H_ */
diff --git a/m4/stdnoreturn.m4 b/m4/stdnoreturn.m4
deleted file mode 100644 (file)
index 1a44069..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# 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])
-])
index 06a4c75..b9ce4d4 100644 (file)
@@ -32,7 +32,6 @@ openat-die
 rmdir           [test $REPLACE_UNLINKAT = 1]
 save-cwd
 stdbool
-stdnoreturn
 sys_stat
 unistd
 unlink          [test $REPLACE_UNLINKAT = 1]
index 90b477a..7229665 100644 (file)
@@ -12,7 +12,6 @@ exitfail
 sigpipe
 sigprocmask
 sigaction
-stdnoreturn
 
 configure.ac:
 
diff --git a/modules/stdnoreturn b/modules/stdnoreturn
deleted file mode 100644 (file)
index 1778862..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-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
diff --git a/modules/stdnoreturn-tests b/modules/stdnoreturn-tests
deleted file mode 100644 (file)
index 1d1f820..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Files:
-tests/test-stdnoreturn.c
-
-Depends-on:
-
-configure.ac:
-
-Makefile.am:
-TESTS += test-stdnoreturn
-check_PROGRAMS += test-stdnoreturn
index e96d057..19e7a0b 100644 (file)
@@ -8,7 +8,6 @@ m4/xalloc.m4
 
 Depends-on:
 inline
-stdnoreturn
 xalloc-die
 xalloc-oversized
 
index aa60a82..d7ea438 100644 (file)
@@ -6,7 +6,6 @@ lib/xmemdup0.h
 lib/xmemdup0.c
 
 Depends-on:
-stdnoreturn
 xalloc
 
 configure.ac:
index b7c79f1..66e5342 100644 (file)
@@ -15,7 +15,6 @@ getopt-gnu
 gettext-h
 intprops
 inttypes-incomplete
-stdnoreturn
 
 configure.ac:
 gl_XSTRTOL
diff --git a/tests/test-stdnoreturn.c b/tests/test-stdnoreturn.c
deleted file mode 100644 (file)
index fed5e54..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Test of <stdnoreturn.h> and _Noreturn.
-   Copyright 2011 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 3 of the License, 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 */
-
-#include <config.h>
-
-#include <stdnoreturn.h>
-
-/* But did he ever return?  No he never returned,
-   And his fate is still unlearned ... */
-static noreturn void MTA (void);
-
-static _Noreturn void
-Charlie (void)
-{
-  MTA ();
-}
-
-static void
-MTA (void)
-{
-  Charlie ();
-}
-
-int
-main (int argc, char **argv)
-{
-  if (argc <= 0)
-    MTA ();
-  if (!argv[0][0])
-    Charlie ();
-  return 0;
-}