History log of /freebsd-current/lib/libc/locale/localeconv.c
Revision Date Author Comments
# 2f1da80f 12-Apr-2024 rilysh <nightquick@proton.me>

libc(localeconv.c): fix "appropriate" spelling

From "approprate" to "appropriate".

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1119


# dc36d6f9 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

lib: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# 559a218c 01-Nov-2023 Warner Losh <imp@FreeBSD.org>

libc: Purge unneeded cdefs.h

These sys/cdefs.h are not needed. Purge them. They are mostly left-over
from the $FreeBSD$ removal. A few in libc are still required for macros
that cdefs.h defines. Keep those.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D42385


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 5b5fa75a 04-Aug-2022 Ed Maste <emaste@FreeBSD.org>

libc: drop "All rights reserved" from Foundation copyrights

This has already been done for most files that have the Foundation as
the only listed copyright holder. Do it now for files that list
multiple copyright holders, but have the Foundation copyright in its own
section.

Sponsored by: The FreeBSD Foundation


# 7eb138a9 17-Sep-2021 Mark Johnston <markj@FreeBSD.org>

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 <henry.hu.sh@gmail.com> for providing a test case
demonstrating the race.

PR: 258360
MFC after: 3 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31899


# 8a16b7a1 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

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.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96


# 3c87aa1d 20-Nov-2011 David Chisnall <theraven@FreeBSD.org>

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)


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 2992b5e8 12-Dec-2007 Alexey Zelkin <phantom@FreeBSD.org>

Remove 3rd clause of license

Per request of: glenn halperin at symbian.com


# 683fe113 26-Jun-2003 Alexey Zelkin <phantom@FreeBSD.org>

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


# f4da1a75 09-Oct-2002 Tim J. Robbins <tjr@FreeBSD.org>

Add support for the 6 new C99 struct lconv members dealing with formatting
international monetary values: int_p_cs_precedes, int_n_cs_precedes,
int_p_sep_by_space, int_n_sep_by_space, int_p_sign_posn, int_n_sign_posn.
This should not break existing binaries or LC_MONETARY data files.

Reviewed by: ache
MFC after: 1 month


# 333fc21e 22-Mar-2002 David E. O'Brien <obrien@FreeBSD.org>

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


# 831e8f61 28-Jan-2002 Andrey A. Chernov <ache@FreeBSD.org>

Do not try to convert to char already converted C monetary locale members.
Do this conversion on locale load stage instead.


# f2d0f427 20-Dec-2001 Alexey Zelkin <phantom@FreeBSD.org>

Add my e-mail to copyrights


# 1e58303f 05-Mar-2001 David E. O'Brien <obrien@FreeBSD.org>

Use our standard .c rcsid format.


# e4efb830 05-Mar-2001 David E. O'Brien <obrien@FreeBSD.org>

Fix copyright breakage in rev 1.2.
We *cannot* remove clause #4 from the Univ of California's license.


# 1bd7723d 10-Feb-2001 Alexey Zelkin <phantom@FreeBSD.org>

. 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.


# ab9577f2 09-Feb-2001 Andrey A. Chernov <ache@FreeBSD.org>

As temporary workaround for missing *grouping fields parser always return "no
grouping" (CHAR_MAX, '\0').
Fixme: grouping parser needs to be implemented.


# 96be743f 09-Feb-2001 Andrey A. Chernov <ache@FreeBSD.org>

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 09-Feb-2001 Andrey A. Chernov <ache@FreeBSD.org>

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


# e690a556 08-Feb-2001 Alexey Zelkin <phantom@FreeBSD.org>

Make localeconv() actual function. Now it will use LC_MONETARY/LC_NUMERIC
information to fill return structure. Remove unused anymore stub.


# 58f0484f 26-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Lib Sources