Modernize platform names, especially for Mac OS X.

This commit is contained in:
Matthew Flatt 2012-03-12 17:22:30 -06:00 committed by Eli Barzilay
parent 540213236a
commit 1228770550
2 changed files with 13 additions and 9 deletions

View File

@ -3,19 +3,23 @@
(define -platform-names-
`(;; source platforms
["win" "Windows"]
["mac" "Macintosh"]
["mac" "Mac OS X"]
["unix" "Unix"]
;; binary platforms
["i386-win32" "Windows x86"]
["x86_64-win32" "Windows x64"]
["i386-win32" "Windows (x86, 32-bit)"]
["x86_64-win32" "Windows (x64, 64-bit)"]
["(ppc|i386|x86_64)-osx-mac"
,(λ (_ cpu)
(format "Macintosh OS X (~a)"
(if (equal? cpu "ppc") "PPC" (format "Intel ~a" cpu))))]
(format "Mac OS X (~a)"
(cond
[(equal? cpu "ppc") "PPC"]
[(equal? cpu "i386") "Intel 32-bit"]
[(equal? cpu "x86_64") "Intel 64-bit"]
[else (error "unregonized cpu!")])))]
["(ppc|68k)-mac-classic" "Macintosh Classic (\\1)"]
["(ppc|i386)-darwin"
,(λ (_ cpu)
(format "Macintosh Darwin (~a)"
(format "Darwin (~a)"
(if (equal? cpu "ppc") "PPC" "Intel")))]
["i386-linux(-gcc2)?" "Linux i386"]
["i386-linux-fc([0-9]+)" "Linux i386 (Fedora Core \\1)"]

View File

@ -139,9 +139,9 @@
var p = navigator.platform;
var l = function(str) { return p.indexOf(str) != -1@";" }
var Win = /Windows/,
Mac = /Macintosh/,
MacIntel = /Macintosh.*Intel/,
MacPPC = /Macintosh.*PPC/,
Mac = /Mac/,
MacIntel = /Mac.*Intel/,
MacPPC = /Mac.*PPC/,
Linux = /Linux/,
Linux64 = /Linux.*x86_64/,
Linux32 = /Linux.*i386/,