summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/arch/amd64/SYS.h19
-rw-r--r--lib/libc/arch/x86_64/SYS.h19
2 files changed, 24 insertions, 14 deletions
diff --git a/lib/libc/arch/amd64/SYS.h b/lib/libc/arch/amd64/SYS.h
index bdf0bfe6d03..f6364d9553a 100644
--- a/lib/libc/arch/amd64/SYS.h
+++ b/lib/libc/arch/amd64/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.1 2004/01/28 01:44:44 mickey Exp $ */
+/* $OpenBSD: SYS.h,v 1.2 2004/02/06 18:19:19 deraadt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -47,20 +47,25 @@
#include <sys/syscall.h>
#ifdef __STDC__
+
#define SYSTRAP(x) movl $(SYS_ ## x),%eax; movq %rcx, %r10; syscall
+#define SYSENTRY(x) \
+ ENTRY(_thread_sys_ ## x); \
+ .weak _C_LABEL(x); \
+ _C_LABEL(x) = _C_LABEL(_thread_sys_ ## x)
#else
+
#define SYSTRAP(x) movl $(SYS_/**/x),%eax; movq %rcx, %r10; syscall
+#define SYSENTRY(x) \
+ ENTRY(_thread_sys_/**/x); \
+ .weak _C_LABEL(x); \
+ _C_LABEL(x) = _C_LABEL(_thread_sys_/**/x)
+
#endif
#define CERROR _C_LABEL(__cerror)
#define CURBRK _C_LABEL(__curbrk)
-#define SYSENTRY(x) \
- ENTRY(_thread_sys_ ## x); \
- .weak _C_LABEL(x); \
- _C_LABEL(x) = _C_LABEL(_thread_sys_ ## x)
-
-
#define _SYSCALL_NOERROR(x,y) \
SYSENTRY(x); \
SYSTRAP(y)
diff --git a/lib/libc/arch/x86_64/SYS.h b/lib/libc/arch/x86_64/SYS.h
index bdf0bfe6d03..f6364d9553a 100644
--- a/lib/libc/arch/x86_64/SYS.h
+++ b/lib/libc/arch/x86_64/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.1 2004/01/28 01:44:44 mickey Exp $ */
+/* $OpenBSD: SYS.h,v 1.2 2004/02/06 18:19:19 deraadt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -47,20 +47,25 @@
#include <sys/syscall.h>
#ifdef __STDC__
+
#define SYSTRAP(x) movl $(SYS_ ## x),%eax; movq %rcx, %r10; syscall
+#define SYSENTRY(x) \
+ ENTRY(_thread_sys_ ## x); \
+ .weak _C_LABEL(x); \
+ _C_LABEL(x) = _C_LABEL(_thread_sys_ ## x)
#else
+
#define SYSTRAP(x) movl $(SYS_/**/x),%eax; movq %rcx, %r10; syscall
+#define SYSENTRY(x) \
+ ENTRY(_thread_sys_/**/x); \
+ .weak _C_LABEL(x); \
+ _C_LABEL(x) = _C_LABEL(_thread_sys_/**/x)
+
#endif
#define CERROR _C_LABEL(__cerror)
#define CURBRK _C_LABEL(__curbrk)
-#define SYSENTRY(x) \
- ENTRY(_thread_sys_ ## x); \
- .weak _C_LABEL(x); \
- _C_LABEL(x) = _C_LABEL(_thread_sys_ ## x)
-
-
#define _SYSCALL_NOERROR(x,y) \
SYSENTRY(x); \
SYSTRAP(y)