Description of problem: The strtol manual page states that "For example, the thousands separator of the current locale may be supported". That is simply untrue. That will NEVER be supported. Version-Release number of selected component (if applicable): man-pages-3.25-1 How reproducible: Always Steps to Reproduce: 1. man strtol 2. /separator/ Actual results: 2. "For example, the thousands separator of the current locale may be supported" Expected results: That statement should be removed or changed. Additional info: A thousands separator is not and NEVER will be accepted by strtol because strtol's behavior is to terminate unambiguously at a non-digit. If it were to accept either a comma or dot as a thousands separator then zillions of existing applications would break because: - often strtol will parse a decimal quantity - often a comma will be used as a separator between distinct integers - the behavior of strtol should not change so dramatically just because of a simple locale change ... a number should always be interpreted as the same number regardless of locale - programmer can easily strip out comma/dot before invoking strtol if known to be safe to do The misleading statement should be removed from the manual entry because it is a total nonsense which might lead people to waste their time trying to get it to work.
Thanks. Fixed in man-pages-3.32-3.fc15.
I have applied the following patch in upstream: diff --git a/man3/strtol.3 b/man3/strtol.3 index 32ce1e1..f45a753 100644 --- a/man3/strtol.3 +++ b/man3/strtol.3 @@ -158,7 +158,12 @@ and then determine if an error occurred by checking whether .I errno has a nonzero value after the call. -In locales other than the "C" locale, other strings may also be accepted. +According to POSIX.1-2001, +in locales other than the "C" and "POSIX", +these functions may accept other, +implementation-defined numeric strings. + +other implementation-defined strings may be accepted. (For example, the thousands separator of the current locale may be supported.) .LP