Article View: comp.sys.sun
Article #1399Why is sprintf ifdef-ed out of <stdio.h>?
From: Root Boy Jim
Date: Wed, 23 Aug 1989 21:37
Date: Wed, 23 Aug 1989 21:37
25 lines
1468 bytes
1468 bytes
? From: Chris Torek <chris@mimsy.umd.edu> ? bob@omni.com (Bob Weissman) asks why there is an `#ifdef vax' around the ? `char *sprintf()' declaration in stdio.h. ? The reason is that sprintf() is supposed to return an int value, namely ? the number of characters printed, but it was `too painful' to fix this for ? 4.2 and 4.3 BSD, so it was left *wrong* in the BSD VAX systems and made ? correct in SunOS. Made correct in which version? I ran a test prog under 3.5 and it returns the first arg. My Version 4 (probably 4.0) manual sez that it still returns char *. I have no access to a running 4.x system. ? Why the `#ifdef vax' ... `#endif' lines were never removed from the Sun ? stdio.h I cannot answer. Note that sprintf() has been fixed in ? 4.3BSD-tahoe. Perhaps your local SunOS/BSD hybrid has the Tahoe sprintf? ? In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) ? Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris Root Boy Jim Have GNU, Will Travel.
Technical Details
Message-ID:
<1351@brazos.Rice.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-requestShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: rbj@dsys.ncsl.nist.gov (Root Boy Jim) Newsgroups: comp.sys.sun Subject: Why is sprintf ifdef-ed out of <stdio.h>? Message-ID: <1351@brazos.Rice.edu> Date: 23 Aug 89 21:37:25 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 25 Keywords: SunOS Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 113, message 12 of 13