Commit f2eaf978 authored by Bodigrim's avatar Bodigrim Committed by Xia Li-yao
Browse files

Rename _hs_text_memcmp to _hs_text_memcmp2 to disambiguate from system-wide headers

parent c07872b8
......@@ -7,7 +7,9 @@
#include <string.h>
#include <sys/types.h>
int _hs_text_memcmp(const void *arr1, size_t off1, const void *arr2, size_t off2, size_t len)
/* Changed name to disambiguate from _hs_text_memcmp,
which could be present in system-wide headers from installed ghc package */
int _hs_text_memcmp2(const void *arr1, size_t off1, const void *arr2, size_t off2, size_t len)
{
return memcmp(arr1 + off1, arr2 + off2, len);
}
......
......@@ -324,7 +324,7 @@ compareInternal (ByteArray src1#) (I# off1#) (ByteArray src2#) (I# off2#) (I# co
#else
i = fromIntegral (inlinePerformIO (memcmp src1# off1# src2# off2# count#))
foreign import ccall unsafe "_hs_text_memcmp" memcmp
foreign import ccall unsafe "_hs_text_memcmp2" memcmp
:: ByteArray# -> Int# -> ByteArray# -> Int# -> Int# -> IO CInt
#endif
{-# INLINE compareInternal #-}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment