Commit c1de576b authored by Yoni Fogel's avatar Yoni Fogel

Port to OSX for some tests.

git-svn-id: file:///svn/tokudb@2187 c7de825b-a66e-492c-adef-691d508d4ae1
parent 4fda0a00
......@@ -13,6 +13,7 @@ endif
ifeq ($(OSX),OSX)
#Note: OSX 10.4 needs DYLD_LIBRARY_PATH. OSX 10.5 claims to support -rpath.
CFLAGS = -DOSX
LIBEXT=dylib
VGRIND=
BDB_SUPPRESSIONS=
......@@ -20,6 +21,7 @@ ifeq ($(OSX),OSX)
SETTOKUENV=export DYLD_LIBRARY_PATH=.. ;
UNSETTOKUENV=unset DYLD_LIBRARY_PATH ;
else
CFLAGS =
SETTOKUENV=
UNSETTOKUENV=
LIBEXT=so
......@@ -40,7 +42,7 @@ endif
LIBNAME=libdb.$(LIBEXT)
# GCOV_FLAGS = -fprofile-arcs -ftest-coverage
CFLAGS = -Wall -Werror $(OPTFLAGS) -g $(GCOV_FLAGS)
CFLAGS += -Wall -Werror $(OPTFLAGS) -g $(GCOV_FLAGS)
TDB_CPPFLAGS = -I../../include
......
......@@ -17,6 +17,10 @@ void handle_error (const DB_ENV *dbenv, const char *errpfx, const char *msg) {
}
int main (int argc, const char *argv[]) {
parse_args(argc, argv);
#if defined(OSX)
if (verbose) printf("Warning: fmemopen does not exist in OSX!\n");
#else
system("rm -rf " DIR);
int r=mkdir(DIR, 0777); assert(r==0);
......@@ -59,6 +63,6 @@ int main (int argc, const char *argv[]) {
}
}
}
#endif
return 0;
}
......@@ -6,7 +6,11 @@
#include <sys/stat.h>
#include <arpa/inet.h>
#include <db.h>
#include <syscall.h>
#if defined(OSX)
#include <sys/syscall.h>
#else
#include <syscall.h>
#endif
#include <pthread.h>
#include "test.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment