bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* [PATCH] m4: Pointer types for pthread_spinlock_init, pthread_mutex_timedlock
@ 2024-02-12  9:28 Florian Weimer
  2024-02-12 11:20 ` Bruno Haible
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer @ 2024-02-12  9:28 UTC (permalink / raw)
  To: bug-gnulib

Without this change, these probes fail unconditionally with GCC 14
because they do not use the correct argument types.

---
 m4/pthread-spin.m4            | 2 +-
 m4/pthread_mutex_timedlock.m4 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/m4/pthread-spin.m4 b/m4/pthread-spin.m4
index daf9462b52..0b668a15fd 100644
--- a/m4/pthread-spin.m4
+++ b/m4/pthread-spin.m4
@@ -42,7 +42,7 @@ AC_DEFUN([gl_PTHREAD_SPIN],
              [AC_LANG_PROGRAM(
                 [[#include <pthread.h>
                 ]],
-                [[pthread_spinlock_t *lock;
+                [[pthread_spinlock_t lock;
                   return pthread_spin_init (&lock, 0);
                 ]])
              ],
diff --git a/m4/pthread_mutex_timedlock.m4 b/m4/pthread_mutex_timedlock.m4
index 1dc4c8c682..824dab9e24 100644
--- a/m4/pthread_mutex_timedlock.m4
+++ b/m4/pthread_mutex_timedlock.m4
@@ -26,7 +26,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK],
                [[#include <pthread.h>
                  #include <time.h>
                ]],
-               [[pthread_mutex_t *lock;
+               [[pthread_mutex_t lock;
                  return pthread_mutex_timedlock (&lock, (struct timespec *) 0);
                ]])
             ],

base-commit: 8c7736e4898fb0c177f97b396bbc782a8daa409a



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] m4: Pointer types for pthread_spinlock_init, pthread_mutex_timedlock
  2024-02-12  9:28 [PATCH] m4: Pointer types for pthread_spinlock_init, pthread_mutex_timedlock Florian Weimer
@ 2024-02-12 11:20 ` Bruno Haible
  0 siblings, 0 replies; 2+ messages in thread
From: Bruno Haible @ 2024-02-12 11:20 UTC (permalink / raw)
  To: bug-gnulib; +Cc: Florian Weimer

Hi Florian,

Florian Weimer wrote:
> Without this change, these probes fail unconditionally with GCC 14
> because they do not use the correct argument types.

Thanks for noticing and reporting it! Applied.
https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=f5b70b135a355d7f957ddd8119a802f3d3bb4958

Bruno





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-12 11:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-12  9:28 [PATCH] m4: Pointer types for pthread_spinlock_init, pthread_mutex_timedlock Florian Weimer
2024-02-12 11:20 ` Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).