summaryrefslogtreecommitdiff
path: root/lib/libc/locale
AgeCommit message (Collapse)Author
2016-03-30for some time now mandoc has not required MLINKS to functionJason McIntyre
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
2016-03-20LOCALE_CHARSETS has been unused for some time nowJeremie Courreges-Anglas
so no need to include share/locale/ctype/Makefile.inc to get it. ok guenther@ stsp@ (who had the same diff)
2016-02-27Fix STANDARDS: use the appropriate .St argument and add the informationIngo Schwarze
that setting errno is required by POSIX, but not by ISO C.
2016-02-27If an incomplete character is passed to mbtowc(3), set errno to EILSEQ.Ingo Schwarze
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@
2016-02-13Dv fix;Jason McIntyre
2016-02-13Fix an obvious cut-and-paste error:Ingo Schwarze
This function doesn't even have an "n" argument, so that non-existent argument clearly cannot restrict the return value.
2016-02-08Align with reality, and with POSIX: For this particular function,Ingo Schwarze
incomplete characters are not an error, do not throw EILSEQ, and are not supposed to. OK millert@
2016-02-05avoid an uninitialised value in a return path added in rev 1.5Jonathan Gray
ok tobias@
2015-12-06Validate input files to prevent out of boundary accesses.Tobias Stoeckmann
with input by and ok schwarze@
2015-10-28Rewrite the mbtowc(3) page for clarity. Explain what needs to be done on error.Stefan Sperling
With input from jmc, zhuk, schwarze, and bentley. ok jmc zhuk bentley
2015-10-24typommcc
2015-10-24nl_langinfo(3) conforms to POSIX.Anthony J. Bentley
ok jmc@
2015-10-01Eliminate the last of the LINTEDn and PRINTFLIKEn comments. In onePhilip Guenther
case, by deleting some useless '& of an array' we also eliminate the need for the casts which prompted the original lint warnings ok deraadt@
2015-09-21Prefer Xr over Fn for interpage references and delete reference toPhilip Guenther
setrunelocale() which is not exported from libc ok jmc@ stsp@
2015-09-19Don't wrap initialized variables: binutils appears to be mishandling themPhilip Guenther
on arm and m88k problems with optind observed by jsg@
2015-09-14Wrap <langinfo.h> and <regexp.h> so internal calls go direct andPhilip Guenther
the symbols are weak
2015-09-14Wrap <locale.h> so internal calls go directPhilip Guenther
2015-09-13Wrap <ctype.h> and <wctype.h> so that calls go direct and the symbols notPhilip Guenther
in standard C are all weak. Hide several symbols internal to the implementation
2015-09-13Wrap <stdlib.h> so that calls go direct and the symbols not in thePhilip Guenther
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.
2015-09-12Wrap <inttypes.h> and finish wrapping of <wchar.h> so that calls go directPhilip Guenther
and the symbols not in the C standard are weak
2015-09-10reduce more .Nd to one line and kill more .TnIngo Schwarze
2015-08-23restore codeset checking: we shouldn't silency fallback to ASCII codeset.Sebastien Marie
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@
2015-08-14Load LC_MESSAGES locale only if the character encoding is UTF-8.Stefan Sperling
ok mpi tedu phessler zhuk, and discussed with many at c2k15
2015-08-14Disable support for loading LC_CTYPE locales other than UTF-8.Stefan Sperling
ok mpi tedu phessler zhuk, and discussed with many at c2k15
2015-08-12Mention LC_MESSAGES.Vadim Zhukov
Input & okay (pre-lock) from jmc@, sobrado@ and stsp@.
2015-07-07the C locale should contain only ASCIIsemarie
suggestion for removing (instead of commenting) the lines from stsp@ OK millert@
2015-07-03There are no ${LIBCSRCDIR}/arch/${MACHINE_CPU}/locale directories insemarie
cvs. Remove the unused search path from Makefile.inc "fine with me" stsp@
2015-07-02remove new_categories variable from global.semarie
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@
2015-06-09Remove unused parameter of load_locale_sub(). No assembly change on i386.Stefan Sperling
Diff from Sebastien Marie. objdump foo help from uwe
2015-04-12Let nl_langinfo(CODESET) return "US-ASCII" as the name of theChristian Weisgerber
character codeset for the POSIX/C default locale. This is the preferred IANA name and also used by FreeBSD. The previous value "646" was an obscure reference to ISO 646 (= ASCII) and was not recognized by GNU iconv out of the box. ok millert@, stsp@
2015-03-22Resolve a mandoc -Tlint warning about trailing whitespace.Stefan Sperling
2015-03-22More wide character string function man page improvements based on feedbackStefan Sperling
by Kaspars Bankovskis. ok jmc@
2015-03-19better wording, from andre smagin; ok stspJason McIntyre
2015-02-05Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@Todd C. Miller
2014-12-11Fix previous:Ingo Schwarze
As pointed out by stsp@, LC_CTYPE *does* affect the ctype.h functions. Use a wording similar to a suggestion by deraadt@. Feedback and OK jmc@, OK stsp@.
2014-12-09LC_CTYPE has no effect on ctype(3), but on wctype(3); ok jmc@Ingo Schwarze
2014-11-30mandoc -Tlint fixes from <kaspars at bankovskis dot net>Ingo Schwarze
2014-11-18Nuke some obvious #include duplications.Kenneth R Westerback
ok espie@ deraadt@ millert@ tedu@
2014-09-15When fopen()ing internal to libc (the API doesn't support the usePhilip Guenther
of the resulting FILE *), then pass fopen() the 'e' mode letter to mark it close-on-exec. ok miod@
2014-07-14international currency locale rules as per POSIX.1-2008Martin Pelikan
required for libc++ ok guenther afresh1
2014-05-25use calloc, from Benjamin BaierTed Unangst
2014-04-07Add some missing names to the NAME sections.Ingo Schwarze
For inet(3), go the other way, remove some bogus symlinks. Found while testing the new makewhatis(8). ok jmc@
2014-03-16lint is dead (long live the lint!), so stop using it as a cpp conditionalPhilip Guenther
(namespace pollution!) or talking about its opinion on code. ok krw@
2014-01-21obvious .Pa fixes; found with mandocdb(8)Ingo Schwarze
2013-11-12ANSI prototypeTheo de Raadt
2013-08-28Allow setlocale(LC_MESSAGES, ...); to succeed. This always returned anStefan Sperling
error, but that makes some ports (e.g. GNOME) freak out. We can allow any message language to be used as long as the encoding specified as part of the locale name is supported (i.e. listed in locale -m output). The primary users of LC_MESSAGES are catopen(3) and gettext(3), which already worked without this change. ok ajacoutot, naddy, matthew
2013-08-28oops, we forgot to remove the .El in previous; sorry stefan (though youJason McIntyre
should have run this through mandoc -Tlint ;)
2013-08-28Cosmetic tweaks of wcrtomb(3) RETURN VALUES section. ok jmcStefan Sperling
2013-08-14no longer any need to quote macro lines with >9 args;Jason McIntyre
From: Jan Stary
2013-06-05Use the fancy .In macro for includes. From Jan Klemkow. ok jmc schwarzeTed Unangst