diff options
author | drh <drh@noemail.net> | 2016-12-29 16:18:35 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2016-12-29 16:18:35 +0000 |
commit | d7b9b97c3bb4bb8f99fc07369832d64c99d9fcfd (patch) | |
tree | dce6f71d3ebdd9985177fc2baed6d13f41f3f301 /test/kvtest.c | |
parent | 6739c692bad68cfbe961d20d37b7fb61e2d6507c (diff) | |
download | sqlite-d7b9b97c3bb4bb8f99fc07369832d64c99d9fcfd.tar.gz sqlite-d7b9b97c3bb4bb8f99fc07369832d64c99d9fcfd.zip |
Fix kvtest.c so that it compiles using MSVC.
FossilOrigin-Name: e2bbeae7e77cde531885ca492494a02e5322154d
Diffstat (limited to 'test/kvtest.c')
-rw-r--r-- | test/kvtest.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/kvtest.c b/test/kvtest.c index 8c6915f23..bb23312a2 100644 --- a/test/kvtest.c +++ b/test/kvtest.c @@ -51,11 +51,21 @@ static const char zHelp[] = #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> -#include <unistd.h> #include <assert.h> #include <string.h> #include "sqlite3.h" +#ifndef _WIN32 +# include <unistd.h> +#else + /* Provide Windows equivalent for the needed parts of unistd.h */ +# include <io.h> +# define R_OK 2 +# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +# define access _access +#endif + + /* ** Show thqe help text and quit. */ |