summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-10-07 14:15:00 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-10-07 14:15:00 -0700
commitd47439a333a33e01ba4b6695e588fd4ded4fc611 (patch)
tree07654f9076555ea27cd827fc2de1f1524a7ea16b /lib
parent84e8e185cdabbe547cb2b724c2ca1014a73efcfc (diff)
downloademacs-d47439a333a33e01ba4b6695e588fd4ded4fc611.tar.gz
Merge from gnulib, fixing some 'configure' typos (Bug#9696).
* lib/signal.in.h, lib/sigprocmask.c, m4/gl-comp.m4: * m4/gnulib-common.m4: Merge from gnulib. Without this, 'configure' would say "func_gl_gnulib_m4code_pathmax: command not found" on powerpc-apple-darwin9.8.0.
Diffstat (limited to 'lib')
-rw-r--r--lib/signal.in.h16
-rw-r--r--lib/sigprocmask.c28
2 files changed, 16 insertions, 28 deletions
diff --git a/lib/signal.in.h b/lib/signal.in.h
index b0e192feeae..e18e0b29832 100644
--- a/lib/signal.in.h
+++ b/lib/signal.in.h
@@ -178,6 +178,10 @@ _GL_WARN_ON_USE (raise, "raise can crash on native Windows - "
#if @GNULIB_SIGPROCMASK@
# if !@HAVE_POSIX_SIGNALBLOCKING@
+# ifndef GNULIB_defined_signal_blocking
+# define GNULIB_defined_signal_blocking 1
+# endif
+
/* Maximum signal number + 1. */
# ifndef NSIG
# define NSIG 32
@@ -303,18 +307,10 @@ _GL_CXXALIAS_SYS (signal, _gl_function_taking_int_returning_void_t,
# endif
_GL_CXXALIASWARN (signal);
-/* Raise signal SIG. */
# if !@HAVE_POSIX_SIGNALBLOCKING@ && GNULIB_defined_SIGPIPE
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef raise
-# define raise rpl_raise
-# endif
-_GL_FUNCDECL_RPL (raise, int, (int sig));
-_GL_CXXALIAS_RPL (raise, int, (int sig));
-# else
-_GL_CXXALIAS_SYS (raise, int, (int sig));
+/* Raise signal SIGPIPE. */
+_GL_EXTERN_C int _gl_raise_SIGPIPE (void);
# endif
-_GL_CXXALIASWARN (raise);
#elif defined GNULIB_POSIXCHECK
# undef sigaddset
diff --git a/lib/sigprocmask.c b/lib/sigprocmask.c
index 6ccac5a8343..e75c7576cdf 100644
--- a/lib/sigprocmask.c
+++ b/lib/sigprocmask.c
@@ -330,27 +330,19 @@ rpl_signal (int sig, handler_t handler)
}
#if GNULIB_defined_SIGPIPE
-/* Raise the signal SIG. */
+/* Raise the signal SIGPIPE. */
int
-rpl_raise (int sig)
-# undef raise
+_gl_raise_SIGPIPE (void)
{
- switch (sig)
+ if (blocked_set & (1U << SIGPIPE))
+ pending_array[SIGPIPE] = 1;
+ else
{
- case SIGPIPE:
- if (blocked_set & (1U << sig))
- pending_array[sig] = 1;
- else
- {
- handler_t handler = SIGPIPE_handler;
- if (handler == SIG_DFL)
- exit (128 + SIGPIPE);
- else if (handler != SIG_IGN)
- (*handler) (sig);
- }
- return 0;
- default: /* System defined signal */
- return raise (sig);
+ handler_t handler = SIGPIPE_handler;
+ if (handler == SIG_DFL)
+ exit (128 + SIGPIPE);
+ else if (handler != SIG_IGN)
+ (*handler) (SIGPIPE);
}
}
#endif