Browse Source

Workarounds for build problems with mingw in C++11 mode.

tags/2021-05-28
jules 11 years ago
parent
commit
d9e902e80f
4 changed files with 16 additions and 8 deletions
  1. +4
    -2
      modules/juce_core/text/juce_CharPointer_ASCII.h
  2. +3
    -3
      modules/juce_core/text/juce_CharPointer_UTF16.h
  3. +4
    -2
      modules/juce_core/text/juce_CharPointer_UTF8.h
  4. +5
    -1
      modules/juce_core/time/juce_Time.cpp

+ 4
- 2
modules/juce_core/text/juce_CharPointer_ASCII.h View File

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


+ 3
- 3
modules/juce_core/text/juce_CharPointer_UTF16.h View File

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


+ 4
- 2
modules/juce_core/text/juce_CharPointer_UTF8.h View File

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


+ 5
- 1
modules/juce_core/time/juce_Time.cpp View File

@@ -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…
Cancel
Save