$FreeBSD$ --- configure.orig Tue Jul 16 22:31:47 2002 +++ configure Wed Jul 24 23:54:26 2002 @@ -1132,7 +1132,7 @@ mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF -#*-freebsd*) opt_bash_malloc=no ;; # they claim it's better; I disagree +*-freebsd*) opt_bash_malloc=no ;; # they claim it's better; I disagree *-openbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment *-aix*) opt_bash_malloc=no ;; # AIX machines *-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep @@ -15218,7 +15218,14 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -d /dev/fd && test -r /dev/fd/0; then - bash_cv_dev_fd=standard + # FreeBSD's devfs only provides /dev/fd/[0-2] + exec 3<&0 + if test -r /dev/fd/3; then + bash_cv_dev_fd=standard + else + bash_cv_dev_fd=absent + fi + exec 3<&- elif test -d /proc/self/fd && test -r /proc/self/fd/0; then bash_cv_dev_fd=whacky else