git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* no "uname -o" on Mac OSX
@ 2005-10-09 10:39 Randal L. Schwartz
  2005-10-09 19:27 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Randal L. Schwartz @ 2005-10-09 10:39 UTC (permalink / raw)
  To: git


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?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

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

* Re: no "uname -o" on Mac OSX
  2005-10-09 10:39 no "uname -o" on Mac OSX Randal L. Schwartz
@ 2005-10-09 19:27 ` Junio C Hamano
  2005-10-09 19:31   ` Randal L. Schwartz
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2005-10-09 19:27 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Randal L. Schwartz, git

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

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

* Re: no "uname -o" on Mac OSX
  2005-10-09 19:27 ` Junio C Hamano
@ 2005-10-09 19:31   ` Randal L. Schwartz
  2005-10-09 19:34     ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Randal L. Schwartz @ 2005-10-09 19:31 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: H. Peter Anvin, git

>>>>> "Junio" == Junio C Hamano <junkio@cox.net> writes:

Junio> Peter, I noticed the same on Solaris recently.

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

How about a chain of elsif's?

Doesn't make support that?

I mean, when you know it's Darwin, no point in checking if it's OpenBSD. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

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

* Re: no "uname -o" on Mac OSX
  2005-10-09 19:31   ` Randal L. Schwartz
@ 2005-10-09 19:34     ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2005-10-09 19:34 UTC (permalink / raw)
  To: Randal L. Schwartz; +Cc: git

merlyn@stonehenge.com (Randal L. Schwartz) writes:

> How about a chain of elsif's?

Makes much more sense.  Thanks.

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

end of thread, other threads:[~2005-10-09 19:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-09 10:39 no "uname -o" on Mac OSX Randal L. Schwartz
2005-10-09 19:27 ` Junio C Hamano
2005-10-09 19:31   ` Randal L. Schwartz
2005-10-09 19:34     ` Junio C Hamano

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 NNTP newsgroup(s).