aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man3/strtoul.38
1 files changed, 6 insertions, 2 deletions
diff --git a/man3/strtoul.3 b/man3/strtoul.3
index f0d6cb5c15..cf2e3e091d 100644
--- a/man3/strtoul.3
+++ b/man3/strtoul.3
@@ -77,7 +77,8 @@ function but returns an unsigned long long integer value.
.SH "RETURN VALUE"
The \fBstrtoul\fP() function returns either the result of the conversion
or, if there was a leading minus sign, the negation of the result of the
-conversion, unless the original (non-negated) value would overflow; in
+conversion represented as an unsigned value,
+unless the original (non-negated) value would overflow; in
the latter case, \fBstrtoul\fP() returns ULONG_MAX and sets the global
variable \fIerrno\fP to ERANGE.
Precisely the same holds for
@@ -108,7 +109,7 @@ and then determine if an error occurred by checking whether
.I errno
has a non-zero value after the call.
-In locales other than the "C" locale, also other strings may be accepted.
+In locales other than the "C" locale, other strings may be accepted.
(For example, the thousands separator of the current locale may be
supported.)
.LP
@@ -127,6 +128,9 @@ may be equivalent to
.BR strtoull ()
or to
.BR strtoul ().
+
+Negative values are considered valid input and are
+silently converted to the equivalent unsigned long value.
.SH "CONFORMING TO"
.BR strtoul ()
conforms to SVID 3, 4.3BSD, ISO 9899 (C99) and POSIX, and