totalorder: Add benchmark

2023-10-15 Thread Bruno Haible
These two patches add a benchmark for the totalorder* functions. 2023-10-15 Bruno Haible totalorder-bench-tests: New module. * tests/bench-totalorder.c: New file, based on tests/test-totalorder.h. * modules/totalorder-bench-tests: New file. 2023-10-15 Bruno Haible

optimizing totalorder

2023-10-15 Thread Bruno Haible
With the new benchmark in place, I measured the run time of - the glibc 2.35 implementation of totalorder, - the gnulib implementation (picked by configuring with gl_cv_func_totalorder_in_libm=no gl_cv_func_totalorder_no_libm=no \ gl_cv_func_totalorderf_in_libm=no gl_cv_func_totalor

lock: Make Autoconf macro more robust

2023-10-15 Thread Bruno Haible
gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER uses $LIBMULTITHREAD. For this, it needs to require gl_THREADLIB, not gl_THREADLIB_EARLY. Otherwise, we could have wrong configuration results. 2023-10-15 Bruno Haible lock: Make Autoconf macro more robust. * m4/pthread_rwlock_rdlock.m4 (

threadlib: Fix link errors on FreeBSD 5.2.1/i386

2023-10-15 Thread Bruno Haible
On FreeBSD 5.2.1/i386, a testdir shows many link errors for pthread_* functions. Most of these functions exist in libthr.so; there is no libpthread in this version of FreeBSD. 2023-10-15 Bruno Haible threadlib: Fix link errors on FreeBSD 5.2.1/i386. * m4/threadlib.m4 (gl_PTHRE

pthread*: Fix link errors on FreeBSD 5.2.1/i386

2023-10-15 Thread Bruno Haible
On FreeBSD 5.2.1/i386, I see these link errors: ../gllib/libgnu.a(mtx.o): In function `mtx_timedlock': /usr/home/bruno/testdir-all/build/gllib/../../gllib/mtx.c:257: undefined reference to `pthread_mutex_timedlock' gmake[4]: *** [test-mtx] Error 1 test-pthread-spin.o: In function `lock_mutator_t

Re: pthread*: Fix link errors on FreeBSD 5.2.1/i386

2023-10-15 Thread Bruno Haible
> 2023-10-15 Bruno Haible > > pthread-spin: Fix link errors on FreeBSD 5.2.1/i386. > * m4/pthread-spin.m4 (gl_PTHREAD_SPIN): Test not only whether >defines the pthread_spinlock_t type, but also whether the > function pthread_spin_init is actually defined. This patch w

Re: Remaining support for GNULIB_MCEL_PREFER

2023-10-15 Thread Bruno Haible
In a testdir, on FreeBSD 5.2.1, I see this warning: ../../gllib/mbspbrk.c:45: warning: unused variable `iter' This patch fixes it. 2023-10-15 Bruno Haible mbspbrk: Fix gcc warning (regression 2023-09-26). * lib/mbspbrk.c (mbspbrk): Fix gcc warning in GNULIB_MCEL_PREFER mode.

net_if tests: Fix gcc warning

2023-10-15 Thread Bruno Haible
In a testdir on FreeBSD 5.2.1, I see this gcc warning: ../../gltests/test-net_if.c:78: warning: implicit declaration of function `strcmp' The fix is trivial: 2023-10-15 Bruno Haible net_if tests: Fix gcc warning. * tests/test-net_if.c: Include . diff --git a/tests/test-net

Clang, MSYS2 and MSVC

2023-10-15 Thread Jeffrey Walton
Hi All, A quick heads up... We caught a bug report because Clang got into a code path intended for MSVC. The problem is like the Apple and LLVM CLang problem. The issue surfaced recently for us on WIndows platforms. We expected Clang to get into certain code paths for MSYS2 (and MinGW and Cygwin)

Re: Clang, MSYS2 and MSVC

2023-10-15 Thread Paul Eggert
On 2023-10-15 17:01, Jeffrey Walton wrote: A quick heads up... We caught a bug report because Clang got into a code path intended for MSVC. Thanks for the heads-up. Was this in Gnulib, or in some other code? If in Gnulib, where? Like with the Apple issue, detect it like so: #if defin