Bug creation and email sending has been disabled, file new bugs at gcc.gnu.org/bugzilla
Bug 5 - std.file: struct_stat64 wrong for ARM
Summary: std.file: struct_stat64 wrong for ARM
Status: RESOLVED FIXED
Alias: None
Product: GDC
Classification: Unclassified
Component: libgphobos (show other bugs)
Version: development
Hardware: ARM Linux
: --- trivial
Assignee: Johannes Pfau
URL:
Depends on:
Blocks:
 
Reported: 2012-09-24 14:58 CEST by Johannes Pfau
Modified: 2013-03-28 11:32 CET (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Pfau 2012-09-24 14:58:29 CEST
The struct_stat64 declaration forces align(4) on st_size. This is wrong for ARM, I wonder if it's actually correct for x86? Should be trivial to fix, but std.file probably should define this struct at all. It should use core.sys.posix.sys.stat instead, which currently does not have a struct_stat64 definition.

Filed here, so it won't be forgotten.
Comment 1 Iain Buclaw 2012-09-24 15:51:38 CEST
This should first be fixed in phobos - which should not be defining it's own version of struct statfs at all.  It should instead use the druntime version.

There is an open ticket somewhere in D.bugs - flag it again and raise a pull request to remove it entirely, and update any parts that may break as a result.
Comment 2 Johannes Pfau 2012-09-28 18:04:47 CEST
https://github.com/D-Programming-Language/phobos/pull/819

Got rid off all the old *64 functions. (struct_stat64 is actually deprecated). I still have to check whether druntime's stat_t is correct though.
Comment 3 Iain Buclaw 2013-03-28 11:32:28 CET
I do believe this is fixed now.