diff --git a/modules/juce_core/files/juce_File.h b/modules/juce_core/files/juce_File.h index cc0a38f4f5..1aa13c6e74 100644 --- a/modules/juce_core/files/juce_File.h +++ b/modules/juce_core/files/juce_File.h @@ -355,13 +355,11 @@ public: bool applyRecursively = false) const; /** Returns true if this file is a hidden or system file. - The criteria for deciding whether a file is hidden are platform-dependent. */ bool isHidden() const; /** If this file is a link, this returns the file that it points to. - If this file isn't actually link, it'll just return itself. */ File getLinkedTarget() const; @@ -695,13 +693,11 @@ public: static void findFileSystemRoots (Array& results); /** Finds the name of the drive on which this file lives. - @returns the volume label of the drive, or an empty string if this isn't possible */ String getVolumeLabel() const; /** Returns the serial number of the volume on which this file lives. - @returns the serial number, or zero if there's a problem doing this */ int getVolumeSerialNumber() const; @@ -790,7 +786,6 @@ public: commonApplicationDataDirectory, /** The folder that should be used for temporary files. - Always delete them when you're finished, to keep the user's computer tidy! */ tempDirectory, @@ -829,18 +824,15 @@ public: hostApplicationPath, /** The directory in which applications normally get installed. - So on windows, this would be something like "c:\program files", on the Mac "/Applications", or "/usr" on linux. */ globalApplicationsDirectory, - /** The most likely place where a user might store their music files. - */ + /** The most likely place where a user might store their music files. */ userMusicDirectory, - /** The most likely place where a user might store their movie files. - */ + /** The most likely place where a user might store their movie files. */ userMoviesDirectory, }; @@ -853,9 +845,7 @@ public: //============================================================================== /** Returns a temporary file in the system's temp directory. - This will try to return the name of a non-existent temp file. - To get the temp folder, you can use getSpecialLocation (File::tempDirectory). */ static File createTempFile (const String& fileNameEnding); @@ -863,7 +853,6 @@ public: //============================================================================== /** Returns the current working directory. - @see setAsCurrentWorkingDirectory */ static File getCurrentWorkingDirectory(); @@ -879,13 +868,11 @@ public: //============================================================================== /** The system-specific file separator character. - On Windows, this will be '\', on Mac/Linux, it'll be '/' */ static const juce_wchar separator; /** The system-specific file separator character, as a string. - On Windows, this will be '\', on Mac/Linux, it'll be '/' */ static const String separatorString; @@ -912,12 +899,10 @@ public: */ static String createLegalPathName (const String& pathNameToFix); - /** Indicates whether filenames are case-sensitive on the current operating system. - */ + /** Indicates whether filenames are case-sensitive on the current operating system. */ static bool areFileNamesCaseSensitive(); - /** Returns true if the string seems to be a fully-specified absolute path. - */ + /** Returns true if the string seems to be a fully-specified absolute path. */ static bool isAbsolutePath (const String& path); /** Creates a file that simply contains this string, without doing the sanity-checking diff --git a/modules/juce_core/maths/juce_MathsFunctions.h b/modules/juce_core/maths/juce_MathsFunctions.h index b436f520db..972c4aa298 100644 --- a/modules/juce_core/maths/juce_MathsFunctions.h +++ b/modules/juce_core/maths/juce_MathsFunctions.h @@ -285,7 +285,7 @@ inline int numElementsInArray (Type (&array)[N]) template inline Type juce_hypot (Type a, Type b) noexcept { - #if JUCE_WINDOWS + #if JUCE_MSVC return static_cast (_hypot (a, b)); #else return static_cast (hypot (a, b)); diff --git a/modules/juce_core/memory/juce_Memory.h b/modules/juce_core/memory/juce_Memory.h index 314cfa8483..39236578d5 100644 --- a/modules/juce_core/memory/juce_Memory.h +++ b/modules/juce_core/memory/juce_Memory.h @@ -26,12 +26,6 @@ #ifndef __JUCE_MEMORY_JUCEHEADER__ #define __JUCE_MEMORY_JUCEHEADER__ -//============================================================================== -#if JUCE_MINGW - /** This allocator is not defined in mingw gcc. */ - #define alloca __builtin_alloca -#endif - //============================================================================== /** Fills a block of memory with zeros. */ inline void zeromem (void* memory, size_t numBytes) noexcept { memset (memory, 0, numBytes); } diff --git a/modules/juce_core/native/juce_BasicNativeHeaders.h b/modules/juce_core/native/juce_BasicNativeHeaders.h index 43451bbde7..074506f42a 100644 --- a/modules/juce_core/native/juce_BasicNativeHeaders.h +++ b/modules/juce_core/native/juce_BasicNativeHeaders.h @@ -83,7 +83,11 @@ #define STRICT 1 #define WIN32_LEAN_AND_MEAN 1 - #define _WIN32_WINNT 0x0600 + #if JUCE_MINGW + #define _WIN32_WINNT 0x0501 + #else + #define _WIN32_WINNT 0x0600 + #endif #define _UNICODE 1 #define UNICODE 1 #ifndef _WIN32_IE diff --git a/modules/juce_core/system/juce_TargetPlatform.h b/modules/juce_core/system/juce_TargetPlatform.h index 919621a9e0..d5211c2e05 100644 --- a/modules/juce_core/system/juce_TargetPlatform.h +++ b/modules/juce_core/system/juce_TargetPlatform.h @@ -81,6 +81,11 @@ #ifdef __MINGW32__ #define JUCE_MINGW 1 + #ifdef __MINGW64__ + #define JUCE_64BIT 1 + #else + #define JUCE_32BIT 1 + #endif #endif /** If defined, this indicates that the processor is little-endian. */ diff --git a/modules/juce_gui_basics/juce_gui_basics.cpp b/modules/juce_gui_basics/juce_gui_basics.cpp index 2e03353dcc..31ef851347 100644 --- a/modules/juce_gui_basics/juce_gui_basics.cpp +++ b/modules/juce_gui_basics/juce_gui_basics.cpp @@ -85,7 +85,7 @@ #endif #if JUCE_MINGW - #include + #include #endif //============================================================================== diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp index 3cd2e7783d..cbec63fd5c 100644 --- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp @@ -54,7 +54,7 @@ void* getUser32Function (const char* functionName) // (NB: this function also us HMODULE user32Mod = GetModuleHandleA ("user32.dll"); jassert (user32Mod != 0); - return static_cast (GetProcAddress (user32Mod, functionName)); + return (void*) GetProcAddress (user32Mod, functionName); } //==============================================================================