win32 cleanups

This commit is contained in:
Ron Pedde 2006-08-28 03:58:31 +00:00
parent d5b29cd4ef
commit 55793d6c32
3 changed files with 3 additions and 2 deletions

View File

@ -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));

View File

@ -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

View File

@ -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");