History log of /freebsd-13.1/lib/libc/locale/lnumeric.c (Results 1 – 23 of 23)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/12.4.0, release/13.1.0
# 4a978de4 03-Feb-2022 Konstantin Belousov <[email protected]>

lnumeric.c: replace some space*8 by tabs

(cherry picked from commit 529575be27c13dd64c10b4c917ce41ccc08937c3)


# 0f674081 02-Feb-2022 Konstantin Belousov <[email protected]>

__numeric_load(): check for calloc() failure

(cherry picked from commit 87151b60e069fd16530fd36aace85d651b936c01)


# 0c60f03d 02-Feb-2022 Konstantin Belousov <[email protected]>

libc/locale/lnumeric.c: minor style

(cherry picked from commit 1aa669c5f9c233989204de96e0557459378e85bc)


Revision tags: release/12.3.0
# 589daa05 20-Oct-2021 Mark Johnston <[email protected]>

Revert "libc/locale: Fix races between localeconv(3) and setlocale(3)"

This reverts commit f89204d6b99d11aa1f67722e8c1d33b0fc4d61d7.

I didn't intend to push this commit yet, pending discussion on P

Revert "libc/locale: Fix races between localeconv(3) and setlocale(3)"

This reverts commit f89204d6b99d11aa1f67722e8c1d33b0fc4d61d7.

I didn't intend to push this commit yet, pending discussion on PR
258360.

PR: 258360

show more ...


# f89204d6 17-Sep-2021 Mark Johnston <[email protected]>

libc/locale: Fix races between localeconv(3) and setlocale(3)

Each locale embeds a lazily initialized lconv which is populated by
localeconv(3) and localeconv_l(3). When setlocale(3) updates the gl

libc/locale: Fix races between localeconv(3) and setlocale(3)

Each locale embeds a lazily initialized lconv which is populated by
localeconv(3) and localeconv_l(3). When setlocale(3) updates the global
locale, the lconv needs to be (lazily) reinitialized. To signal this,
we set flag variables in the locale structure. There are two problems:

- The flags are set before the locale is fully updated, so a concurrent
localeconv() call can observe partially initialized locale data.
- No barriers ensure that localeconv() observes a fully initialized
locale if a flag is set.

So, move the flag update appropriately, and use acq/rel barriers to
provide some synchronization. Note that this is inadequate in the face
of multiple concurrent calls to setlocale(3), but this is not expected
to work regardless.

Thanks to Henry Hu <[email protected]> for providing a test case
demonstrating the race.

PR: 258360
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 7eb138a9e53636366e615bdf04062fedc044bcea)

show more ...


Revision tags: release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0
# d915a14e 25-Nov-2017 Pedro F. Giffuni <[email protected]>

libc: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
p

libc: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

show more ...


Revision tags: release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0, release/10.3.0, release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0, release/8.4.0, release/9.1.0, release/8.3.0_cvs, release/8.3.0, release/9.0.0
# 3c87aa1d 20-Nov-2011 David Chisnall <[email protected]>

Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a
load of _l suffixed versions of various standard library functions that use
the global locale, making them take an explicit

Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a
load of _l suffixed versions of various standard library functions that use
the global locale, making them take an explicit locale parameter. Also
adds support for per-thread locales. This work was funded by the FreeBSD
Foundation.

Please test any code you have that uses the C standard locale functions!

Reviewed by: das (gdtoa changes)
Approved by: dim (mentor)

show more ...


Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0, release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0, release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0, release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0
# 683fe113 26-Jun-2003 Alexey Zelkin <[email protected]>

. style(9)
. fix/add comments (to cover changes done thru last 20 months)
. extend monetary testcase to cover int_* values


# 3dfdc427 13-Jun-2003 Jordan K. Hubbard <[email protected]>

Fixes to locale code to properly use indirect pointers in order to prevent
memory leaks (fixes bugs earlier purported to be fixed).
Submitted by: Ed Moy <[email protected]>
Obtained from: Apple Computer

Fixes to locale code to properly use indirect pointers in order to prevent
memory leaks (fixes bugs earlier purported to be fixed).
Submitted by: Ed Moy <[email protected]>
Obtained from: Apple Computer, Inc.
MFC after: 2 weeks

show more ...


Revision tags: release/5.1.0_cvs, release/5.1.0, release/4.8.0_cvs, release/4.8.0
# befb332a 20-Mar-2003 Andrey A. Chernov <[email protected]>

decimal_point can't be "" according to C99, so set it to standard "."
in that case.


Revision tags: release/5.0.0_cvs, release/5.0.0, release/4.7.0_cvs, release/4.6.2_cvs, release/4.6.2
# 76692b80 08-Aug-2002 Andrey A. Chernov <[email protected]>

