2
1

0002-m4-pthread-cond.m4-fix-build-without-threads.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. From 7622a0a4c6309f9cecaeef72569da687eb5b6b93 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Mon, 5 Apr 2021 01:13:29 +0200
  4. Subject: [PATCH] pthread-cond: Fix wrong configure results when <pthread.h> is
  5. absent.
  6. * m4/pthread-cond.m4 (gl_PTHREAD_COND): When <pthread.h> does not exist,
  7. set HAVE_PTHREAD_COND_* to 0, not to 1.
  8. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  9. [yann.morin.1998@free.fr:
  10. - backport from upstream gnulib
  11. - drop upstream's Changelog hunk
  12. - reisntate Fabrice's SoB
  13. ]
  14. Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
  15. ---
  16. m4/pthread-cond.m4 | 18 +++++++++---------
  17. 2 files changed, 15 insertions(+), 9 deletions(-)
  18. diff --git a/m4/pthread-cond.m4 b/m4/pthread-cond.m4
  19. index 75e37c6138..8922a8a243 100644
  20. --- a/m4/pthread-cond.m4
  21. +++ b/m4/pthread-cond.m4
  22. @@ -1,5 +1,5 @@
  23. -# pthread-cond.m4 serial 1
  24. -dnl Copyright (C) 2019-2020 Free Software Foundation, Inc.
  25. +# pthread-cond.m4 serial 2
  26. +dnl Copyright (C) 2019-2021 Free Software Foundation, Inc.
  27. dnl This file is free software; the Free Software Foundation
  28. dnl gives unlimited permission to copy and/or distribute it,
  29. dnl with or without modifications, as long as this notice is preserved.
  30. @@ -23,14 +23,14 @@ AC_DEFUN([gl_PTHREAD_COND],
  31. REPLACE_PTHREAD_COND_DESTROY=1
  32. else
  33. if test $HAVE_PTHREAD_H = 0; then
  34. - HAVE_PTHREAD_COND_INIT=1
  35. - HAVE_PTHREAD_CONDATTR_INIT=1
  36. - HAVE_PTHREAD_CONDATTR_DESTROY=1
  37. - HAVE_PTHREAD_COND_WAIT=1
  38. - HAVE_PTHREAD_COND_TIMEDWAIT=1
  39. - HAVE_PTHREAD_COND_SIGNAL=1
  40. - HAVE_PTHREAD_COND_BROADCAST=1
  41. - HAVE_PTHREAD_COND_DESTROY=1
  42. + HAVE_PTHREAD_COND_INIT=0
  43. + HAVE_PTHREAD_CONDATTR_INIT=0
  44. + HAVE_PTHREAD_CONDATTR_DESTROY=0
  45. + HAVE_PTHREAD_COND_WAIT=0
  46. + HAVE_PTHREAD_COND_TIMEDWAIT=0
  47. + HAVE_PTHREAD_COND_SIGNAL=0
  48. + HAVE_PTHREAD_COND_BROADCAST=0
  49. + HAVE_PTHREAD_COND_DESTROY=0
  50. fi
  51. fi
  52. ])
  53. --
  54. 2.30.2