c32ispunct tests: Avoid a test failure on Solaris 11 OmniOS

2024-06-09 Thread Bruno Haible
: assertion 'is != 0' failed FAIL test-c32ispunct.sh (exit status: 1) This patch avoids the failure. 2024-06-09 Bruno Haible c32ispunct tests: Avoid a test failure on Solaris 11 OmniOS. * tests/test-c32ispunct.c (main): On Solaris, disable two tests that fail

c32rtomb: Add a sanity check, working around Solaris 11 OmniOS

2024-06-09 Thread Bruno Haible
). For Gnulib's purposes, a char32_t that cannot be converted back to multibyte is unusable. In this case, we are better off using wchar_t, assuming that wcrtomb acts as the inverse of mbrtowc. This patch adds a workaround. Is fixes all these 8 test failures. 2024-06-09 Bruno Haible c32rtomb

Re: [sr #111072] "[[]] attributes are a C23 extension warning" with clang

2024-06-08 Thread Bruno Haible
Paul J. Lucas wrote: > IMHO, the code generated for config.h should not use [[ anywhere unless it > knows for certain (via #if’s or other means) that the compiler supports [[ > without warnings under any circumstances. The compiler does not give us this information. The compiler only gives us

Re: [sr #111072] "[[]] attributes are a C23 extension warning" with clang

2024-06-08 Thread Bruno Haible
Adding to what Paul Eggert wrote: > It looks like -Wc23-extensions is the problem. If you stop using it (or > if you also use -std=gnu23), you shouldn't get those warnings. At least, > that's the behavior I see with clang 18.1.6 (a bit later than your > clang) on Fedora. > > -Wc23-extensions

c32isblank tests: Avoid test failure on NetBSD 10.0

2024-06-08 Thread Bruno Haible
status: 1) The cause is that here, iswblank (L'\f') returns true, not false (as expected). This patch avoids the failure. 2024-06-08 Bruno Haible c32isblank tests: Avoid test failure on NetBSD 10.0. * tests/test-c32isblank.c (main): Disable test of '\f', that fails

Re: usleep: Document Cygwin bug

2024-06-08 Thread Bruno Haible
> In a CI run of libunistring (on GitHub), I see a test failure: > > ../../tests/test-usleep.c:35: assertion 'start < time (NULL)' failed > FAIL test-usleep.exe (exit status: 134) I'm seeing this test failure again. It's time to disable the test on Cygwin. 2024-06-0

Re: test-framework-sh: Don't leave temporary directories on NetBSD.

2024-06-08 Thread Bruno Haible
Collin Funk wrote: > Originally I thought that this was due to GNU getopt rearranging options > or something, since I don't think NetBSD does that. The cause appears to be that for GNU mktemp, the -t option does not take an argument [1]; likewise for OpenBSD mktemp [2] and Solaris mktemp [3].

sigprocmask, pthread_sigmask tests: Avoid failure due to known NetBSD 10.0 bug

2024-06-07 Thread Bruno Haible
-pthread_sigmask1 These are known (and reported) NetBSD 10.0 bugs, see https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00065.html . But I need the test failures to disappear, so as to get an error-free CI. 2024-06-07 Bruno Haible pthread_sigmask tests: Avoid failure due

Re: continuous integration for many platforms

2024-06-07 Thread Bruno Haible
I wrote: > The continuous integration of Gnulib for many platforms is now operational. > <https://github.com/gnu-gnulib/ci-testdir-check/actions> Let me document it in the HACKING file. 2024-06-07 Bruno Haible Update HACKING. * HACKING: Mention the new ma

Re: continuous integration for many platforms

2024-06-07 Thread Bruno Haible
Collin Funk wrote: > Now we should be able to catch errors quickly as things update, etc. Right. With this multi-platform-CI is it now easier to add a unit test: Just make sure that it follows the specification and works on two or three platforms, commit it, and then we'll see (within a week at

usleep: Document Cygwin bug

2024-06-07 Thread Bruno Haible
(NULL)); It means that either usleep() has slept for less than 1 second, or that time (NULL) returned the same value after 1 second or more had elapsed. Since we have no better way to measure time than time() and gettimeofday(), I'll blame usleep. 2024-06-07 Bruno Haible usleep: Do

Re: new module 'tzname', tm_zone and tm_gmtoff

2024-06-06 Thread Bruno Haible
Paul Eggert wrote: > > tzname is used in three places: > >- time_rz, > > This should be fixed to use strftime instead. This seems wrong for two reasons: * time_rz is a small module, without textual I/O. strftime is a large module, doing string formatting. If time_rz depends on

continuous integration for many platforms

2024-06-06 Thread Bruno Haible
The continuous integration of Gnulib for many platforms is now operational. It tests a testdir of nearly all modules of Gnulib on the following platforms: - Ubuntu GNU/Linux 22.04 - CentOS 7 - Alpine Linux - macOS 11, 12, 13 (all

Re: new module 'tzname', tm_zone and tm_gmtoff

2024-06-06 Thread Bruno Haible
Paul Eggert wrote: > * Don't make tzname a module, as this mistakenly suggests that tzname is > useful. Instead, leave tzname's implementation as internal detail of the > nstrftime and c-nstrftime modules. This should be easy. > > * Since tzname should be an internal detail, Gnulib can still

Re: tzname, daylight, timezone: Update documentation

2024-06-06 Thread Bruno Haible
Hi Eric, > You should also document that POSIX will be recommending that you > avoid these three globals, because they do not work with > location-based TZ settings (standardized in the soon-to-be-released > POSIX Issue 8): > > https://austingroupbugs.net/view.php?id=1816 Thanks for the

new module 'tzname'

2024-06-06 Thread Bruno Haible
this module and replacing all uses of HAVE_TZNAME with HAVE_TZNAME_ARRAY, the %Z directive in nstrftime works fine. 2024-06-06 Bruno Haible nstrftime, c-nstrftime: Support time zone names on MSVC. * lib/strftime.c: Use HAVE_TZNAME_ARRAY instead of HAVE_TZNAME. (tzname

tzname, daylight, timezone: Update documentation

2024-06-06 Thread Bruno Haible
a different name, prefixed with underscore. 2024-06-06 Bruno Haible tzname, daylight, timezone: Update documentation. * doc/posix-functions/tzname.texi: Update info about native Windows. * doc/posix-functions/daylight.texi: Update info about OpenBSD, Cygwin

Re: Emacs portability requirements

2024-06-06 Thread Bruno Haible
Thanks, Eli. Everything is clear now (from my side). We will be able to avoid that Gnulib destabilizes Emacs, better than we could in the past. Bruno

Re: Emacs portability requirements

2024-06-06 Thread Bruno Haible
Hi Eli, > > 1) > > > On Windows 9X > > > Emacs loads the UNICOWS.DLL shared library at startup to be able to > > > use some functions ... > > > > Can the source code call the functions of UNICOWS.DLL directly, or > > do these functions all need to be call via pointers obtained via > >

Re: Emacs portability requirements

2024-06-06 Thread Bruno Haible
Hi Eli, Thanks for explaining. Four more questions: 1) > On Windows 9X > Emacs loads the UNICOWS.DLL shared library at startup to be able to > use some functions ... Can the source code call the functions of UNICOWS.DLL directly, or do these functions all need to be call via pointers obtained

Re: acl-permissions: Fix test-file-has-acl-2.sh failure on Cygwin

2024-06-05 Thread Bruno Haible
installation. On the GitHub CI machines, group:Users:* is occurring as well, and needs to be ignored too. 2024-06-06 Bruno Haible acl-permissions: Fix test-file-has-acl-2.sh failure on Cygwin. * lib/acl-internal.c (acl_access_nontrivial): On Cygwin, ignore also group:Users:* en

setenv, unsetenv: On native Windows, don't modify _environ directly

2024-06-05 Thread Bruno Haible
ich modifies both), * and apparently on this machine, MSVC uses a Microsoft CRT that looks at _wgetenv (L"TZ"), not getenv ("TZ"). The fix is to change setenv and unsetenv to use _putenv(). The patches below do this, and also improve comments, fix a possible out-of-memo

setenv: Modernize

2024-06-05 Thread Bruno Haible
The setenv module's code, shared with glibc, contains an unnecessary cast from 'char **' to 'char *'. Probably it was once needed for pre-ANSI C systems, when the type 'void *' did not exist and memcpy() took a 'char *' as first argument. This is long obsolete. 2024-06-05 Bruno Haible

Re: platforms without

2024-06-05 Thread Bruno Haible
Paul Eggert wrote: > As I mentioned since we're close to branching off for a release, I'm a > bit reluctant to mess with this stuff right now. Asking questions should be permitted at any time. Eli only doesn't want "us to destabilize the master branch". If you don't want to ask, can you please

Re: platforms without

2024-06-05 Thread Bruno Haible
Paul Eggert wrote: > > Which platform is this? > > Don't know offhand. I could ask. Please, can you ask? Thanks. > Right now Emacs is starting to freeze up for cutting off the next branch > and I expect people would not be interested in changing this crufty old > stuff right now. Probably

Re: platforms without

2024-06-05 Thread Bruno Haible
Paul Eggert wrote: > Thanks, looks good except that Emacs attempts to be portable to > platforms lacking . It's the first time I hear about such platforms in ca. 20 years. In Gnulib, we're assuming that exists since 2011:

Re: nstrftime, c-nstrftime: Make %c work on native Windows

2024-06-05 Thread Bruno Haible
I did: > + is_c_locale = > +(wstrcmp (locale, L"C") == 0 || wstrcmp (locale, L"POSIX") == 0); Oops. Wrong function name. 2024-06-05 Bruno Haible nstrftime: Make %c work on native Windows again, part 2. * lib/strftime.c (__st

Re: nstrftime, c-nstrftime: Make %c work on native Windows

2024-06-05 Thread Bruno Haible
geLog b/ChangeLog index 8e808fd6a8..d04105378d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2024-06-05 Bruno Haible + + nstrftime: Make %c work on native Windows again. + * lib/strftime.c: Include always. Include on native + Windows. + (__strftime_in

Re: readlink: Work around a Cygwin 3.3.6 bug

2024-06-03 Thread Bruno Haible
ace ../../gllib/abort-debug.c:40 0x40243d _gl_pre_abort ../../gllib/abort-debug.c:81 0x402372 test_readlink ../../gltests/test-readlink.h:120 0x4127a0 main ../../gltests/test-readlinkat.c:75 This patch should fix it. 2024-06-03 Bruno Haible readlinkat: W

readlink: Work around a Cygwin 3.3.6 bug

2024-06-03 Thread Bruno Haible
dlink.exe (exit status: 1) With a workaround in the 'readlink' module, these two tests now succeed. 2024-06-03 Bruno Haible readlink: Work around a Cygwin 3.3.6 bug. * m4/readlink.m4 (gl_FUNC_READLINK): Set REPLACE_READLINK to 1 on Cygwin. * lib/readlink.c (rpl_readlink): On

Re: [PATCH] attribute: const/pure defaults to unsequenced/reproducible

2024-06-03 Thread Bruno Haible
Paul Eggert wrote: > N2956 has a typo. In this statement: > > "Similarly, GCC’s pure is less restricted than the new standard > attribute [[reproducible]], and an implementation of the GCC feature is, > syntax aside, an implementation of the new standard attribute." > > The words "less

flock tests: Don't expect a failure on native Windows

2024-06-03 Thread Bruno Haible
On mingw and MSVC, the replacement code from lib/flock.c is working fine. No test failure here. 2024-06-03 Bruno Haible flock tests: Don't expect a failure on native Windows. * modules/flock-tests (Depends-on): Add test-xfail. (Makefile.am): Don't augment XFAIL_TESTS

Re: acl-permissions: Fix test-file-has-acl-2.sh failure on Cygwin

2024-06-03 Thread Bruno Haible
Hi Ken, > > In this situation, the "trivial" ACL is not > > user::rwx > > group::r-x > > other::r-x > > but instead > > user::rwx > > group::r-x > > group:SYSTEM:rwx > > group:Administrators:rwx > >

nstrftime, c-nstrftime tests: Avoid some failures on native Windows

2024-06-03 Thread Bruno Haible
d "2001-09-09 03:46:42 +0200 (CEST)", got "2001-09-09 01:46:42 + (Coordinated Universal Time)" This patch fixes the failures for mingw on these machines. Apparently native Windows knows the gmt-offset of the time zones in the winter time, but not in the summer time (DST)

acl-permissions: Fix test-file-has-acl-2.sh failure on Cygwin

2024-06-03 Thread Bruno Haible
_nontrivial function to ignore group:SYSTEM:* group:Administrators:* mask::* and thus file_has_acl("tmpfile0") then returns 'no'. I'm not entirely sure whether the permissions of the three entries should be ignored. Maybe someone more familiar with ACLs can elaborate on this?

Re: gnulib-tool.py: Refactor duplicated regular expressions.

2024-06-03 Thread Bruno Haible
Collin Funk wrote: > Good point. I've pushed this patch adding a set() around that one call. Thanks. > This comment is interesting: > > # We need NO_EXPENSIVE_WARN_CFLAGS, because with gcc 13, the compilation of > # libxml/parser.c requires 1.9 GB of RAM with -fanalyzer, as opposed to > #

dprintf-posix tests: Skip the memory leak test on macOS

2024-06-03 Thread Bruno Haible
On the GitHub CI macOS machines (each of macOS 11, 12, 13, 14), I occasionally see the test-dprintf-posix2.sh test fail. This patch will skip this test instead on macOS, like we already do with the test-fprintf-posix3.sh test. 2024-06-03 Bruno Haible dprintf-posix tests: Skip

Re: gnulib-tool.py: Refactor duplicated regular expressions.

2024-06-03 Thread Bruno Haible
Hi Collin, > Oops yes. Good point, I must have overlooked that. It appears that it > will be O(n²). In this loop [1] and the else branch of > "PyAnySet_Check(other)" [2]. Thanks for checking. > The lists there seem small enough that I doubt it matters too much. Bad excuse :) You haven't seen

pthread-* tests, regex tests: Prepare for use of 'alarm'

2024-06-03 Thread Bruno Haible
Some tests use HAVE_DECL_ALARM without testing for 'alarm' first. This patch fixes it. 2024-06-03 Bruno Haible pthread-* tests, regex tests: Prepare for use of 'alarm'. * modules/pthread-cond-tests (configure.ac): Test whether 'alarm' is declared. * modules

mtx tests: Fix a possible link error

2024-06-03 Thread Bruno Haible
The mtx tests use atomic-int-isoc.h, which uses . It therefore needs this patch: 2024-06-03 Bruno Haible mtx tests: Fix a possible link error. * modules/mtx-tests (Files): Add m4/semaphore.m4. (configure.ac): Require gl_SEMAPHORE. (Makefile.am): Link test-mtx

pthread-mutex, pthread-rwlock: Fix a compilation error

2024-06-03 Thread Bruno Haible
]) is missing. This patch should fix it. [1] https://github.com/gnu-grep/ci-check/actions/runs/9344481782 [2] https://github.com/gnu-sed/ci-check/actions/runs/9344732180 2024-06-03 Bruno Haible pthread-mutex, pthread-rwlock: Fix a compilation error. * modules/pthread-mutex-tests (Files

Re: gnulib-tool.py: Refactor duplicated regular expressions.

2024-06-03 Thread Bruno Haible
Hi Collin, > Indirectly this also fixes two issues. The first is the same issue as > yesterdays patch. Variables with a trailing comment, e.g. > > lib_SOURCES += file.c file.h # comment > > are not matched. As far as I can tell none of the module descriptions > have this comment style but

_AM_PATH_GPGRT_CONFIG produces spurious error output

2024-06-02 Thread Bruno Haible
Hi Yutaka, dev.gnupg.org's src/libgcrypt.m4 is mirrored into Gnulib. Building a recent testdir of all of Gnulib on AIX 7.1, I see this among the output of 'configure': ... checking for gpgrt-config... no ../configure[28123]: --version: not found checking for preferred C# implementation... any

c-strtod, c-strtof, c-strtold: Fix link error on AIX

2024-06-02 Thread Bruno Haible
, as well as pthread_mutex_lock, pthread_mutex_unlock (directly). This patch fixes the link errors. 2024-06-02 Bruno Haible c-strtod, c-strtof, c-strtold: Fix link error on AIX. * lib/c-strtod.c (newlocale): Undefine before use. diff --git a/lib/c-strtod.c b/lib/c-strtod.c index

totalorder*: Avoid compilation error by IBM XL C compiler

2024-06-02 Thread Bruno Haible
. "../../gltests/test-totalorder.h", line 64.32: 1506-196 (S) Initialization between types "long double" and "union {...}" is not allowed. "../../gltests/test-totalorder.h", line 66.33: 1506-196 (S) Initialization between types "long double" and &

Re: gnulib/m4/getcwd-path-max.m4 fails on Mac OS X 10.5.8

2024-06-02 Thread Bruno Haible
Hi, James Youngman wrote: > It appears that the test in gnulib/m4/getcwd-path-max.m4 fails on Mac OS X > 10.5.8, leaving behind a deep directory tree that $ac_clean_files doesn't > properly clean up. This is not what I see. On the Mac OS X 10.5.8 system I have access to (x86_64), a testdir for

isnanf, isnand, isnanl: Fix link errors on AIX 7.1 with xlc

2024-06-02 Thread Bruno Haible
it that undoes the macro definitions done by isnan?-nolibm.h. This patch fixes it. 2024-06-02 Bruno Haible isnanf, isnand, isnanl: Fix link errors on AIX 7.1 with xlc. * lib/isnanf-nolibm.h (HAVE_ISNANF_NOLIBM): New macro. * lib/isnand-nolibm.h (HAVE_ISNAND_NOLIBM): New

Re: gnulib-tool.py: Fix crash when no ACLOCAL_AMFLAGS is found.

2024-06-02 Thread Bruno Haible
Collin Funk wrote: > Thanks, I've applied the attached patch fixing that regular expression. Thanks. Now it appears to work fine. Bruno

Re: gnulib-tool.py: Fix crash when no ACLOCAL_AMFLAGS is found.

2024-06-02 Thread Bruno Haible
Hi Collin, > > Thanks for this recipe. I think this is worth a unit test, since it > > is a special case that is otherwise not tested. > > Agreed. I can add one later today. I added it already. Bruno

Re: gnulib-tool.py: Fix crash when no ACLOCAL_AMFLAGS is found.

2024-06-02 Thread Bruno Haible
Hi Collin, > Not sure how this didn't get found sooner, to be honest. Here is an > example of the bug: > > $ git clone https://git.savannah.gnu.org/git/rcs.git > $ cd rcs > $ git checkout next > $ sh -x autogen.sh Thanks for this recipe. I think this is worth a unit test, since

Re: windows-once: Free allocated resources when done

2024-05-31 Thread Bruno Haible
gresses until the end of the function, each of them will call DeleteCriticalSection. I don't think this is allowed (although it has not caused crashes in my testing on Windows 10). These two patches fix it. 2024-05-31 Bruno Haible windows-once: Fix race (regression yesterday).

Re: pthread-once: Work around Cygwin 3.5.3 bug

2024-05-31 Thread Bruno Haible
estroying the lock), then thread2 will proceed and attempt to lock a lock that has already been destroyed — which is undefined behaviour. This patch series fixes the race condition. With it, 100 consecutive runs of test-pthread-once2 succeed. 2024-05-31 Bruno Haible pthread-once:

