Article View: comp.std.c
Article #5397What's a good prototype for write(2)?
From: Stephen J. Friedl
Date: Tue, 25 Oct 1988 08:10
Date: Tue, 25 Oct 1988 08:10
20 lines
999 bytes
999 bytes
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@vsi.com {backbones}!vsi.com!friedl attmail!vsi!friedl
----Nancy Reagan on 120MB SCSI cartridge tape: "Just say *now*"----
Technical Details
Message-ID:
<902@vsi.COM>Path:
arc1-ca.pugleaf.net!utzoo!yunexus!geac!syntron!jtsv16!uunet!vsi!friedlShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!yunexus!geac!syntron!jtsv16!uunet!vsi!friedl From: friedl@vsi.COM (Stephen J. Friedl) Newsgroups: comp.std.c Subject: What's a good prototype for write(2)? Message-ID: <902@vsi.COM> Date: 25 Oct 88 08:10:30 GMT Article-I.D.: vsi.902 Distribution: comp Organization: V-Systems, Inc. -- Santa Ana, CA Lines: 20