diff options
author | Steven Boswell <ulatekh@yahoo.com> | 2014-03-29 14:37:30 -0400 |
---|---|---|
committer | RJ Ryan <rryan@mixxx.org> | 2014-03-29 14:37:30 -0400 |
commit | 477174772cf1b482833d03ba39211da280eb3ec3 (patch) | |
tree | d58b597f3f7296e94889867a3c8c1bc05c0b93c0 /lib | |
parent | 955f927c77a89dcd41f57f6b9b841a5f5bd50d76 (diff) |
Various build system fixes for Windows (and particularly MingW cross-compiling to Windows). Fixes Bug #1179683.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fidlib-0.9.10/fidlib.c | 3 | ||||
-rw-r--r-- | lib/xwax/lut_win32.c (renamed from lib/xwax/lut.cpp) | 6 | ||||
-rwxr-xr-x | lib/xwax/timecoder_win32.c (renamed from lib/xwax/timecoder_win32.cpp) | 6 |
3 files changed, 8 insertions, 7 deletions
diff --git a/lib/fidlib-0.9.10/fidlib.c b/lib/fidlib-0.9.10/fidlib.c index 690be05e37..619325287c 100644 --- a/lib/fidlib-0.9.10/fidlib.c +++ b/lib/fidlib-0.9.10/fidlib.c @@ -259,7 +259,8 @@ extern FidFilter *mkfilter(char *, ...); // // Macro for local inline routines that shouldn't be visible externally -#ifdef T_MSVC +// See Mixxx Bug #1179683 +#if defined(T_MINGW) || defined(T_MSVC) #define STATIC_INLINE static __inline #else #define STATIC_INLINE static inline diff --git a/lib/xwax/lut.cpp b/lib/xwax/lut_win32.c index a10face3f4..1ad06c2064 100644 --- a/lib/xwax/lut.cpp +++ b/lib/xwax/lut_win32.c @@ -43,16 +43,16 @@ int lut_init(struct lut *lut, int nslots) bytes = sizeof(struct slot) * nslots + sizeof(slot_no_t) * hashes; fprintf(stderr, "Lookup table has %d hashes to %d slots" - " (%d slots per hash, %zuKb)\n", + " (%d slots per hash, %u Kb)\n", hashes, nslots, nslots / hashes, bytes / 1024); - lut->slot = static_cast<struct slot*>(malloc(sizeof(struct slot) * nslots)); + lut->slot = (struct slot*)(malloc(sizeof(struct slot) * nslots)); if (lut->slot == NULL) { perror("malloc"); return -1; } - lut->table = static_cast<slot_no_t*>(malloc(sizeof(slot_no_t) * hashes)); + lut->table = (slot_no_t*)(malloc(sizeof(slot_no_t) * hashes)); if (lut->table == NULL) { perror("malloc"); return -1; diff --git a/lib/xwax/timecoder_win32.cpp b/lib/xwax/timecoder_win32.c index a197528080..ffc6985cea 100755 --- a/lib/xwax/timecoder_win32.cpp +++ b/lib/xwax/timecoder_win32.c @@ -348,7 +348,7 @@ int timecoder_monitor_init(struct timecoder *tc, int size) { assert(tc->mon == NULL); tc->mon_size = size; - tc->mon = static_cast<unsigned char*>(malloc(SQ(tc->mon_size))); + tc->mon = (unsigned char*)(malloc(SQ(tc->mon_size))); if (tc->mon == NULL) { perror("malloc"); return -1; @@ -632,9 +632,9 @@ signed int timecoder_get_position(struct timecoder *tc, double *when) if (r >= 0) { // normalize position to milliseconds, not timecode steps -- Owen - r = static_cast<double>(r) + r = (double)(r) * (1000.0 - / (static_cast<double>(tc->def->resolution) * tc->speed)); + / ((double)(tc->def->resolution) * tc->speed)); } if (when) |