git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Makefile: update defaults for modern Cygwin

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Apr 3, 2010, 07:47 UTC
Message-ID
<20100403074700.GA24176@progeny.tock>
In-Reply-To
<4BB5F94F.3090403@redhat.com>
Eric Blake wrote:
> On 04/02/2010 12:47 AM, Junio C Hamano wrote:
Show 9 quoted lines
>> Replacing
>> this with "ifeq(... ,1 5)" may not be an improvement either, unless we are
>> sure that nobody is using 1.4 or older, but I wonder if somebody else have
>> better ideas?
>
> Nothing short of using $(shell) and doing some actual computation on the
> string in $(uname_R).  But that's not too hard, if people think it's
> worth it; speak up if you want me to rework it along those lines,
> otherwise I'll assume that things are good enough as-is.

Red Hat internal people might want to be able to use 1.8 when it comes out. Maybe something like this would do the trick? I don’t know whether Cygwin 1.6 has the fixes 1.7 does, so in my ignorance I lumped it with 1.5.

What you sent is probably good enough already; just trying to avoid future work.

-- %< --
Subject: Makefile: future-proof Cygwin version check

Tweak the condition that detects old Cygwin versions to not include versions such as 1.8, 1.11, and 2.1.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
diff --git a/Makefile b/Makefile
index 11ec3e2..a712430 100644
--- a/Makefile
+++ b/Makefile
@@ -831,7 +831,7 @@ ifeq ($(uname_S),SunOS)
 	BASIC_CFLAGS += -D__EXTENSIONS__ -D__sun__ -DHAVE_ALLOCA_H
 endif
 ifeq ($(uname_O),Cygwin)
-	ifneq ($(wordlist 1, 2, $(subst ., ,$(uname_R))),1 7)
+	ifeq ($(shell expr "$(uname_R)" : '1\.[1-6]\.'),4)
 		NO_D_TYPE_IN_DIRENT = YesPlease
 		NO_D_INO_IN_DIRENT = YesPlease
 		NO_STRCASESTR = YesPlease
Previous: Eric BlakeNext: Junio C Hamano
Message 4 of 11 in “Makefile: update defaults for modern Cygwin”
  1. Makefile: update defaults for modern CygwinEric Blake, Apr 1, 2010
  2. Junio C HamanoApr 2, 2010
  3. Eric BlakeApr 2, 2010
  4. Jonathan NiederApr 3, 2010
  5. Junio C HamanoApr 3, 2010
  6. Teach mailinfo %< as an alternative scissors markJonathan Nieder, Apr 3, 2010
  7. Eric BlakeApr 5, 2010
  8. Jonathan NiederApr 5, 2010
  9. Eric BlakeApr 5, 2010
  10. Makefile: avoid a fork in Cygwin version checkJonathan Nieder, Apr 5, 2010
  11. Andreas SchwabApr 5, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.