Rewrite locale loading procedures, so any load failure will not affect
currently cached data. It allows a number of nice things, like: removing
fallback code from single locale loading, remove memor

Rewrite locale loading procedures, so any load failure will not affect
currently cached data. It allows a number of nice things, like: removing
fallback code from single locale loading, remove memory leak when LC_CTYPE
data loaded again and again, efficient cache use, not only for
setlocale(locale1); setlocale(locale1), but for setlocale(locale1);
setlocale("C"); setlocale(locale1) too (i.e. data file loaded only once).

show more ...


# ecc4c620 07-Aug-2002 Andrey A. Chernov <[email protected]>

Style fixes in preparation of code rewritting


Revision tags: release/4.6.1, release/4.6.0_cvs
# 333fc21e 22-Mar-2002 David E. O'Brien <[email protected]>

Fix the style of the SCM ID's.
I believe have made all of libc .c's as consistent as possible.


Revision tags: release/4.5.0_cvs, release/4.4.0_cvs
# 74f2b975 11-Dec-2001 Alexey Zelkin <[email protected]>

* Add my e-mail to copyrights
* style(9)'ify


Revision tags: release/4.3.0_cvs, release/4.3.0
# 39d2c772 13-Feb-2001 Alexey Zelkin <[email protected]>

catch up to __part_load_locale() interface change


# b161fb00 12-Feb-2001 Alexey Zelkin <[email protected]>

Make comparsions more clear (per style(9))


# 9040b756 11-Feb-2001 Alexey Zelkin <[email protected]>

Don't try to convert grouping strings in case if C or POSIX locale
was explicitly specified.

Submitted by: ache


# 1bd7723d 10-Feb-2001 Alexey Zelkin <[email protected]>

. Fix semantics of grouping (LC_MONETARY::mon_grouping,
LC_NUMERIC::grouping) values.
. Always set __XXX_changed flags then loading numeric & monetary locale
categories to allow localeconv() to u

. Fix semantics of grouping (LC_MONETARY::mon_grouping,
LC_NUMERIC::grouping) values.
. Always set __XXX_changed flags then loading numeric & monetary locale
categories to allow localeconv() to use C locale also.

show more ...


# 96be743f 10-Feb-2001 Andrey A. Chernov <[email protected]>

According to Garrett, POSIX widely use -1 to indicate CHAR_MAX, so back out
all my "-1" -> "something" fixes and replace -1 with CHAR_MAX directly in
strtol() in cnv()


# d2712eaf 10-Feb-2001 Andrey A. Chernov <[email protected]>

Use __XSTRING(CHAR_MAX) instead of "127" and strtol() base 0 to parse it (0x7f)


# 1506a668 10-Feb-2001 Andrey A. Chernov <[email protected]>

Correct myself a bit: situation is broken not for _all_ numeric LC_MONETARY,
LC_NUMERIC fields, but only for *grouping fields - other fields are converted
to a chars in localeconv(), so final change

Correct myself a bit: situation is broken not for _all_ numeric LC_MONETARY,
LC_NUMERIC fields, but only for *grouping fields - other fields are converted
to a chars in localeconv(), so final change is:

"-1" -> "127"

127 here is because CHAR_MAX supposed, which is _positive_ (SUSv2 requirement),
not negative as 255. It is still a bit of hack. To find real CHAR_MAX will be
better to sprintf() it once somewhere in static buffer. *grouping parsing
still broken and missing and needs to be implemented.

show more ...


# 051f867f 10-Feb-2001 Andrey A. Chernov <[email protected]>

NOTE: according to SUSV2 and other implementations, numeric elements in
LC_MONETARY, LC_NUMERIC are byte-arrays, not ASCII strings!

Fix "C" locale, change "-1" to {CHAR_MAX, '\0'} according to stand

NOTE: according to SUSV2 and other implementations, numeric elements in
LC_MONETARY, LC_NUMERIC are byte-arrays, not ASCII strings!

Fix "C" locale, change "-1" to {CHAR_MAX, '\0'} according to standards.

This is only partial fix - locale loading procedure remains broken as before
and load too big values for all locales. All numeric strings there should be
converted with something like atoi() and placed into bytes. Maybe I do it
later, if someone will not fix it faster.

show more ...


# 90423ece 08-Feb-2001 Alexey Zelkin <[email protected]>

Make FreeBSD locale support complete: add support for rest locale categories
LC_MONETARY, LC_NUMERIC and LC_MESSAGES. Remove stub functions since they
don't need anymore.

Reviewed by: silence on -i1

Make FreeBSD locale support complete: add support for rest locale categories
LC_MONETARY, LC_NUMERIC and LC_MESSAGES. Remove stub functions since they
don't need anymore.

Reviewed by: silence on -i18n

show more ...