diff options
| author | Paul Eggert | 2011-10-07 14:15:00 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-10-07 14:15:00 -0700 |
| commit | d47439a333a33e01ba4b6695e588fd4ded4fc611 (patch) | |
| tree | 07654f9076555ea27cd827fc2de1f1524a7ea16b /lib | |
| parent | 84e8e185cdabbe547cb2b724c2ca1014a73efcfc (diff) | |
| download | emacs-d47439a333a33e01ba4b6695e588fd4ded4fc611.tar.gz emacs-d47439a333a33e01ba4b6695e588fd4ded4fc611.zip | |
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.h | 16 | ||||
| -rw-r--r-- | lib/sigprocmask.c | 28 |
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 - " | |||
| 178 | #if @GNULIB_SIGPROCMASK@ | 178 | #if @GNULIB_SIGPROCMASK@ |
| 179 | # if !@HAVE_POSIX_SIGNALBLOCKING@ | 179 | # if !@HAVE_POSIX_SIGNALBLOCKING@ |
| 180 | 180 | ||
| 181 | # ifndef GNULIB_defined_signal_blocking | ||
| 182 | # define GNULIB_defined_signal_blocking 1 | ||
| 183 | # endif | ||
| 184 | |||
| 181 | /* Maximum signal number + 1. */ | 185 | /* Maximum signal number + 1. */ |
| 182 | # ifndef NSIG | 186 | # ifndef NSIG |
| 183 | # define NSIG 32 | 187 | # define NSIG 32 |
| @@ -303,18 +307,10 @@ _GL_CXXALIAS_SYS (signal, _gl_function_taking_int_returning_void_t, | |||
| 303 | # endif | 307 | # endif |
| 304 | _GL_CXXALIASWARN (signal); | 308 | _GL_CXXALIASWARN (signal); |
| 305 | 309 | ||
| 306 | /* Raise signal SIG. */ | ||
| 307 | # if !@HAVE_POSIX_SIGNALBLOCKING@ && GNULIB_defined_SIGPIPE | 310 | # if !@HAVE_POSIX_SIGNALBLOCKING@ && GNULIB_defined_SIGPIPE |
| 308 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 311 | /* Raise signal SIGPIPE. */ |
| 309 | # undef raise | 312 | _GL_EXTERN_C int _gl_raise_SIGPIPE (void); |
| 310 | # define raise rpl_raise | ||
| 311 | # endif | ||
| 312 | _GL_FUNCDECL_RPL (raise, int, (int sig)); | ||
| 313 | _GL_CXXALIAS_RPL (raise, int, (int sig)); | ||
| 314 | # else | ||
| 315 | _GL_CXXALIAS_SYS (raise, int, (int sig)); | ||
| 316 | # endif | 313 | # endif |
| 317 | _GL_CXXALIASWARN (raise); | ||
| 318 | 314 | ||
| 319 | #elif defined GNULIB_POSIXCHECK | 315 | #elif defined GNULIB_POSIXCHECK |
| 320 | # undef sigaddset | 316 | # 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) | |||
| 330 | } | 330 | } |
| 331 | 331 | ||
| 332 | #if GNULIB_defined_SIGPIPE | 332 | #if GNULIB_defined_SIGPIPE |
| 333 | /* Raise the signal SIG. */ | 333 | /* Raise the signal SIGPIPE. */ |
| 334 | int | 334 | int |
| 335 | rpl_raise (int sig) | 335 | _gl_raise_SIGPIPE (void) |
| 336 | # undef raise | ||
| 337 | { | 336 | { |
| 338 | switch (sig) | 337 | if (blocked_set & (1U << SIGPIPE)) |
| 338 | pending_array[SIGPIPE] = 1; | ||
| 339 | else | ||
| 339 | { | 340 | { |
| 340 | case SIGPIPE: | 341 | handler_t handler = SIGPIPE_handler; |
| 341 | if (blocked_set & (1U << sig)) | 342 | if (handler == SIG_DFL) |
| 342 | pending_array[sig] = 1; | 343 | exit (128 + SIGPIPE); |
| 343 | else | 344 | else if (handler != SIG_IGN) |
| 344 | { | 345 | (*handler) (SIGPIPE); |
| 345 | handler_t handler = SIGPIPE_handler; | ||
| 346 | if (handler == SIG_DFL) | ||
| 347 | exit (128 + SIGPIPE); | ||
| 348 | else if (handler != SIG_IGN) | ||
| 349 | (*handler) (sig); | ||
| 350 | } | ||
| 351 | return 0; | ||
| 352 | default: /* System defined signal */ | ||
| 353 | return raise (sig); | ||
| 354 | } | 346 | } |
| 355 | } | 347 | } |
| 356 | #endif | 348 | #endif |