+2024-08-07 Bruno Haible <bruno@clisp.org>
+
+ Avoid compiler warnings in some configure tests.
+ * m4/pthread-rwlock.m4 (gl_PTHREAD_RWLOCK): Allocate more room for local
+ array 'name'.
+ * m4/pthread_mutex_timedlock.m4 (gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK): Don't
+ pass a NULL pointer to pthread_mutex_timedlock.
+
2024-08-07 Bruno Haible <bruno@clisp.org>
pthread-rwlock: Fix default wait queue behaviour on glibc/Linux.
# pthread-rwlock.m4
-# serial 5
+# serial 6
dnl Copyright (C) 2019-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
char **names = (char **) malloc (n * sizeof (char *));
for (size_t i = 0; i < n; i++)
{
- char name[10];
+ char name[12];
sprintf (name, "%c%u", rw_string[i], (unsigned int) (i+1));
names[i] = strdup (name);
}
# pthread_mutex_timedlock.m4
-# serial 5
+# serial 6
dnl Copyright (C) 2019-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
#include <time.h>
]],
[[pthread_mutex_t lock;
- return pthread_mutex_timedlock (&lock, (struct timespec *) 0);
+ struct timespec ts = { 0 };
+ return pthread_mutex_timedlock (&lock, &ts);
]])
],
[gl_cv_func_pthread_mutex_timedlock_in_LIBMULTITHREAD=yes],