Subject: lib/2750: [dM] funopen(3) refs seek(2)
To: None <gnats-bugs@gnats.netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: netbsd-bugs
Date: 09/13/1996 07:04:26
>Number:         2750
>Category:       lib
>Synopsis:       [dM] funopen(3) refs seek(2)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 13 04:20:02 1996
>Last-Modified:
>Originator:     der Mouse
>Organization:
	Dis-
>Release:        1.2_BETA
>Environment:
	Any (noticed on Sun-3/260)
>Description:
	funopen(3) says, in part,

     The calling conventions of readfn, writefn, seekfn and closefn must match
     those, respectively, of read(2),  write(2),  seek(2),  and close(2) with

	Except there is no seek(2) call, as far as I can tell.
	"man 2 seek" shows the lseek(2) manpage (why?!), but lseek uses
	off_t, not the fpos_t shown in the prototype for the seekfn
	argument.
>How-To-Repeat:
	% man 3 funopen
	% man 2 seek
>Fix:
	Either the code (src/lib/libc/stdio/funopen.c) needs to be
	changed to use off_t instead of fpos_t, with a corresponding
	change at the top of the manpage, and the reference changed to
	indicate lseek(2), or the description needs to be rewritten to
	indicate that seekfn is like lseek except for the type of the
	second argument and return value (and the cookie, of course).

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     01 EE 31 F6 BB 0C 34 36  00 F3 7C 5A C1 A0 67 1D
>Audit-Trail:
>Unformatted: