diff options
Diffstat (limited to 'lib/libc/locale')
-rw-r--r-- | lib/libc/locale/duplocale.3 | 18 | ||||
-rw-r--r-- | lib/libc/locale/xlocale.3 | 30 |
2 files changed, 24 insertions, 24 deletions
diff --git a/lib/libc/locale/duplocale.3 b/lib/libc/locale/duplocale.3 index 9c14c52..712b578 100644 --- a/lib/libc/locale/duplocale.3 +++ b/lib/libc/locale/duplocale.3 @@ -59,15 +59,6 @@ locale. .Pt The locale returned by this call must be freed with .Xr freelocale 3 . -.Sh BUGS -Ideally, -.Xr uselocale 3 -should make a copy of the -.Fa 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. .Sh SEE ALSO .Xr freelocale 3 , .Xr localeconv 3 , @@ -78,3 +69,12 @@ for compatibility with Darwin. .Sh STANDARDS This function, conforms to .St -p1003.1-2008 +.Sh BUGS +Ideally, +.Xr uselocale 3 +should make a copy of the +.Fa 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. diff --git a/lib/libc/locale/xlocale.3 b/lib/libc/locale/xlocale.3 index debe7f5..11a392d 100644 --- a/lib/libc/locale/xlocale.3 +++ b/lib/libc/locale/xlocale.3 @@ -65,21 +65,6 @@ LC_GLOBAL_LOCALE refers to the global locale. The global locale is the locale set with the .Xr setlocale 3 function. -.Sh CAVEATS -The -.Xr setlocale 3 -function, and others in the family, refer to the global locale. -Other functions that depend on the locale, however, -will take the thread-local locale if one has been set. -This means that the idiom of setting the locale using -.Xr setlocale 3 , -calling a locale-dependent function, -and then restoring the locale will not -have the expected behavior if the current thread has had a locale set using -.Xr uselocale 3 . -You should avoid this idiom and prefer to use the -.Fa _l -suffixed versions instead. .Sh SEE ALSO .Xr duplocale 3 , .Xr freelocale 3 , @@ -278,3 +263,18 @@ The xlocale APIs first appeared in Darwin 8.0. This implementation was written by David Chisnall, under sponsorship from the FreeBSD Foundation and first appeared in .Fx 9.1 . +.Sh CAVEATS +The +.Xr setlocale 3 +function, and others in the family, refer to the global locale. +Other functions that depend on the locale, however, +will take the thread-local locale if one has been set. +This means that the idiom of setting the locale using +.Xr setlocale 3 , +calling a locale-dependent function, +and then restoring the locale will not +have the expected behavior if the current thread has had a locale set using +.Xr uselocale 3 . +You should avoid this idiom and prefer to use the +.Fa _l +suffixed versions instead. |