| Summary: | S_ISREG etc marcos missing from stat man page | ||
|---|---|---|---|
| Product: | Documentation | Reporter: | Alden <aspiess> |
| Component: | Books & Articles | Assignee: | Wolfram Schneider <wosch> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
On Thu, Dec 09, 2004 at 12:13:59PM +0000, Alden wrote: > Using the man page interface on www.freebsd.org, search for lstat. > Look in all sections. I've tried FreeBSD 6.0-current and FreeBSD > 4.8-RELEASE (which is the BSD version I'm using). This is funny... On November 15th, about three weeks before you filed this PR, Yar Tikhiy committed revision 1.37 of the stat(2) manual page, which added just those macros (or at least their descriptions; the macros are indeed very much there for us all to use :) Then, on November 25th, he merged the change into the RELENG_5 branch. The funny part is that those definitions haven't shown up yet in the 6.0-CURRENT section of the website. I'm CC'ing the www@ team, since somebody over there would probably know just how does man.cgi do its thing - or rather, who is in charge of updating the bsddoc/man directories on the FreeBSD web server. G'luck, Peter -- Peter Pentchev roam@ringlet.net roam@cnsys.bg roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 If the meanings of 'true' and 'false' were switched, then this sentence wouldn't be false. Responsible Changed From-To: freebsd-doc->freebsd-www Oops, it seems I didn't really CC www@ on this one. Well, let's just turn the PR over to them, to see if somebody knows anything about updating nwww's manpages to reflect the recent changes to -CURRENT :) Responsible Changed From-To: freebsd-www->freebsd-doc Canonicalize assignment. Responsible Changed From-To: freebsd-doc->wosch Wolfram is the best person to handle this, AFAICT. State Changed From-To: open->closed These seem to be there at the moment. |
The section 2 man page for stat, lstat, etc does not define the POSIX macros to define file mode - i.e. S_ISLNK, S_ISREG, etc. The macros do not appear to have their own man page. As the macros exist only for testing the st_mode field in the stat buffer the stat man page is the obvious place to define them. I know the macros exist because I'm using them. Fix: Include the standard definition for the macros. Text from the linux man page for stat below, as an example: The following POSIX macros are defined to check the file type: S_ISREG(m) is it a regular file? S_ISDIR(m) directory? S_ISCHR(m) character device? S_ISBLK(m) block device? S_ISFIFO(m) fifo? S_ISLNK(m) symbolic link? (Not in POSIX.1-1996.) S_ISSOCK(m) socket? (Not in POSIX.1-1996.) How-To-Repeat: Using the man page interface on www.freebsd.org, search for lstat. Look in all sections. I've tried FreeBSD 6.0-current and FreeBSD 4.8-RELEASE (which is the BSD version I'm using). The S_IFLNK flag is defined, but not the macro to test it. Same for the other file modes.