diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-01-29 17:36:58 +0000 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-02-14 21:09:12 -0300 |
commit | fcb78a55058fd4e3477d9e4c6a5083d650aefa31 (patch) | |
tree | 888c34d043ee64bc43da8e8fca7d61966cb22df6 /sysdeps/unix/sysv/linux/alpha | |
parent | 9a973da617772eff1f351989f8995f4305a2e63c (diff) | |
download | glibc-fcb78a55058fd4e3477d9e4c6a5083d650aefa31.tar glibc-fcb78a55058fd4e3477d9e4c6a5083d650aefa31.tar.gz glibc-fcb78a55058fd4e3477d9e4c6a5083d650aefa31.tar.bz2 glibc-fcb78a55058fd4e3477d9e4c6a5083d650aefa31.zip |
linux: Consolidate INLINE_SYSCALL
With all Linux ABIs using the expected Linux kABI to indicate
syscalls errors, there is no need to replicate the INLINE_SYSCALL.
The generic Linux sysdep.h includes errno.h even for !__ASSEMBLER__,
which is ok now and it allows cleanup some archaic code that assume
otherwise.
Checked with a build against all affected ABIs.
Diffstat (limited to 'sysdeps/unix/sysv/linux/alpha')
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/brk.S | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/sysdep.h | 25 |
2 files changed, 2 insertions, 26 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index 45ecbbea1b..5596b346d8 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -21,8 +21,7 @@ break value (instead of the new, requested one). */ #include <sysdep.h> -#define _ERRNO_H -#include <bits/errno.h> +#include <errno.h> #ifdef PIC .section .bss diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index 218e207e50..f5bcd851f0 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -92,6 +92,7 @@ # define USEPV_PROF no #endif +#undef SYSCALL_ERROR_LABEL #if RTLD_PRIVATE_ERRNO # define SYSCALL_ERROR_LABEL $syscall_error # define SYSCALL_ERROR_HANDLER \ @@ -169,42 +170,18 @@ __LABEL(name) \ #else /* !ASSEMBLER */ -/* In order to get __set_errno() definition in INLINE_SYSCALL. */ -#include <errno.h> - -#undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) \ -({ \ - INTERNAL_SYSCALL_DECL (_sc_err); \ - long int _sc_ret = INTERNAL_SYSCALL (name, sc_err, nr, args); \ - if (INTERNAL_SYSCALL_ERROR_P (_sc_ret, _sc_err)) \ - { \ - __set_errno (INTERNAL_SYSCALL_ERRNO (_sc_ret, _sc_err)); \ - _sc_ret = -1L; \ - } \ - _sc_ret; \ -}) - #define INTERNAL_SYSCALL(name, err_out, nr, args...) \ internal_syscall##nr(__NR_##name, args) #define INTERNAL_SYSCALL_NCS(name, err_out, nr, args...) \ internal_syscall##nr(name, args) -#define INTERNAL_SYSCALL_DECL(err) do { } while (0) - /* The normal Alpha calling convention sign-extends 32-bit quantties no matter what the "real" sign of the 32-bit type. We want to preserve that when filling in values for the kernel. */ #define syscall_promote(arg) \ (sizeof (arg) == 4 ? (long int)(int)(long int)(arg) : (long int)(arg)) -/* Make sure and "use" the variable that we're not returning, - in order to suppress unused variable warnings. */ -#define INTERNAL_SYSCALL_ERROR_P(val, err) \ - ((unsigned long) (val) > -4096UL) -#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val)) - #define internal_syscall_clobbers \ "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \ "$22", "$23", "$24", "$25", "$27", "$28", "memory" |