[sanitizer] replace size_t with SIZE_T in interceptors (same for ssize_t, off_t and off64_t). This is done to avoid confusion and to make the code work with compilers that define size_t w/o any includes (MSVC)
llvm-svn: 170103
diff --git a/compiler-rt/lib/interception/interception.h b/compiler-rt/lib/interception/interception.h
index 7dad07f..e5f8916 100644
--- a/compiler-rt/lib/interception/interception.h
+++ b/compiler-rt/lib/interception/interception.h
@@ -19,6 +19,15 @@
# error "Interception doesn't work on this operating system."
#endif
+#include "sanitizer/common_interface_defs.h"
+
+// These typedefs should be used only in the interceptor definitions to replace
+// the standard system types (e.g. SSIZE_T instead of ssize_t)
+typedef __sanitizer::uptr SIZE_T;
+typedef __sanitizer::sptr SSIZE_T;
+typedef __sanitizer::u64 OFF_T;
+typedef __sanitizer::u64 OFF64_T;
+
// How to use this library:
// 1) Include this header to define your own interceptors
// (see details below).