From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id CB1713857363; Fri, 5 Aug 2022 19:32:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB1713857363 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Szabolcs Nagy To: glibc-cvs@sourceware.org Subject: [glibc/arm/morello/main] TODO(api): cheri: fix syscall return type X-Act-Checkin: glibc X-Git-Author: Szabolcs Nagy X-Git-Refname: refs/heads/arm/morello/main X-Git-Oldrev: fbdd679dfe6a00c9ad6edf41299c00c61933171a X-Git-Newrev: 2d17978865e853744c9b30416251a9a0e6931908 Message-Id: <20220805193232.CB1713857363@sourceware.org> Date: Fri, 5 Aug 2022 19:32:32 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2022 19:32:32 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2d17978865e853744c9b30416251a9a0e6931908 commit 2d17978865e853744c9b30416251a9a0e6931908 Author: Szabolcs Nagy Date: Thu Jul 14 14:22:26 2022 +0100 TODO(api): cheri: fix syscall return type TODO: this affects API (syscall return type is long) so breaks portability and requires doc updates. Diff: --- sysdeps/unix/sysv/linux/sysdep.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/sysdep.h b/sysdeps/unix/sysv/linux/sysdep.h index 3dc2bad50e..83f2323eda 100644 --- a/sysdeps/unix/sysv/linux/sysdep.h +++ b/sysdeps/unix/sysv/linux/sysdep.h @@ -35,13 +35,19 @@ }) #endif +#ifdef __CHERI_PURE_CAPABILITY__ +# define syscall_ret_t intptr_t +#else +# define syscall_ret_t long +#endif + /* Define a macro which expands into the inline wrapper code for a system call. It sets the errno and returns -1 on a failure, or the syscall return value otherwise. */ #undef INLINE_SYSCALL #define INLINE_SYSCALL(name, nr, args...) \ ({ \ - long int sc_ret = INTERNAL_SYSCALL (name, nr, args); \ + syscall_ret_t sc_ret = INTERNAL_SYSCALL (name, nr, args); \ __glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (sc_ret)) \ ? SYSCALL_ERROR_LABEL (INTERNAL_SYSCALL_ERRNO (sc_ret)) \ : sc_ret; \