# HG changeset patch # User Tassilo Philipp # Date 1492357855 -7200 # Node ID 8216c86b4cbc18980389b7537b7329de56e0d864 # Parent 76ed51a690a6879896f7164d485e0e6c8c87b5ef - make dynload_plain test build on windows diff -r 76ed51a690a6 -r 8216c86b4cbc test/dynload_plain/dynload_plain.c --- a/test/dynload_plain/dynload_plain.c Sun Apr 16 15:08:50 2017 +0200 +++ b/test/dynload_plain/dynload_plain.c Sun Apr 16 17:50:55 2017 +0200 @@ -27,7 +27,12 @@ #include "../common/platformInit.h" #include -#include +#if defined(DC_WINDOWS) +# include +# define F_OK 0 +#else +# include +#endif int main(int argc, char* argv[]) @@ -35,6 +40,7 @@ int r = 0, i; void* p; DLLib* pLib; + DLSyms* pSyms; const char* path = NULL; const char* clibs[] = { // hacky/lazy list of some clib paths per platform "/lib/libc.so", @@ -48,7 +54,10 @@ "/lib32/libc.so.7", "/usr/lib/system/libsystem_c.dylib", "/usr/lib/libc.dylib", - "C:\\Windows\\system32\\msvcrt.dll" + "\\Windows\\system32\\msvcrt.dll", + "C:\\Windows\\system32\\msvcrt.dll", + "D:\\Windows\\system32\\msvcrt.dll", + "E:\\Windows\\system32\\msvcrt.dll" }; @@ -82,7 +91,7 @@ // dlSyms* tests (intentionally after freeing lib above, as they work standalone) // -------- - DLSyms* pSyms = dlSymsInit(path); // check if we can iterate over symbols - init + pSyms = dlSymsInit(path); // check if we can iterate over symbols - init if(pSyms) { int n; const char* name;