From jehamby@hamby1.lightside.net  Sat Nov  9 15:34:37 1996
Received: from hamby1.lightside.net (hamby1.lightside.net [207.67.176.17])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id PAA28587
          for <FreeBSD-gnats-submit@freebsd.org>; Sat, 9 Nov 1996 15:34:29 -0800 (PST)
Received: (from jehamby@localhost) by hamby1.lightside.net (8.8.2/8.8.2) id NAA01017; Fri, 8 Nov 1996 13:32:49 -0800 (PST)
Message-Id: <199611082132.NAA01017@hamby1.lightside.net>
Date: Fri, 8 Nov 1996 13:32:49 -0800 (PST)
From: jehamby@lightside.com
Reply-To: jehamby@lightside.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: FOPEN_MAX != _POSIX_STREAM_MAX
X-Send-Pr-Version: 3.2

>Number:         1988
>Category:       bin
>Synopsis:       FOPEN_MAX in stdio.h != _POSIX_STREAM_MAX in limits.h
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov  9 15:40:01 PST 1996
>Closed-Date:    Tue Nov 12 05:34:14 PST 1996
>Last-Modified:  Tue Nov 12 05:34:49 PST 1996
>Originator:     Jake Hamby
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
Jet Propulsion Laboratory
>Environment:

FreeBSD-current
	

>Description:

As the description in stdio.h indicates, FOPEN_MAX should be equal to
_POSIX_STREAM_MAX in limits.h.  Instead, FOPEN_MAX=20 and _POSIX_STREAM_MAX=8.
The correct value, according to sysconf(_SC_STREAM_MAX), is 20, so
_POSIX_STREAM_MAX is wrong.

>How-To-Repeat:

N/A

>Fix:
	
Patch /usr/include/limits.h as follows:
50c50
< #define       _POSIX_STREAM_MAX       8
---
> #define       _POSIX_STREAM_MAX       20
>Release-Note:
>Audit-Trail:

From: Bruce Evans <bde@zeta.org.au>
To: FreeBSD-gnats-submit@freebsd.org, jehamby@lightside.com
Cc:  Subject: Re: bin/1988: FOPEN_MAX != _POSIX_STREAM_MAX
Date: Sun, 10 Nov 1996 20:11:31 +1100

 >As the description in stdio.h indicates, FOPEN_MAX should be equal to
 >_POSIX_STREAM_MAX in limits.h.  Instead, FOPEN_MAX=20 and _POSIX_STREAM_MAX=8.
 
 This is a bug in the description in stdio.h.  FOPEN_MAX shall be >=
 _POSIX_STREAM_MAX.
 
 >The correct value, according to sysconf(_SC_STREAM_MAX), is 20, so
 >_POSIX_STREAM_MAX is wrong.
 
 Both FOPEN_MAX and sysconf(_SC_STREAM_MAX) give the minumum number of
 streams that can be opened by the current process on the current system.
 _POSIX_STREAM_MAX gives the minimum number of streams that can be opened
 by a process on any POSIX system.  These numbers are only related by >=.
 
 >>Fix:
 >	
 >Patch /usr/include/limits.h as follows:
 >50c50
 >< #define       _POSIX_STREAM_MAX       8
 >---
 >> #define       _POSIX_STREAM_MAX       20
 
 This would break _POSIX_STREAM_MAX, since POSIX specifies that it shall
 be 8.
 
 Bruce
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Tue Nov 12 05:34:14 PST 1996 
State-Changed-Why:  
I presume Bruce's answer settles this one. 
>Unformatted:
