Article View: gnu.g++.lib.bug
Article #37Re: libg++ and strtol
From: Jason Merrill
Date: Tue, 07 Apr 1992 23:18
Date: Tue, 07 Apr 1992 23:18
23 lines
1198 bytes
1198 bytes
bothner@cygnus.com writes: >strtol is required by ANSI. 4.2bsd never claimed to be ANSI >>The Sequent version of Unix (bsd 4.3ish) does nor provide it Actually, Dynix is more 4.2ish than 4.3ish. As far as I know, it supports all 4.2isms, but not all 4.3isms (such as, say, strtol). >>I am not using it so why is it required. >Becase it is used for I/O. Why can't you use the stroul function included with iostream in its place? strtoul checks for unary minus and all, so it should return the correct value. The only problem spot would be, I suppose, in overflow conditions, when strtoul returns ULONG_MAX, which evaluates to -1 in a 2's complement representation. Jason Merrill jason@jarthur.claremont.edu
Technical Details
Message-ID:
<1992Apr7.231846.4355@muddcs.claremont.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!jarthur.claremont.edu!jasonReferences:
<26034.9204060305@cch.coventry.ac.uk>Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.lib.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!jarthur.claremont.edu!jason From: jason@jarthur.claremont.edu (Jason Merrill) Subject: Re: libg++ and strtol Message-ID: <1992Apr7.231846.4355@muddcs.claremont.edu> Sender: gnulists@ai.mit.edu Organization: Harvey Mudd College References: <26034.9204060305@cch.coventry.ac.uk> Distribution: gnu Date: Tue, 7 Apr 1992 23:18:46 GMT Approved: bug-lib-g++@prep.ai.mit.edu Lines: 24