What's a good prototype for write(2)?

Stephen J. Friedl friedl at vsi.COM
Tue Oct 25 18:10:30 AEST 1988


What is a proper prototype for write(2)?  It would have to
be one of:

	extern int write(int, const void *, unsigned);
or
	extern int write(int, const void *, int);

both of which are wrong in some respect.  I've seen
the first used, but how does this deal with a successful
write very near the maximum unsigned value?  The return
would then appear to be negative.

     Steve

P.S. - I know that write(2) is not specified in the dpANS.

-- 
Steve Friedl    V-Systems, Inc.  +1 714 545 6442    3B2-kind-of-guy
friedl at vsi.com     {backbones}!vsi.com!friedl    attmail!vsi!friedl
----Nancy Reagan on 120MB SCSI cartridge tape: "Just say *now*"----



More information about the Comp.std.c mailing list