After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728663 - W32: wrong stat struct is used when built with MinGW-w64
W32: wrong stat struct is used when built with MinGW-w64
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: win32
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-win32 maintainers
Depends on:
Blocks:
 
 
Reported: 2014-04-21 16:12 UTC by LRN
Modified: 2015-04-05 11:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Make sure GStatBuf is typedefed correctly (866 bytes, patch)
2014-04-21 16:12 UTC, LRN
committed Details | Review

Description LRN 2014-04-21 16:12:41 UTC
What some people don't quite get is that mingw-w64 supports LFS, and supported
it for some time (a couple of years, roughly).
LFS is controlled by an intricate set of macros, and there's a blog post[1] i
did to explore and systematize this, but in a nutshell: normal autotooled
software packages will end up using LFS, with "struct stat" having 64-bit
st_size field, regardless of OS bitness, while time fields (an issue orthogonal
to LFS) will be 32-bit on 32-bit OS and 64-bit on 64-bit OS.

gstdio.h, as of March 2010, typedefs GStatBuf as "struct stat" instead of
"struct _stat". Which means that GStatBuf will have LFS, if configure is used
(I.e. glib is built in MSYS, or cross-compiled from GNU/Linux or Cygwin).
"struct _stat" would not have had this problem, as it has 32-bit st_size field,
always.

This bug is a fork of bug 711547 (see [2]), i want it fixed soon'ish.

[1] https://gnunet.org/content/sorting-out-stat-thing
[2] https://bugzilla.gnome.org/show_bug.cgi?id=711547#c10
Comment 1 LRN 2014-04-21 16:12:47 UTC
Created attachment 274814 [details] [review]
Make sure GStatBuf is typedefed correctly
Comment 2 Allison Karlitskaya (desrt) 2014-06-27 13:40:49 UTC
I have exactly zero opinion on this topic.  Hopefully someone who knows more about Windows can contribute a useful opinion.
Comment 3 Ignacio Casal Quinteiro (nacho) 2015-04-05 10:56:25 UTC
Review of attachment 274814 [details] [review]:

I'd say let's get it in. This has been used downstream for the last 6 months or so.
Comment 4 LRN 2015-04-05 11:12:03 UTC
Attachment 274814 [details] pushed as eac975c - Make sure GStatBuf is typedefed correctly