[gtk+] W32: Ensure that correct statting function is used by iconcache
- From: Руслан Ижбулатов <ruslanizhb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] W32: Ensure that correct statting function is used by iconcache
- Date: Thu, 14 Jan 2016 09:49:52 +0000 (UTC)
commit 59f1b87409c587093a68ae52500336b686c5903c
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date: Thu Jan 14 09:40:58 2016 +0000
W32: Ensure that correct statting function is used by iconcache
With Mingw-w64 fstat() can be an inline function that
calls _fstat32() or _fstat64(), depending on some macros.
And if LFS is enabled, fstat() is defined to turn into
_fstat32i64() or _fstat64(). And some/all of the above
might also be macros as well. Side-step all that mess
and excplicitly re-define fstat as _fstat32, which is
guaranteed to use a version of "stat" struct that
has 32-bit size and time fields, which is what we want.
https://bugzilla.gnome.org/show_bug.cgi?id=760615
gtk/gtkiconcache.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkiconcache.c b/gtk/gtkiconcache.c
index ef9ecfa..1bf564e 100644
--- a/gtk/gtkiconcache.c
+++ b/gtk/gtkiconcache.c
@@ -110,7 +110,7 @@ _gtk_icon_cache_new_for_path (const gchar *path)
/* Bug 660730: _fstat32 is only defined in msvcrt80.dll+/VS 2005+ */
/* or possibly in the msvcrt.dll linked to by the Windows DDK */
/* (will need to check on the Windows DDK part later) */
-#if (_MSC_VER >= 1400 || __MSVCRT_VERSION__ >= 0x0800)
+#if (_MSC_VER >= 1400 || __MSVCRT_VERSION__ >= 0x0800) || defined (__MINGW64_VERSION_MAJOR)
#undef fstat /* Just in case */
#define fstat _fstat32
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]