| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
|
|
|
|
|
|
|
|
|
| |
Explicitly state that our implementation now complies with the
stricter requirements of TC3 because the newlocale(3) in old OpenBSD
releases only complied with the weaker requirements of the old text
of the standard. The complaints from our users resulted in both
our implementation and the standard being improved.
For details, see: http://austingroupbugs.net/view.php?id=1243#c4347
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While POSIX appears to allow the old behaviour of ignoring "oldloc",
Ted and Karl convinced me that is a bug in the spec and the Austin
group almost certainly intended to require the new behaviour.
Anyway, compatibility strongly suggests the new behaviour because
most (or maybe even all?) other systems do not ignore "oldloc",
and some software appears to depend on the copying from "oldloc"
to the new locale.
Issue analyzed and reported by Karl Williamson <public at
khwilliamson dot com> with support from the Perl 5 community.
This final diff is similar to two earlier diffs from Ted,
but handles invalid input in a mode robust way.
OK tedu@.
|
|
|
|
|
|
|
|
| |
* mention LC_COLLATE;
* clarify that all these functions are infested, including the *_l() versions;
* avoid ENVIRONMENT, these functions don't inspect it;
* and point to the C library functions that change the locale.
OK millert@
|
|
|
|
|
|
|
|
| |
CAVEATS pointing to the new CAVEATS section in setlocale(3).
Make those in wprintf(3) and wscanf(3) more concise
since duplicate information is a bad idea.
Incompleteness of information originally pointed out by millert@.
OK millert@
|
|
|
|
|
|
|
| |
list many (hopefully the most important) functions affected by the
locale, such that the CAVEATS sections in individual manual pages
can be kept shorter in the future;
basic idea from millert@; feedback and OK jmc@; OK deraadt@.
|
| |
|
| |
|
|
|
|
|
| |
setlocale(3) manual page, such that the latter becomes easier
to read. No text change.
|
|
|
|
|
| |
Minus eight lines of code, no functional change.
OK martijn@.
|
|
|
|
|
|
|
|
|
|
|
| |
1. setlocale(LC_ALL, "A"); setlocale(LC_CTYPE, "T"); setlocale(LC_ALL, NULL);
must return "A/T/A/A/A/A", not "A". Fix this by always initializing the
LC_ALL entry of newgl to "" in dupgl(). Reported by Karl Williamson
<public at khwilliamson dot com> on bugs@, thanks!
2. Do not leak newgl when strdup(3) fails in setlocale(3).
3. For setlocale(LC_ALL, "C/C/fr_FR.UTF-8/C/C/C"); correctly set
_GlobalRuneLocale; i found 2. and 3. while looking at the code.
Feedback on a buggy earlier version and OK martijn@.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
noticed that this was no good.
* More relevant one line description.
* Generally more precision, less handwaving.
* Delete details regarding features we deliberate do not support.
* Write a real RETURN VALUES section.
* Delete pointless SEE ALSO section.
* Add two useful EXAMPLES.
* Do not talk about BUGS we don't have because we avoid the facilities.
Using several suggestions from martijn@ and one from stsp@,
OK jmc@ stsp@ martijn@ on earlier versions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Complete in the sense that all POSIX *locale(3) and *_l(3) functions
are included, but in OpenBSD, we of course only really care about
LC_CTYPE and we only support ASCII and UTF-8.
With important help from kettenis@, guenther@, and jca@.
Repeated testing in ports bulk builds by naddy@.
Additional testing by jca@, sebastia@, dcoppa@, and others.
OK kettenis@ dcoppa@, and guenther@ on an earlier version.
Riding guenther@'s libc/librthread major bump.
|
|
|
|
|
|
| |
change _ctype_, _tolower_tab_, and _toupper_tab_.
No functional change.
Suggested by and OK kettenis@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Declare functions rather than generating declarations with macros.
Just call functions rather than mainting function pointer tables.
Purge unused arguments. Simplify mbstate_t casting.
Garbage collect one empty and one unused function.
As a bonus, make mbsinit(3) work at all, it returned garbage
in the past due to a missing cast when passing mbstate_t.
Apart from that, no functional change.
No libc bump needed; only private functions are removed and
change prototype and only private structs change size.
OK stsp@ mpi@; deraadt@ likes the general direction.
|
|
|
|
|
| |
While here, polish some wording.
OK stsp@
|
|
|
|
|
|
| |
a linked list to store it. No functional change.
OK mpi@ guenther@,
and stsp@ agrees too that the time is ripe to start such cleanup
|
|
|
|
|
|
| |
from henning petersen, netbsd pr lib/51284
ok semarie
|
|
|
|
|
|
|
| |
locale implementation: _{Current,Default}*Locale, __[mn]locale_changed,
__mb_len_max_runtime
ok millert@ schwarze@ deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
| |
correctly - logically complete that now by removing MLINKS from base;
authors need only to ensure there is an entry in NAME for any function/
util being added. MLINKS will still work, and remain for perl to ease
upgrades;
ok nicm (curses) bcook (ssl)
ok schwarze, who provided a lot of feedback and assistance
ok tb natano jung
|
|
|
|
|
|
| |
so no need to include share/locale/ctype/Makefile.inc to get it.
ok guenther@ stsp@ (who had the same diff)
|
|
|
|
| |
that setting errno is required by POSIX, but not by ISO C.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is unambiguously required both by POSIX and by our own manual page.
It also makes a lot of sense because having a function that can
fail and that sets errno in some failure modes but does not set
errno in other failure modes would be a terrible idea. Such a
function would be ridiculously complicated to use. To detect the
reason for failure, you would have to:
- save errno
- reset errno to zero
- call the function
- inspect the return value to detect failure
- inspect errno to decide about the reason for failure
- if errno is zero, restore the saved errno
That is completely unreasonable, in particular for a seemingly innocous
function like mbtowc(3). Next to no programmer would get that right in
any real-world program.
Note that this bug is very widespread, it also affects NetBSD,
FreeBSD, Solaris 11, and glibc. I will also send a note around to
the other systems.
There may be fallout from programs using the interface incorrectly.
If you run into any, please report that to me.
OK millert@
|
| |
|
|
|
|
|
| |
This function doesn't even have an "n" argument, so that non-existent
argument clearly cannot restrict the return value.
|
|
|
|
|
|
| |
incomplete characters are not an error, do not throw EILSEQ, and
are not supposed to.
OK millert@
|
|
|
|
| |
ok tobias@
|
|
|
|
| |
with input by and ok schwarze@
|
|
|
|
|
| |
With input from jmc, zhuk, schwarze, and bentley.
ok jmc zhuk bentley
|
| |
|
|
|
|
| |
ok jmc@
|
|
|
|
|
|
|
| |
case, by deleting some useless '& of an array' we also eliminate the need
for the casts which prompted the original lint warnings
ok deraadt@
|
|
|
|
|
|
| |
setrunelocale() which is not exported from libc
ok jmc@ stsp@
|
|
|
|
|
|
| |
on arm and m88k
problems with optind observed by jsg@
|
|
|
|
| |
the symbols are weak
|
| |
|
|
|
|
|
| |
in standard C are all weak.
Hide several symbols internal to the implementation
|
|
|
|
|
|
| |
C standard are all weak.
Apply __{BEGIN,END}_HIDDEN_DECLS to gdtoa{,imp}.h, hiding the
arch-specific __strtorx, __ULtox_D2A, __strtorQ, __ULtoQ_D2A symbols.
|
|
|
|
| |
and the symbols not in the C standard are weak
|
| |
|
|
|
|
|
|
|
|
|
| |
there is a test for "only UTF-8" after, that will return ENOTSUP. So the caller
will known the wanted codeset isn't supported.
problem spotted by guenther@
OK stsp@ guenther@
|
|
|
|
| |
ok mpi tedu phessler zhuk, and discussed with many at c2k15
|
|
|
|
| |
ok mpi tedu phessler zhuk, and discussed with many at c2k15
|
|
|
|
| |
Input & okay (pre-lock) from jmc@, sobrado@ and stsp@.
|
|
|
|
|
| |
suggestion for removing (instead of commenting) the lines from stsp@
OK millert@
|
|
|
|
|
|
| |
cvs. Remove the unused search path from Makefile.inc
"fine with me" stsp@
|
|
|
|
|
|
|
|
|
| |
This variable is used as temporary buffer in order to do checking
before copying the content to current_categories variable.
Switch it as local variable in setlocale function. Adapts some functions.
the commit collapse 3 proposed diffs on tech@, and all OK stsp@
|
|
|
|
| |
Diff from Sebastien Marie. objdump foo help from uwe
|