1 //===-- sanitizer_platform_interceptors.h -----------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines macro telling whether sanitizer tools can/should intercept
11 // given library functions on a given platform.
13 //===----------------------------------------------------------------------===//
15 #include "sanitizer_internal_defs.h"
18 # define SI_NOT_WINDOWS 1
20 # define SI_NOT_WINDOWS 0
23 #if defined(__linux__) && !defined(ANDROID)
24 # define SI_LINUX_NOT_ANDROID 1
26 # define SI_LINUX_NOT_ANDROID 0
29 # define SANITIZER_INTERCEPT_READ SI_NOT_WINDOWS
30 # define SANITIZER_INTERCEPT_PREAD SI_NOT_WINDOWS
31 # define SANITIZER_INTERCEPT_WRITE SI_NOT_WINDOWS
32 # define SANITIZER_INTERCEPT_PWRITE SI_NOT_WINDOWS
34 # define SANITIZER_INTERCEPT_PREAD64 SI_LINUX_NOT_ANDROID
35 # define SANITIZER_INTERCEPT_PWRITE64 SI_LINUX_NOT_ANDROID
36 # define SANITIZER_INTERCEPT_PRCTL SI_LINUX_NOT_ANDROID
38 # define SANITIZER_INTERCEPT_SCANF SI_NOT_WINDOWS