mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-31 03:00:05 +00:00
Fixes for mingw headers.
This commit is contained in:
parent
e3e812ecd6
commit
b2ddfe67a8
4 changed files with 13 additions and 5 deletions
|
|
@ -376,7 +376,7 @@ bool juce_isfinite (NumericType) noexcept
|
|||
template <>
|
||||
inline bool juce_isfinite (float value) noexcept
|
||||
{
|
||||
#if JUCE_WINDOWS
|
||||
#if JUCE_WINDOWS && ! JUCE_MINGW
|
||||
return _finite (value) != 0;
|
||||
#else
|
||||
return std::isfinite (value);
|
||||
|
|
@ -386,7 +386,7 @@ inline bool juce_isfinite (float value) noexcept
|
|||
template <>
|
||||
inline bool juce_isfinite (double value) noexcept
|
||||
{
|
||||
#if JUCE_WINDOWS
|
||||
#if JUCE_WINDOWS && ! JUCE_MINGW
|
||||
return _finite (value) != 0;
|
||||
#else
|
||||
return std::isfinite (value);
|
||||
|
|
|
|||
|
|
@ -113,6 +113,8 @@
|
|||
|
||||
#if JUCE_MINGW
|
||||
#include <basetyps.h>
|
||||
#include <sys/time.h>
|
||||
#define alloca __builtin_alloca
|
||||
#else
|
||||
#include <crtdbg.h>
|
||||
#include <comutil.h>
|
||||
|
|
|
|||
|
|
@ -104,6 +104,10 @@
|
|||
#pragma warning (pop)
|
||||
#endif
|
||||
|
||||
#if JUCE_MINGW
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#if JUCE_ANDROID
|
||||
#include <atomic>
|
||||
#include <byteswap.h>
|
||||
|
|
|
|||
|
|
@ -62,9 +62,11 @@ namespace TimeHelpers
|
|||
}
|
||||
else
|
||||
{
|
||||
time_t now = static_cast <time_t> (seconds);
|
||||
time_t now = static_cast<time_t> (seconds);
|
||||
|
||||
#if JUCE_WINDOWS
|
||||
#if JUCE_WINDOWS && JUCE_MINGW
|
||||
return *localtime (&now);
|
||||
#elif JUCE_WINDOWS
|
||||
if (now >= 0 && now <= 0x793406fff)
|
||||
localtime_s (&result, &now);
|
||||
else
|
||||
|
|
@ -190,7 +192,7 @@ Time& Time::operator= (const Time& other) noexcept
|
|||
//==============================================================================
|
||||
int64 Time::currentTimeMillis() noexcept
|
||||
{
|
||||
#if JUCE_WINDOWS
|
||||
#if JUCE_WINDOWS && ! JUCE_MINGW
|
||||
struct _timeb t;
|
||||
_ftime_s (&t);
|
||||
return ((int64) t.time) * 1000 + t.millitm;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue