Index: src/squeezeplay/src/common.h =================================================================== --- src/squeezeplay/src/common.h (revision 7852) +++ src/squeezeplay/src/common.h (working copy) @@ -88,8 +88,8 @@ #define PATH_SEPARATOR_CHAR ';' #define PATH_SEPARATOR_STR ";" #define LIBRARY_EXT "dll" -#define mkdir(path,mode) _mkdir (path) -typedef _W64 int ssize_t; +#define mkdir(path,mode) _mkdir (path) +typedef _W64 int ssize_t; #endif /* WIN32 */ #ifndef DIR_SEPARATOR_CHAR Index: src/squeezeplay/src/log.c =================================================================== --- src/squeezeplay/src/log.c (revision 7852) +++ src/squeezeplay/src/log.c (working copy) @@ -10,7 +10,7 @@ #include #endif -#if defined(WIN32) +#if defined(WIN32) #include #define strcasecmp stricmp #endif @@ -21,69 +21,69 @@ static enum log_priority appender_syslog = LOG_PRIORITY_OFF; static struct log_category *category_head = NULL; - -#if defined(WIN32) - -#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) - #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64 -#else - #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL -#endif - -struct tm *gmtime_r (const time_t *, struct tm *); - -struct tm * -gmtime_r (const time_t *timer, struct tm *result) -{ - struct tm *local_result; - local_result = gmtime (timer); - - if (local_result == NULL || result == NULL) - return NULL; - - memcpy (result, local_result, sizeof (result)); - return result; -} - -struct timezone -{ - int tz_minuteswest; /* minutes W of Greenwich */ - int tz_dsttime; /* type of dst correction */ -}; - -int gettimeofday(struct timeval *tv, struct timezone *tz) -{ - FILETIME ft; - unsigned __int64 tmpres = 0; - static int tzflag; - - if (NULL != tv) - { - GetSystemTimeAsFileTime(&ft); - - tmpres |= ft.dwHighDateTime; - tmpres <<= 32; - tmpres |= ft.dwLowDateTime; - - /*converting file time to unix epoch*/ - tmpres /= 10; /*convert into microseconds*/ - tmpres -= DELTA_EPOCH_IN_MICROSECS; - tv->tv_sec = (long)(tmpres / 1000000UL); - tv->tv_usec = (long)(tmpres % 1000000UL); - } - - if (NULL != tz) - { - if (!tzflag) - { - _tzset(); - tzflag++; - } - tz->tz_minuteswest = _timezone / 60; - tz->tz_dsttime = _daylight; - } - - return 0; + +#if defined(WIN32) + +#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) + #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64 +#else + #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL +#endif + +struct tm *gmtime_r (const time_t *, struct tm *); + +struct tm * +gmtime_r (const time_t *timer, struct tm *result) +{ + struct tm *local_result; + local_result = gmtime (timer); + + if (local_result == NULL || result == NULL) + return NULL; + + memcpy (result, local_result, sizeof (result)); + return result; +} + +struct timezone +{ + int tz_minuteswest; /* minutes W of Greenwich */ + int tz_dsttime; /* type of dst correction */ +}; + +int gettimeofday(struct timeval *tv, struct timezone *tz) +{ + FILETIME ft; + unsigned __int64 tmpres = 0; + static int tzflag; + + if (NULL != tv) + { + GetSystemTimeAsFileTime(&ft); + + tmpres |= ft.dwHighDateTime; + tmpres <<= 32; + tmpres |= ft.dwLowDateTime; + + /*converting file time to unix epoch*/ + tmpres /= 10; /*convert into microseconds*/ + tmpres -= DELTA_EPOCH_IN_MICROSECS; + tv->tv_sec = (long)(tmpres / 1000000UL); + tv->tv_usec = (long)(tmpres % 1000000UL); + } + + if (NULL != tz) + { + if (!tzflag) + { + _tzset(); + tzflag++; + } + tz->tz_minuteswest = _timezone / 60; + tz->tz_dsttime = _daylight; + } + + return 0; } #endif Index: src/squeezeplay/src/log.h =================================================================== --- src/squeezeplay/src/log.h (revision 7852) +++ src/squeezeplay/src/log.h (working copy) @@ -13,7 +13,7 @@ * Lightweight logging api with a compatible api to log4c */ -#ifdef _WIN32 +#ifdef _WIN32 #define __func__ __FUNCTION__ #endif Index: src/squeezeplay/VisualC/jive.vcproj =================================================================== --- src/squeezeplay/VisualC/jive.vcproj (revision 7852) +++ src/squeezeplay/VisualC/jive.vcproj (working copy) @@ -391,6 +391,14 @@ RelativePath="..\src\ui\system.c" > + + + +