public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Iain Buclaw <ibuclaw@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r10-10354] libphobos: Fix definition of stat_t for MIPS64 (PR103604) Date: Tue, 21 Dec 2021 13:17:19 +0000 (GMT) [thread overview] Message-ID: <20211221131719.0D9643858430@sourceware.org> (raw) https://gcc.gnu.org/g:ecd9684ec16ec0de2e4c0bb3f2097f98e6686cbe commit r10-10354-gecd9684ec16ec0de2e4c0bb3f2097f98e6686cbe Author: Iain Buclaw <ibuclaw@gdcproject.org> Date: Tue Dec 21 14:07:37 2021 +0100 libphobos: Fix definition of stat_t for MIPS64 (PR103604) Backported specific change from commit r12-6003. libphobos/ChangeLog: PR d/103604 * libdruntime/core/sys/posix/sys/stat.d (struct stat_t): Fix definition for MIPS64. (cherry picked from commit 96a09dec2421af3e201f5a54dadb35f00917ea5b) Diff: --- libphobos/libdruntime/core/sys/posix/sys/stat.d | 46 +++++++++++++++---------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/libphobos/libdruntime/core/sys/posix/sys/stat.d b/libphobos/libdruntime/core/sys/posix/sys/stat.d index b154e1489a6..6c51144ba9f 100644 --- a/libphobos/libdruntime/core/sys/posix/sys/stat.d +++ b/libphobos/libdruntime/core/sys/posix/sys/stat.d @@ -337,26 +337,23 @@ version (CRuntime_Glibc) } c_long[14] st_pad5; } + static if (!__USE_FILE_OFFSET64) + static assert(stat_t.sizeof == 144); + else + static assert(stat_t.sizeof == 160); } else version (MIPS64) { struct stat_t { - c_ulong st_dev; + dev_t st_dev; int[3] st_pad1; - static if (!__USE_FILE_OFFSET64) - { - ino_t st_ino; - } - else - { - c_ulong st_ino; - } + ino_t st_ino; mode_t st_mode; nlink_t st_nlink; uid_t st_uid; gid_t st_gid; - c_ulong st_rdev; + dev_t st_rdev; static if (!__USE_FILE_OFFSET64) { uint[2] st_pad2; @@ -365,8 +362,8 @@ version (CRuntime_Glibc) } else { - c_long[3] st_pad2; - c_long st_size; + uint[3] st_pad2; + off_t st_size; } static if (__USE_MISC || __USE_XOPEN2K8) { @@ -391,15 +388,26 @@ version (CRuntime_Glibc) } blksize_t st_blksize; uint st_pad4; + blkcnt_t st_blocks; + int[14] st_pad5; + } + version (MIPS_N32) + { static if (!__USE_FILE_OFFSET64) - { - blkcnt_t st_blocks; - } + static assert(stat_t.sizeof == 160); else - { - c_long st_blocks; - } - c_long[14] st_pad5; + static assert(stat_t.sizeof == 176); + } + else version (MIPS_O64) + { + static if (!__USE_FILE_OFFSET64) + static assert(stat_t.sizeof == 160); + else + static assert(stat_t.sizeof == 176); + } + else + { + static assert(stat_t.sizeof == 216); } } else version (PPC)
reply other threads:[~2021-12-21 13:17 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=20211221131719.0D9643858430@sourceware.org \ --to=ibuclaw@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.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: linkBe 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).