On Mon, Jan 19, 2015 at 1:59 PM, David Macek <[email protected]>
wrote:
> On 19. 1. 2015 22:55, Greg Jung wrote:
> > I'm working on a routine that returns file sizes and find that the
> 32-bit builds don't accomodate a larger byte-count typical of the large
> movie files or backup files found these days. I'm testing cygwin64 (native
> cygwin build) and mingw/msys 32-bit build:64-bit version does ok: .
> > I presume when I go mingw64 it'll be positive, but is there a way to
> trick the 32-bit builds to bring a 64-bit size value?
>
> I think you should be able to use some form of stat64, which uses 64-bit
> integers even on 32-bit platforms. See for example:
> http://stackoverflow.com/a/12568257
>
> --
> David Macek
>
Yes this worked in my ming build (just now), i set all
"struct stat" to "struct stat64"
and lstat -> lstat64
and
#ifdef _WIN32
#define lstat64(x,y) stat64(x,y)
#endif
but now the cygwin compilation has complaints:
stat64 statStruct’ has incomplete type and cannot be defined
struct stat64 statStruct;
^
/f/gdl/src/file.cpp:402:58: error: ‘lstat64’ was not declared in this scope
int actStat = lstat64( testFile.c_str(), &statStruct);
^
/so I take a look at the cygwin64 /usr/include/sys/stat.h, I can't find
lstat64 at all:
greg@Homerw7 /f/gdl/src
$ grep lstat /usr/include/sys/stat.h
int _EXFUN(lstat,( const char *__restrict __path, struct stat
*__restrict __buf ));
$ grep -B3 -A2 stat64 /usr/include/sys/stat.h
#ifdef __CYGWIN__
#include <cygwin/stat.h>
#ifdef _COMPILING_NEWLIB
#define stat64 stat
#endif
#else
--
int _EXFUN(_stat,( const char *__restrict __path, struct stat
*__restrict __sbuf ));
int _EXFUN(_mkdir,( const char *_path, mode_t __mode ));
#ifdef __LARGE64_FILES
struct stat64;
int _EXFUN(_stat64,( const char *__restrict __path, struct stat64
*__restrict __sbuf ));
int _EXFUN(_fstat64,( int __fd, struct stat64 *__sbuf ));
#endif
#endif
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users