From: Keith M. <kei...@us...> - 2012-02-10 11:06:00
|
Please keep replies on-list; I've taken the liberty of forwarding this: ---------- Forwarded message ---------- On Thu, 2012-02-09 at 14:17 +0000, Keith Marshall wrote: > To further qualify my earlier reply: > > On 9 February 2012 11:29, Linux <linux@...> wrote: > > I also want to distribute a Windows version of the utility but can't get > > it to compile and work on Windows 7 using the Mingw 4.6.3 > > The most recent release, from this project, is MinGW GCC-4.6.2; > this is what I have used, to build my example. > > > with the Code::Blocks IDE for Windows. > > While this may be your preference, it shouldn't be relevant to the > distributed code. I prefer to use only vim. > > > I can not find the MinGW specific sources for the functions stat(), > > stat64() ... > > nor will you, because these come directly from Microsoft; (there is > no stat64() anyway; it is _stat64()). > > > ... opendir(), readdir(), closedir() and other functions. > > These three, and others related to them, are implemented in > mingwex/dirent.c, in the mingwrt source distribution, or in CVS: > http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/mingw/include/dirent.h?cvsroot=src > http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/mingw/mingwex/dirent.c?cvsroot=src > Thanks for the information. The code lists directory and files names. It does not list the file sizes. Apparently the current MinGW library does not support'stat64' or '_stat64' functions needed to read 64 bit filesize information from structure 'stat' or 'stat64' ->st_size member. How can I use with MinGW _stat64 and if necessary, _findfirst64, _findnext64, _findclose, etc. and thereby avoid porting about 10,000 lines of Linux code to Visual Studio 10 and paying $ 1000's for a license to give away the finial software for free? Hans |