diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 2001-04-11 02:33:07 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 2001-04-11 02:33:07 +0000 |
commit | fb21882ffc08f0f36202a6492bc4628bd832ac18 (patch) | |
tree | 2a3a3b5b7ce03cb28810b3212cb44a3a1698ca44 /contrib/libreadline/aclocal.m4 | |
parent | 152b41126121f69480691bc73bf0e6ea3ae404c7 (diff) | |
download | src-fb21882ffc08f0f36202a6492bc4628bd832ac18.tar.gz src-fb21882ffc08f0f36202a6492bc4628bd832ac18.zip |
v4.2 initial import
Notes
Notes:
svn path=/vendor/libreadline/dist/; revision=75406
Diffstat (limited to 'contrib/libreadline/aclocal.m4')
-rw-r--r-- | contrib/libreadline/aclocal.m4 | 58 |
1 files changed, 47 insertions, 11 deletions
diff --git a/contrib/libreadline/aclocal.m4 b/contrib/libreadline/aclocal.m4 index f8f5b74b72f0..8c977c16db94 100644 --- a/contrib/libreadline/aclocal.m4 +++ b/contrib/libreadline/aclocal.m4 @@ -1065,17 +1065,19 @@ fi ]) AC_DEFUN(BASH_CHECK_GETPW_FUNCS, -[AC_MSG_CHECKING(whether programs are able to redeclare getpw functions) -AC_CACHE_VAL(bash_cv_can_redecl_getpw, -[AC_TRY_COMPILE([#include <sys/types.h> +[AC_MSG_CHECKING(whether getpw functions are declared in pwd.h) +AC_CACHE_VAL(bash_cv_getpw_declared, +[AC_EGREP_CPP(getpwuid, +[ +#include <sys/types.h> +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif #include <pwd.h> -extern struct passwd *getpwent(); -extern struct passwd *getpwuid(); -extern struct passwd *getpwnam();], -[struct passwd *z; z = getpwent(); z = getpwuid(0); z = getpwnam("root");], - bash_cv_can_redecl_getpw=yes,bash_cv_can_redecl_getpw=no)]) -AC_MSG_RESULT($bash_cv_can_redecl_getpw) -if test $bash_cv_can_redecl_getpw = no; then +], +bash_cv_getpw_declared=yes,bash_cv_getpw_declared=no)]) +AC_MSG_RESULT($bash_cv_getpw_declared) +if test $bash_cv_getpw_declared = yes; then AC_DEFINE(HAVE_GETPW_DECLS) fi ]) @@ -1350,12 +1352,15 @@ dnl causes system calls to be restarted after the signal is caught dnl AC_DEFUN(BASH_SYS_RESTARTABLE_SYSCALLS, [AC_REQUIRE([BASH_SIGNAL_CHECK]) -AC_CACHE_CHECK(for restartable system calls with posix sigaction, +AC_CACHE_CHECK(whether posix sigaction restarts system calls by default, bash_cv_sys_restartable_syscalls, [AC_TRY_RUN( [/* Exit 0 (true) if wait returns something other than -1, i.e. the pid of the child, which means that wait was restarted after getting the signal. */ +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif #include <sys/types.h> #include <signal.h> static int caught = 0; @@ -1425,3 +1430,34 @@ if test $bash_cv_struct_timeval = yes; then AC_DEFINE(HAVE_TIMEVAL) fi ]) + +AC_DEFUN(BASH_CHECK_RTSIGS, +[AC_MSG_CHECKING(for unusable real-time signals due to large values) +AC_CACHE_VAL(bash_cv_unusable_rtsigs, +[AC_TRY_RUN([ +#include <sys/types.h> +#include <signal.h> + +#ifndef NSIG +# define NSIG 64 +#endif + +main () +{ + int n_sigs = 2 * NSIG; +#ifdef SIGRTMIN + int rtmin = SIGRTMIN; +#else + int rtmin = 0; +#endif + + exit(rtmin < n_sigs); +}], bash_cv_unusable_rtsigs=yes, bash_cv_unusable_rtsigs=no, + [AC_MSG_WARN(cannot check real-time signals if cross compiling -- defaulting to yes) + bash_cv_unusable_rtsigs=yes] +)]) +AC_MSG_RESULT($bash_cv_unusable_rtsigs) +if test $bash_cv_unusable_rtsigs = yes; then +AC_DEFINE(UNUSABLE_RT_SIGNALS) +fi +]) |