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