tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] strto*l() nonstandard behaviour fix



On Tue, Aug 19, 2008 at 5:57 PM, der Mouse 
<mouse%rodents-montreal.org@localhost> wrote:
>> strto*l() functions should operate with bases from 2 till 36 and 0 as
>> well for special cases.  [...]
>>       /*
>> +      * Check base range. We only accept bases from 2 to 36 as
>> +      * described in ISO/IEC 9899:1999 7.20.1.4.
>> +      */
>> +     if (base < 2 || base > 36) {
>> +             errno = EINVAL;
>> +             return 0;
>> +     }
>> +
>> +     /*
>
> Is there any requirement to reject other base values, or does the spec
> merely require support for 2-36 and 0?

Did you read corresponding section in the standard?
Especially clause 3 and 5.


-- 
With Best Regards,
Andy Shevchenko


Home | Main Index | Thread Index | Old Index