mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-22 01:34:21 +00:00
Workarounds for build problems with mingw in C++11 mode.
This commit is contained in:
parent
8c66a5e767
commit
d9e902e80f
4 changed files with 16 additions and 8 deletions
|
|
@ -276,8 +276,10 @@ public:
|
|||
|
||||
int compareIgnoreCase (const CharPointer_ASCII other) const
|
||||
{
|
||||
#if JUCE_WINDOWS
|
||||
#if JUCE_MSVC
|
||||
return stricmp (data, other.data);
|
||||
#elif JUCE_MINGW
|
||||
return CharacterFunctions::compareIgnoreCase (*this, other);
|
||||
#else
|
||||
return strcasecmp (data, other.data);
|
||||
#endif
|
||||
|
|
@ -344,7 +346,7 @@ public:
|
|||
/** Parses this string as a 64-bit integer. */
|
||||
int64 getIntValue64() const noexcept
|
||||
{
|
||||
#if JUCE_LINUX || JUCE_ANDROID
|
||||
#if JUCE_LINUX || JUCE_ANDROID || JUCE_MINGW
|
||||
return atoll (data);
|
||||
#elif JUCE_WINDOWS
|
||||
return _atoi64 (data);
|
||||
|
|
|
|||
|
|
@ -349,7 +349,7 @@ public:
|
|||
return CharacterFunctions::compareIgnoreCaseUpTo (*this, other, maxChars);
|
||||
}
|
||||
|
||||
#if JUCE_WINDOWS && ! DOXYGEN
|
||||
#if JUCE_MSVC && ! DOXYGEN
|
||||
int compareIgnoreCase (const CharPointer_UTF16 other) const noexcept
|
||||
{
|
||||
return _wcsicmp (data, other.data);
|
||||
|
|
@ -408,7 +408,7 @@ public:
|
|||
/** Parses this string as a 32-bit integer. */
|
||||
int getIntValue32() const noexcept
|
||||
{
|
||||
#if JUCE_WINDOWS
|
||||
#if JUCE_MSVC
|
||||
return _wtoi (data);
|
||||
#else
|
||||
return CharacterFunctions::getIntValue <int, CharPointer_UTF16> (*this);
|
||||
|
|
@ -418,7 +418,7 @@ public:
|
|||
/** Parses this string as a 64-bit integer. */
|
||||
int64 getIntValue64() const noexcept
|
||||
{
|
||||
#if JUCE_WINDOWS
|
||||
#if JUCE_MSVC
|
||||
return _wtoi64 (data);
|
||||
#else
|
||||
return CharacterFunctions::getIntValue <int64, CharPointer_UTF16> (*this);
|
||||
|
|
|
|||
|
|
@ -421,8 +421,10 @@ public:
|
|||
/** Compares this string with another one. */
|
||||
int compareIgnoreCase (const CharPointer_UTF8 other) const noexcept
|
||||
{
|
||||
#if JUCE_WINDOWS
|
||||
#if JUCE_MSVC
|
||||
return stricmp (data, other.data);
|
||||
#elif JUCE_MINGW
|
||||
return CharacterFunctions::compareIgnoreCase (*this, other);
|
||||
#else
|
||||
return strcasecmp (data, other.data);
|
||||
#endif
|
||||
|
|
@ -479,7 +481,7 @@ public:
|
|||
/** Parses this string as a 64-bit integer. */
|
||||
int64 getIntValue64() const noexcept
|
||||
{
|
||||
#if JUCE_LINUX || JUCE_ANDROID
|
||||
#if JUCE_LINUX || JUCE_ANDROID || JUCE_MINGW
|
||||
return atoll (data);
|
||||
#elif JUCE_WINDOWS
|
||||
return _atoi64 (data);
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ String Time::getTimeZone() const noexcept
|
|||
{
|
||||
String zone[2];
|
||||
|
||||
#if JUCE_WINDOWS
|
||||
#if JUCE_MSVC
|
||||
_tzset();
|
||||
|
||||
#ifdef _INC_TIME_INL
|
||||
|
|
@ -378,7 +378,11 @@ String Time::getTimeZone() const noexcept
|
|||
zone[1] = zonePtr[1];
|
||||
#endif
|
||||
#else
|
||||
#if JUCE_MINGW
|
||||
#warning "Can't find a replacement for tzset on mingw - ideas welcome!"
|
||||
#else
|
||||
tzset();
|
||||
#endif
|
||||
const char** const zonePtr = (const char**) tzname;
|
||||
zone[0] = zonePtr[0];
|
||||
zone[1] = zonePtr[1];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue