[commit: nofib] master: Don't use uname -o (7debffc)

git at git.haskell.org git at git.haskell.org
Tue Aug 15 01:35:15 UTC 2017


Repository : ssh://git@git.haskell.org/nofib

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/7debffc19e17ceec7a5fc4bde9aa9780847dda17/nofib

>---------------------------------------------------------------

commit 7debffc19e17ceec7a5fc4bde9aa9780847dda17
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Mon Aug 14 20:45:40 2017 -0400

    Don't use uname -o
    
    Summary:
    It's not required by the POSIX specification and OS X doesn't support
    it; instead use uname -s.
    
    Test Plan: V
    
    Reviewers: O26 nofib, michalt, mpickering
    
    Reviewed By: O26 nofib, michalt, mpickering
    
    Subscribers: mpickering
    
    GHC Trac Issues: #13711
    
    Differential Revision: https://phabricator.haskell.org/D3594


>---------------------------------------------------------------

7debffc19e17ceec7a5fc4bde9aa9780847dda17
 mk/boilerplate.mk         | 2 +-
 runstdtest/runstdtest.prl | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mk/boilerplate.mk b/mk/boilerplate.mk
index 45344ca..c2a5cd6 100644
--- a/mk/boilerplate.mk
+++ b/mk/boilerplate.mk
@@ -23,7 +23,7 @@ CONTEXT_DIFF_RAW = diff -U 1
 EXECUTABLE_FILE = chmod +x
 
 # Windows MSYS specific settings
-ifeq ($(shell uname -o), Msys)
+ifeq ($(shell uname -s | grep -c MSYS), 1)
 	exeext=.exe
 	CONTEXT_DIFF=$(CONTEXT_DIFF_RAW) --strip-trailing-cr
 else
diff --git a/runstdtest/runstdtest.prl b/runstdtest/runstdtest.prl
index 8af3c0b..f1ebbd8 100644
--- a/runstdtest/runstdtest.prl
+++ b/runstdtest/runstdtest.prl
@@ -57,7 +57,7 @@ if ( $ENV{'TMPDIR'} ) { # where to make tmp file names
 }
 $cmp = "cmp -s";
 # If this is Msys, ignore eol and CR characters.
-if ( `uname -o | grep Msys` ) {
+if ( `uname -s | grep MSYS` ) {
     $CONTEXT_DIFF=$CONTEXT_DIFF . " --strip-trailing-cr" ;
     $cmp = $CONTEXT_DIFF . " -q";
 }



More information about the ghc-commits mailing list