* [RFC, hurd 64bit]: st_dev type
@ 2023-05-01 13:45 Samuel Thibault
0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2023-05-01 13:45 UTC (permalink / raw)
To: libc-alpha, bug-hurd
[-- Attachment #1: Type: text/plain, Size: 802 bytes --]
Hello,
Since we are creating a new ABI, it's time to take care of types :)
I have fixed a few cases that had been identified on hurd 32bit, so that
hurd 64bit doesn't get affected.
There is however one case which remains problematic: stat.st_dev, which
the standars say to have type dev_t, is #defined to st_fsid on Hurd,
since the pid of the translator is what is representative of the device
number. It happens that dev_t is 32bit (__U32_TYPE) and fsid_t is
64bit (__UQUAD_TYPE), see BZ 23084. Perhaps we should just make dev_t
UWORD_TYPE, so it becomes 64bit on Hurd 64bit, as the attached patch
does? (it is UQUAD or 64bit on Linux ports)
I have only checked what is tested by the testsuite, we should
probably carefully review all types exposed by libc with hurd-specific
definitions.
Samuel
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 552 bytes --]
diff --git a/sysdeps/mach/hurd/bits/typesizes.h b/sysdeps/mach/hurd/bits/typesizes.h
index 7b95bb0b91..646ee934bb 100644
--- a/sysdeps/mach/hurd/bits/typesizes.h
+++ b/sysdeps/mach/hurd/bits/typesizes.h
@@ -26,7 +26,7 @@
/* See <bits/types.h> for the meaning of these macros. This file exists so
that <bits/types.h> need not vary across different GNU platforms. */
-#define __DEV_T_TYPE __U32_TYPE
+#define __DEV_T_TYPE __UWORD_TYPE
#define __UID_T_TYPE __U32_TYPE
#define __GID_T_TYPE __U32_TYPE
#define __INO_T_TYPE __ULONGWORD_TYPE
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-01 13:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-01 13:45 [RFC, hurd 64bit]: st_dev type Samuel Thibault
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).