From 55793d6c327ca10dec43d4d5300f89076d0ae3ae Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Mon, 28 Aug 2006 03:58:31 +0000 Subject: [PATCH] win32 cleanups --- src/os-win32-u.c | 1 - src/win32.h | 2 ++ src/xml-rpc.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/os-win32-u.c b/src/os-win32-u.c index f2673b93..39bcff8d 100644 --- a/src/os-win32-u.c +++ b/src/os-win32-u.c @@ -122,7 +122,6 @@ char *os_realpath(const char *pathname, char *resolved_path) { char *ptr; WCHAR utf16_rel_path[PATH_MAX+1]; WCHAR utf16_path[PATH_MAX+1]; - int utf16_len; /* need to take the utf-8 and convert to utf-16, then _fullpath, then back */ util_utf8toutf16((unsigned char *)&utf16_rel_path,PATH_MAX * sizeof(WCHAR),(char*)pathname,(int)strlen(pathname)); diff --git a/src/win32.h b/src/win32.h index 0d886d0f..2c5fe04b 100644 --- a/src/win32.h +++ b/src/win32.h @@ -38,6 +38,7 @@ #define PATH_MAX 512 /* it's clearly not _MAX_PATH... other projects seem to use 512 */ #define MAX_NAME_LEN _MAX_PATH #define EADDRINUSE WSAEADDRINUSE +#define S_IFLNK 0x1 #define HOST "unknown-windows-ick" #define SERVICENAME "Firefly Media Server" @@ -56,6 +57,7 @@ typedef INT16 int16_t; typedef UINT32 uint32_t; typedef INT32 int32_t; + /* Funtion fixups */ #define snprintf _snprintf #define vsnprintf _vsnprintf diff --git a/src/xml-rpc.c b/src/xml-rpc.c index 3361f15e..4b201ffb 100644 --- a/src/xml-rpc.c +++ b/src/xml-rpc.c @@ -470,7 +470,7 @@ void xml_browse_path(WS_CONNINFO *pwsc) { readable = !access(resolved_path,R_OK); writable = !access(resolved_path,W_OK); - if(pde->d_type & DT_DIR) { + if(sb.st_mode & S_IFDIR) { xml_push(pxml,"directory"); } else if((sb.st_mode & S_IFLNK) == S_IFLNK) { xml_push(pxml,"symlink");