Cleanup header usage in lsmtest for files that require _O_BINARY.

FossilOrigin-Name: f3a6a64ec90e6cf24aadf62aef4f92104be5ba6790f7fca040eff7abc31f1061
This commit is contained in:
mistachkin
2017-07-10 18:57:03 +00:00
parent 7ff64dc2bc
commit 91ea8cf4ac
6 changed files with 25 additions and 46 deletions
+14 -4
View File
@@ -7,18 +7,24 @@
#include "lsm.h"
#include <assert.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#ifndef _WIN32
# include <unistd.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <ctype.h>
#include <stdlib.h>
#include <errno.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _O_BINARY
# define _O_BINARY (0)
#endif
#ifdef _WIN32
# include "windows.h"
# define gettimeofday win32GetTimeOfDay
@@ -56,6 +62,10 @@ typedef unsigned long long int u64;
#define TESTDB_DEFAULT_PAGE_SIZE 4096
#define TESTDB_DEFAULT_CACHE_SIZE 2048
#ifndef _O_BINARY
# define _O_BINARY (0)
#endif
/*
** Ideally, these should be in wrapper.c. But they are here instead so that
** they can be used by the C++ database wrappers in wrapper2.cc.
-7
View File
@@ -240,13 +240,6 @@ static void testOomScan(
#define LSMTEST6_TESTDB "testdb.lsm"
#ifndef _WIN32
# include <unistd.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
void testDeleteLsmdb(const char *zFile){
char *zLog = testMallocPrintf("%s-log", zFile);
char *zShm = testMallocPrintf("%s-shm", zFile);
-8
View File
@@ -55,14 +55,6 @@
#include "lsmtest.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#ifndef _WIN32
# include <unistd.h>
#endif
#include <ctype.h>
typedef struct IoContext IoContext;
struct IoContext {
-16
View File
@@ -1,23 +1,7 @@
#include "stdarg.h"
#include "lsmtest.h"
#include "stdio.h"
#include "assert.h"
#include "string.h"
#include "stdlib.h"
#include <sqlite3.h>
#ifndef _WIN32
# include <unistd.h>
#endif
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
void test_failed(){
assert( 0 );
return;