diff options
-rw-r--r-- | src/util.c | 9 | ||||
-rw-r--r-- | test/lilv_test.c | 2 | ||||
-rw-r--r-- | wscript | 3 |
3 files changed, 8 insertions, 6 deletions
@@ -28,7 +28,9 @@ #include <stdlib.h> #include <string.h> -#ifdef _MSC_VER +#ifdef _WIN32 +# define _WIN32_WINNT 0x0600 /* for CreateSymbolicLink */ +# include <windows.h> # include <direct.h> # include <io.h> # define F_OK 0 @@ -345,7 +347,6 @@ lilv_size_mtime(const char* path, off_t* size, time_t* time) struct stat buf; if (stat(path, &buf)) { LILV_ERRORF("stat(%s) (%s)\n", path, strerror(errno)); - *size = *time = 0; } if (size) { @@ -370,8 +371,8 @@ update_latest(const char* path, const char* name, void* data) char* entry_path = lilv_path_join(path, name); unsigned num; if (sscanf(entry_path, latest->pattern, &num) == 1) { - off_t entry_size; - time_t entry_time; + off_t entry_size = 0; + time_t entry_time = 0; lilv_size_mtime(entry_path, &entry_size, &entry_time); if (entry_size == latest->orig_size && entry_time >= latest->time) { free(latest->latest); diff --git a/test/lilv_test.c b/test/lilv_test.c index c1da9ba..ea22771 100644 --- a/test/lilv_test.c +++ b/test/lilv_test.c @@ -28,7 +28,7 @@ #include <string.h> #include <sys/stat.h> -#ifdef _MSC_VER +#ifdef _WIN32 # include <direct.h> # define mkdir(path, flags) _mkdir(path) # define setenv(n, v, r) SetEnvironmentVariable((n), (v)) @@ -193,8 +193,9 @@ def build(bld): lib = ['dl'] libflags = ['-fvisibility=hidden'] defines = [] + if sys.platform == 'win32': + lib = [] if bld.env['MSVC_COMPILER']: - lib = [] libflags = [] defines = ['snprintf=_snprintf'] elif sys.platform.find('bsd') > 0: |