The documentation claims that /dev/fd is emulated on
operating systems which lack support for it when
performing checks in conditional expressions. The
emulation is not complete though and does not work for
the -a, -e, -r, -w and -x tests. This results in one
test failure on Compaq Tru64 (see zsh-workers/14450).
This was fixed for AIX in zsh-workers/10073 by using
the faccessx system call but it is an AIX specific
call. What we need is something similar which will
work on other platforms - the equivalent of access but
taking an open file descriptor instead of a filename.
This could be done with a wrapper around fstat but I'm
hoping someone knows of a better way.