bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* [PATCH] threadlib: fix case patterns for older Solaris.
@ 2023-01-25  3:53 Nick Bowler
  2023-01-25  8:44 ` Bruno Haible
  0 siblings, 1 reply; 2+ messages in thread
From: Nick Bowler @ 2023-01-25  3:53 UTC (permalink / raw)
  To: bug-gnulib

The case pattern which matches solaris2.[1-9] etc. is not fully
quoted, so the brackets get eaten by m4 and don't actually make
it into the resulting configure script, giving just:

    case "$host_os" in
      solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)

which is obviously not correct.

* m4/threadlib.m4 (gl_STDTHREADLIB_BODY): Allow case patterns to
survive m4 processing by using changequote.
---
 m4/threadlib.m4 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/m4/threadlib.m4 b/m4/threadlib.m4
index 48ced460b3..49bc99ef3b 100644
--- a/m4/threadlib.m4
+++ b/m4/threadlib.m4
@@ -261,7 +261,9 @@ AC_DEFUN([gl_PTHREADLIB_BODY],
              # On Solaris 10 or newer, this test is no longer needed, because
              # libc contains the fully functional pthread functions.
              case "$host_os" in
+changequote(,)dnl
                solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
+changequote([,])dnl
                  AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
                    [Define if the pthread_in_use() detection is hard.])
              esac
-- 
2.35.1



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

* Re: [PATCH] threadlib: fix case patterns for older Solaris.
  2023-01-25  3:53 [PATCH] threadlib: fix case patterns for older Solaris Nick Bowler
@ 2023-01-25  8:44 ` Bruno Haible
  0 siblings, 0 replies; 2+ messages in thread
From: Bruno Haible @ 2023-01-25  8:44 UTC (permalink / raw)
  To: bug-gnulib; +Cc: Nick Bowler

Hi,

Nick Bowler wrote:
> The case pattern which matches solaris2.[1-9] etc. is not fully
> quoted, so the brackets get eaten by m4 and don't actually make
> it into the resulting configure script, giving just:
> 
>     case "$host_os" in
>       solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
> 
> which is obviously not correct.

Oh, indeed! Thanks for the observation and the fix. I have applied
it in your name. (The "tiny change" marker in the ChangeLog merely
means that the change is small enough that I could apply it without
asking you for a copyright assignment. Cf.
https://www.gnu.org/prep/maintain/html_node/Legally-Significant.html .)

> * m4/threadlib.m4 (gl_STDTHREADLIB_BODY): Allow case patterns to
> survive m4 processing by using changequote.

The change was in gl_PTHREADLIB_BODY, not in gl_STDTHREADLIB_BODY.
But anyway, thanks for providing the change description in the
first place.

Bruno


2023-01-25  Nick Bowler  <nbowler@draconx.ca>  (tiny change)

	threadlib: Fix support for Solaris 9 and older.
	* m4/threadlib.m4 (gl_PTHREADLIB_BODY): Allow case patterns to survive
	m4 processing by using changequote.

diff --git a/m4/threadlib.m4 b/m4/threadlib.m4
index 48ced460b3..7202b9528d 100644
--- a/m4/threadlib.m4
+++ b/m4/threadlib.m4
@@ -1,4 +1,4 @@
-# threadlib.m4 serial 34
+# threadlib.m4 serial 35
 dnl Copyright (C) 2005-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -261,7 +261,9 @@ AC_DEFUN([gl_PTHREADLIB_BODY],
              # On Solaris 10 or newer, this test is no longer needed, because
              # libc contains the fully functional pthread functions.
              case "$host_os" in
+changequote(,)dnl
                solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
+changequote([,])dnl
                  AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
                    [Define if the pthread_in_use() detection is hard.])
              esac





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

end of thread, other threads:[~2023-01-25  8:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-25  3:53 [PATCH] threadlib: fix case patterns for older Solaris Nick Bowler
2023-01-25  8:44 ` 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).