Re: [PATCH] attribute: const/pure defaults to unsequenced/reproducible

2024-05-31 Thread Bruno Haible
Basil L. Contovounesios wrote: > Isn't this saying that C23 [[reproducible]] is stricter than GCC pure? > https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm#some-differences-with-gcc-const-and-pure Yes: [1], section "Note on GCC attributes", also claims that "pure is more relaxed than

Re: endian: Quote variables that may be undefined (regr. 2024-05-18).

2024-05-30 Thread Bruno Haible
Hi Collin, > However, as > you mention it makes simple mistakes like typos go unnoticed. Thanks for > explaining the conventions. Thanks for being willing to listen. Yes, we have to make trade-offs that are initially not obvious. Some of it (like how to avoid typo mistakes) is a years-long

assert-h, verify: Fix compilation error with g++ (4.8.5) -std=gnu++11

2024-05-30 Thread Bruno Haible
with no message is a C++1z extension [-Wc++1z-extensions] in the 1-arg case, which (AFAIU) is correct. 2024-05-30 Bruno Haible assert-h, verify: Fix compilation error with g++ (4.8.5) -std=gnu++11. Reported by Harmen at <https://savannah.gnu.org/bugs/index.php?65811

attribute: Try harder to avoid syntax errors

2024-05-30 Thread Bruno Haible
hrough the __attribute__((...)) syntax, _without_ placement constraints. I'm therefore committing this. To be revisited when such gcc and clang compiler versions have been released. 2024-05-30 Bruno Haible attribute: Try harder to avoid syntax errors. * m4/gnulib-common.m4 (gl_COMMO

