Module Name: src Committed By: christos Date: Mon Feb 15 15:36:53 UTC 2021
Modified Files: src/lib/libc/locale: duplocale.3 freelocale.3 newlocale.3 Log Message: Remove FreeBSD portions that are not relevant to our implementation (pointed out by joerg@) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/locale/duplocale.3 \ src/lib/libc/locale/freelocale.3 src/lib/libc/locale/newlocale.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/locale/duplocale.3 diff -u src/lib/libc/locale/duplocale.3:1.1 src/lib/libc/locale/duplocale.3:1.2 --- src/lib/libc/locale/duplocale.3:1.1 Mon Feb 15 09:35:04 2021 +++ src/lib/libc/locale/duplocale.3 Mon Feb 15 10:36:53 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: duplocale.3,v 1.1 2021/02/15 14:35:04 christos Exp $ +.\" $NetBSD: duplocale.3,v 1.2 2021/02/15 15:36:53 christos Exp $ .\" Copyright (c) 2011 The FreeBSD Foundation .\" All rights reserved. .\" @@ -28,7 +28,7 @@ .\" .\" $FreeBSD: head/lib/libc/locale/duplocale.3 281925 2015-04-24 10:17:55Z theraven $ .\" -.Dd September 17, 2011 +.Dd February 15, 2021 .Dt DUPLOCALE 3 .Os .Sh NAME @@ -46,17 +46,6 @@ Duplicates an existing returning a new .Fa locale_t that refers to the same locale values but has an independent internal state. -Various functions, such as -.Xr 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 -.Fa locale_t -associated with the current thread by -.Xr 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 .Xr freelocale 3 . .Sh SEE ALSO @@ -64,17 +53,8 @@ The locale returned by this call must be .Xr localeconv 3 , .Xr newlocale 3 , .\" .Xr querylocale 3 , -.Xr uselocale 3 , +.\" .Xr uselocale 3 , .\" .Xr xlocale 3 .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. Index: src/lib/libc/locale/freelocale.3 diff -u src/lib/libc/locale/freelocale.3:1.1 src/lib/libc/locale/freelocale.3:1.2 --- src/lib/libc/locale/freelocale.3:1.1 Mon Feb 15 09:35:04 2021 +++ src/lib/libc/locale/freelocale.3 Mon Feb 15 10:36:53 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: freelocale.3,v 1.1 2021/02/15 14:35:04 christos Exp $ +.\" $NetBSD: freelocale.3,v 1.2 2021/02/15 15:36:53 christos Exp $ .\" Copyright (c) 2011 The FreeBSD Foundation .\" All rights reserved. .\" @@ -27,7 +27,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD: head/lib/libc/locale/freelocale.3 303495 2016-07-29 17:18:47Z ed $ -.Dd July 26, 2016 +.Dd February 15, 2021 .Dt FREELOCALE 3 .Os .Sh NAME @@ -46,14 +46,12 @@ or Frees a .Fa locale_t . This relinquishes any resources held exclusively by this locale. -Note that locales share reference-counted components, -so a call to this function is not guaranteed to free all of the components. .Sh SEE ALSO .Xr duplocale 3 , .Xr localeconv 3 , .Xr newlocale 3 , .\" .Xr querylocale 3 , -.Xr uselocale 3 , +.\" .Xr uselocale 3 , .\" .Xr xlocale 3 .Sh STANDARDS This function conforms to Index: src/lib/libc/locale/newlocale.3 diff -u src/lib/libc/locale/newlocale.3:1.1 src/lib/libc/locale/newlocale.3:1.2 --- src/lib/libc/locale/newlocale.3:1.1 Mon Feb 15 09:35:04 2021 +++ src/lib/libc/locale/newlocale.3 Mon Feb 15 10:36:53 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: newlocale.3,v 1.1 2021/02/15 14:35:04 christos Exp $ +.\" $NetBSD: newlocale.3,v 1.2 2021/02/15 15:36:53 christos Exp $ .\" Copyright (c) 2011 The FreeBSD Foundation .\" All rights reserved. .\" @@ -27,7 +27,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD: head/lib/libc/locale/newlocale.3 366375 2020-10-02 18:35:55Z markj $ -.Dd October 2, 2020 +.Dd February 15, 2021 .Dt NEWLOCALE 3 .Os .Sh NAME @@ -118,9 +118,9 @@ You must free the returned locale with .Xr duplocale 3 , .Xr freelocale 3 , .Xr localeconv 3 , -\" .Xr querylocale 3 , -.Xr uselocale 3 , -\" .Xr xlocale 3 +.\" .Xr querylocale 3 , +.\" .Xr uselocale 3 , +.\" .Xr xlocale 3 .Sh STANDARDS This function conforms to .St -p1003.1-2008 .