# HG changeset patch # User Bruno Haible # Date 1316820502 -7200 # Node ID 51a803e5cfdc277034f1e9eb580e418ef31457b2 # Parent a27be0e3ac062791e53fd6e084652e21ffaeba5b 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. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,25 @@ +2011-09-23 Bruno Haible + + 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 sigprocmask: Avoid crashes through signal() on MSVC 9. diff --git a/MODULES.html.sh b/MODULES.html.sh --- a/MODULES.html.sh +++ b/MODULES.html.sh @@ -2451,7 +2451,7 @@ 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 --- a/NEWS +++ b/NEWS @@ -12,6 +12,8 @@ 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). diff --git a/doc/posix-headers/signal.texi b/doc/posix-headers/signal.texi --- a/doc/posix-headers/signal.texi +++ b/doc/posix-headers/signal.texi @@ -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 diff --git a/modules/pthread_sigmask b/modules/pthread_sigmask --- a/modules/pthread_sigmask +++ b/modules/pthread_sigmask @@ -6,7 +6,7 @@ m4/pthread_sigmask.m4 Depends-on: -signal +signal-h threadlib sigprocmask [test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1] diff --git a/modules/raise b/modules/raise --- a/modules/raise +++ b/modules/raise @@ -6,7 +6,7 @@ m4/raise.m4 Depends-on: -signal +signal-h msvc-inval [test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1] configure.ac: diff --git a/modules/sigaction b/modules/sigaction --- a/modules/sigaction +++ b/modules/sigaction @@ -7,7 +7,7 @@ m4/sigaction.m4 Depends-on: -signal +signal-h sigprocmask [test $HAVE_SIGACTION = 0] configure.ac: diff --git a/modules/signal b/modules/signal --- a/modules/signal +++ b/modules/signal @@ -1,62 +1,19 @@ Description: -A GNU-like . +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 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: - License: LGPLv2+ Maintainer: -all +Bruno Haible diff --git a/modules/signal-c++-tests b/modules/signal-c++-tests deleted file mode 100644 --- a/modules/signal-c++-tests +++ /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 --- /dev/null +++ b/modules/signal-h @@ -0,0 +1,62 @@ +Description: +A GNU-like . + +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 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: + + +License: +LGPLv2+ + +Maintainer: +all diff --git a/modules/signal-h-c++-tests b/modules/signal-h-c++-tests new file mode 100644 --- /dev/null +++ b/modules/signal-h-c++-tests @@ -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 --- /dev/null +++ b/modules/signal-h-tests @@ -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 --- a/modules/signal-tests +++ /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 diff --git a/modules/sigpipe b/modules/sigpipe --- a/modules/sigpipe +++ b/modules/sigpipe @@ -14,7 +14,7 @@ Depends-on: msvc-nothrow raise -signal +signal-h sigprocmask stdio unistd diff --git a/modules/sigprocmask b/modules/sigprocmask --- a/modules/sigprocmask +++ b/modules/sigprocmask @@ -6,7 +6,7 @@ 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] diff --git a/modules/sys_select b/modules/sys_select --- a/modules/sys_select +++ b/modules/sys_select @@ -8,7 +8,7 @@ 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 --- a/tests/test-signal-c++.cc +++ /dev/null @@ -1,60 +0,0 @@ -/* Test of 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 . */ - -/* Written by Bruno Haible , 2010. */ - -#define GNULIB_NAMESPACE gnulib -#include - -#include - -#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 --- a/tests/test-signal-c++2.cc +++ /dev/null @@ -1,20 +0,0 @@ -/* Test of 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 . */ - -#define GNULIB_NAMESPACE gnulib -#include - -#include diff --git a/tests/test-signal-h-c++.cc b/tests/test-signal-h-c++.cc new file mode 100644 --- /dev/null +++ b/tests/test-signal-h-c++.cc @@ -0,0 +1,60 @@ +/* Test of 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 . */ + +/* Written by Bruno Haible , 2010. */ + +#define GNULIB_NAMESPACE gnulib +#include + +#include + +#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 --- /dev/null +++ b/tests/test-signal-h-c++2.cc @@ -0,0 +1,20 @@ +/* Test of 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 . */ + +#define GNULIB_NAMESPACE gnulib +#include + +#include diff --git a/tests/test-signal-h.c b/tests/test-signal-h.c new file mode 100644 --- /dev/null +++ b/tests/test-signal-h.c @@ -0,0 +1,129 @@ +/* Test of 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 . */ + +/* Written by Eric Blake , 2009. */ + +#include + +#include + +/* 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 --- a/tests/test-signal.c +++ /dev/null @@ -1,129 +0,0 @@ -/* Test of 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 . */ - -/* Written by Eric Blake , 2009. */ - -#include - -#include - -/* 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; -}