Re: [PATCH] attribute: const/pure defaults to unsequenced/reproducible

2024-05-30 Thread Bruno Haible
A small adjustment of the comments style. When there is a comment block of more than 10 lines, we should not need to be looking down, into a block of #ifdefs, to see what the comment is all about. 2024-05-30 Bruno Haible attribute: Improve comments. * m4/gnulib-common.m4

Re: endian: Quote variables that may be undefined (regr. 2024-05-18).

2024-05-30 Thread Bruno Haible
Hi Collin, > While learning m4/autoconf I seemed to forget about the importance of > quoting variables (see a similar issue Paul fixed with my byteswap.m4 > changes)... > > In a testdir on an AIX machine (cfarm111) I see this warning: > > ./configure[7173]: test: argument expected >

Re: call_once: Work around Cygwin 3.5.3 bug

2024-05-30 Thread Bruno Haible
Hi Jeffrey, > > call_once, being implemented on top of pthread_once in Cygwin, is affected > > by the same bug, and needs a workaround as well. > > Be careful of call_once. Be sure to test it on non-x86 machines. Cygwin exists only for x86. I've run a testdir of all of gnulib on various Linux/

call_once: Work around Cygwin 3.5.3 bug

2024-05-30 Thread Bruno Haible
call_once, being implemented on top of pthread_once in Cygwin, is affected by the same bug, and needs a workaround as well. 2024-05-30 Bruno Haible call_once: Work around Cygwin 3.5.3 bug. * m4/call_once.m4 (gl_FUNC_CALL_ONCE): Require AC_CANONICAL_HOST. On Cygwin

