| cf85e703 | 26-Nov-2025 |
Jose Luis Duran <jlduran@FreeBSD.org> |
strfmon: Fix negative sign handling for C locale
If the locale's positive_sign and negative_sign values would both be returned by localeconv() as empty strings, strfmon() shall behave as if the nega
strfmon: Fix negative sign handling for C locale
If the locale's positive_sign and negative_sign values would both be returned by localeconv() as empty strings, strfmon() shall behave as if the negative_sign value was the string "-".
This occurs with the C locale. The implementation previously assigned "0" to sign_posn (parentheses around the entire string); now it assigns it to "1" (sign before the string) when it is undefined (CHAR_MAX).
Austin Group Defect 1199[1] is applied, changing the requirements for the '+' and '(' flags.
[1]: https://www.austingroupbugs.net/view.php?id=1199
Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53913
show more ...
|
| 1fd01897 | 26-Nov-2025 |
Jose Luis Duran <jlduran@FreeBSD.org> |
strfmon: EINVAL if the '+' flag and both signs are empty
According to the Open Group Base Specifications Issue 8[1], strfmon(3) should return EINVAL when the '+' flag was included in a conversion sp
strfmon: EINVAL if the '+' flag and both signs are empty
According to the Open Group Base Specifications Issue 8[1], strfmon(3) should return EINVAL when the '+' flag was included in a conversion specification and the locale's positive_sign and negative_sign values would both be returned by localeconv(3) as empty strings.
Austin Group Defect 1199[2] is applied, adding the [EINVAL] error.
[1]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/strfmon.html [2]: https://www.austingroupbugs.net/view.php?id=1199
Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53912
show more ...
|
| c0946aee | 07-Aug-2024 |
Mark Johnston <markj@FreeBSD.org> |
libc tests: Add some test cases for recursive exiting
Derived from tests posted by kib in D46108. I made one of them use a pthread barrier instead of sleeping.
Reviewed by: kib MFC after: 2 weeks
libc tests: Add some test cases for recursive exiting
Derived from tests posted by kib in D46108. I made one of them use a pthread barrier instead of sleeping.
Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D46176
show more ...
|
| 621bf918 | 28-Oct-2022 |
Jose Luis Duran <jlduran@gmail.com> |
strfmon_l: Use specified locale for number formatting
strfmon_l does not take fully into consideration the explicitly passed locale to perform the formatting.
Parallel universe bug report: https://
strfmon_l: Use specified locale for number formatting
strfmon_l does not take fully into consideration the explicitly passed locale to perform the formatting.
Parallel universe bug report: https://sourceware.org/bugzilla/show_bug.cgi?id=19633
Obtained from: Darwin Reviewed by: kib PR: 267410 Github PR: #620 MFC after: 1 week
show more ...
|
| 29972f06 | 28-Oct-2022 |
Jose Luis Duran <jlduran@gmail.com> |
strfmon_test: Add a test for strfmon_l
Attempt to test the correctness of strfmon_l(3).
Items marked with XXX represent an invalid output.
Obtained from: https://github.com/NetBSD/src/commit/e7eba
strfmon_test: Add a test for strfmon_l
Attempt to test the correctness of strfmon_l(3).
Items marked with XXX represent an invalid output.
Obtained from: https://github.com/NetBSD/src/commit/e7eba0044fe6128291cbb7e5923c7cf7d87318cc
Reviewed by: kib PR: 267410 Github PR: #620 MFC after: 1 week
show more ...
|
| 34f88528 | 21-Oct-2022 |
Jose Luis Duran <jlduran@gmail.com> |
strfmon: Fix formatting of a second fixed-width value
There is a bug when formatting two consecutive values using fixed-widths and the values need padding. This was because the value of pad_size wa
strfmon: Fix formatting of a second fixed-width value
There is a bug when formatting two consecutive values using fixed-widths and the values need padding. This was because the value of pad_size was zeroed only every other time.
Format Before After [%8n] [%8n] [ $123.45] [ $123.45] [ $123.45] [ $123.45]
Reviewed by: kib PR: 267282 Github PR: #619 MFC after: 1 week
show more ...
|