summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2015-12-12 23:03:30 +0000
committerChris Wilson <chris+github@qwirx.com>2015-12-12 23:03:30 +0000
commitb692c4737d305d52289fb0d4d09cb18e998d0e22 (patch)
tree20ec301fffcd8b2632e91938b08b44cc54fdf2ea /lib
parent0f6eedb4d9ce5cd4d97e127c601559d7524e7c8e (diff)
parent5fef134653263456fa7fe0cdb67821b34a0ca309 (diff)
Merge branch 'appveyor' of github.com:boxbackup/boxbackup into appveyor
Some local commits were not pushed before, sorry.
Diffstat (limited to 'lib')
-rw-r--r--lib/common/Test.h8
-rw-r--r--lib/win32/emu.h4
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/common/Test.h b/lib/common/Test.h
index 15a3db6f..36cd6a59 100644
--- a/lib/common/Test.h
+++ b/lib/common/Test.h
@@ -243,4 +243,12 @@ void safe_sleep(int seconds);
std::auto_ptr<Configuration> load_config_file(const std::string& config_file,
const ConfigurationVerify& verify);
+#ifdef _MSC_VER
+ // Our CMakeFiles compile tests to different executable filenames,
+ // e.g. test_common.exe instead of _test.exe.
+ #define TEST_EXECUTABLE BOX_MODULE ".exe"
+#else
+ #define TEST_EXECUTABLE "./_test"
+#endif
+
#endif // TEST__H
diff --git a/lib/win32/emu.h b/lib/win32/emu.h
index 8014316a..b0fa2832 100644
--- a/lib/win32/emu.h
+++ b/lib/win32/emu.h
@@ -162,6 +162,10 @@ inline int geteuid(void)
{
return 0;
}
+inline int getpid(void)
+{
+ return GetCurrentProcessId();
+}
#ifndef PATH_MAX
#define PATH_MAX MAX_PATH