From: <man...@us...> - 2013-05-18 14:30:07
|
Revision: 2098 http://sourceforge.net/p/modplug/code/2098 Author: manxorist Date: 2013-05-18 14:29:53 +0000 (Sat, 18 May 2013) Log Message: ----------- Merged revision(s) 2018-2022, 2024-2048, 2043-2048, 2052-2071, 2075-2077, 2080, 2087-2089 from branches/manx/gcc-fixes: [Ref] Various GGC compatibility fixes in common/. ........ [Ref] Do not depend on forward declared enums in common/FlagSet.h ........ [Ref] GCC wont bind references to aligned types to unaligned variables. Make SwapBytesXX argument an unaligned reference. ........ [Ref] GCC REALLY wont bind references to members of packed structures. Hack-around it for now. ........ [Var] Portability and correctness fixes for libopenmpt and openmpt123. ........ [Ref] Add MULTICHAR4_LE_MSVC macro to avoid using multi-character constants. [Ref] Use MULTICHAR4_LE_MSVC in GET_MPTHEADER_sized_member and related functions to avoid characterisation preprocessor operator (#@), which is completely msvc-only. ........ [Ref] Sndfile.h is spelled with an uppercase S. ........ [Ref] Dlsbank.h is spelled with an uppercase D. ........ [Ref] Replace __int16 and __int32 with portable int26 and int32. [Ref] For multi-character constants, use uint32 as container type. ........ [Ref] Add missing #ifdef NEEDS_PRAGMA_PACK ........ [Ref] Add #ifdef _MSC_VER around #pragma warning. ........ [Ref] Fix zlib include path for non WIN32 systems. [Ref] amFile variable was shadowed in load_j2b.cpp. ........ [Ref] Fix include paths in PlugInterface.h. ........ [Ref] ChunkReader.h needs <vector>. [Ref] Fix name lookup for begin() and end() for gcc 4.4 in ChunkReader.h. ........ [Ref] Fix some GCC warnings in tuningbase.h. ........ [Ref] FileReader.h needs misc_util.h for Util::MaxValueOfType<T>. [Ref] Fix some GCC warnings in FileReader.h. ........ [Ref] Work-around gcc braindamage in serialization_utils when taking a reference to a static const class member causes linker errors. ........ [Ref] Add more WIN32 types to typedefs.h. [Ref] Add UNREFERENCED_PARAMETER(x) macro. [Fix] Fix PACKED macro for GCC. ........ [Ref] #define NO_XMPLAY and NO_WINAMP on !WIN32 ........ [Ref] Replace MSVC specific _strnicmp with mpt_strnicmp. ........ [Ref] Add <string.h> and shuffle around code in StringFixer.h to make gcc happy. ........ [Ref] Make tuningcollection.h compile with gcc. ........ [Ref] Fix gcc warnings in libopenmpt. ........ [Ref] Only use PaUtil_SetDebugPrintFunction() in MSVC builds in openmpt123. ........ [Ref] Fix spelling of tuningcollection.h ........ [Ref] patternContainer.h needs <algorithm>. ........ [Ref] Fix GCC warnings in RowVisitor. ........ [Ref] Fix annoying unreferenced parameter warning in Fastmix.cpp. ........ [Ref] modcommand.h needs <cstring> ........ [Ref] Wav.h needs Endianness.h ........ [Ref] Fix spelling of tuningcollection.h ........ [Ref] patternContainer.h needs <algorithm>. ........ [Ref] Fix GCC warnings in RowVisitor. ........ [Ref] Fix annoying unreferenced parameter warning in Fastmix.cpp. ........ [Ref] modcommand.h needs <cstring> ........ [Ref] Wav.h needs Endianness.h ........ [Ref] Add support for svnversion in addition to subwcrev support to version.cpp. ........ [Ref] Do not typedef CHAR twice. ........ [Ref] Add #ifdef _MSC_VER around #pragma warning. ........ [Ref] Make SNDMIXPLUGIN::pPluginData a char* instead of void*, so that deleting it has defined behaviour. ........ [Ref] Fix initialization order warnigns in ModSequence.*. [Ref] Do not require CSoundFile being defined in ModSequence.h (add GetSndFileType() non-inline function in ModSequence.cpp). ........ [Fix] Add missing pragma pack and PACKED for struct S3ISAMPLESTRUCT. ........ [Ref] Use MULTICHAR4_LE_MSVC() macro instead of non-portable multi-character constants. ........ [Ref] Fix some trivial GCC warnings in pattern.h. ........ [Ref] Add a bunch of missing typename in SampleFormatConverters.h. ........ [Ref] String literals are const. ........ [Ref] Replace all FLOAT with float. ........ [Ref] Add missing typenames in Load_wav.cpp. ........ [Ref] GCC gets confused when choosing between a function pointer to ReadTuningMap and a funtion pointer to ReadTuningMap<TUNNUMTYPE, STRSIZETYPE>. Disambiguify by renaming the templated function. ........ [Ref] In CSoundFile::ReadM15, GCC 4.4 gets confused when calling std::max with a parameter being an enum literal of an enum defined in function scope. Move enum definition out of the function to make GCC happy. ........ [Ref] GCC wont bind references to unaligned types (or arrays thereof). Work-around it by using a simple pointer. This probably has to be solved differently in the future. ........ [Ref] Fix initialization order warnings in ITCompression.cpp. [Ref] Add missing typenames in ITCompression.cpp. [Ref] Work-around gcc problem: Taking a reference to a static const class member causes linker errors. [Ref] delete[] void* is undefined. Cast sampleData to uint8* when deleting it. ........ [Ref] Add alternate C implementations for x86 inline asm. ........ [Ref] Use char instead of CHAR for on-disk strings. Rationale: CHAR is signed in WIN32, therefore CHAR is a typedef of std::int8_t (and not char which could be an unsigned type) in typedefs.h on non-win32 systems. std::int8_t itself is a typedef of signed char most of the time. signed char* is not convertable to char* because char is a distinct type. This causes problems for e.g. class StringFixer which expects char arrays or pointers and not signed char. ........ [New] Add a simple very non-portable makefile for building openmpt123 with statically built-in libopenmpt. ........ [Ref] Add #ifdef _MSC_VER around #pragma warning. ........ [Fix] Fix truncation error with 64bit gcc in libopenmpt_stream_callbacks.h by adding another cast. ........ [Ref] Help std::min template argument deduction in cases where size_t is 64bit. ........ [Ref] Workaround reference to static const member problem for a case where this triggers with clang 3.0. [Ref] Move code around in StringFixer.h so name lookup works with clang 3.0. [Mod] Disable loading of wav files for libopenmpt. [Ref] misc_util.h needs <string.h>. ........ [Fix] Fix openmpt123 stdout output with int16 samples. ........ [Ref] Add comment describing pointer/reference dance in Endianness.h ........ [Ref] Trivial MSVC build fixes for gcc-fixes branch. ........ [New] Add build configurations for libopenmpt and openmpt123 for VS2010 x86-64. ........ Modified Paths: -------------- trunk/OpenMPT/common/BuildSettings.h trunk/OpenMPT/common/FlagSet.h trunk/OpenMPT/common/Profiler.cpp trunk/OpenMPT/common/StringFixer.h trunk/OpenMPT/common/misc_util.h trunk/OpenMPT/common/mptString.h trunk/OpenMPT/common/mutex.h trunk/OpenMPT/common/serialization_utils.cpp trunk/OpenMPT/common/serialization_utils.h trunk/OpenMPT/common/typedefs.cpp trunk/OpenMPT/common/typedefs.h trunk/OpenMPT/common/version.cpp trunk/OpenMPT/common/version.h trunk/OpenMPT/include/portaudio/build/msvc/portaudio_openmpt_vs2010.vcxproj trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/zlibstat.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt.sln trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt_stream_callbacks.h trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Mod2wave.cpp trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/Moddoc.h trunk/OpenMPT/mptrack/Modedit.cpp trunk/OpenMPT/mptrack/Mpdlgs.cpp trunk/OpenMPT/mptrack/Mpt_midi.cpp trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/PSRatioCalc.cpp trunk/OpenMPT/mptrack/PatternGotoDialog.cpp trunk/OpenMPT/mptrack/View_gen.cpp trunk/OpenMPT/mptrack/View_ins.cpp trunk/OpenMPT/mptrack/View_smp.cpp trunk/OpenMPT/mptrack/View_tre.cpp trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/mptrack/dlg_misc.cpp trunk/OpenMPT/mptrack/tagging.cpp trunk/OpenMPT/openmpt123/openmpt123.cpp trunk/OpenMPT/openmpt123/openmpt123.sln trunk/OpenMPT/openmpt123/openmpt123.vcxproj trunk/OpenMPT/sounddsp/DSP.cpp trunk/OpenMPT/sounddsp/EQ.cpp trunk/OpenMPT/sounddsp/Reverb.cpp trunk/OpenMPT/sounddsp/Reverb.h trunk/OpenMPT/soundlib/ChunkReader.h trunk/OpenMPT/soundlib/Dlsbank.cpp trunk/OpenMPT/soundlib/Dlsbank.h trunk/OpenMPT/soundlib/Endianness.h trunk/OpenMPT/soundlib/Fastmix.cpp trunk/OpenMPT/soundlib/FileReader.h trunk/OpenMPT/soundlib/ITCompression.cpp trunk/OpenMPT/soundlib/LOAD_DSM.CPP trunk/OpenMPT/soundlib/Load_ams.cpp trunk/OpenMPT/soundlib/Load_it.cpp trunk/OpenMPT/soundlib/Load_mdl.cpp trunk/OpenMPT/soundlib/Load_mid.cpp trunk/OpenMPT/soundlib/Load_mod.cpp trunk/OpenMPT/soundlib/Load_mt2.cpp trunk/OpenMPT/soundlib/Load_ptm.cpp trunk/OpenMPT/soundlib/Load_stm.cpp trunk/OpenMPT/soundlib/Load_wav.cpp trunk/OpenMPT/soundlib/Load_xm.cpp trunk/OpenMPT/soundlib/Mmcmp.cpp trunk/OpenMPT/soundlib/Mmx_mix.cpp trunk/OpenMPT/soundlib/ModChannel.h trunk/OpenMPT/soundlib/ModSample.cpp trunk/OpenMPT/soundlib/ModSequence.cpp trunk/OpenMPT/soundlib/ModSequence.h trunk/OpenMPT/soundlib/RowVisitor.h trunk/OpenMPT/soundlib/SampleFormatConverters.h trunk/OpenMPT/soundlib/SampleFormats.cpp trunk/OpenMPT/soundlib/Snd_defs.h trunk/OpenMPT/soundlib/Snd_flt.cpp trunk/OpenMPT/soundlib/Snd_fx.cpp trunk/OpenMPT/soundlib/Sndfile.cpp trunk/OpenMPT/soundlib/Sndfile.h trunk/OpenMPT/soundlib/Sndmix.cpp trunk/OpenMPT/soundlib/Tables.cpp trunk/OpenMPT/soundlib/Wav.h trunk/OpenMPT/soundlib/Waveform.cpp trunk/OpenMPT/soundlib/XMTools.cpp trunk/OpenMPT/soundlib/XMTools.h trunk/OpenMPT/soundlib/load_j2b.cpp trunk/OpenMPT/soundlib/modcommand.h trunk/OpenMPT/soundlib/modsmp_ctrl.cpp trunk/OpenMPT/soundlib/pattern.h trunk/OpenMPT/soundlib/patternContainer.cpp trunk/OpenMPT/soundlib/patternContainer.h trunk/OpenMPT/soundlib/plugins/PlugInterface.h trunk/OpenMPT/soundlib/tuningCollection.cpp trunk/OpenMPT/soundlib/tuningbase.h trunk/OpenMPT/soundlib/tuningcollection.h Added Paths: ----------- trunk/OpenMPT/common/svn_version_svnversion/ trunk/OpenMPT/openmpt123/Makefile Property Changed: ---------------- trunk/OpenMPT/ trunk/OpenMPT/include/portaudio/build/msvc/ trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/ trunk/OpenMPT/libopenmpt/ trunk/OpenMPT/openmpt123/ Index: trunk/OpenMPT =================================================================== --- trunk/OpenMPT 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT 2013-05-18 14:29:53 UTC (rev 2098) Property changes on: trunk/OpenMPT ___________________________________________________________________ Modified: svn:mergeinfo ## -1,5 +1,5 ## /branches/manx/build-speedup:1586-1589 -/branches/manx/gcc-fixes:2022,2041-2042 +/branches/manx/gcc-fixes:2018-2022,2024-2048,2052-2071,2075-2077,2080,2087-2089 /branches/manx/header-dependencies-cleanups:1394-1397,1401-1402,1405-1406 /branches/manx/nonglobal-mixer:1715-1841 /branches/manx/profiler:1813 \ No newline at end of property Modified: trunk/OpenMPT/common/BuildSettings.h =================================================================== --- trunk/OpenMPT/common/BuildSettings.h 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/common/BuildSettings.h 2013-05-18 14:29:53 UTC (rev 2098) @@ -25,7 +25,7 @@ #define ENABLE_ASM // inline assembly requires MSVC compiler -#if defined(ENABLE_ASM) && defined(_MSC_VER) +#if defined(ENABLE_ASM) && defined(_MSC_VER) && defined(_M_IX86) // Generate general x86 inline assembly. #define ENABLE_X86 @@ -122,15 +122,19 @@ #define NO_ASIO #define NO_VST #define NO_PORTAUDIO -#if !defined(_WIN32) +#if !defined(_WIN32) || (defined(_WIN32) && !defined(_M_IX86)) #define NO_MO3 #endif #define NO_DSOUND #define NO_FLAC #define NO_MP3_SAMPLES //#define NO_LIBMODPLUG -//#define NO_WINAMP -//#define NO_XMPLAY +#if !defined(_WIN32) || (defined(_WIN32) && !defined(_M_IX86)) +#define NO_WINAMP +#endif +#if !defined(_WIN32) || (defined(_WIN32) && !defined(_M_IX86)) +#define NO_XMPLAY +#endif //#define NO_LIBOPENMPT_C //#define NO_LIBOPENMPT_CXX Modified: trunk/OpenMPT/common/FlagSet.h =================================================================== --- trunk/OpenMPT/common/FlagSet.h 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/common/FlagSet.h 2013-05-18 14:29:53 UTC (rev 2098) @@ -161,10 +161,3 @@ inline enum_t &operator &= (enum_t &a, enum_t b) { a = (a & b); return a; } \ inline enum_t &operator |= (enum_t &a, enum_t b) { a = (a | b); return a; } \ inline enum_t operator ~ (enum_t a) { return static_cast<enum_t>(~(+a)); } - -// Declaration of a typesafe flag set enum. -// Usage: FLAGSET(enumName) { foo = 1, bar = 2, ... } -#define FLAGSET(enum_t) \ - enum enum_t; \ - DECLARE_FLAGSET(enum_t) \ - enum enum_t Modified: trunk/OpenMPT/common/Profiler.cpp =================================================================== --- trunk/OpenMPT/common/Profiler.cpp 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/common/Profiler.cpp 2013-05-18 14:29:53 UTC (rev 2098) @@ -8,7 +8,7 @@ */ -#include "Stdafx.h" +#include "stdafx.h" #include "Profiler.h" #include <stdlib.h> Modified: trunk/OpenMPT/common/StringFixer.h =================================================================== --- trunk/OpenMPT/common/StringFixer.h 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/common/StringFixer.h 2013-05-18 14:29:53 UTC (rev 2098) @@ -11,6 +11,8 @@ #pragma once +#include <string.h> + namespace StringFixer { @@ -63,18 +65,6 @@ // Copy a string from srcBuffer to destBuffer using a given read mode. - // Used for reading strings from files. - // Preferrably use this version of the function, it is safer. - template <ReadWriteMode mode, size_t destSize, size_t srcSize> - void ReadString(char (&destBuffer)[destSize], const char (&srcBuffer)[srcSize]) - //----------------------------------------------------------------------------- - { - STATIC_ASSERT(destSize > 0); - STATIC_ASSERT(srcSize > 0); - ReadString<mode, destSize>(destBuffer, srcBuffer, srcSize); - } - - // Copy a string from srcBuffer to destBuffer using a given read mode. // Used for reading strings from files. // Only use this version of the function if the size of the source buffer is variable. @@ -159,18 +149,18 @@ } - // Copy a string from srcBuffer to destBuffer using a given write mode. - // Used for writing strings to files. + // Used for reading strings from files. // Preferrably use this version of the function, it is safer. template <ReadWriteMode mode, size_t destSize, size_t srcSize> - void WriteString(char (&destBuffer)[destSize], const char (&srcBuffer)[srcSize]) - //------------------------------------------------------------------------------ + void ReadString(char (&destBuffer)[destSize], const char (&srcBuffer)[srcSize]) + //----------------------------------------------------------------------------- { STATIC_ASSERT(destSize > 0); STATIC_ASSERT(srcSize > 0); - WriteString<mode, destSize>(destBuffer, srcBuffer, srcSize); + ReadString<mode, destSize>(destBuffer, srcBuffer, srcSize); } + // Copy a string from srcBuffer to destBuffer using a given write mode. // Used for writing strings to files. // Only use this version of the function if the size of the source buffer is variable. @@ -215,15 +205,19 @@ } } - - // Copy from one fixed size char array to another one. - template <size_t destSize, size_t srcSize> - void Copy(char (&destBuffer)[destSize], const char (&srcBuffer)[srcSize]) - //----------------------------------------------------------------------- + // Copy a string from srcBuffer to destBuffer using a given write mode. + // Used for writing strings to files. + // Preferrably use this version of the function, it is safer. + template <ReadWriteMode mode, size_t destSize, size_t srcSize> + void WriteString(char (&destBuffer)[destSize], const char (&srcBuffer)[srcSize]) + //------------------------------------------------------------------------------ { - CopyN(destBuffer, srcBuffer, srcSize); + STATIC_ASSERT(destSize > 0); + STATIC_ASSERT(srcSize > 0); + WriteString<mode, destSize>(destBuffer, srcBuffer, srcSize); } + // Copy from a char array to a fixed size char array. template <size_t destSize> void CopyN(char (&destBuffer)[destSize], const char *srcBuffer, const size_t srcSize = SIZE_MAX) @@ -233,4 +227,14 @@ strncpy(destBuffer, srcBuffer, copySize); destBuffer[copySize] = '\0'; } + + // Copy from one fixed size char array to another one. + template <size_t destSize, size_t srcSize> + void Copy(char (&destBuffer)[destSize], const char (&srcBuffer)[srcSize]) + //----------------------------------------------------------------------- + { + CopyN(destBuffer, srcBuffer, srcSize); + } + }; + Modified: trunk/OpenMPT/common/misc_util.h =================================================================== --- trunk/OpenMPT/common/misc_util.h 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/common/misc_util.h 2013-05-18 14:29:53 UTC (rev 2098) @@ -14,8 +14,11 @@ #include <sstream> #include <string> +#include <cmath> #include <cstdlib> +#include <string.h> + #include "typedefs.h" #ifdef MODPLUG_TRACKER @@ -177,7 +180,7 @@ if(b == 0) return a; a %= b; - } + } while(true); } @@ -253,7 +256,7 @@ *result |= 0x80; } result++; - } while (++bytesUsed < maxLength && value != 0) + } while (++bytesUsed < maxLength && value != 0); return bytesUsed; } Modified: trunk/OpenMPT/common/mptString.h =================================================================== --- trunk/OpenMPT/common/mptString.h 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/common/mptString.h 2013-05-18 14:29:53 UTC (rev 2098) @@ -11,6 +11,9 @@ #pragma once #include <string> +#ifdef __GNUC__ +#include <strings.h> // for strcasecmp +#endif namespace mpt { @@ -86,3 +89,13 @@ } return str; } + + +static inline int mpt_strnicmp(const char *a, const char *b, size_t count) +{ + #ifdef _MSC_VER + return _strnicmp(a, b, count); + #else + return strncasecmp(a, b, count); + #endif +} Modified: trunk/OpenMPT/common/mutex.h =================================================================== --- trunk/OpenMPT/common/mutex.h 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/common/mutex.h 2013-05-18 14:29:53 UTC (rev 2098) @@ -9,6 +9,8 @@ #pragma once +#ifdef MODPLUG_TRACKER + #define WIN32_LEAN_AND_MEAN #define VC_EXTRALEAN #define NOMINMAX @@ -49,3 +51,5 @@ }; } // namespace Util + +#endif // MODPLUG_TRACKER Modified: trunk/OpenMPT/common/serialization_utils.cpp =================================================================== --- trunk/OpenMPT/common/serialization_utils.cpp 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/common/serialization_utils.cpp 2013-05-18 14:29:53 UTC (rev 2098) @@ -10,12 +10,15 @@ #include "stdafx.h" #include "serialization_utils.h" +#include "misc_util.h" #include <algorithm> #include <iterator> // for back_inserter namespace srlztn { +static const uint8 HeaderId_FlagByte = 0; + // Indexing starts from 0. inline bool Testbit(uint8 val, uint8 bitindex) {return ((val & (1 << bitindex)) != 0);} @@ -145,7 +148,7 @@ void WriteItemString(OutStream& oStrm, const char* const pStr, const size_t nSize) //-------------------------------------------------------------------------------- { - uint32 id = (std::min)(nSize, (uint32_max >> 4)) << 4; + uint32 id = std::min<size_t>(nSize, (uint32_max >> 4)) << 4; id |= 12; // 12 == 1100b Binarywrite<uint32>(oStrm, id); id >>= 4; @@ -188,9 +191,7 @@ { int32 val = 0; memcpy(&val, pId, nLength); - char buf[36]; - _itoa(val, buf, 10); - str = buf; + str = Stringify(val); } return str; } @@ -220,29 +221,29 @@ #define SSB_INITIALIZATION_LIST \ + m_Status(SNT_NONE), \ + m_nFixedEntrySize(0), \ + m_fpLogFunc(s_DefaultLogFunc), \ m_Readlogmask(s_DefaultReadLogMask), \ m_Writelogmask(s_DefaultWriteLogMask), \ - m_fpLogFunc(s_DefaultLogFunc), \ - m_nCounter(0), \ - m_nNextReadHint(0), \ + m_posStart(0), \ m_nReadVersion(0), \ - m_nFixedEntrySize(0), \ - m_nIdbytes(IdSizeVariable), \ - m_nReadEntrycount(0), \ m_nMaxReadEntryCount(16000), \ - m_pSubEntry(nullptr), \ m_rposMapBegin(0), \ - m_posStart(0), \ - m_posSubEntryStart(0), \ + m_posMapEnd(0), \ m_posDataBegin(0), \ - m_posMapStart(0), \ m_rposEndofHdrData(0), \ - m_posMapEnd(0), \ + m_nReadEntrycount(0), \ + m_nIdbytes(IdSizeVariable), \ + m_nCounter(0), \ + m_nNextReadHint(0), \ + m_Flags(s_DefaultFlags), \ + m_pSubEntry(nullptr), \ + m_posSubEntryStart(0), \ + m_nMapReserveSize(0), \ m_posEntrycount(0), \ m_posMapPosField(0), \ - m_nMapReserveSize(0), \ - m_Flags(s_DefaultFlags), \ - m_Status(SNT_NONE) + m_posMapStart(0) \ Ssb::Ssb(InStream* pIstrm, OutStream* pOstrm) : @@ -268,8 +269,8 @@ Ssb::Ssb(InStream& iStrm) : + m_pOstrm(nullptr), m_pIstrm(&iStrm), - m_pOstrm(nullptr), SSB_INITIALIZATION_LIST //------------------------------ {} Modified: trunk/OpenMPT/common/serialization_utils.h =================================================================== --- trunk/OpenMPT/common/serialization_utils.h 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/common/serialization_utils.h 2013-05-18 14:29:53 UTC (rev 2098) @@ -21,6 +21,7 @@ #include <type_traits> #endif #include <algorithm> +#include <string.h> namespace srlztn //SeRiaLiZaTioN { @@ -122,6 +123,113 @@ }; +template<class T> +inline void Binarywrite(OutStream& oStrm, const T& data) +//------------------------------------------------------ +{ + oStrm.write(reinterpret_cast<const char*>(&data), sizeof(data)); +} + +//Write only given number of bytes from the beginning. +template<class T> +inline void Binarywrite(OutStream& oStrm, const T& data, const Offtype bytecount) +//-------------------------------------------------------------------------- +{ + oStrm.write(reinterpret_cast<const char*>(&data), MIN(bytecount, sizeof(data))); +} + +template <class T> +inline void WriteItem(OutStream& oStrm, const T& data) +//---------------------------------------------------- +{ + #ifdef HAS_TYPE_TRAITS + static_assert(std::is_trivial<T>::value == true, ""); + #endif + Binarywrite(oStrm, data); +} + +void WriteItemString(OutStream& oStrm, const char* const pStr, const size_t nSize); + +template <> +inline void WriteItem<std::string>(OutStream& oStrm, const std::string& str) {WriteItemString(oStrm, str.c_str(), str.length());} + +template <> +inline void WriteItem<LPCSTR>(OutStream& oStrm, const LPCSTR& psz) {WriteItemString(oStrm, psz, strlen(psz));} + + +template<class T> +inline void Binaryread(InStream& iStrm, T& data) +//---------------------------------------------- +{ + iStrm.read(reinterpret_cast<char*>(&data), sizeof(T)); +} + +//Read only given number of bytes to the beginning of data; data bytes are memset to 0 before reading. +template <class T> +inline void Binaryread(InStream& iStrm, T& data, const Offtype bytecount) +//----------------------------------------------------------------------- +{ + #ifdef HAS_TYPE_TRAITS + static_assert(std::is_trivial<T>::value == true, ""); + #endif + memset(&data, 0, sizeof(data)); + iStrm.read(reinterpret_cast<char*>(&data), (std::min)((size_t)bytecount, sizeof(data))); +} + + +template <class T> +inline void ReadItem(InStream& iStrm, T& data, const DataSize nSize) +//------------------------------------------------------------------ +{ + #ifdef HAS_TYPE_TRAITS + static_assert(std::is_trivial<T>::value == true, ""); + #endif + if (nSize == sizeof(T) || nSize == invalidDatasize) + Binaryread(iStrm, data); + else + Binaryread(iStrm, data, nSize); +} + +// Read specialization for float. If data size is 8, read double and assign it to given float. +template <> +inline void ReadItem<float>(InStream& iStrm, float& f, const DataSize nSize) +//-------------------------------------------------------------------------- +{ + if (nSize == 8) + { + double d; + Binaryread(iStrm, d); + f = static_cast<float>(d); + } + else + Binaryread(iStrm, f); +} + +// Read specialization for double. If data size is 4, read float and assign it to given double. +template <> +inline void ReadItem<double>(InStream& iStrm, double& d, const DataSize nSize) +//---------------------------------------------------------------------------- +{ + if (nSize == 4) + { + float f; + Binaryread(iStrm, f); + d = f; + } + else + Binaryread(iStrm, d); +} + +void ReadItemString(InStream& iStrm, std::string& str, const DataSize); + +template <> +inline void ReadItem<std::string>(InStream& iStrm, std::string& str, const DataSize nSize) +//---------------------------------------------------------------------------------------- +{ + ReadItemString(iStrm, str, nSize); +} + + class Ssb //======= { @@ -236,10 +344,6 @@ // Write given string to log if log func is defined. void AddToLog(LPCTSTR psz) {if (m_fpLogFunc) m_fpLogFunc(psz);} - SsbStatus m_Status; - uint32 m_nFixedEntrySize; // Read/write: If > 0, data entries have given fixed size. - fpLogFunc_t m_fpLogFunc; // Pointer to log function. - private: // Reads map to cache. void CacheMap(); @@ -285,13 +389,22 @@ void IncrementWriteCounter(); private: + + OutStream* m_pOstrm; // Write: Pointer to write stream. + InStream* m_pIstrm; // Read: Pointer to read stream. + +public: + + SsbStatus m_Status; + uint32 m_nFixedEntrySize; // Read/write: If > 0, data entries have given fixed size. + fpLogFunc_t m_fpLogFunc; // Pointer to log function. + +private: + SsbStatus m_Readlogmask; // Read: Controls which read messages will be written to log. SsbStatus m_Writelogmask; // Write: Controls which write messages will be written to log. std::vector<char> m_Idarray; // Read: Holds entry ids. - - InStream* m_pIstrm; // Read: Pointer to read stream. - OutStream* m_pOstrm; // Write: Pointer to write stream. Postype m_posStart; // Read/write: Stream position at the beginning of object. std::vector<ReadEntry> mapData; // Read: Contains map information. @@ -316,8 +429,6 @@ Postype m_posMapStart; // Write: Pos of map start. OstrStream m_MapStream; // Write: Map stream. -private: - static const uint8 HeaderId_FlagByte = 0; public: static const uint8 s_DefaultFlagbyte = 0; static int32 s_DefaultReadLogMask; @@ -393,113 +504,7 @@ } -template<class T> -inline void Binarywrite(OutStream& oStrm, const T& data) -//------------------------------------------------------ -{ - oStrm.write(reinterpret_cast<const char*>(&data), sizeof(data)); -} - -//Write only given number of bytes from the beginning. -template<class T> -inline void Binarywrite(OutStream& oStrm, const T& data, const Offtype bytecount) -//-------------------------------------------------------------------------- -{ - oStrm.write(reinterpret_cast<const char*>(&data), MIN(bytecount, sizeof(data))); -} - template <class T> -inline void WriteItem(OutStream& oStrm, const T& data) -//---------------------------------------------------- -{ - #ifdef HAS_TYPE_TRAITS - static_assert(std::is_trivial<T>::value == true, ""); - #endif - Binarywrite(oStrm, data); -} - -void WriteItemString(OutStream& oStrm, const char* const pStr, const size_t nSize); - -template <> -inline void WriteItem<std::string>(OutStream& oStrm, const std::string& str) {WriteItemString(oStrm, str.c_str(), str.length());} - -template <> -inline void WriteItem<LPCSTR>(OutStream& oStrm, const LPCSTR& psz) {WriteItemString(oStrm, psz, strlen(psz));} - -template<class T> -inline void Binaryread(InStream& iStrm, T& data) -//---------------------------------------------- -{ - iStrm.read(reinterpret_cast<char*>(&data), sizeof(T)); -} - -//Read only given number of bytes to the beginning of data; data bytes are memset to 0 before reading. -template <class T> -inline void Binaryread(InStream& iStrm, T& data, const Offtype bytecount) -//----------------------------------------------------------------------- -{ - #ifdef HAS_TYPE_TRAITS - static_assert(std::is_trivial<T>::value == true, ""); - #endif - memset(&data, 0, sizeof(data)); - iStrm.read(reinterpret_cast<char*>(&data), (std::min)((size_t)bytecount, sizeof(data))); -} - - -template <class T> -inline void ReadItem(InStream& iStrm, T& data, const DataSize nSize) -//------------------------------------------------------------------ -{ - #ifdef HAS_TYPE_TRAITS - static_assert(std::is_trivial<T>::value == true, ""); - #endif - if (nSize == sizeof(T) || nSize == invalidDatasize) - Binaryread(iStrm, data); - else - Binaryread(iStrm, data, nSize); -} - -// Read specialization for float. If data size is 8, read double and assign it to given float. -template <> -inline void ReadItem<float>(InStream& iStrm, float& f, const DataSize nSize) -//-------------------------------------------------------------------------- -{ - if (nSize == 8) - { - double d; - Binaryread(iStrm, d); - f = static_cast<float>(d); - } - else - Binaryread(iStrm, f); -} - -// Read specialization for double. If data size is 4, read float and assign it to given double. -template <> -inline void ReadItem<double>(InStream& iStrm, double& d, const DataSize nSize) -//---------------------------------------------------------------------------- -{ - if (nSize == 4) - { - float f; - Binaryread(iStrm, f); - d = f; - } - else - Binaryread(iStrm, d); -} - -void ReadItemString(InStream& iStrm, std::string& str, const DataSize); - -template <> -inline void ReadItem<std::string>(InStream& iStrm, std::string& str, const DataSize nSize) -//---------------------------------------------------------------------------------------- -{ - ReadItemString(iStrm, str, nSize); -} - - -template <class T> struct ArrayWriter //================ { Modified: trunk/OpenMPT/common/typedefs.cpp =================================================================== --- trunk/OpenMPT/common/typedefs.cpp 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/common/typedefs.cpp 2013-05-18 14:29:53 UTC (rev 2098) @@ -11,6 +11,7 @@ #include "stdafx.h" #include "typedefs.h" #include <iostream> +#include <cstring> #ifndef MODPLUG_TRACKER @@ -118,7 +119,7 @@ } #endif //LOG_TO_FILE #else // !MODPLUG_TRACKER - std::size_t len = strlen(message); + std::size_t len = std::strlen(message); // remove eol if already present if(len > 0 && message[len-1] == '\n') { Modified: trunk/OpenMPT/common/typedefs.h =================================================================== --- trunk/OpenMPT/common/typedefs.h 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/common/typedefs.h 2013-05-18 14:29:53 UTC (rev 2098) @@ -19,6 +19,10 @@ #define MSVC_VER_VC10 1600 #define MSVC_VER_2010 MSVC_VER_VC10 +#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) + + + #if defined(_MSC_VER) #pragma warning(error : 4309) // Treat "truncation of constant value"-warning as error. #endif @@ -31,9 +35,15 @@ -#if defined(_MSC_VER) && (_MSC_VER < MSVC_VER_2010) +#if defined(_MSC_VER) +#if (_MSC_VER < MSVC_VER_2010) #define nullptr 0 #endif +#elif defined(__GNUC__) +#if GCC_VERSION < 40600 +#define nullptr 0 +#endif +#endif @@ -50,7 +60,7 @@ #define PACKED __declspec(align(1)) #define NEEDS_PRAGMA_PACK #elif defined(__GNUC__) -#define PACKED __attribute__((packed))) __attribute__((aligned(1)))) +#define PACKED __attribute__((packed)) __attribute__((aligned(1))) #endif @@ -225,6 +235,7 @@ // openmpt assumes these type have exact WIN32 semantics #define VOID void +typedef std::int32_t BOOL; typedef std::uint8_t BYTE; typedef std::uint16_t WORD; typedef std::uint32_t DWORD; @@ -233,21 +244,35 @@ typedef std::int16_t SHORT; typedef std::int32_t INT; typedef std::int32_t LONG; +typedef std::int64_t LONGLONG; typedef std::uint8_t UCHAR; typedef std::uint16_t USHORT; typedef std::uint32_t UINT; typedef std::uint32_t ULONG; +typedef std::uint64_t ULONGLONG; typedef VOID * LPVOID; typedef VOID * PVOID; +typedef BYTE * LPBYTE; +typedef WORD * LPWORD; +typedef DWORD * LPDWORD; +typedef INT * LPINT; +typedef LONG * LPLONG; -typedef std::int8_t CHAR; typedef char TCHAR; typedef const char * LPCSTR; typedef char * LPSTR; typedef const char * LPCTSTR; typedef char * LPTSTR; + +// for BOOL +#define TRUE (1) +#define FALSE (0) + #define MPT_TEXT(x) x +// wsprintf is just sprintf, but defined in the WINDOWS API +#define wsprintf sprintf + #endif // _WIN32 @@ -265,8 +290,10 @@ #define snprintf c99_snprintf #endif +#define MULTICHAR4_LE_MSVC(a,b,c,d) static_cast<uint32>( (static_cast<uint8>(a) << 24) | (static_cast<uint8>(b) << 16) | (static_cast<uint8>(c) << 8) | (static_cast<uint8>(d) << 0) ) + //STRINGIZE makes a string of given argument. If used with #defined value, //the string is made of the contents of the defined value. #define HELPER_STRINGIZE(x) #x @@ -305,3 +332,10 @@ // just #undef Log in files, where this Log redefinition causes problems //#undef Log + + + +#ifndef UNREFERENCED_PARAMETER +#define UNREFERENCED_PARAMETER(x) (void)(x) +#endif + Modified: trunk/OpenMPT/common/version.cpp =================================================================== --- trunk/OpenMPT/common/version.cpp 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/common/version.cpp 2013-05-18 14:29:53 UTC (rev 2098) @@ -12,6 +12,8 @@ #include <sstream> +#include <cstdlib> + #include "versionNumber.h" #include "svn_version.h" @@ -21,6 +23,65 @@ const char * const str = MPT_VERSION_STR; +static int parse_svnversion_to_revision( std::string svnversion ) +{ + if(svnversion.length() == 0) + { + return 0; + } + if(svnversion.find(":") != std::string::npos) + { + svnversion = svnversion.substr(svnversion.find(":") + 1); + } + if(svnversion.find("M") != std::string::npos) + { + svnversion = svnversion.substr(0, svnversion.find("M")); + } + if(svnversion.find("S") != std::string::npos) + { + svnversion = svnversion.substr(0, svnversion.find("S")); + } + if(svnversion.find("P") != std::string::npos) + { + svnversion = svnversion.substr(0, svnversion.find("P")); + } + return std::strtol(svnversion.c_str(), 0, 10); +} + +static bool parse_svnversion_to_mixed_revisions( std::string svnversion ) +{ + if(svnversion.length() == 0) + { + return false; + } + if(svnversion.find(":") != std::string::npos) + { + return true; + } + if(svnversion.find("S") != std::string::npos) + { + return true; + } + if(svnversion.find("P") != std::string::npos) + { + return true; + } + return false; +} + +static bool parse_svnversion_to_modified( std::string svnversion ) +{ + if(svnversion.length() == 0) + { + return false; + } + if(svnversion.find("M") != std::string::npos) + { + return true; + } + return false; +} + std::string GetOpenMPTVersionStr() { return std::string("OpenMPT ") + std::string(MPT_VERSION_STR); @@ -73,32 +134,54 @@ std::string GetUrl() { - return OPENMPT_VERSION_URL; + #ifdef OPENMPT_VERSION_URL + return OPENMPT_VERSION_URL; + #else + return ""; + #endif } int GetRevision() { - return OPENMPT_VERSION_REVISION; + #if defined(OPENMPT_VERSION_REVISION) + return OPENMPT_VERSION_REVISION; + #elif defined(OPENMPT_VERSION_SVNVERSION) + return parse_svnversion_to_revision(OPENMPT_VERSION_SVNVERSION); + #else + return 0; + #endif } bool IsDirty() { - return OPENMPT_VERSION_DIRTY; + #if defined(OPENMPT_VERSION_DIRTY) + return OPENMPT_VERSION_DIRTY; + #elif defined(OPENMPT_VERSION_SVNVERSION) + return parse_svnversion_to_modified(OPENMPT_VERSION_SVNVERSION); + #else + return false; + #endif } bool HasMixedRevisions() { - return OPENMPT_VERSION_MIXEDREVISIONS; + #if defined(OPENMPT_VERSION_MIXEDREVISIONS) + return OPENMPT_VERSION_MIXEDREVISIONS; + #elif defined(OPENMPT_VERSION_SVNVERSION) + return parse_svnversion_to_mixed_revisions(OPENMPT_VERSION_SVNVERSION); + #else + return false; + #endif } std::string GetStateString() { std::string retval; - if(OPENMPT_VERSION_MIXEDREVISIONS) + if(HasMixedRevisions()) { retval += "+mixed"; } - if(OPENMPT_VERSION_DIRTY) + if(IsDirty()) { retval += "+dirty"; } @@ -137,17 +220,17 @@ std::string GetRevisionString() { - if(OPENMPT_VERSION_REVISION == 0) + if(GetRevision() == 0) { return ""; } std::ostringstream str; - str << "-r" << OPENMPT_VERSION_REVISION; - if(OPENMPT_VERSION_MIXEDREVISIONS) + str << "-r" << GetRevision(); + if(HasMixedRevisions()) { str << "!"; } - if(OPENMPT_VERSION_DIRTY) + if(IsDirty()) { str << "+"; } @@ -167,18 +250,22 @@ std::string GetVersionUrlString() { - if(OPENMPT_VERSION_REVISION == 0) + if(GetRevision() == 0) { return ""; } - std::string url = OPENMPT_VERSION_URL; + #if defined(OPENMPT_VERSION_URL) + std::string url = OPENMPT_VERSION_URL; + #else + std::string url = ""; + #endif std::string baseurl = "https://svn.code.sf.net/p/modplug/code/"; if(url.substr(0, baseurl.length()) == baseurl) { url = url.substr(baseurl.length()); } std::ostringstream str; - str << url << "@" << OPENMPT_VERSION_REVISION << GetStateString(); + str << url << "@" << GetRevision() << GetStateString(); return str.str(); } Modified: trunk/OpenMPT/common/version.h =================================================================== --- trunk/OpenMPT/common/version.h 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/common/version.h 2013-05-18 14:29:53 UTC (rev 2098) @@ -16,7 +16,8 @@ //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of //version 1.17.02.28. -#define MAKE_VERSION_NUMERIC(v0,v1,v2,v3) ((0x##v0 << 24) | (0x##v1<<16) | (0x##v2<<8) | (0x##v3)) +#define MAKE_VERSION_NUMERIC_HELPER(prefix,v0,v1,v2,v3) ((prefix##v0 << 24) | (prefix##v1<<16) | (prefix##v2<<8) | (prefix##v3)) +#define MAKE_VERSION_NUMERIC(v0,v1,v2,v3) MAKE_VERSION_NUMERIC_HELPER(0x,v0,v1,v2,v3) namespace MptVersion Index: trunk/OpenMPT/include/portaudio/build/msvc =================================================================== --- trunk/OpenMPT/include/portaudio/build/msvc 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/include/portaudio/build/msvc 2013-05-18 14:29:53 UTC (rev 2098) Property changes on: trunk/OpenMPT/include/portaudio/build/msvc ___________________________________________________________________ Modified: svn:ignore ## -1,3 +1,4 ## portaudio_openmpt_vs2010.vcxproj.user Win32 *.user +x64 Modified: trunk/OpenMPT/include/portaudio/build/msvc/portaudio_openmpt_vs2010.vcxproj =================================================================== --- trunk/OpenMPT/include/portaudio/build/msvc/portaudio_openmpt_vs2010.vcxproj 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/include/portaudio/build/msvc/portaudio_openmpt_vs2010.vcxproj 2013-05-18 14:29:53 UTC (rev 2098) @@ -49,11 +49,11 @@ <UseOfMfc>false</UseOfMfc> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> + <ConfigurationType>StaticLibrary</ConfigurationType> <UseOfMfc>false</UseOfMfc> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> + <ConfigurationType>StaticLibrary</ConfigurationType> <UseOfMfc>false</UseOfMfc> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> @@ -186,9 +186,9 @@ <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <AdditionalIncludeDirectories>..\..\src\common;..\..\include;.\;..\..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>_WIN64;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_WDMKS_NO_KSGUID_LIB;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>_WIN64;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_WDMKS_NO_KSGUID_LIB;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> <StringPooling>true</StringPooling> - <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <FunctionLevelLinking>true</FunctionLevelLinking> <PrecompiledHeaderOutputFile>$(Platform)\$(Configuration)\portaudio.pch</PrecompiledHeaderOutputFile> <AssemblerListingLocation>$(Platform)\$(Configuration)\</AssemblerListingLocation> @@ -273,7 +273,7 @@ <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>..\..\src\common;..\..\include;.\;..\..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>_WIN64;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_WDMKS_NO_KSGUID_LIB;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>_WIN64;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_WDMKS_NO_KSGUID_LIB;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>true</MinimalRebuild> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> @@ -566,6 +566,8 @@ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\..\src\hostapi\asio\ASIOSDK\common\asio.cpp"> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -582,6 +584,8 @@ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\..\src\hostapi\asio\ASIOSDK\host\asiodrivers.cpp"> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -598,6 +602,8 @@ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\..\src\hostapi\asio\ASIOSDK\host\pc\asiolist.cpp"> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -614,6 +620,8 @@ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\..\src\hostapi\dsound\pa_win_ds.c"> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -661,6 +669,8 @@ <ClCompile Include="..\..\src\hostapi\wdmks\pa_win_wdmks.c"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\..\src\os\win\pa_win_coinitialize.c" /> <ClCompile Include="..\..\src\os\win\pa_win_hostapis.c"> Index: trunk/OpenMPT/include/zlib/contrib/vstudio/vc10 =================================================================== --- trunk/OpenMPT/include/zlib/contrib/vstudio/vc10 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/include/zlib/contrib/vstudio/vc10 2013-05-18 14:29:53 UTC (rev 2098) Property changes on: trunk/OpenMPT/include/zlib/contrib/vstudio/vc10 ___________________________________________________________________ Modified: svn:ignore ## -1 +1,2 ## x86 +x64 Modified: trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/zlibstat.vcxproj =================================================================== --- trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/zlibstat.vcxproj 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/zlibstat.vcxproj 2013-05-18 14:29:53 UTC (rev 2098) @@ -308,7 +308,7 @@ <StringPooling>true</StringPooling> <ExceptionHandling> </ExceptionHandling> - <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <BufferSecurityCheck>false</BufferSecurityCheck> <FunctionLevelLinking>true</FunctionLevelLinking> <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile> @@ -369,7 +369,7 @@ <StringPooling>true</StringPooling> <ExceptionHandling> </ExceptionHandling> - <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <BufferSecurityCheck>false</BufferSecurityCheck> <FunctionLevelLinking>true</FunctionLevelLinking> <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile> Index: trunk/OpenMPT/libopenmpt =================================================================== --- trunk/OpenMPT/libopenmpt 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/libopenmpt 2013-05-18 14:29:53 UTC (rev 2098) Property changes on: trunk/OpenMPT/libopenmpt ___________________________________________________________________ Modified: svn:ignore ## -14,3 +14,4 ## libopenmpt_settings.vcxproj.user libopenmpt_foobar2000.opensdf libopenmpt_foobar2000.suo +x64 Modified: trunk/OpenMPT/libopenmpt/libopenmpt.sln =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.sln 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/libopenmpt/libopenmpt.sln 2013-05-18 14:29:53 UTC (rev 2098) @@ -13,21 +13,33 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {812A654D-99BE-4D13-B97F-86332AD3E363}.Debug|Win32.ActiveCfg = Debug|Win32 {812A654D-99BE-4D13-B97F-86332AD3E363}.Debug|Win32.Build.0 = Debug|Win32 + {812A654D-99BE-4D13-B97F-86332AD3E363}.Debug|x64.ActiveCfg = Debug|x64 + {812A654D-99BE-4D13-B97F-86332AD3E363}.Debug|x64.Build.0 = Debug|x64 {812A654D-99BE-4D13-B97F-86332AD3E363}.Release|Win32.ActiveCfg = Release|Win32 {812A654D-99BE-4D13-B97F-86332AD3E363}.Release|Win32.Build.0 = Release|Win32 + {812A654D-99BE-4D13-B97F-86332AD3E363}.Release|x64.ActiveCfg = Release|x64 + {812A654D-99BE-4D13-B97F-86332AD3E363}.Release|x64.Build.0 = Release|x64 {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = ReleaseWithoutAsm|x64 {B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Debug|Win32.ActiveCfg = Debug|Win32 {B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Debug|Win32.Build.0 = Debug|Win32 + {B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Debug|x64.ActiveCfg = Debug|Win32 {B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Release|Win32.ActiveCfg = Release|Win32 {B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Release|Win32.Build.0 = Release|Win32 + {B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Modified: trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2013-05-18 14:20:01 UTC (rev 2097) +++ trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2013-05-18 14:29:53 UTC (rev 2098) @@ -5,18 +5,34 @@ <Configuration>DebugStatic</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> + <ProjectConfiguration Include="DebugStatic|x64"> + <Configuration>DebugStatic</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="ReleaseStatic|Win32"> <Configuration>ReleaseStatic</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> + <ProjectConfiguration Include="ReleaseStatic|x64"> + <Configuration>ReleaseStatic</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="Release|Win32"> <Configuration>Release</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{812A654D-99BE-4D13-B97F-86332AD3E363}</ProjectGuid> @@ -28,43 +44,82 @@ <UseDebugLibraries>true</UseDebugLibraries> <CharacterSet>NotSet</CharacterSet> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <CharacterSet>NotSet</CharacterSet> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <WholeProgramOptimization>false</WholeProgramOptimization> <CharacterSet>NotSet</CharacterSet> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>false</WholeProgramOptimization> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <WholeProgramOptimization>false</WholeProgramOptimization> <CharacterSet>NotSet</CharacterSet> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>false</WholeProgramOptimization> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <OutDir>bin\</OutDir> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <OutDir>bin\</OutDir> + <TargetName>$(ProjectName)64</TargetName> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <WarningLevel>Level3</WarningLevel> @@ -86,6 +141,27 @@ </Command> </PostBuildEvent> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..;../common;../include;../common/svn_version;../common/svn_version_default</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ModuleDefinitionFile>xmpin.def</ModuleDefinitionFile> + <DelayLoadDLLs>libopenmpt_settings.dll</DelayLoadDLLs> + </Link> + <PreBuildEvent> + <Command>subwcrev .. ..\common\svn_version\svn_version.template.h ..\common\svn_version\svn_version.h || del ..\common\svn_version\svn_version.h || true</Command> + </PreBuildEvent> + <PostBuildEvent> + <Command> + </Command> + </PostBuildEvent> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|Win32'"> <ClCompile> <WarningLevel>Level3</WarningLevel> @@ -104,6 +180,24 @@ <AdditionalOptions>/ignore:4221 %(AdditionalOptions)</AdditionalOptions> </Lib> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..;../common;../include;../common/svn_version;../common/svn_version_default</AdditionalIncludeDirectories> + <PreprocessorDefinitions>LIBOPENMPT_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + <PreBuildEvent> + <Command>subwcrev .. ..\common\svn_version\svn_version.template.h ..\common\svn_version\svn_version.h || del ..\common\svn_version\svn_version.h || true</Command> + </PreBuildEvent> + <Lib> + <AdditionalOptions>/ignore:4221 %(AdditionalOptions)</AdditionalOptions> + </Lib> + </ItemDefinitionGroup> ... [truncated message content] |