From e2eb72d3d2070a3888df1f7e7907798833965baa Mon Sep 17 00:00:00 2001 From: Masamichi Hosoda Date: Sat, 9 May 2015 17:20:19 +0900 Subject: [PATCH] Issue 4374 / 1: Fix platform identification 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 | 2 +- scm/ps-to-png.scm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scm/lily.scm b/scm/lily.scm index 6322e01960..27ba76ab37 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -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. diff --git a/scm/ps-to-png.scm b/scm/ps-to-png.scm index e2a0d6cb20..7e94ac0516 100644 --- a/scm/ps-to-png.scm +++ b/scm/ps-to-png.scm @@ -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)) -- 2.39.5