Daily bump.
[official-gcc.git] / libsanitizer / sanitizer_common / sanitizer_syscall_generic.inc
blob6b2c915a3bc2719e62a9e32f725239a075eaeb10
1 //===-- sanitizer_syscall_generic.inc ---------------------------*- C++ -*-===//
2 //
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
5 //
6 //===----------------------------------------------------------------------===//
7 //
8 // Generic implementations of internal_syscall and internal_iserror.
9 //
10 //===----------------------------------------------------------------------===//
12 #define internal_syscall syscall
14 bool internal_iserror(uptr retval, int *rverrno) {
15   if (retval == (uptr)-1) {
16     if (rverrno)
17       *rverrno = errno;
18     return true;
19   } else {
20     return false;
21   }