From: Samuel Thibault <samuel.thibault@gnu.org>
To: libc-alpha@sourceware.org, bug-hurd@gnu.org
Subject: [RFC, hurd 64bit]: st_dev type
Date: Mon, 1 May 2023 15:45:26 +0200 [thread overview]
Message-ID: <20230501134526.727cicipy7pkutv6@begin> (raw)
[-- 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
reply other threads:[~2023-05-01 13:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230501134526.727cicipy7pkutv6@begin \
--to=samuel.thibault@gnu.org \
--cc=bug-hurd@gnu.org \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).