1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Initial work on porting lsmtest to Win32.

FossilOrigin-Name: 7e669d9bfab237ff7ece821cf95cfd3bb753b1882b9a86044b7d4579808aecf4
This commit is contained in:
mistachkin
2017-06-27 22:27:54 +00:00
parent 59b1dd3830
commit b5fdc26c21
13 changed files with 94 additions and 28 deletions

View File

@ -15,6 +15,25 @@
extern "C" {
#endif
#ifdef _WIN32
# include "windows.h"
# define gettimeofday win32GetTimeOfDay
# define F_OK (0)
# define sleep(sec) Sleep(1000 * (sec))
# define usleep(usec) Sleep((usec) / 1000)
# ifdef _MSC_VER
# include <io.h>
# define snprintf _snprintf
# define fsync(fd) FlushFileBuffers((HANDLE)_get_osfhandle((fd)))
# define fdatasync(fd) FlushFileBuffers((HANDLE)_get_osfhandle((fd)))
# define __va_copy(dst,src) ((dst) = (src))
# define ftruncate(fd,sz) (_chsize_s((fd), (sz))==0)
# else
# error Unsupported C compiler for Windows.
# endif
int win32GetTimeOfDay(struct timeval *, void *);
#endif
#ifndef _LSM_INT_H
typedef unsigned int u32;
typedef unsigned char u8;