Re: svn commit: r368692 - in head: include/xlocale lib/libc/include lib/libc/nls lib/libc/string
On Thu, Dec 17, 2020 at 4:53 PM Konstantin Belousov wrote: > > On Thu, Dec 17, 2020 at 04:02:05PM +0100, Antoine Brodin wrote: > > On Thu, Dec 17, 2020 at 11:07 AM Konstantin Belousov > > wrote: > > > Could you please try the following, which might be a right thing to do > > > regardless p11-kit quirk. > > > > Hi, > > > > This change fixes p11-kit. > Initially you said that there are ports broken by the change, and reply > mention only p11-kit as fixed. Are there more broken ports ? I don't know, it takes 2 or 3 days for bulk -a to complete. Antoine ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r368692 - in head: include/xlocale lib/libc/include lib/libc/nls lib/libc/string
On Thu, Dec 17, 2020 at 04:02:05PM +0100, Antoine Brodin wrote: > On Thu, Dec 17, 2020 at 11:07 AM Konstantin Belousov > wrote: > > Could you please try the following, which might be a right thing to do > > regardless p11-kit quirk. > > Hi, > > This change fixes p11-kit. Initially you said that there are ports broken by the change, and reply mention only p11-kit as fixed. Are there more broken ports ? ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r368692 - in head: include/xlocale lib/libc/include lib/libc/nls lib/libc/string
On Thu, Dec 17, 2020 at 11:07 AM Konstantin Belousov wrote: > > On Thu, Dec 17, 2020 at 10:32:14AM +0100, Antoine Brodin wrote: > > On Wed, Dec 16, 2020 at 10:02 AM Konstantin Belousov > > wrote: > > > > > > Author: kib > > > Date: Wed Dec 16 09:02:09 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 > > > > Hi, > > > > It seems that this change broke some ports. > > For instance: > > http://gohan03.nyi.freebsd.org/data/head-amd64-default-baseline/p558245_s368709/logs/errors/p11-kit-0.23.22.log > > p11-kit does strange/stupid thing. It checks for strerror_l() without > namespace restriction, but then in common/message.c, before actually using it, > it does > #define _POSIX_C_SOURCE 200112L > > Could you please try the following, which might be a right thing to do > regardless p11-kit quirk. Hi, This change fixes p11-kit. Cheers, Antoine > diff --git a/include/string.h b/include/string.h > index 3c5cceaeb85..774cf5fe975 100644 > --- a/include/string.h > +++ b/include/string.h > @@ -140,7 +140,7 @@ int timingsafe_bcmp(const void *, const void *, size_t); > int timingsafe_memcmp(const void *, const void *, size_t); > #endif /* __BSD_VISIBLE */ > > -#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) > +#if __POSIX_VISIBLE >= 200112 || defined(_XLOCALE_H_) > #include > #endif > ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r368692 - in head: include/xlocale lib/libc/include lib/libc/nls lib/libc/string
On Thu, Dec 17, 2020 at 10:32:14AM +0100, Antoine Brodin wrote: > On Wed, Dec 16, 2020 at 10:02 AM Konstantin Belousov wrote: > > > > Author: kib > > Date: Wed Dec 16 09:02:09 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 > > Hi, > > It seems that this change broke some ports. > For instance: > http://gohan03.nyi.freebsd.org/data/head-amd64-default-baseline/p558245_s368709/logs/errors/p11-kit-0.23.22.log p11-kit does strange/stupid thing. It checks for strerror_l() without namespace restriction, but then in common/message.c, before actually using it, it does #define _POSIX_C_SOURCE 200112L Could you please try the following, which might be a right thing to do regardless p11-kit quirk. diff --git a/include/string.h b/include/string.h index 3c5cceaeb85..774cf5fe975 100644 --- a/include/string.h +++ b/include/string.h @@ -140,7 +140,7 @@ int timingsafe_bcmp(const void *, const void *, size_t); int timingsafe_memcmp(const void *, const void *, size_t); #endif /* __BSD_VISIBLE */ -#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) +#if __POSIX_VISIBLE >= 200112 || defined(_XLOCALE_H_) #include #endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r368692 - in head: include/xlocale lib/libc/include lib/libc/nls lib/libc/string
On Wed, Dec 16, 2020 at 10:02 AM Konstantin Belousov wrote: > > Author: kib > Date: Wed Dec 16 09:02:09 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 Hi, It seems that this change broke some ports. For instance: http://gohan03.nyi.freebsd.org/data/head-amd64-default-baseline/p558245_s368709/logs/errors/p11-kit-0.23.22.log Cheers, Antoine ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r368692 - in head: include/xlocale lib/libc/include lib/libc/nls lib/libc/string
Author: kib Date: Wed Dec 16 09:02:09 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 Modified: 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 Modified: head/include/xlocale/_string.h == --- head/include/xlocale/_string.h Wed Dec 16 08:43:38 2020 (r368691) +++ head/include/xlocale/_string.h Wed Dec 16 09:02:09 2020 (r368692) @@ -46,6 +46,7 @@ typedef struct_xlocale *locale_t; * POSIX2008 functions */ int strcoll_l(const char *, const char *, locale_t); +char *strerror_l(int num, locale_t); size_t strxfrm_l(char *, const char *, size_t, locale_t); #endif /* _XLOCALE_STRING1_H */ Modified: head/lib/libc/include/libc_private.h == --- head/lib/libc/include/libc_private.hWed Dec 16 08:43:38 2020 (r368691) +++ head/lib/libc/include/libc_private.hWed Dec 16 09:02:09 2020 (r368692) @@ -431,4 +431,9 @@ void___pthread_cleanup_pop_imp(int); void __throw_constraint_handler_s(const char * restrict msg, int error); +struct __nl_cat_d; +struct _xlocale; +struct __nl_cat_d *__catopen_l(const char *name, int type, + struct _xlocale *locale); + #endif /* _LIBC_PRIVATE_H_ */ Modified: head/lib/libc/nls/msgcat.c == --- head/lib/libc/nls/msgcat.c Wed Dec 16 08:43:38 2020(r368691) +++ head/lib/libc/nls/msgcat.c Wed Dec 16 09:02:09 2020(r368692) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include "../locale/xlocale_private.h" +#include "libc_private.h" #define _DEFAULT_NLS_PATH "/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L:" \ _PATH_LOCALBASE "/share/nls/%L/%N.cat:" \ @@ -122,6 +123,12 @@ SLIST_HEAD(listhead, catentry) cache = nl_catd catopen(const char *name, int type) { + return (__catopen_l(name, type, __get_locale())); +} + +nl_catd +__catopen_l(const char *name, int type, locale_t locale) +{ struct stat sbuf; struct catentry *np; char *base, *cptr, *cptr1, *nlspath, *pathP, *pcode; @@ -139,7 +146,7 @@ catopen(const char *name, int type) lang = NULL; else { if (type == NL_CAT_LOCALE) - lang = querylocale(LC_MESSAGES_MASK, __get_locale()); + lang = querylocale(LC_MESSAGES_MASK, locale); else lang = getenv("LANG"); Modified: head/lib/libc/string/Makefile.inc == --- head/lib/libc/string/Makefile.inc Wed Dec 16 08:43:38 2020 (r368691) +++ head/lib/libc/string/Makefile.inc Wed Dec 16 09:02:09 2020 (r368692) @@ -64,6 +64,7 @@ MLINKS+=strcpy.3 stpcpy.3 \ strcpy.3 strncpy.3 MLINKS+=strdup.3 strndup.3 MLINKS+=strerror.3 perror.3 \ + strerror.3 strerror_l.3 \ strerror.3 strerror_r.3 \ strerror.3 sys_errlist.3 \ strerror.3 sys_nerr.3 Modified: head/lib/libc/string/Symbol.map == --- head/lib/libc/string/Symbol.map Wed Dec 16 08:43:38 2020 (r368691) +++ head/lib/libc/string/Symbol.map Wed Dec 16 09:02:09 2020 (r368692) @@ -110,6 +110,10 @@ FBSD_1.5 { timingsafe_memcmp; }; +FBSD_1.6 { + strerror_l; +}; + FBSDprivate_1.0 { __strtok_r; }; Modified: head/lib/libc/string/strerror.3 == --- head/lib/libc/string/strerror.3 Wed Dec 16 08:43:38 2020 (r368691) +++ head/lib/libc/string/strerror.3 Wed Dec 16 09:02:09 2020 (r368692) @@ -32,12 +32,13 @@ .\" @(#)strerror.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd April 5, 2011 +.Dd December 7, 2020 .Dt STRERROR 3 .Os .Sh NAME .Nm perror , .Nm strerror , +.Nm strerror_l , .Nm strerror_r , .Nm sys_errlist , .Nm sys_nerr @@ -53,12 +54,15 @@ .In string.h .Ft "char *" .Fn strerror "int errnum" +.Ft "char *" +.Fn strerror_l "int errnum" "locale_t" .Ft int .Fn strerror_r "int errnum" "char *strerrbuf" "size_t buflen" .Sh DESCRIPTION The .Fn strerror , -.Fn strerror_r +.Fn strerror_l , +.Fn strerror_r , and .Fn perror functions