[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH glibc 12/34] hurd: More 64-bit integer casting fixes
From: |
Sergey Bugaev |
Subject: |
[RFC PATCH glibc 12/34] hurd: More 64-bit integer casting fixes |
Date: |
Sun, 19 Mar 2023 18:09:55 +0300 |
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
sysdeps/mach/hurd/ioctl.c | 4 ++--
sysdeps/mach/hurd/x86/init-first.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sysdeps/mach/hurd/ioctl.c b/sysdeps/mach/hurd/ioctl.c
index 0f5de5d3..ab913a59 100644
--- a/sysdeps/mach/hurd/ioctl.c
+++ b/sysdeps/mach/hurd/ioctl.c
@@ -149,10 +149,10 @@ __ioctl (int fd, unsigned long int request, ...)
Rather than pointing to the value, ARG is the value itself. */
#ifdef MACH_MSG_TYPE_BIT
*t++ = io2mach_type (1, _IOTS (integer_t));
- *(integer_t *) t = (integer_t) arg;
+ *(integer_t *) t = (integer_t) (intptr_t) arg;
t = (void *) t + sizeof (integer_t);
#else
- *(integer_t *) p = (integer_t) arg;
+ *(integer_t *) p = (integer_t) (intptr_t) arg;
p = (void *) p + sizeof (integer_t);
#endif
}
diff --git a/sysdeps/mach/hurd/x86/init-first.c
b/sysdeps/mach/hurd/x86/init-first.c
index 6ca27155..48c330ec 100644
--- a/sysdeps/mach/hurd/x86/init-first.c
+++ b/sysdeps/mach/hurd/x86/init-first.c
@@ -1,4 +1,4 @@
-/* Initialization code run first thing by the ELF startup code. For i386/Hurd.
+/* Initialization code run first thing by the ELF startup code. For x86/Hurd.
Copyright (C) 1995-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -92,7 +92,7 @@ posixland_init (int argc, char **argv, char **envp)
static void
init (void **data)
{
- int argc = (int) *data;
+ int argc = (int) (uintptr_t) *data;
char **argv = (void *) (data + 1);
char **envp = &argv[argc + 1];
struct hurd_startup_data *d;
--
2.39.2
- [RFC PATCH 00/34] The rest of the x86_64-gnu port, Sergey Bugaev, 2023/03/19
- [RFC PATCH gnumach 01/34] Add i386_fsgs_base_state, Sergey Bugaev, 2023/03/19
- [RFC PATCH gnumach 02/34] Remove bootstrap.defs, Sergey Bugaev, 2023/03/19
- [RFC PATCH gnumach 03/34] Make exception subcode a long, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 04/34] hurd: Make exception subcode a long, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 05/34] hurd: Remove __hurd_threadvar_stack_{offset, mask}, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 09/34] hurd: Fix _hurd_setup_sighandler () signature, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 06/34] hurd: Swap around two function calls, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 07/34] hurd: Fix file name in #error, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 12/34] hurd: More 64-bit integer casting fixes,
Sergey Bugaev <=
- [RFC PATCH glibc 13/34] x86-64: Disable prefer_map_32bit_exec tunable on non-Linux, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 14/34] hurd: Move rtld-strncpy-c.c out of mach/hurd/, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 15/34] hurd: Use uintptr_t for register values in trampoline.c, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 10/34] stdio-common: Fix building when !IS_IN (libc), Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 11/34] mach, hurd: Drop __libc_lock_self0, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 08/34] hurd: Disable O_TRUNC and FS_RETRY_MAGICAL in rtld, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 17/34] hurd: Implement x86_64/intr-msg.h, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 16/34] hurd: Add sys/ucontext.h and sigcontext.h for x86_64, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 18/34] hurd: Port trampoline.c to x86_64, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 19/34] hurd: Move a couple of singal-related files to x86, Sergey Bugaev, 2023/03/19