diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lilv_internal.h | 5 | ||||
-rw-r--r-- | src/util.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/lilv_internal.h b/src/lilv_internal.h index cedc33e..15d2716 100644 --- a/src/lilv_internal.h +++ b/src/lilv_internal.h @@ -29,13 +29,16 @@ extern "C" { #ifdef _WIN32 # include <windows.h> # include <direct.h> +# include <stdio.h> # define dlopen(path, flags) LoadLibrary(path) # define dlclose(lib) FreeLibrary((HMODULE)lib) # define unlink(path) _unlink(path) # define rmdir(path) _rmdir(path) # ifdef _MSC_VER # define __func__ __FUNCTION__ -# define snprintf _snprintf +# ifndef snprintf +# define snprintf _snprintf +# endif # endif #ifndef INFINITY # define INFINITY DBL_MAX + DBL_MAX @@ -39,8 +39,9 @@ # include <io.h> # define F_OK 0 # define mkdir(path, flags) _mkdir(path) +# if defined(_MSC_VER) && _MSC_VER <= 1400 /** Implement 'CreateSymbolicLink()' for MSVC 8 or earlier */ -BOOLEAN WINAPI +extern "C" BOOLEAN WINAPI CreateSymbolicLink(LPCTSTR linkpath, LPCTSTR targetpath, DWORD flags) { typedef BOOLEAN (WINAPI* PFUNC)(LPCTSTR, LPCTSTR, DWORD); @@ -49,6 +50,7 @@ CreateSymbolicLink(LPCTSTR linkpath, LPCTSTR targetpath, DWORD flags) "CreateSymbolicLinkA"); return pfn ? pfn(linkpath, targetpath, flags) : 0; } +# endif #else # include <dirent.h> # include <limits.h> |