windows-once: Free allocated resources when done

2024-05-30 Thread Bruno Haible
Bruno Haible windows-once: Free allocated resources when done. Based on an observation regarding Cygwin's pthread_once implementation by Takashi Yano at <https://cygwin.com/pipermail/cygwin/2024-January/255182.html> and <https://cygwin.com/piperma

call_once tests: Fix link error on mingw

2024-05-29 Thread Bruno Haible
Compiling a testdir for 'call_once' on mingw, I get link errors due to 'mtx_lock' and 'mtx_unlock'. This patch fixes it. 2024-05-29 Bruno Haible call_once tests: Fix link error on mingw. * modules/call_once-tests (Depends-on): Add mtx. diff --git a/modules/call_once-tests b

mbfile tests: Avoid test failure on mingw

2024-05-29 Thread Bruno Haible
locale. This patch avoids the failure, like in some other tests. 2024-05-29 Bruno Haible mbfile tests: Avoid test failure on mingw. * tests/test-mbfile.c: Include , localcharset.h. (main): Verify that setlocale() has installed an UTF-8 locale. * modules/mbfile-tests

pthread-once tests: Fix crash on mingw

2024-05-29 Thread Bruno Haible
In a mingw build of a testdir of 'asyncsafe-spin' and some other modules, I see a crash of test-pthread-once2. The cause is that this test program uses the pthread_rwlock_* functions from the winpthreads library, which is known to be broken. This patch fixes it. 2024-05-29 Bruno Haible

