xref: /netbsd-src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_common_nolibc.cc (revision 627f7eb200a4419d89b531d55fccd2ee3ffdcde0)
1 //===-- sanitizer_common_nolibc.cc ----------------------------------------===//
2 //
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
5 //
6 //===----------------------------------------------------------------------===//
7 //
8 // This file contains stubs for libc function to facilitate optional use of
9 // libc in no-libcdep sources.
10 //===----------------------------------------------------------------------===//
11 
12 #include "sanitizer_platform.h"
13 #include "sanitizer_common.h"
14 #include "sanitizer_libc.h"
15 
16 namespace __sanitizer {
17 
18 // The Windows implementations of these functions use the win32 API directly,
19 // bypassing libc.
20 #if !SANITIZER_WINDOWS
21 #if SANITIZER_LINUX
LogMessageOnPrintf(const char * str)22 void LogMessageOnPrintf(const char *str) {}
23 #endif
WriteToSyslog(const char * buffer)24 void WriteToSyslog(const char *buffer) {}
Abort()25 void Abort() { internal__exit(1); }
SleepForSeconds(int seconds)26 void SleepForSeconds(int seconds) { internal_sleep(seconds); }
27 #endif // !SANITIZER_WINDOWS
28 
29 #if !SANITIZER_WINDOWS && !SANITIZER_MAC
init()30 void ListOfModules::init() {}
31 #endif
32 
33 }  // namespace __sanitizer
34