summaryrefslogtreecommitdiff
path: root/Build/OSXMkLibs.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-12-09 13:06:59 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-12-09 13:06:59 -0400
commitecd7822e0a9b7bf19c2c5f1f6f88c3ff9ce28709 (patch)
tree308bbc8d1306bc99d3538cd21d9fc259308d139b /Build/OSXMkLibs.hs
parent0f5b494133b7dcd99fbb7958ce1d8a30dd5e7063 (diff)
avoid using short lib names that clash with unix command names
Diffstat (limited to 'Build/OSXMkLibs.hs')
-rw-r--r--Build/OSXMkLibs.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Build/OSXMkLibs.hs b/Build/OSXMkLibs.hs
index 4535073d7..ab78e39bf 100644
--- a/Build/OSXMkLibs.hs
+++ b/Build/OSXMkLibs.hs
@@ -103,9 +103,8 @@ getLibName lib libmap = case M.lookup lib libmap of
Just n -> (n, libmap)
Nothing -> (nextfreename, M.insert lib nextfreename libmap)
where
- names = map (\c -> [c]) letters ++
- [[l1, l2] | l1 <- letters, l2 <- letters]
- letters = ['a' .. 'z'] ++ ['0' .. '9']
+ names = map (\c -> [c]) ['A' .. 'Z'] ++
+ [[n, l] | n <- ['0' .. '9'], l <- ['A' .. 'Z']
used = S.fromList $ M.elems libmap
nextfreename = fromMaybe (error "ran out of short library names!") $
headMaybe $ dropWhile (`S.member` used) names