9 Feb 12:29
MinGw, opendir() stat64() and related
I coded a small utility in "C" using the Code::Blocks IDE on 32 Bit Linux for distribution. The utility searches, identifies and can delete files with identical content. 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 with the Code::Blocks IDE for Windows. Under Windows, the complier rejects these declarations and functions: struct stat64 lst; stat64(path, &lst); Using 'stat' instead of 'stat64' will complile without errors but 'opendir()' returns 0. readir() and closedir() also fail; The code compiles and works as it should on 32 and 64 bit Linux. I can not find the MinGW specific sources for the functions stat(), stat64(), opendir(), readdir(), closedir() and other functions. ' ------------------------------------------ #define _LARGEFILE64_SOURCE #define _FILE_OFFSET_BITS 64 #include <unistd.h> #include <stdio.h> #include <stdlib.h>(Continue reading)
RSS Feed