From nobody@FreeBSD.org  Thu Dec  9 12:13:59 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6904416A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  9 Dec 2004 12:13:59 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5548343D5A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  9 Dec 2004 12:13:59 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id iB9CDxjE046699
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 9 Dec 2004 12:13:59 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id iB9CDwTS046697;
	Thu, 9 Dec 2004 12:13:59 GMT
	(envelope-from nobody)
Message-Id: <200412091213.iB9CDwTS046697@www.freebsd.org>
Date: Thu, 9 Dec 2004 12:13:59 GMT
From: Alden <aspiess@software.plasmon.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: S_ISREG etc marcos missing from stat man page
X-Send-Pr-Version: www-2.3

>Number:         74889
>Category:       docs
>Synopsis:       S_ISREG etc marcos missing from stat man page
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wosch
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 09 12:20:20 GMT 2004
>Closed-Date:    Sun Dec 25 02:29:20 GMT 2005
>Last-Modified:  Sun Dec 25 02:29:20 GMT 2005
>Originator:     Alden
>Release:        Man pages on freebsd.org website
>Organization:
Plasmon
>Environment:
NA
>Description:
      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.
>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.
>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.)

>Release-Note:
>Audit-Trail:

From: Peter Pentchev <roam@ringlet.net>
To: Alden <aspiess@software.plasmon.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: docs/74889: S_ISREG etc marcos missing from stat man page
Date: Tue, 21 Dec 2004 21:25:01 +0200

 --C+ts3FVlLX8+P6JN
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 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
 
 --=20
 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 wou=
 ldn't be false.
 
 --C+ts3FVlLX8+P6JN
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.6 (FreeBSD)
 
 iD8DBQFByHiN7Ri2jRYZRVMRAvXcAKCcXkT0em16dDDFnqLGena0/WOTEACfane/
 eahAgUrUD0lkb1GsmGk+FdA=
 =7rTc
 -----END PGP SIGNATURE-----
 
 --C+ts3FVlLX8+P6JN--
Responsible-Changed-From-To: freebsd-doc->freebsd-www 
Responsible-Changed-By: roam 
Responsible-Changed-When: Tue Dec 21 19:42:39 GMT 2004 
Responsible-Changed-Why:  
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 :) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=74889 
Responsible-Changed-From-To: freebsd-www->freebsd-doc 
Responsible-Changed-By: keramida 
Responsible-Changed-When: Mon Jan 24 13:58:49 GMT 2005 
Responsible-Changed-Why:  
Canonicalize assignment. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=74889 
Responsible-Changed-From-To: freebsd-doc->wosch 
Responsible-Changed-By: keramida 
Responsible-Changed-When: Mon Jan 24 14:03:42 GMT 2005 
Responsible-Changed-Why:  
Wolfram is the best person to handle this, AFAICT. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=74889 
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Sun Dec 25 02:24:04 UTC 2005 
State-Changed-Why:  
These seem to be there at the moment. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=74889 
>Unformatted:
