From: Chet Ramey <chet@odin.INS.CWRU.Edu>
To: byron@netapp.com
Cc: rc@hawkwind.utcs.toronto.edu
Subject: Re: autoconfig
Date: Wed, 2 Apr 1997 11:32:03 -0500 [thread overview]
Message-ID: <9704021632.AA15443.SM@odin.INS.CWRU.Edu> (raw)
In-Reply-To: Message from byron@netapp.com of Tue, 1 Apr 1997 14:28:39 -0500 (id <9704011928.AA27920@netapp.com>)
> 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
next prev parent reply other threads:[~1997-04-02 23:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-04-01 19:28 autoconfig Byron Rakitzis
1997-04-02 1:11 ` autoconfig Greg A. Woods
1997-04-02 8:32 ` autoconfig Stefan Dalibor
1997-04-02 2:20 ` autoconfig Scott Schwartz
1997-04-02 15:10 ` autoconfig Mark K. Gardner
1997-04-02 2:59 ` autoconfig David Luyer
1997-04-02 16:32 ` Chet Ramey [this message]
1997-04-01 23:52 autoconfig Alan Watson
1997-04-02 9:38 autoconfig Bengt Kleberg
1997-04-03 0:15 ` autoconfig Scott Merrilees
1997-04-03 3:14 ` autoconfig Warren Toomey
1997-04-02 17:30 autoconfig Rich Salz
1997-04-02 20:24 autoconfig Byron Rakitzis
1997-04-05 18:38 autoconfig Bengt Kleberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9704021632.AA15443.SM@odin.INS.CWRU.Edu \
--to=chet@odin.ins.cwru.edu \
--cc=byron@netapp.com \
--cc=chet@po.CWRU.Edu \
--cc=rc@hawkwind.utcs.toronto.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).