signal-h: Rename from signal.
authorBruno Haible <bruno@clisp.org>
Fri, 23 Sep 2011 23:28:22 +0000 (01:28 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 23 Sep 2011 23:30:49 +0000 (01:30 +0200)
* modules/signal-h: Renamed from modules/signal.
* modules/pthread_sigmask (Depends-on): Update.
* modules/raise (Depends-on): Likewise.
* modules/sigaction (Depends-on): Likewise.
* modules/sigpipe (Depends-on): Likewise.
* modules/sigprocmask (Depends-on): Likewise.
* modules/sys_select (Depends-on): Likewise.
* modules/signal-h-tests: Renamed from modules/signal-tests.
(Files, Depends-on, Makefile.am): Update.
* tests/test-signal-h.c: Renamed from tests/test-signal.c.
* modules/signal-h-c++-tests: Renamed from modules/signal-c++-tests.
(Files, Makefile.am): Update.
* tests/test-signal-h-c++.cc: Renamed from tests/test-signal-c++.cc.
* tests/test-signal-h-c++2.cc: Renamed from tests/test-signal-c++2.cc.
* modules/signal: New placeholder file.
* MODULES.html.sh (Support for systems lacking POSIX:2008): Update.
* doc/posix-headers/signal.texi: Update.
* NEWS: Mention the change.

22 files changed:
ChangeLog
MODULES.html.sh
NEWS
doc/posix-headers/signal.texi
modules/pthread_sigmask
modules/raise
modules/sigaction
modules/signal
modules/signal-c++-tests [deleted file]
modules/signal-h [new file with mode: 0644]
modules/signal-h-c++-tests [new file with mode: 0644]
modules/signal-h-tests [new file with mode: 0644]
modules/signal-tests [deleted file]
modules/sigpipe
modules/sigprocmask
modules/sys_select
tests/test-signal-c++.cc [deleted file]
tests/test-signal-c++2.cc [deleted file]
tests/test-signal-h-c++.cc [new file with mode: 0644]
tests/test-signal-h-c++2.cc [new file with mode: 0644]
tests/test-signal-h.c [new file with mode: 0644]
tests/test-signal.c [deleted file]

index 32b8c04..ef8dc92 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,27 @@
 2011-09-23  Bruno Haible  <bruno@clisp.org>
 
+       signal-h: Rename from signal.
+       * modules/signal-h: Renamed from modules/signal.
+       * modules/pthread_sigmask (Depends-on): Update.
+       * modules/raise (Depends-on): Likewise.
+       * modules/sigaction (Depends-on): Likewise.
+       * modules/sigpipe (Depends-on): Likewise.
+       * modules/sigprocmask (Depends-on): Likewise.
+       * modules/sys_select (Depends-on): Likewise.
+       * modules/signal-h-tests: Renamed from modules/signal-tests.
+       (Files, Depends-on, Makefile.am): Update.
+       * tests/test-signal-h.c: Renamed from tests/test-signal.c.
+       * modules/signal-h-c++-tests: Renamed from modules/signal-c++-tests.
+       (Files, Makefile.am): Update.
+       * tests/test-signal-h-c++.cc: Renamed from tests/test-signal-c++.cc.
+       * tests/test-signal-h-c++2.cc: Renamed from tests/test-signal-c++2.cc.
+       * modules/signal: New placeholder file.
+       * MODULES.html.sh (Support for systems lacking POSIX:2008): Update.
+       * doc/posix-headers/signal.texi: Update.
+       * NEWS: Mention the change.
+
+2011-09-23  Bruno Haible  <bruno@clisp.org>
+
        sigprocmask: Avoid crashes through signal() on MSVC 9.
        * lib/sigprocmask.c: Include msvc-inval.h.
        (signal_nothrow): New function.
index 8273faa..9903150 100755 (executable)
@@ -2451,7 +2451,7 @@ func_all_modules ()
   func_module servent
   func_module setsockopt
   func_module shutdown
-  func_module signal
+  func_module signal-h
   func_module sleep
   func_module snprintf-posix
   func_module socket
diff --git a/NEWS b/NEWS
index d7d9acd..21f4708 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,8 @@ User visible incompatible changes
 
 Date        Modules         Changes
 
+2011-09-23  signal          This module is renamed to 'signal-h'.
+
 2011-09-22  select          The link requirements of this module are changed
                             from $(LIBSOCKET) to $(LIB_SELECT).
 
index 18bd309..99ad79e 100644 (file)
@@ -3,7 +3,7 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html}
 
-Gnulib module: signal
+Gnulib module: signal-h
 
 Portability problems fixed by Gnulib:
 @itemize
