Bug 251651 - POSIX function strerror_l is missing
Summary: POSIX function strerror_l is missing
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: standards (show other bugs)
Version: 12.2-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: Konstantin Belousov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-06 21:49 UTC by Yuri Victorovich
Modified: 2021-12-02 12:01 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2020-12-06 21:49:07 UTC
It is in the POSIX standard:
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/string.h.html#tag_13_51

and it is missing in 12.2-STABLE r366720.
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2020-12-06 21:51:16 UTC
It is used by multimedia/obs-studio: https://github.com/obsproject/obs-studio/issues/3835

So this port can't be updated pending addition of strerror_l.
Comment 2 Konstantin Belousov freebsd_committer freebsd_triage 2020-12-06 23:51:56 UTC
https://reviews.freebsd.org/D27495
Comment 3 commit-hook freebsd_committer freebsd_triage 2020-12-16 09:02:28 UTC
A commit references this bug:

Author: kib
Date: Wed Dec 16 09:02:11 UTC 2020
New revision: 368692
URL: https://svnweb.freebsd.org/changeset/base/368692

Log:
  Implement strerror_l().

  Only for the arches that provide user-mode TLS.

  PR: 251651
  Requested by:	yuri
  Discussed with:	emaste, jilles, tijl
  Sponsored by:	The FreeBSD Foundation
  Differential revision:	https://reviews.freebsd.org/D27495
  MFC after:	2 weeks

Changes:
  head/include/xlocale/_string.h
  head/lib/libc/include/libc_private.h
  head/lib/libc/nls/msgcat.c
  head/lib/libc/string/Makefile.inc
  head/lib/libc/string/Symbol.map
  head/lib/libc/string/strerror.3
  head/lib/libc/string/strerror.c
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-12-30 11:51:29 UTC
A commit in branch stable/12 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=d3912bec58d0b82509a0973cae02f156986d88fa

commit d3912bec58d0b82509a0973cae02f156986d88fa
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2020-12-16 09:02:09 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2020-12-30 10:44:23 +0000

    Implement strerror_l().

    PR: 251651

    MFC of r368692, r368723
    (cherry picked from commit 675079b1ea61b310f3a42cb0d352a49c1780f89a)
    (cherry picked from commit 65bf3043365bd86fc5d4d387ad0c42217f11330b)

 include/string.h                |  2 +-
 include/xlocale/_string.h       |  1 +
 lib/libc/include/libc_private.h |  5 ++++
 lib/libc/nls/msgcat.c           |  9 ++++++-
 lib/libc/string/Makefile.inc    |  1 +
 lib/libc/string/Symbol.map      |  4 ++++
 lib/libc/string/strerror.3      | 52 +++++++++++++++++++++++++++++++++--------
 lib/libc/string/strerror.c      | 46 +++++++++++++++++++++++++++---------
 8 files changed, 97 insertions(+), 23 deletions(-)