diff options
Diffstat (limited to 'src/test_fs.c')
-rw-r--r-- | src/test_fs.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/test_fs.c b/src/test_fs.c index d821a83b9..1c47bbaac 100644 --- a/src/test_fs.c +++ b/src/test_fs.c @@ -69,18 +69,15 @@ #include <sys/stat.h> #include <fcntl.h> -#if SQLITE_OS_UNIX || defined(__MINGW_H) +#if !defined(_WIN32) || defined(__MSVCRT__) # include <unistd.h> # include <dirent.h> # ifndef DIRENT # define DIRENT dirent # endif -#endif -#if SQLITE_OS_WIN +#else # include <io.h> -# if !defined(__MINGW_H) -# include "test_windirent.h" -# endif +# include "test_windirent.h" # ifndef S_ISREG # define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG) # endif @@ -485,7 +482,7 @@ static int fstreeFilter( int nDir; char aWild[2] = { '\0', '\0' }; -#if SQLITE_OS_WIN +#ifdef _WIN32 const char *zDrive = windirent_getenv("fstreeDrive"); if( zDrive==0 ){ zDrive = windirent_getenv("SystemDrive"); @@ -538,7 +535,7 @@ static int fstreeFilter( sqlite3_bind_text(pCsr->pStmt, 2, zRoot, nRoot, SQLITE_TRANSIENT); sqlite3_bind_text(pCsr->pStmt, 3, zPrefix, nPrefix, SQLITE_TRANSIENT); -#if SQLITE_OS_WIN +#ifdef _WIN32 sqlite3_free(zPrefix); sqlite3_free(zRoot); #endif |