Re: pthread-once: Work around Cygwin 3.5.3 bug

2024-05-29 Thread Bruno Haible
I wrote: > On Cygwin 3.5.3, programs that use pthread_once or call_once may hang > indefinitely. This is visible also in a testdir for module 'file-has-acl': test-lock hangs (and fails through timeout). This patch fixes it. 2024-05-29 Bruno Haible lock: Work around Cygwin 3.5

Re: [PATCH] gnulib-tool.py: Simplify creation of module shell ids.

2024-05-29 Thread Bruno Haible
Collin Funk wrote: > I've committed this patch adding the ASCII flag. Thanks.

Re: [PATCH] gnulib-tool.py: Simplify creation of module shell ids.

2024-05-29 Thread Bruno Haible
Hi Collin, > -# List of characters allowed in shell identifiers. > -shell_id_chars: ClassVar[str] = > 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_' > +# Regular expression matching module names that can be used as shell ids. > +shell_id_pattern:

pthread-once: Work around Cygwin 3.5.3 bug

2024-05-28 Thread Bruno Haible
Cygwin version is what the GitHub CI uses currently. - There's no sign of activity regarding Cygwin from Corinna Vinschen in more than a month. 2024-05-28 Bruno Haible pthread-once: Work around Cygwin 3.5.3 bug. * m4/pthread-once.m4 (gl_PTHREAD_ONCE): On Cygwi

