Re: g_stat() did not work for large file (>2B) under WIN32
- From: Tor Lillqvist <tml iki fi>
- To: Kuang-Chun Cheng <kccheng linuxdaq-labs com>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: g_stat() did not work for large file (>2B) under WIN32
- Date: Wed, 29 Jul 2009 22:03:38 +0300
> I recently found that g_stat() didn't work for large file (>2B) under WIN32.
True, because the struct stat that it uses is the one with a just
32-bit st_size. Use gio instead, i.e. get the
G_FILE_ATTRIBUTE_STANDARD_SIZE. Or call the _stati64() (or
_wstati64()) function.
> I use "-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" during compilation
What makes you think these compiler and C library specific macro
definitions would have any effect on GLib or on the Microsoft C
library? Those macros affect the Linux C library (glibc) only. They
should not be used with any other C library (they might after all have
some entirely unexpected effect on some random C library.) They have
no standard meaning. Such C library feature selection macros are by
definition implementation specific as they start with an underscore.
--tml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]