[compiler-rt] r230183 - Unix/BSD system calls are prefixed with SYS_ on FreeBSD and Mac
Ismail Pazarbasi
ismail.pazarbasi at gmail.com
Sun Feb 22 14:01:09 PST 2015
Author: ismailp
Date: Sun Feb 22 16:01:09 2015
New Revision: 230183
URL: http://llvm.org/viewvc/llvm-project?rev=230183&view=rev
Log:
Unix/BSD system calls are prefixed with SYS_ on FreeBSD and Mac
Also, __syscall form should be used when one or more of the
parameters is a 64-bit argument to ensure that argument alignment
is correct.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_syscall_generic.inc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_syscall_generic.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_syscall_generic.inc?rev=230183&r1=230182&r2=230183&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_syscall_generic.inc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_syscall_generic.inc Sun Feb 22 16:01:09 2015
@@ -11,13 +11,13 @@
//
//===----------------------------------------------------------------------===//
-#if SANITIZER_FREEBSD
+#if SANITIZER_FREEBSD || SANITIZER_MAC
# define SYSCALL(name) SYS_ ## name
#else
# define SYSCALL(name) __NR_ ## name
#endif
-#if SANITIZER_FREEBSD && defined(__x86_64__)
+#if (SANITIZER_FREEBSD || SANITIZER_MAC) && defined(__x86_64__)
# define internal_syscall __syscall
# else
# define internal_syscall syscall
More information about the llvm-commits
mailing list