Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 2/2] Support sizes >=2G in various config options accepting 'g' sizes.

From: Nix <hidden>
Date: 2016-06-15 22:51:59

On 6 Sep 2011, Johannes Sixt stated:
Am 9/6/2011 12:25, schrieb Nix:
quoted
OK, I'll add range checking support then!
Don't forget to follow this advice noted on the POSIX page
(http://pubs.opengroup.org/onlinepubs/9699919799/functions/strtol.html):

Since 0, {LONG_MIN} or {LLONG_MIN}, and {LONG_MAX} or {LLONG_MAX} are
returned on error and are also valid returns on success, an application
wishing to check for error situations should set errno to 0, then call
strtol() or strtoll(), then check errno.
Oh, I've fallen into *that* trap before with math functions setting
ERANGE/EDOM. Thanks for the reminder :)

-- 
NULL && (void)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help