Re: RFC: Adding tcgetwinsize and tcsetwinsize.

2024-05-28 Thread Bruno Haible
Collin Funk wrote: > Section 8.3 "Other Environment Variables" has a decent description [1]. > The newest draft is better since it mentions tcgetwinsize & tcsetwinsize. > > The process goes something like: > > 1. If $LINES and $COLUMNS are set to positive decimal numbers use them. >- POSIX

Re: RFC: Adding tcgetwinsize and tcsetwinsize.

2024-05-27 Thread Bruno Haible
Hi Collin, > > This needs thought first, because where on the Unix side you have > > two concepts: > > - winsize from the OS, > > - lines and columns from the terminfo description of $TERM, > > and the LINES and COLUMNS environment variables, > > on the Windows side you have only the

Re: RFC: Adding tcgetwinsize and tcsetwinsize.

2024-05-27 Thread Bruno Haible
Hi Collin, > POSIX 2024 added these two functions in termios.h, tcgetwinsize and > tcsetwinsize. They get and set the terminal size respectively. > > As far as I can tell only NetBSD has them implemented [1]. They seem > pretty useful and are easy to implement. I've attached two files that >

nstrftime, c-nstrftime tests: Avoid test failures on native Windows

2024-05-27 Thread Bruno Haible
one as -13 rather than -12. Then, only one test has to be disabled. With this patch, the nstrftime, c-nstrftime tests now pass on mingw and MSVC. 2024-05-27 Bruno Haible nstrftime, c-nstrftime tests: Avoid test failures on native Windows. * doc/posix-functions/tzset.texi: Add a ref

nstrftime, c-nstrftime tests: Avoid some failures on native Windows

2024-05-27 Thread Bruno Haible
Europe Standard Time)" CET-1CEST,M3.5.0,M10.5.0/3: expected "2001-09-09 03:46:42 +0200 (CEST)", got "2001-09-09 03:46:42 +0200 (W. Europe Daylight Time)" I think one needs to accept the fact that time zones have different names in Windows than in POSIX. This patch thus

nstrftime, c-nstrftime: Make %r work on native Windows

2024-05-27 Thread Bruno Haible
On mingw, I see that the %r specifier testing code runs into the assertion of ASSERT (n > 0). This patch adds support for the %r specifier. 2024-05-27 Bruno Haible nstrftime, c-nstrftime: Make %r work on native Windows. * doc/posix-functions/strftime.texi: Mention the

nstrftime, c-nstrftime: Make %h work on native Windows

2024-05-27 Thread Bruno Haible
On mingw, I see that the %h specifier testing code runs into the assertion of ASSERT (n > 0). This patch adds support for the %h specifier. 2024-05-27 Bruno Haible nstrftime, c-nstrftime: Make %h work on native Windows. * doc/posix-functions/strftime.texi: Mention the

