Date: Sun, 10 Nov 1996 01:20:02 -0800 (PST) From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs Subject: Re: bin/1988: FOPEN_MAX != _POSIX_STREAM_MAX Message-ID: <199611100920.BAA25594@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/1988; it has been noted by GNATS. 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611100920.BAA25594>