Browse Source

Fix for iphone atomics on older SDKs.

tags/2021-05-28
Julian Storer 15 years ago
parent
commit
db2224b209
4 changed files with 11 additions and 2 deletions
  1. +3
    -0
      amalgamation/juce_amalgamated_template.cpp
  2. +4
    -0
      juce_amalgamated.cpp
  3. +2
    -1
      juce_amalgamated.h
  4. +2
    -1
      src/core/juce_Atomic.h

+ 3
- 0
amalgamation/juce_amalgamated_template.cpp View File

@@ -316,6 +316,9 @@
#include "../src/gui/components/windows/juce_ThreadWithProgressWindow.cpp"
#include "../src/gui/components/windows/juce_TooltipWindow.cpp"
#include "../src/gui/components/windows/juce_TopLevelWindow.cpp"
#endif
#if JUCE_BUILD_MISC // (put these in misc to balance the file sizes and avoid problems in iphone build)
#include "../src/gui/graphics/colour/juce_Colour.cpp"
#include "../src/gui/graphics/colour/juce_ColourGradient.cpp"
#include "../src/gui/graphics/colour/juce_Colours.cpp"


+ 4
- 0
juce_amalgamated.cpp View File

@@ -77777,6 +77777,9 @@ TopLevelWindow* TopLevelWindow::getActiveTopLevelWindow() throw()
END_JUCE_NAMESPACE
/*** End of inlined file: juce_TopLevelWindow.cpp ***/

#endif

#if JUCE_BUILD_MISC // (put these in misc to balance the file sizes and avoid problems in iphone build)

/*** Start of inlined file: juce_Colour.cpp ***/
BEGIN_JUCE_NAMESPACE
@@ -78284,6 +78287,7 @@ END_JUCE_NAMESPACE
/*** End of inlined file: juce_Colour.cpp ***/



/*** Start of inlined file: juce_ColourGradient.cpp ***/
BEGIN_JUCE_NAMESPACE



+ 2
- 1
juce_amalgamated.h View File

@@ -3136,7 +3136,8 @@ private:
Atomic& operator= (const Atomic&);
};

#if JUCE_MAC && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2)) // Older Mac builds using gcc4.1 or earlier...
#if (JUCE_IPHONE && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_2 || ! defined (__IPHONE_3_2))) \
|| (JUCE_MAC && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2))) // Older OSX builds using gcc4.1 or earlier...

inline void Atomic::increment (int32& variable) { OSAtomicIncrement32 (static_cast <int32_t*> (&variable)); }
inline int32 Atomic::incrementAndReturn (int32& variable) { return OSAtomicIncrement32 (static_cast <int32_t*> (&variable)); }


+ 2
- 1
src/core/juce_Atomic.h View File

@@ -62,7 +62,8 @@ private:
//==============================================================================
#if JUCE_MAC && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2)) // Older Mac builds using gcc4.1 or earlier...
#if (JUCE_IPHONE && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_2 || ! defined (__IPHONE_3_2))) \
|| (JUCE_MAC && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2))) // Older OSX builds using gcc4.1 or earlier...
inline void Atomic::increment (int32& variable) { OSAtomicIncrement32 (static_cast <int32_t*> (&variable)); }
inline int32 Atomic::incrementAndReturn (int32& variable) { return OSAtomicIncrement32 (static_cast <int32_t*> (&variable)); }


Loading…
Cancel
Save