nstrftime, c-nstrftime: Make %c work on native Windows

2024-05-27 Thread Bruno Haible
06:40:03") || STREQ (buf, "26 octobre 2017 à 06:40:03") || STREQ (buf, "26 octobre 2017 \340 06:40:03")' failed In order to avoid wrong interpretation of the output, it is useful to print a month name rather than the month number. This patch does it. 2024-05-27

tests: Fix internationalization problems on native Windows

2024-05-27 Thread Bruno Haible
t;Jeu")' failed This shows that the internationalization is not working here. The cause is that the setlocale() function here is not overridden by gnulib, and the native Windows setlocale() function, when called with "" argument, ignores the LC_ALL environment variable. This patch

nstrftime, c-nstrftime tests: Improve debuggability

2024-05-27 Thread Bruno Haible
-05-27 Bruno Haible nstrftime, c-nstrftime tests: Improve debuggability. * tests/test-nstrftime.h (posixtm_test, tzalloc_test, quarter_test, errno_test, locales_test): Flush output after every printf invocation. diff --git a/tests/test-nstrftime.h b/tests/test-nstrftime.h

parse-datetime tests: Avoid failure on native Windows

2024-05-27 Thread Bruno Haible
with slashes. See lib/tzset.c. - After setting the TZ environment variable, it is necessary to call tzset(), otherwise the previous GMT offset continue to be used. This patch fixes it all. 2024-05-27 Bruno Haible parse-datetime tests: Avoid failure on native Windows

Re: mbrtoc32: Work around bug in Cygwin 3.5.3

2024-05-27 Thread Bruno Haible
I did: > 2024-05-23 Bruno Haible > > mbrtoc32: Strengthen tests. > * tests/test-mbrtoc32.c (main): Add tests for one-by-one input in the > UTF-8 and GB18030 encodings. This new test fails on NetBSD 10.0, reported by the CI. In this case, mbrtoc32 returns (si

Re: What is the history behind the check-module script?

2024-05-27 Thread Bruno Haible
Hi Collin, > I never looked at the check-module script until now. Was it supposed > to be used as an automatic check to be run before committing or > something? Probably yes. Certainly Jim used it. I don't use it. Bruno

attribute: Support ISO C 23 [[reproducible]] and [[unsequenced]]

2024-05-27 Thread Bruno Haible
std.org/jtc1/sc22/wg14/www/docs/n2956.htm>. 2024-05-27 Bruno Haible attribute: Support ISO C 23 [[reproducible]] and [[unsequenced]]. * m4/gnulib-common.m4 (gl_COMMON_BODY): Define _GL_ATTR_reproducible, _GL_ATTR_unsequenced, _GL_ATTRIBUTE_REPRODUCIBLE, _GL_AT

Re: uchar-c23: Speed up mbrtoc32 on Solaris 11.4

2024-05-26 Thread Bruno Haible
Collin Funk wrote: > I'm not sure how long this would have taken to get caught without CI. I run the testdirs on various platforms occasionally. Without the CI, I would have noticed within a few months. The real question is: How could we have detected this without the test-mcel.c test? Our unit

euidaccess: Fix test failure on mingw

2024-05-25 Thread Bruno Haible
: 1) Likewise on MSVC. This patch fixes it. 2024-05-25 Bruno Haible euidaccess: Fix test failure on native Windows. * lib/euidaccess.c: Don't include . (euidaccess): On native Windows, invoke access, not _access. diff --git a/lib/euidaccess.c b/lib/euidaccess.c index

Re: mcel tests: Run the test in several locales

2024-05-25 Thread Bruno Haible
I did: > 2024-05-21 Bruno Haible > > mcel tests: Run the test in several locales. > * tests/test-mcel-1.sh: New file, based on tests/test-mbrtowc-1.sh. > * tests/test-mcel-2.sh: New file, based on tests/test-mbrtowc-2.sh. > * tests/test-mcel-3.s

mcel tests: Fix typo