index b9a8f96..f451259 100644 (file)
@@ -6,7 +6,7 @@ lib/pthread_sigmask.c
 m4/pthread_sigmask.m4
 
 Depends-on:
-signal
+signal-h
 threadlib
 sigprocmask     [test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1]
 
index 11f9e0e..734e03a 100644 (file)
@@ -6,7 +6,7 @@ lib/raise.c
 m4/raise.m4
 
 Depends-on:
-signal
+signal-h
 msvc-inval      [test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1]
 
 configure.ac:
index 9fde5f6..2180766 100644 (file)
@@ -7,7 +7,7 @@ lib/sig-handler.h
 m4/sigaction.m4
 
 Depends-on:
-signal
+signal-h
 sigprocmask     [test $HAVE_SIGACTION = 0]
 
 configure.ac:
index fe9af81..5bf24bc 100644 (file)
@@ -1,62 +1,19 @@
 Description:
-A GNU-like <signal.h>.
+Placeholder for eventual signal() replacement.
 
 Files:
-lib/signal.in.h
-m4/signal_h.m4
 
 Depends-on:
-include_next
-snippet/arg-nonnull
-snippet/c++defs
-snippet/warn-on-use
-extensions
+signal-h
 
 configure.ac:
-gl_SIGNAL_H
 
 Makefile.am:
-BUILT_SOURCES += signal.h
-
-# We need the following in order to create <signal.h> when the system
-# doesn't have a complete one.
-signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-       $(AM_V_GEN)rm -f $@-t $@ && \
-       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-             -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \
-             -e 's|@''GNULIB_PTHREAD_SIGMASK''@|$(GNULIB_PTHREAD_SIGMASK)|g' \
-             -e 's|@''GNULIB_RAISE''@|$(GNULIB_RAISE)|g' \
-             -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \
-             -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \
-             -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \
-             -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \
-             -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \
-             -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \
-             -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \
-             -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \
-             -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \
-             -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \
-             -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \
-             -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \
-             -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \
-             -e 's|@''REPLACE_RAISE''@|$(REPLACE_RAISE)|g' \
-             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-             < $(srcdir)/signal.in.h; \
-       } > $@-t && \
-       mv $@-t $@
-MOSTLYCLEANFILES += signal.h signal.h-t
 
 Include:
-<signal.h>
 
 License:
 LGPLv2+
 
 Maintainer:
-all
+Bruno Haible
diff --git a/modules/signal-c++-tests b/modules/signal-c++-tests
deleted file mode 100644 (file)
index 02a92fb..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-Files:
-tests/test-signal-c++.cc
-tests/test-signal-c++2.cc
-tests/signature.h
-
-Status:
-c++-test
-
-Depends-on:
-ansi-c++-opt
-
-configure.ac:
-
-Makefile.am:
-if ANSICXX
-TESTS += test-signal-c++
-check_PROGRAMS += test-signal-c++
-test_signal_c___SOURCES = test-signal-c++.cc test-signal-c++2.cc
-test_signal_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP) $(LIB_PTHREAD_SIGMASK)
-endif
diff --git a/modules/signal-h b/modules/signal-h
new file mode 100644 (file)
index 0000000..fe9af81
--- /dev/null
@@ -0,0 +1,62 @@
+Description:
+A GNU-like <signal.h>.
+
+Files:
+lib/signal.in.h
+m4/signal_h.m4
+
+Depends-on:
+include_next
+snippet/arg-nonnull
+snippet/c++defs
+snippet/warn-on-use
+extensions
+
+configure.ac:
+gl_SIGNAL_H
+
+Makefile.am:
+BUILT_SOURCES += signal.h
+
+# We need the following in order to create <signal.h> when the system
+# doesn't have a complete one.
+signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \
+             -e 's|@''GNULIB_PTHREAD_SIGMASK''@|$(GNULIB_PTHREAD_SIGMASK)|g' \
+             -e 's|@''GNULIB_RAISE''@|$(GNULIB_RAISE)|g' \
+             -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \
+             -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \
+             -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \
+             -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \
+             -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \
+             -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \
+             -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \
+             -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \
+             -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \
+             -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \
+             -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \
+             -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \
+             -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \
+             -e 's|@''REPLACE_RAISE''@|$(REPLACE_RAISE)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/signal.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += signal.h signal.h-t
+
+Include:
+<signal.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all
diff --git a/modules/signal-h-c++-tests b/modules/signal-h-c++-tests
new file mode 100644 (file)
index 0000000..c7b2371
--- /dev/null
@@ -0,0 +1,20 @@
+Files:
+tests/test-signal-h-c++.cc
+tests/test-signal-h-c++2.cc
+tests/signature.h
+
+Status:
+c++-test
+
+Depends-on:
+ansi-c++-opt
+
+configure.ac:
+
+Makefile.am:
+if ANSICXX
+TESTS += test-signal-h-c++
+check_PROGRAMS += test-signal-h-c++
+test_signal_h_c___SOURCES = test-signal-h-c++.cc test-signal-h-c++2.cc
+test_signal_h_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP) $(LIB_PTHREAD_SIGMASK)
+endif
diff --git a/modules/signal-h-tests b/modules/signal-h-tests
new file mode 100644 (file)
index 0000000..dab83e9
--- /dev/null
@@ -0,0 +1,11 @@
+Files:
+tests/test-signal-h.c
+
+Depends-on:
+signal-h-c++-tests
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-signal-h
+check_PROGRAMS += test-signal-h
diff --git a/modules/signal-tests b/modules/signal-tests
deleted file mode 100644 (file)
index 9b882a5..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Files:
-tests/test-signal.c
-
-Depends-on:
-signal-c++-tests
-
-configure.ac:
-
-Makefile.am:
-TESTS += test-signal
-check_PROGRAMS += test-signal
index d28a562..8bb7442 100644 (file)
@@ -14,7 +14,7 @@ m4/asm-underscore.m4
 Depends-on:
 msvc-nothrow
 raise
