]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4374 / 1: Fix platform identification
authorMasamichi Hosoda <trueroad@trueroad.jp>
Sat, 9 May 2015 08:20:19 +0000 (17:20 +0900)
committerMasamichi Hosoda <trueroad@trueroad.jp>
Sat, 16 May 2015 11:56:31 +0000 (20:56 +0900)
On Cygwin environment,
Guile's uname returns the strings of "CYGWIN_NT-6.3" etc.
It contains unnecessary strings for the platform identification,
such as Windows version.

Therefore, to remove them to return the only "cygwin".

scm/lily.scm
scm/ps-to-png.scm

index 6322e0196053af7480909fc3ddbbd2d148b56e00..27ba76ab378e3d0b1670666bf323b0089f0dada6 100644 (file)
@@ -41,7 +41,7 @@
 (define-public PLATFORM
   (string->symbol
    (string-downcase
-    (car (string-tokenize (utsname:sysname (uname)))))))
+    (car (string-tokenize (utsname:sysname (uname)) char-set:letter)))))
 
 ;;
 ;; Session-handling variables and procedures.
index e2a0d6cb205665eb10963ad615ea9f54cf498418..7e94ac051601cc33056cbabbeb05a42a6ac585c9 100644 (file)
@@ -34,7 +34,7 @@
 (define PLATFORM
   (string->symbol
    (string-downcase
-    (car (string-tokenize (vector-ref (uname) 0) char-set:letter)))))
+    (car (string-tokenize (utsname:sysname (uname)) char-set:letter)))))
 
 (define (re-sub re sub string)
   (regexp-substitute/global #f re string 'pre sub 'post))