1. catopen("", 0) should set errno to ENOENT;
2. Document EFTYPE. POSIX says nothing about how to report a corrupt
catalog. NetBSD and OpenBSD do nothing (errno == 0), while we set
EFTYPE. Document it.
3. Fix errno under a rare condition (fstat(2) fails after open(2)).
Further points out more EFTYPE errors.
The exact explanation of EFTYPE here should be "The file designated by
the named catalog is not a regular file or a symbolic link pointing to
a regular file, or its data format is not POSIX NLS catalog.", which
confirms with the general meaning of EFTYPE "Inappropriate file type
or format. The file was the wrong type for the operation, or a data
file had the wrong format.". Please help improve the wording in
catopen.3 is you find that the current version is not enough.
Zhihao Yuan, nickname lichray
The best way to predict the future is to invent it.
4BSD -- http://4bsd.biz/
batch change of PRs untouched in 2018 marked "in progress" back to open.
Now catopen("", 0) sets errno to ENOENT.