[sanitizer] OFF_T on Mac is u64.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 7 Feb 2013 09:52:43 +0000 (09:52 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 7 Feb 2013 09:52:43 +0000 (09:52 +0000)
llvm-svn: 174600

compiler-rt/lib/interception/interception.h

index c8a0543dcb6a450ae189d8956cea6112620796cd..00675341830bc3e3e3a184ea4a6eeb4cf33d8181 100644 (file)
@@ -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: