-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Nick Stoughton wrote:
> On Fri, 2008-06-20 at 16:49 +0100, Stephane Chazelas wrote:
>> Shouldn't it be something that should be mentionned in the
>> standard, i.e. that errno _may_ be set to ERANGE, but that a
>> conformant application can't rely on it to check for overflow?
>
> The standard does not mention ERANGE as one of the defined errors for
> scanf, just EILSEQ, ENOMEM and EINVAL. Thus an ERANGE error falls into
> the category of "Implementations may generate error numbers listed here
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> under circumstances other than those described, if and only if all those
> error conditions can always be treated identically to the error
> conditions as described in this volume of POSIX.1".
I'm failing to see how ERANGE manages to be an error number "listed
here". The allowance is for unspecified conditions, not unspecified
error codes.
- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer,
and GNU Wget Project Maintainer.
http://micah.cowan.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIX9fa7M8hyUobTrERApGWAJ0bGAi+LE6vMNizqBgNQLqRAY7V+gCfV47S
wFGxEdKOzuiVss5ng6uXJOU=
=5tkJ
-----END PGP SIGNATURE-----
|