From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from odin.INS.CWRU.Edu ([129.22.8.102]) by hawkwind.utcs.utoronto.ca with SMTP id <24657>; Wed, 2 Apr 1997 18:58:23 -0500 Received: (chet@localhost) by odin.INS.CWRU.Edu (8.7.6+cwru/CWRU-2.3-ins) id LAA17441; Wed, 2 Apr 1997 11:42:51 -0500 (EST) (from chet) Date: Wed, 2 Apr 1997 11:32:03 -0500 From: Chet Ramey To: byron@netapp.com Subject: Re: autoconfig Cc: rc@hawkwind.utcs.toronto.edu Reply-To: chet@po.CWRU.Edu In-Reply-To: Message from byron@netapp.com of Tue, 1 Apr 1997 14:28:39 -0500 (id <9704011928.AA27920@netapp.com>) Message-ID: <9704021632.AA15443.SM@odin.INS.CWRU.Edu> Read-Receipt-To: chet@po.CWRU.Edu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > I am sorely tempted to remove named pipe support. It never worked > properly. So something is needed to auto-sense the particular > encoding for /dev/fd (systems encode this differently), which I > doubt is supplied by GNU autoconf. Here is the test from bash's aclocal.m4 (the `local extensions' to autoconf). It handles /dev/fd and Linux's whacky /proc/self/fd, and it is easy enough to add more directory prefixes to the check. The bash code then checks whether a file in /dev/fd is specified and constructs the pathname to use with DEV_FD_PREFIX. The bash `test' code and the code that builds filenames for use in process substitution both use DEV_FD_PREFIX when HAVE_DEV_FD is defined. AC_DEFUN(BASH_CHECK_DEV_FD, [AC_MSG_CHECKING(whether /dev/fd is available) AC_CACHE_VAL(bash_cv_dev_fd, [if test -d /dev/fd && test -r /dev/fd/0; then bash_cv_dev_fd=standard elif test -d /proc/self/fd && test -r /proc/self/fd/0; then bash_cv_dev_fd=whacky else bash_cv_dev_fd=absent fi ]) AC_MSG_RESULT($bash_cv_dev_fd) if test $bash_cv_dev_fd = "standard"; then AC_DEFINE(HAVE_DEV_FD) AC_DEFINE(DEV_FD_PREFIX, "/dev/fd/") elif test $bash_cv_dev_fd = "whacky"; then AC_DEFINE(HAVE_DEV_FD) AC_DEFINE(DEV_FD_PREFIX, "/proc/self/fd/") fi ]) -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Chet Ramey, Case Western Reserve University Internet: chet@po.CWRU.Edu