[compiler-rt] r174600 - [sanitizer] OFF_T on Mac is u64.

Evgeniy Stepanov eugeni.stepanov at gmail.com
Thu Feb 7 01:52:43 PST 2013


Author: eugenis
Date: Thu Feb  7 03:52:43 2013
New Revision: 174600

URL: http://llvm.org/viewvc/llvm-project?rev=174600&view=rev
Log:
[sanitizer] OFF_T on Mac is u64.

Modified:
    compiler-rt/trunk/lib/interception/interception.h

Modified: compiler-rt/trunk/lib/interception/interception.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/interception/interception.h?rev=174600&r1=174599&r2=174600&view=diff
==============================================================================
--- compiler-rt/trunk/lib/interception/interception.h (original)
+++ compiler-rt/trunk/lib/interception/interception.h Thu Feb  7 03:52:43 2013
@@ -30,7 +30,12 @@ typedef __sanitizer::s64  INTMAX_T;
 // WARNING: OFF_T may be different from OS type off_t, depending on the value of
 // _FILE_OFFSET_BITS. This definition of OFF_T matches the ABI of system calls
 // like pread and mmap, as opposed to pread64 and mmap64.
+// Mac is special.
+#ifdef __APPLE__
+typedef __sanitizer::u64 OFF_T;
+#else
 typedef __sanitizer::uptr OFF_T;
+#endif
 typedef __sanitizer::u64  OFF64_T;
 
 // How to add an interceptor:





More information about the llvm-commits mailing list