Mercurial > pub > dyncall > dyncall
changeset 233:8216c86b4cbc
- make dynload_plain test build on windows
author | Tassilo Philipp |
---|---|
date | Sun, 16 Apr 2017 17:50:55 +0200 |
parents | 76ed51a690a6 |
children | 808045066f12 |
files | test/dynload_plain/dynload_plain.c |
diffstat | 1 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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 <string.h> -#include <unistd.h> +#if defined(DC_WINDOWS) +# include <io.h> +# define F_OK 0 +#else +# include <unistd.h> +#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;