Deleted Added
full compact
29c29,30
< AC_MSG_ERROR(cannot check dup2 if cross compiling))
---
> [AC_MSG_ERROR(cannot check dup2 if cross compiling -- defaulting to no)
> bash_cv_dup2_broken=no])
131c132,133
< AC_MSG_ERROR(cannot check pgrp synchronization if cross compiling))
---
> [AC_MSG_ERROR(cannot check pgrp synchronization if cross compiling -- defaulting to no)
> bash_cv_pgrp_pipe=no])
172c174,175
< [AC_TRY_COMPILE([#include <sys/types.h>],
---
> [AC_TRY_COMPILE([#include <sys/types.h>
> #include <sys/resource.h>],
187c190,191
< AC_MSG_ERROR(cannot check quad_t if cross compiling))])
---
> [AC_MSG_ERROR(cannot check quad_t if cross compiling -- defaulting to long)
> bash_cv_type_rlimit=long])])
199a204,220
> AC_DEFUN(BASH_DECL_UNDER_SYS_SIGLIST,
> [AC_MSG_CHECKING([for _sys_siglist in signal.h or unistd.h])
> AC_CACHE_VAL(bash_cv_decl_under_sys_siglist,
> [AC_TRY_COMPILE([
> #include <sys/types.h>
> #include <signal.h>
> #ifdef HAVE_UNISTD_H
> #include <unistd.h>
> #endif], [ char *msg = _sys_siglist[2]; ],
> bash_cv_decl_under_sys_siglist=yes, bash_cv_decl_under_sys_siglist=no,
> [AC_MSG_ERROR(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)])])dnl
> AC_MSG_RESULT($bash_cv_decl_under_sys_siglist)
> if test $bash_cv_decl_under_sys_siglist = yes; then
> AC_DEFINE(UNDER_SYS_SIGLIST_DECLARED)
> fi
> ])
>
201c222,223
< [AC_MSG_CHECKING([for _sys_siglist in system C library])
---
> [AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST])
> AC_MSG_CHECKING([for _sys_siglist in system C library])
209c231
< #ifndef _sys_siglist
---
> #ifndef UNDER_SYS_SIGLIST_DECLARED
214c236
< char *msg = _sys_siglist[2];
---
> char *msg = (char *)_sys_siglist[2];
217,218c239,241
< bash_cv_under_sys_siglist=yes, bash_cv_under_sys_siglist=no,
< AC_MSG_ERROR(cannot check for _sys_siglist[] if cross compiling))])dnl
---
> bash_cv_under_sys_siglist=yes, bash_cv_under_sys_siglist=no,
> [AC_MSG_ERROR(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)
> bash_cv_under_sys_siglist=no])])
243,244c266,268
< bash_cv_sys_siglist=yes, bash_cv_sys_siglist=no,
< AC_MSG_ERROR(cannot check for sys_siglist if cross compiling))])dnl
---
> bash_cv_sys_siglist=yes, bash_cv_sys_siglist=no,
> [AC_MSG_ERROR(cannot check for sys_siglist if cross compiling -- defaulting to no)
> bash_cv_sys_siglist=no])])
304c328,330
< AC_MSG_ERROR(cannot check opendir if cross compiling))])
---
> [AC_MSG_ERROR(cannot check opendir if cross compiling -- defaulting to no)
> bash_cv_opendir_not_robust=no]
> )])
330a357,464
> AC_DEFUN(BASH_TYPE_INT32_T,
> [
> if test "X$bash_cv_type_int32_t" = "X"; then
> _bash_needmsg=yes
> else
> AC_MSG_CHECKING(which builtin C type is 32 bits wide)
> _bash_needmsg=
> fi
> AC_CACHE_VAL(bash_cv_type_int32_t,
> [AC_TRY_RUN([
> main()
> {
> #if SIZEOF_INT == 4
> exit (0);
> #else
> # if SIZEOF_LONG == 4
> exit (1);
> # else
> # error cannot find 32 bit type...
> # endif
> #endif
> }], bash_cv_type_int32_t=int, bash_cv_type_int32_t=long,
> [AC_MSG_ERROR(cannot check type sizes if cross-compiling -- defaulting to int)
> bash_cv_type_int32_t=int]
> )])
> if test "X$_bash_needmsg" = "Xyes"; then
> AC_MSG_CHECKING(which builtin C type is 32 bits wide)
> fi
> AC_MSG_RESULT($bash_cv_type_int32_t);
> if test "$bash_cv_type_int32_t" = "int"; then
> AC_DEFINE(int32_t, int)
> else
> AC_DEFINE(int32_t, long)
> fi
> ])
>
> AC_DEFUN(BASH_TYPE_U_INT32_T,
> [
> if test "X$bash_cv_type_u_int32_t" = "X"; then
> _bash_needmsg=yes
> else
> AC_MSG_CHECKING(which unsigned builtin C type is 32 bits wide)
> _bash_needmsg=
> fi
> AC_CACHE_VAL(bash_cv_type_u_int32_t,
> [AC_TRY_RUN([
> main()
> {
> #if SIZEOF_INT == 4
> exit (0);
> #else
> # if SIZEOF_LONG == 4
> exit (1);
> # else
> # error cannot find 32 bit type...
> # endif
> #endif
> }], bash_cv_type_u_int32_t=int, bash_cv_type_u_int32_t=long,
> [AC_MSG_ERROR(cannot check type sizes if cross-compiling -- defaulting to int)
> bash_cv_type_u_int32_t=int]
> )])
> if test "X$_bash_needmsg" = "Xyes"; then
> AC_MSG_CHECKING(which unsigned builtin C type is 32 bits wide)
> fi
> AC_MSG_RESULT($bash_cv_type_u_int32_t);
> if test "$bash_cv_type_u_int32_t" = "int"; then
> AC_DEFINE(u_int32_t, unsigned int)
> else
> AC_DEFINE(u_int32_t, unsigned long)
> fi
> ])
>
> AC_DEFUN(BASH_TYPE_PTRDIFF_T,
> [
> if test "X$bash_cv_type_ptrdiff_t" = "X"; then
> _bash_needmsg=yes
> else
> AC_MSG_CHECKING(which builtin C type is correct for ptrdiff_t)
> _bash_needmsg=
> fi
> AC_CACHE_VAL(bash_cv_type_ptrdiff_t,
> [AC_TRY_RUN([
> main()
> {
> #if SIZEOF_CHAR_P == SIZEOF_INT
> exit (0);
> #else
> # if SIZEOF_CHAR_P == SIZEOF_LONG
> exit (1);
> # else
> # error cannot find type for pointer arithmetic...
> # endif
> #endif
> }], bash_cv_type_ptrdiff_t=int, bash_cv_type_ptrdiff_t=long,
> [AC_MSG_ERROR(cannot check type sizes if cross-compiling -- defaulting to int)
> bash_cv_type_ptrdiff_t=int]
> )])
> if test "X$_bash_needmsg" = "Xyes"; then
> AC_MSG_CHECKING(which builtin C type is correct for ptrdiff_t)
> fi
> AC_MSG_RESULT($bash_cv_type_ptrdiff_t);
> if test "$bash_cv_type_ptrdiff_t" = "int"; then
> AC_DEFINE(ptrdiff_t, int)
> else
> AC_DEFINE(ptrdiff_t, long)
> fi
> ])
>
332c466
< [AC_MSG_CHECKING([for the existance of strsignal])
---
> [AC_MSG_CHECKING([for the existence of strsignal])
351c485
< ],[ lstat("",(struct stat *)0); ],
---
> ],[ lstat(".",(struct stat *)0); ],
417c551,553
< AC_MSG_ERROR(cannot check getenv redefinition if cross compiling))])
---
> [AC_MSG_ERROR(cannot check getenv redefinition if cross compiling -- defaulting to yes)
> bash_cv_getenv_redef=yes]
> )])
437c573
< pf = printf;
---
> pf = (_bashfunc) printf;
440,441c576,579
< ],bash_cv_printf_declared=yes, bash_cv_printf_declared=no,
< AC_MSG_ERROR(cannot check printf declaration if cross compiling))])
---
> ], bash_cv_printf_declared=yes, bash_cv_printf_declared=no,
> [AC_MSG_ERROR(cannot check printf declaration if cross compiling -- defaulting to yes)
> bash_cv_printf_declared=yes]
> )])
457,458c595,598
< ],bash_cv_ulimit_maxfds=yes, bash_cv_ulimit_maxfds=no,
< AC_MSG_ERROR(cannot check ulimit if cross compiling))])
---
> ], bash_cv_ulimit_maxfds=yes, bash_cv_ulimit_maxfds=no,
> [AC_MSG_ERROR(cannot check ulimit if cross compiling -- defaulting to no)
> bash_cv_ulimit_maxfds=no]
> )])
482c622
< if test $bash_cv_termcap_lib = gnutermcap; then
---
> if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
553c693,695
< AC_MSG_ERROR(cannot check whether getcwd calls popen if cross compiling))])
---
> [AC_MSG_ERROR(cannot check whether getcwd calls popen if cross compiling -- defaulting to no)
> bash_cv_getcwd_calls_popen=no]
> )])
675c817,819
< AC_MSG_ERROR(cannot check signal handling if cross compiling))])
---
> [AC_MSG_ERROR(cannot check signal handling if cross compiling -- defaulting to no)
> bash_cv_must_reinstall_sighandlers=no]
> )])
741,743c885,888
< }],bash_cv_job_control_missing=present, bash_cv_job_control_missing=missing,
< AC_MSG_ERROR(cannot check job control if cross-compiling))
< ])
---
> }], bash_cv_job_control_missing=present, bash_cv_job_control_missing=missing,
> [AC_MSG_ERROR(cannot check job control if cross-compiling -- defaulting to missing)
> bash_cv_job_control_missing=missing]
> )])
785,787c930,933
< }],bash_cv_sys_named_pipes=present, bash_cv_sys_named_pipes=missing,
< AC_MSG_ERROR(cannot check for named pipes if cross-compiling))
< ])
---
> }], bash_cv_sys_named_pipes=present, bash_cv_sys_named_pipes=missing,
> [AC_MSG_ERROR(cannot check for named pipes if cross-compiling -- defaulting to missing)
> bash_cv_sys_named_pipes=missing]
> )])
835,837c981,984
< }],bash_cv_func_sigsetjmp=present, bash_cv_func_sigsetjmp=missing,
< AC_MSG_ERROR(cannot check for sigsetjmp/siglongjmp if cross-compiling))
< ])
---
> }], bash_cv_func_sigsetjmp=present, bash_cv_func_sigsetjmp=missing,
> [AC_MSG_ERROR(cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing)
> bash_cv_func_sigsetjmp=missing]
> )])
857,858c1004,1005
< [AC_MSG_CHECKING(for struct winsize in sys/ioctl.h)
< AC_CACHE_VAL(bash_cv_struct_winsize_in_ioctl,
---
> [AC_MSG_CHECKING(for struct winsize in sys/ioctl.h and termios.h)
> AC_CACHE_VAL(bash_cv_struct_winsize_header,
861,864c1008,1020
< bash_cv_struct_winsize_in_ioctl=yes,bash_cv_struct_winsize_in_ioctl=no)])
< AC_MSG_RESULT($bash_cv_struct_winsize_in_ioctl)
< if test $bash_cv_struct_winsize_in_ioctl = yes; then
< AC_DEFINE(STRUCT_WINSIZE_IN_SYS_IOCTL)
---
> bash_cv_struct_winsize_header=ioctl_h,
> [AC_TRY_COMPILE([#include <sys/types.h>
> #include <termios.h>], [struct winsize x;],
> bash_cv_struct_winsize_header=termios_h, bash_cv_struct_winsize_header=other)
> ])])
> if test $bash_cv_struct_winsize_header = ioctl_h; then
> AC_MSG_RESULT(sys/ioctl.h)
> AC_DEFINE(STRUCT_WINSIZE_IN_SYS_IOCTL)
> elif test $bash_cv_struct_winsize_header = termios_h; then
> AC_MSG_RESULT(termios.h)
> AC_DEFINE(STRUCT_WINSIZE_IN_TERMIOS)
> else
> AC_MSG_RESULT(not found)
914c1070,1073
< extern struct passwd *getpwent();], [struct passwd *z; z = getpwent();],
---
> extern struct passwd *getpwent();
> extern struct passwd *getpwuid();
> extern struct passwd *getpwnam();],
> [struct passwd *z; z = getpwent(); z = getpwuid(0); z = getpwnam("root");],
997,998d1155
< elif test -d /usr/spool/mail; then
< bash_cv_mail_dir=/usr/spool/mail
1000a1158,1159
> elif test -d /usr/spool/mail; then
> bash_cv_mail_dir=/usr/spool/mail
1033,1039c1192,1198
< [AC_TRY_COMPILE([
< #include <sys/types.h>
< #define _KERNEL
< #include <sys/resource.h>
< #undef _KERNEL
< ],
< [
---
> [AC_TRY_COMPILE([
> #include <sys/types.h>
> #define _KERNEL
> #include <sys/resource.h>
> #undef _KERNEL
> ],
> [
1042c1201
< ], bash_cv_kernel_rlimit=yes, bash_cv_kernel_rlimit=no)]
---
> ], bash_cv_kernel_rlimit=yes, bash_cv_kernel_rlimit=no)]
1090,1091c1249,1251
< AC_MSG_ERROR(cannot check strcoll if cross compiling))
< ])
---
> [AC_MSG_ERROR(cannot check strcoll if cross compiling -- defaulting to no)
> bash_cv_func_strcoll_broken=no]
> )])
1096a1257,1344
>
> dnl
> dnl If available, use support for large files unless the user specified
> dnl one of the CPPFLAGS, LDFLAGS, or LIBS variables (<eggert@twinsun.com>
> dnl via GNU patch 2.5)
> dnl
> AC_DEFUN(BASH_LARGE_FILE_SUPPORT,
> [AC_MSG_CHECKING(whether large file support needs explicit enabling)
> ac_getconfs=''
> ac_result=yes
> ac_set=''
> ac_shellvars='CPPFLAGS LDFLAGS LIBS'
> for ac_shellvar in $ac_shellvars; do
> case $ac_shellvar in
> CPPFLAGS) ac_lfsvar=LFS_CFLAGS ac_lfs64var=LFS64_CFLAGS ;;
> *) ac_lfsvar=LFS_$ac_shellvar ac_lfs64var=LFS64_$ac_shellvar ;;
> esac
> eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar
> (getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; }
> ac_getconf=`getconf $ac_lfsvar`
> ac_getconf64=`getconf $ac_lfs64var`
> ac_getconfs=$ac_getconfs$ac_getconf\ $ac_getconf64
> eval ac_test_$ac_shellvar="\$ac_getconf\ \$ac_getconf64"
> done
> case "$ac_result$ac_getconfs" in
> yes) ac_result=no ;;
> esac
> case "$ac_result$ac_set" in
> yes?*) ac_result="yes, but $ac_set is already set, so use its settings"
> esac
> AC_MSG_RESULT($ac_result)
> case $ac_result in
> yes)
> for ac_shellvar in $ac_shellvars; do
> eval $ac_shellvar=\$ac_test_$ac_shellvar
> done ;;
> esac
> ])
>
> dnl
> dnl AC_SYS_RESTARTABLE_SYSCALLS tests only for restarted system calls
> dnl after a signal handler has been installed with signal(). Since
> dnl Bash uses sigaction() if it is available, we need to check whether
> dnl or not a signal handler installed with sigaction and SA_RESTART
> 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,
> 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. */
> #include <sys/types.h>
> #include <signal.h>
> static int caught = 0;
> void ucatch (isig) int isig; { caught = 1; }
> main ()
> {
> #if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
> exit (1);
> #else
> struct sigaction act, oact;
> int i, status;
>
> act.sa_handler = ucatch;
> /* Might want to add SA_RESTART here, but bash's set_signal_handler
> does not. */
> act.sa_flags = 0;
> sigemptyset(&act.sa_mask);
> sigemptyset(&oact.sa_mask);
> i = fork ();
> /* A possible race condition here, but in practice it never happens. */
> if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); }
> sigaction(SIGINT, &act, &oact);
> status = wait(&i);
> if (status == -1) wait(&i);
> exit (status == -1);
> #endif
> }
> ], bash_cv_sys_restartable_syscalls=yes, bash_cv_sys_restartable_syscalls=no,
> AC_MSG_ERROR(cannot check restartable syscalls if cross compiling))
> ])
> if test $bash_cv_sys_restartable_syscalls = yes; then
> AC_DEFINE(HAVE_RESTARTABLE_SYSCALLS)
> fi
> ])