-signal
+signal-h
 sigprocmask
 stdio
 unistd
index cdcd17c..644654c 100644 (file)
@@ -6,7 +6,7 @@ lib/sigprocmask.c
 m4/signalblocking.m4
 
 Depends-on:
-signal
+signal-h
 stdint          [test $HAVE_POSIX_SIGNALBLOCKING = 0]
 raise           [test $HAVE_POSIX_SIGNALBLOCKING = 0]
 msvc-inval      [test $HAVE_POSIX_SIGNALBLOCKING = 0]
index 49a0360..97262bb 100644 (file)
@@ -8,7 +8,7 @@ m4/sys_socket_h.m4
 
 Depends-on:
 include_next
-signal
+signal-h
 snippet/c++defs
 snippet/warn-on-use
 sys_time
diff --git a/tests/test-signal-c++.cc b/tests/test-signal-c++.cc
deleted file mode 100644 (file)
index 11b70c8..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Test of <signal.h> substitute in C++ mode.
-   Copyright (C) 2010-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 Bruno Haible <bruno@clisp.org>, 2010.  */
-
-#define GNULIB_NAMESPACE gnulib
-#include <config.h>
-
-#include <signal.h>
-
-#include "signature.h"
-
-
-#if GNULIB_TEST_PTHREAD_SIGMASK
-SIGNATURE_CHECK (GNULIB_NAMESPACE::pthread_sigmask, int,
-                 (int, const sigset_t *, sigset_t *));
-#endif
-
-#if GNULIB_TEST_RAISE
-SIGNATURE_CHECK (GNULIB_NAMESPACE::raise, int, (int));
-#endif
-
-#if GNULIB_TEST_SIGPROCMASK
-SIGNATURE_CHECK (GNULIB_NAMESPACE::sigismember, int, (const sigset_t *, int));
-SIGNATURE_CHECK (GNULIB_NAMESPACE::sigemptyset, int, (sigset_t *));
-SIGNATURE_CHECK (GNULIB_NAMESPACE::sigaddset, int, (sigset_t *, int));
-SIGNATURE_CHECK (GNULIB_NAMESPACE::sigdelset, int, (sigset_t *, int));
-SIGNATURE_CHECK (GNULIB_NAMESPACE::sigfillset, int, (sigset_t *));
-SIGNATURE_CHECK (GNULIB_NAMESPACE::sigpending, int, (sigset_t *));
-SIGNATURE_CHECK (GNULIB_NAMESPACE::sigprocmask, int,
-                 (int, const sigset_t *, sigset_t *));
-SIGNATURE_CHECK (GNULIB_NAMESPACE::signal,
-                 _gl_function_taking_int_returning_void_t,
-                 (int, _gl_function_taking_int_returning_void_t));
-SIGNATURE_CHECK (GNULIB_NAMESPACE::raise, int, (int));
-#endif
-
-#if GNULIB_TEST_SIGACTION
-SIGNATURE_CHECK (GNULIB_NAMESPACE::sigaction, int,
-                 (int, const struct sigaction *, struct sigaction *));
-#endif
-
-
-int
-main ()
-{
-}
diff --git a/tests/test-signal-c++2.cc b/tests/test-signal-c++2.cc
deleted file mode 100644 (file)
index 744e9a4..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Test of <signal.h> substitute in C++ mode.
-   Copyright (C) 2010-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/>.  */
-
-#define GNULIB_NAMESPACE gnulib
-#include <config.h>
-
-#include <csignal>
diff --git a/tests/test-signal-h-c++.cc b/tests/test-signal-h-c++.cc
new file mode 100644 (file)
index 0000000..11b70c8
--- /dev/null
@@ -0,0 +1,60 @@
+/* Test of <signal.h> substitute in C++ mode.
+   Copyright (C) 2010-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 Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <signal.h>
+
+#include "signature.h"
+
+
+#if GNULIB_TEST_PTHREAD_SIGMASK
+SIGNATURE_CHECK (GNULIB_NAMESPACE::pthread_sigmask, int,
+                 (int, const sigset_t *, sigset_t *));
+#endif
+
+#if GNULIB_TEST_RAISE
+SIGNATURE_CHECK (GNULIB_NAMESPACE::raise, int, (int));
+#endif
+
+#if GNULIB_TEST_SIGPROCMASK
+SIGNATURE_CHECK (GNULIB_NAMESPACE::sigismember, int, (const sigset_t *, int));
+SIGNATURE_CHECK (GNULIB_NAMESPACE::sigemptyset, int, (sigset_t *));
+SIGNATURE_CHECK (GNULIB_NAMESPACE::sigaddset, int, (sigset_t *, int));
+SIGNATURE_CHECK (GNULIB_NAMESPACE::sigdelset, int, (sigset_t *, int));
+SIGNATURE_CHECK (GNULIB_NAMESPACE::sigfillset, int, (sigset_t *));
+SIGNATURE_CHECK (GNULIB_NAMESPACE::sigpending, int, (sigset_t *));
+SIGNATURE_CHECK (GNULIB_NAMESPACE::sigprocmask, int,
+                 (int, const sigset_t *, sigset_t *));
+SIGNATURE_CHECK (GNULIB_NAMESPACE::signal,
+                 _gl_function_taking_int_returning_void_t,
+                 (int, _gl_function_taking_int_returning_void_t));
+SIGNATURE_CHECK (GNULIB_NAMESPACE::raise, int, (int));
+#endif
+
+#if GNULIB_TEST_SIGACTION
+SIGNATURE_CHECK (GNULIB_NAMESPACE::sigaction, int,
+                 (int, const struct sigaction *, struct sigaction *));
+#endif
+
+
+int
+main ()
+{
+}
diff --git a/tests/test-signal-h-c++2.cc b/tests/test-signal-h-c++2.cc
new file mode 100644 (file)
index 0000000..744e9a4
--- /dev/null
@@ -0,0 +1,20 @@
+/* Test of <signal.h> substitute in C++ mode.
+   Copyright (C) 2010-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/>.  */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <csignal>
diff --git a/tests/test-signal-h.c b/tests/test-signal-h.c
new file mode 100644 (file)
index 0000000..7103e1f
--- /dev/null
@@ -0,0 +1,129 @@
+/* Test of <signal.h> substitute.
+   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <signal.h>
+
+/* Check for required types.  */
+struct
+{
+  size_t a;
+  uid_t b;
+  volatile sig_atomic_t c;
+  sigset_t d;
+  pid_t e;
+#if 0
+  /* Not guaranteed by gnulib.  */
+  pthread_t f;
+  struct timespec g;
+#endif
+} s;
+
+/* Check that NSIG is defined.  */
+int nsig = NSIG;
+
+int
+main (void)
+{
+  switch (0)
+    {
+      /* The following are guaranteed by C.  */
+    case 0:
+    case SIGABRT:
+    case SIGFPE:
+    case SIGILL:
+    case SIGINT:
+    case SIGSEGV:
+    case SIGTERM:
+      /* The following is guaranteed by gnulib.  */
+#if GNULIB_SIGPIPE || defined SIGPIPE
+    case SIGPIPE:
+#endif
+      /* Ensure no conflict with other standardized names.  */
+#ifdef SIGALRM
+    case SIGALRM:
+#endif
+      /* On Haiku, SIGBUS is mistakenly equal to SIGSEGV.  */
+#if defined SIGBUS && SIGBUS != SIGSEGV
+    case SIGBUS:
+#endif
+#ifdef SIGCHLD
+    case SIGCHLD:
+#endif
+#ifdef SIGCONT
+    case SIGCONT:
+#endif
+#ifdef SIGHUP
+    case SIGHUP:
+#endif
+#ifdef SIGKILL
+    case SIGKILL:
+#endif
+#ifdef SIGQUIT
+    case SIGQUIT:
+#endif
+#ifdef SIGSTOP
+    case SIGSTOP:
+#endif
+#ifdef SIGTSTP
+    case SIGTSTP:
+#endif
+#ifdef SIGTTIN
+    case SIGTTIN:
+#endif
+#ifdef SIGTTOU
+    case SIGTTOU:
+#endif
+#ifdef SIGUSR1
+    case SIGUSR1:
+#endif
+#ifdef SIGUSR2
+    case SIGUSR2:
+#endif
+#ifdef SIGSYS
+    case SIGSYS:
+#endif
+#ifdef SIGTRAP
+    case SIGTRAP:
+#endif
+#ifdef SIGURG
+    case SIGURG:
+#endif
+#ifdef SIGVTALRM
+    case SIGVTALRM:
+#endif
+#ifdef SIGXCPU
+    case SIGXCPU:
+#endif
+#ifdef SIGXFSZ
+    case SIGXFSZ:
+#endif
+      /* SIGRTMIN and SIGRTMAX need not be compile-time constants.  */
+#if 0
+# ifdef SIGRTMIN
+    case SIGRTMIN:
+# endif
+# ifdef SIGRTMAX
+    case SIGRTMAX:
+# endif
+#endif
+      ;
+    }
+  return s.a + s.b + s.c + s.e;
+}
diff --git a/tests/test-signal.c b/tests/test-signal.c
deleted file mode 100644 (file)
index 7103e1f..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/* Test of <signal.h> substitute.
-   Copyright (C) 2009-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 Eric Blake <ebb9@byu.net>, 2009.  */
-
-#include <config.h>
-
-#include <signal.h>
-
-/* Check for required types.  */
-struct
-{
-  size_t a;
-  uid_t b;
-  volatile sig_atomic_t c;
-  sigset_t d;
-  pid_t e;
-#if 0
-  /* Not guaranteed by gnulib.  */
-  pthread_t f;
-  struct timespec g;
-#endif
-} s;
-
-/* Check that NSIG is defined.  */
-int nsig = NSIG;
-
-int
-main (void)
-{
-  switch (0)
-    {
-      /* The following are guaranteed by C.  */
-    case 0:
-    case SIGABRT:
-    case SIGFPE:
-    case SIGILL:
-    case SIGINT:
-    case SIGSEGV:
-    case SIGTERM:
-      /* The following is guaranteed by gnulib.  */
-#if GNULIB_SIGPIPE || defined SIGPIPE
-    case SIGPIPE:
-#endif
-      /* Ensure no conflict with other standardized names.  */
-#ifdef SIGALRM
-    case SIGALRM:
-#endif
-      /* On Haiku, SIGBUS is mistakenly equal to SIGSEGV.  */
-#if defined SIGBUS && SIGBUS != SIGSEGV
-    case SIGBUS:
-#endif
-#ifdef SIGCHLD
-    case SIGCHLD:
-#endif
-#ifdef SIGCONT
-    case SIGCONT:
-#endif
-#ifdef SIGHUP
-    case SIGHUP:
-#endif
-#ifdef SIGKILL
-    case SIGKILL:
-#endif
-#ifdef SIGQUIT
-    case SIGQUIT:
-#endif
-#ifdef SIGSTOP
-    case SIGSTOP:
-#endif
-#ifdef SIGTSTP
-    case SIGTSTP:
-#endif
-#ifdef SIGTTIN
-    case SIGTTIN:
-#endif
-#ifdef SIGTTOU
-    case SIGTTOU:
-#endif
-#ifdef SIGUSR1
-    case SIGUSR1:
-#endif
-#ifdef SIGUSR2
-    case SIGUSR2:
-#endif
-#ifdef SIGSYS
-    case SIGSYS:
-#endif
-#ifdef SIGTRAP
-    case SIGTRAP:
-#endif
-#ifdef SIGURG
-    case SIGURG:
-#endif
-#ifdef SIGVTALRM
-    case SIGVTALRM:
-#endif
-#ifdef SIGXCPU
-    case SIGXCPU:
-#endif
-#ifdef SIGXFSZ
-    case SIGXFSZ:
-#endif
-      /* SIGRTMIN and SIGRTMAX need not be compile-time constants.  */
-#if 0
-# ifdef SIGRTMIN
-    case SIGRTMIN:
-# endif
-# ifdef SIGRTMAX
-    case SIGRTMAX:
-# endif
-#endif
-      ;
-    }
-  return s.a + s.b + s.c + s.e;
-}