23 lines
645 B
PHP
23 lines
645 B
PHP
|
//===-- sanitizer_syscall_generic.inc ---------------------------*- C++ -*-===//
|
||
|
//
|
||
|
// This file is distributed under the University of Illinois Open Source
|
||
|
// License. See LICENSE.TXT for details.
|
||
|
//
|
||
|
//===----------------------------------------------------------------------===//
|
||
|
//
|
||
|
// Generic implementations of internal_syscall and internal_iserror.
|
||
|
//
|
||
|
//===----------------------------------------------------------------------===//
|
||
|
|
||
|
#define internal_syscall syscall
|
||
|
|
||
|
bool internal_iserror(uptr retval, int *rverrno) {
|
||
|
if (retval == (uptr)-1) {
|
||
|
if (rverrno)
|
||
|
*rverrno = errno;
|
||
|
return true;
|
||
|
} else {
|
||
|
return false;
|
||
|
}
|
||
|
}
|