• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//===-- sanitizer_syscall_generic.inc ---------------------------*- C++ -*-===//
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// Generic implementations of internal_syscall and internal_iserror.
11//
12//===----------------------------------------------------------------------===//
13
14#define internal_syscall syscall
15
16bool internal_iserror(uptr retval, int *rverrno) {
17  if (retval == (uptr)-1) {
18    if (rverrno)
19      *rverrno = errno;
20    return true;
21  } else {
22    return false;
23  }
24}
25