From 840871d4a024e16b206d4487ee5ccd7e77f88fda Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 17 Dec 2002 12:29:48 +0000 Subject: [PATCH] [project @ 2002-12-17 12:29:48 by simonmar] On second thoughts, use memcmp instead. --- ghc/compiler/utils/FastString.lhs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ghc/compiler/utils/FastString.lhs b/ghc/compiler/utils/FastString.lhs index ed81d79..494648f 100644 --- a/ghc/compiler/utils/FastString.lhs +++ b/ghc/compiler/utils/FastString.lhs @@ -422,7 +422,7 @@ cmpFS (FastString u1# l1# b1#) (FastString u2# l2# b2#) = if u1# ==# u2# then EQ else let l# = if l1# <=# l2# then l1# else l2# in unsafePerformIO ( - strncmp b1# b2# l# >>= \ (I# res) -> + memcmp b1# b2# l# >>= \ (I# res) -> return ( if res <# 0# then LT else if res ==# 0# then @@ -431,8 +431,8 @@ cmpFS (FastString u1# l1# b1#) (FastString u2# l2# b2#) = else GT )) -foreign import ccall "strncmp" unsafe - strncmp :: ByteArray# -> ByteArray# -> Int# -> IO Int +foreign import ccall "ghc_memcmp" unsafe + memcmp :: ByteArray# -> ByteArray# -> Int# -> IO Int -- ----------------------------------------------------------------------------- -- Outputting 'FastString's -- 1.7.10.4