From: drh <> Date: Tue, 10 Jun 2025 16:56:02 +0000 (+0000) Subject: Adjustments to ext/misc/fileio.c in an attempt to get it to build using mingw. X-Git-Tag: version-3.50.2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cc279d5bd7d681aa3a5387d1444b0a5197c7fb2b;p=thirdparty%2Fsqlite.git Adjustments to ext/misc/fileio.c in an attempt to get it to build using mingw. FossilOrigin-Name: ac786b92e3e24e2f1c4f4093acc2c357da38b0e986f6e29fec858398c6ec04d9 --- diff --git a/ext/misc/fileio.c b/ext/misc/fileio.c index 96a7f82bd1..03c9117120 100644 --- a/ext/misc/fileio.c +++ b/ext/misc/fileio.c @@ -92,13 +92,14 @@ SQLITE_EXTENSION_INIT1 # include # include # include +# define STRUCT_STAT struct stat #else # include "windows.h" # include # include # include "test_windirent.h" # define dirent DIRENT -# define stat _stat +# define STRUCT_STAT struct _stat # define chmod(path,mode) fileio_chmod(path,mode) # define mkdir(path,mode) fileio_mkdir(path) #endif @@ -289,7 +290,7 @@ LPWSTR utf8_to_utf16(const char *z){ */ static void statTimesToUtc( const char *zPath, - struct stat *pStatBuf + STRUCT_STAT *pStatBuf ){ HANDLE hFindFile; WIN32_FIND_DATAW fd; @@ -317,7 +318,7 @@ static void statTimesToUtc( */ static int fileStat( const char *zPath, - struct stat *pStatBuf + STRUCT_STAT *pStatBuf ){ #if defined(_WIN32) sqlite3_int64 sz = strlen(zPath); @@ -341,7 +342,7 @@ static int fileStat( */ static int fileLinkStat( const char *zPath, - struct stat *pStatBuf + STRUCT_STAT *pStatBuf ){ #if defined(_WIN32) return fileStat(zPath, pStatBuf); @@ -374,7 +375,7 @@ static int makeDirectory( int i = 1; while( rc==SQLITE_OK ){ - struct stat sStat; + STRUCT_STAT sStat; int rc2; for(; zCopy[i]!='/' && i