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

Re: no "uname -o" on Mac OSX

From
Junio C Hamano <junkio@cox.net>
Date
Oct 9, 2005, 19:27 UTC
Message-ID
<7voe5yebjv.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<86k6gnm0sz.fsf@blue.stonehenge.com>
merlyn@stonehenge.com (Randal L. Schwartz) writes:
> Recently, a change was made to git/Makefile to invoke "uname -o".
> This isn't portable to OSX/Darwin.  Is there a chance this information
> can be obtained some other way, or not invoked on darwni?
Peter, I noticed the same on Solaris recently.

The following seems to work but is quite yucky, and I prefer somebody to come up with a better alternative.

    ------------
Makefile: 'uname -o' is not portable.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
diff --git a/Makefile b/Makefile
index 7ba3eeb..ba048cb 100644
--- a/Makefile
+++ b/Makefile
@@ -180,7 +180,7 @@ ifeq ($(shell uname -s),SunOS)
 	TAR = gtar
 	PLATFORM_DEFINES += -D__EXTENSIONS__
 endif
-ifeq ($(shell uname -o),Cygwin)
+ifeq ($(shell sh -c 'uname -o 2>/dev/null || echo not'),Cygwin)
 	NO_STRCASESTR = YesPlease
 	NEEDS_LIBICONV = YesPlease
 	NO_IPV6 = YesPlease
Previous: Randal L. SchwartzNext: Randal L. Schwartz
Message 2 of 4 in “no "uname -o" on Mac OSX”
  1. Randal L. SchwartzOct 9, 2005
  2. Junio C HamanoOct 9, 2005
  3. Randal L. SchwartzOct 9, 2005
  4. Junio C HamanoOct 9, 2005

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.