2024-05-25 Thread Bruno Haible
. 2024-05-25 Bruno Haible mcel tests: Fix typo. * tests/test-mcel.c (main): Increment j instead of i. diff --git a/tests/test-mcel.c b/tests/test-mcel.c index 7458fa472c..ab6b7dd8d3 100644 --- a/tests/test-mcel.c +++ b/tests/test-mcel.c @@ -109,7 +109,7 @@ main (void

uchar-c23: Speed up mbrtoc32 on Solaris 11.4

2024-05-25 Thread Bruno Haible
pen (even twice), and that calls dlopen, which does lots of filesystem and mmap() calls. The function 'get_converters' was meant to cache its result, but didn't. This patch fixes it and brings the execution times down to ca. 4 seconds. 2024-05-25 Bruno Haible uchar-c23: Speed up mbrtoc

tests: Before declaring a SKIP, test if there were ASSERT failures

2024-05-25 Thread Bruno Haible
Paul Eggert wrote: > * tests/test-linkat.c (main): Don’t lose the failure results of > earlier tests. Problem found by Coverity. The same problem exists on a few more tests. Fixed by the first patch below. The second patch is a simple refactoring. 2024-05-25 Bruno Haible

Re: Native windows boot-time

2024-05-24 Thread Bruno Haible
Collin Funk wrote: > I've fixed those in the attached patch and pushed it. Thanks. readutmp now needs a module dependency on gettimetoday, right? Bruno

Re: Native windows boot-time

2024-05-24 Thread Bruno Haible
Hi Collin, > I wrote this patch just now. Any thoughts? - In line 393 the #endif is misindented. - The readutmp module is a second user of boot-time-aux.h. It should also make a call to get_windows_boot_time_fallback. Other than that, it's OK to push. > I've only tested it with a mingw

Re: [PATCH 2/2] putenv-tests: pacify gcc -Wdiscarded-qualifiers

2024-05-24 Thread Bruno Haible
Paul Eggert wrote: > > It is not spam. It is fully justified, since in > >putenv ((char []) {"TEST_VAR=abc"}) > > the argument is allocated in automatic storage. See ISO C § 6.5.2.5.(12). > > Well, to be fair, the test program removed the string from the > environment before 'main' returned

Re: Native windows boot-time

2024-05-24 Thread Bruno Haible
Hi Collin, > Does the get_windows_boot_time () not work on Native Windows? The > Mingw and MSVC actions fail it. There's apparently a difference between a full installation of Windows 10 and the image that they use in the Microsoft Azure cloud. > I'm thinking that it could be implemented using

Re: [PATCH] POSIX.1-2024 has been approved

2024-05-24 Thread Bruno Haible
Great news, and thanks for the doc update. Bruno

Re: [PATCH 2/2] putenv-tests: pacify gcc -Wdiscarded-qualifiers

2024-05-24 Thread Bruno Haible
Collin Funk wrote: > The putenv > function places the pointer that it is given into the environment. > When it goes out of scope the behavior is undefined [1]. Yes. Practically this means that the code in the exit() function (which gets executed after main() returns) may call getenv(), and this

Re: [PATCH] putenv tests: Silence -Wanalyzer-putenv-of-auto-var.

2024-05-24 Thread Bruno Haible
52 00 47 43 43 3A 20 28 55 TEST_VAR.GCC: (U ... $ objdump -x a.out ... 22 .data 0019 4000 4000 3000 2**3 CONTENTS, ALLOC, LOAD, DATA ... I'm therefore applying this: 2024-05-24 Bruno Haible putenv tests: Put the p

Re: mbrtoc32: Work around bug in Cygwin 3.5.3

2024-05-24 Thread Bruno Haible
I did: > 2024-05-23 Bruno Haible > > mbrtoc32: Strengthen tests. > * tests/test-mbrtoc32.c (main): Add tests for one-by-one input in the > UTF-8 and GB18030 encodings. Oops, the new test fails on Solaris 11.4. Fixed as follows: 2024-05-24 Bruno Haible

mbrtoc32: Work around bug in Cygwin 3.5.3

2024-05-23 Thread Bruno Haible
The mbrtoc32 function, newly added in Cygwin 3.5.0, is buggy. These two patches provide a workaround (at the cost of deactivating the GB18030 locale support in Cygwin), and add a two test cases. 2024-05-23 Bruno Haible mbrtoc32: Strengthen tests. * tests/test-mbrtoc32.c

sethostname tests: Avoid test failure on Cygwin

2024-05-23 Thread Bruno Haible
the LSB specifies it should fail in this case, I don't think it's worth a workaround in Gnulib, since this function is rarely used. So, let me just skip this test and notify the Cygwin people. 2024-05-23 Bruno Haible sethostname tests: Avoid test failure on Cygwin. * tests/test

access, euidaccess tests: Avoid test failures on Cygwin

2024-05-23 Thread Bruno Haible
Administrators group) and 544(Administrators), whereas on my installation, it isn't. All other groups are the same. This patch should avoid the test failures. 2024-05-23 Bruno Haible access, euidaccess tests: Avoid test failures on Cygwin. * tests/test-access.h (test_access): O

c32is*, c32toupper tests: Avoid test failures on Cygwin

2024-05-23 Thread Bruno Haible
. This patch fixes the failures: 2024-05-23 Bruno Haible c32is*, c32toupper tests: Avoid test failures on Cygwin. * tests/test-c32isalpha.c (main): Disable tests that fail on Cygwin 3.5.3. * tests/test-c32iscntrl.c (main): Likewise. * tests/test

  1   2   3   4   5   6   7   8   9   10   >