Commit d47439a3 authored by Paul Eggert's avatar Paul Eggert
Browse files

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.
parent 84e8e185
2011-10-07 Paul Eggert <eggert@cs.ucla.edu>
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.
* configure.in (GC_LISP_OBJECT_ALIGNMENT): Remove.
This is now done by src/alloc.c.
......
......@@ -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
......
......@@ -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
......@@ -79,9 +79,9 @@ AC_DEFUN([gl_EARLY],
# Code from module stdarg:
dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
dnl for the builtin va_copy to work. With Autoconf 2.60 or later,
dnl AC_PROG_CC_STDC arranges for this. With older Autoconf AC_PROG_CC_STDC
dnl gl_PROG_CC_C99 arranges for this. With older Autoconf gl_PROG_CC_C99
dnl shouldn't hurt, though installers are on their own to set c99 mode.
AC_REQUIRE([AC_PROG_CC_STDC])
gl_PROG_CC_C99
# Code from module stdbool:
# Code from module stddef:
# Code from module stdint:
......@@ -246,12 +246,6 @@ if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
fi
gl_SIGNAL_MODULE_INDICATOR([sigprocmask])
gl_gnulib_enabled_sigprocmask=true
if $condition; then
func_gl_gnulib_m4code_raise
fi
if $condition; then
func_gl_gnulib_m4code_f691f076f650964c9f5598c3ee487616
fi
fi
}
func_gl_gnulib_m4code_stat ()
......@@ -264,13 +258,10 @@ if test $REPLACE_STAT = 1; then
fi
gl_SYS_STAT_MODULE_INDICATOR([stat])
gl_gnulib_enabled_stat=true
if $condition; then
if test $REPLACE_STAT = 1; then
func_gl_gnulib_m4code_dosname
fi
if $condition; then
func_gl_gnulib_m4code_pathmax
fi
if $condition; then
if test $REPLACE_STAT = 1; then
func_gl_gnulib_m4code_verify
fi
fi
......@@ -305,12 +296,6 @@ gl_STDLIB_MODULE_INDICATOR([strtoull])
gl_gnulib_enabled_verify=true
fi
}
if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
func_gl_gnulib_m4code_f691f076f650964c9f5598c3ee487616
fi
if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
func_gl_gnulib_m4code_676220fa4366efa9bdbfccf11a857c07
fi
if test $REPLACE_GETOPT = 1; then
func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
fi
......
# gnulib-common.m4 serial 30
# gnulib-common.m4 serial 31
dnl Copyright (C) 2007-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,
......@@ -211,6 +211,29 @@ m4_ifndef([AS_VAR_IF],
[m4_define([AS_VAR_IF],
[AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])])
# gl_PROG_CC_C99
# Modifies the value of the shell variable CC in an attempt to make $CC
# understand ISO C99 source code.
# This is like AC_PROG_CC_C99, except that
# - AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60,
# - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC
# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00367.html>,
# but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99
# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00441.html>.
# Remaining problems:
# - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options
# to CC twice
# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00431.html>.
# - AC_PROG_CC_STDC is likely to change when C1X is an ISO standard.
AC_DEFUN([gl_PROG_CC_C99],
[
dnl Change that version number to the minimum Autoconf version that supports
dnl mixing AC_PROG_CC_C99 calls with AC_PROG_CC_STDC calls.
m4_version_prereq([9.0],
[AC_REQUIRE([AC_PROG_CC_C99])],
[AC_REQUIRE([AC_PROG_CC_STDC])])
])
# gl_PROG_AR_RANLIB
# Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler.
# The user can set the variables AR, ARFLAGS, RANLIB if he wants to override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment