From owner-freebsd-bugs Sun Nov 10 01:20:05 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id BAA25601 for bugs-outgoing; Sun, 10 Nov 1996 01:20:05 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id BAA25594; Sun, 10 Nov 1996 01:20:02 -0800 (PST) Date: Sun, 10 Nov 1996 01:20:02 -0800 (PST) Message-Id: <199611100920.BAA25594@freefall.freebsd.org> To: freebsd-bugs Cc: From: Bruce Evans Subject: Re: bin/1988: FOPEN_MAX != _POSIX_STREAM_MAX Reply-To: Bruce Evans Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR bin/1988; it has been noted by GNATS. From: Bruce Evans 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