diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-07-22 17:10:30 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-07-22 17:10:30 +0000 |
commit | 72677cc3d8403da4b35c99617352bde347780222 (patch) | |
tree | 7d5d29cc3f49a1b69f90ca9ae6fbf3f61e81b1ce /libc/sysdeps/linux/common/getcwd.c | |
parent | 980e7850176c30ba374a706298b2865f387ec2ae (diff) |
Rework syscall handling. Rewrite syscall handlers for x86 and ARM.
Prepare to kill the UNIFIED_SYSCALL option and instead have it be
a per arch thing that is either enabled or not for that arch.
-Erik
Diffstat (limited to 'libc/sysdeps/linux/common/getcwd.c')
-rw-r--r-- | libc/sysdeps/linux/common/getcwd.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/common/getcwd.c b/libc/sysdeps/linux/common/getcwd.c index 1ec00a36e..9cdd84b47 100644 --- a/libc/sysdeps/linux/common/getcwd.c +++ b/libc/sysdeps/linux/common/getcwd.c @@ -8,8 +8,12 @@ #include <sys/syscall.h> #ifdef __NR_getcwd -#define __NR___getcwd __NR_getcwd -static inline _syscall2(int, __getcwd, char *, buf, unsigned long, size); + +#ifndef INLINE_SYSCALL +#define INLINE_SYSCALL(name, nr, args...) __syscall_getcwd (args) +#define __NR___syscall_getcwd __NR_getcwd +static inline _syscall2(int, __syscall_getcwd, char *, buf, unsigned long, size); +#endif char *getcwd(char *buf, int size) { @@ -31,7 +35,7 @@ char *getcwd(char *buf, int size) if (buf == NULL) return NULL; } - ret = __getcwd(buf, size); + ret = INLINE_SYSCALL(getcwd, 2, buf, size); if (ret < 0) { if (allocbuf) { free(allocbuf); |