Subject: lib/895: fgets() not ANSI compliant, second arg should be an int.
To: None <gnats-admin@NetBSD.ORG>
From: J.T. Conklin <jtc@chris.cygnus.com>
List: netbsd-bugs
Date: 03/22/1995 10:50:05
>Number:         895
>Category:       lib
>Synopsis:       fgets() not ANSI compliant, second arg should be an int.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 22 10:50:03 1995
>Originator:     J.T. Conklin
>Organization:
Cygnus Support
>Release:        1.0
>Environment:
System: NetBSD chris.cygnus.com 1.0 NetBSD 1.0 (TESLA) #3: Wed Mar 15 20:21:56 PST 1995 grossman@chris.cygnus.com:/usr/src/sys/arch/i386/compile/TESLA i386


>Description:
The fgets() function is defined such that the second argument is a size_t,
rather than an int as ANSI specifies.

>How-To-Repeat:
Compile this code:
	#include <stdio.h>
	extern char *fgets(char *, int, FILE *);
>Fix:
fgets needs to be fixed...  It's not as easy as it would have been before 
the DEC Alpha port arrived, since sizeof(int) != sizeof(size_t) on that
platform.

I'm planning to fix this in libc's ivory_soap branch.  This PR is only to
remind me to update stdio.h at the same time.
>Audit-Trail:
>Unformatted: