Query: duplocale
OS: freebsd
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
DUPLOCALE(3) BSD Library Functions Manual DUPLOCALE(3)NAMEduplocale -- duplicate an localeLIBRARYStandard C Library (libc, -lc)SYNOPSIS#include <xlocale.h> locale_t duplocale(locale_t locale);DESCRIPTIONDuplicates an existing locale_t returning a new locale_t that refers to the same locale values but has an independent internal state. Vari- ous functions, such as mblen(3) require a persistent state. These functions formerly used static variables and calls to them from multiple threads had undefined behavior. They now use fields in the locale_t associated with the current thread by uselocale(3). These calls are therefore only thread safe on threads with a unique per-thread locale. The locale returned by this call must be freed with freelocale(3).SEE ALSOfreelocale(3), localeconv(3), newlocale(3), querylocale(3), uselocale(3), xlocale(3)STANDARDSThis function conforms to IEEE Std 1003.1-2008 (``POSIX.1'').BUGSIdeally, uselocale(3) should make a copy of the locale_t implicitly to ensure thread safety, and a copy of the global locale should be installed lazily on each thread. The FreeBSD implementation does not do this, for compatibility with Darwin.BSDSeptember 17, 2011 BSD
Related Man Pages |
---|
uselocale(3) - linux |
duplocale(3) - freebsd |
uselocale(3) - opendarwin |
uselocale(3) - plan9 |
uselocale(3) - xfree86 |
Similar Topics in the Unix Linux Community |
---|
scope |
Non Duplicates |
Duplicates |