juce_StandardHeader.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. /*
  2. ==============================================================================
  3. This file is part of the juce_core module of the JUCE library.
  4. Copyright (c) 2013 - Raw Material Software Ltd.
  5. Permission to use, copy, modify, and/or distribute this software for any purpose with
  6. or without fee is hereby granted, provided that the above copyright notice and this
  7. permission notice appear in all copies.
  8. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
  9. TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
  10. NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  11. DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
  12. IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  13. CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. ------------------------------------------------------------------------------
  15. NOTE! This permissive ISC license applies ONLY to files within the juce_core module!
  16. All other JUCE modules are covered by a dual GPL/commercial license, so if you are
  17. using any other modules, be sure to check that you also comply with their license.
  18. For more details, visit www.juce.com
  19. ==============================================================================
  20. */
  21. #ifndef JUCE_STANDARDHEADER_H_INCLUDED
  22. #define JUCE_STANDARDHEADER_H_INCLUDED
  23. //==============================================================================
  24. /** Current JUCE version number.
  25. See also SystemStats::getJUCEVersion() for a string version.
  26. */
  27. #define JUCE_MAJOR_VERSION 3
  28. #define JUCE_MINOR_VERSION 0
  29. #define JUCE_BUILDNUMBER 7
  30. /** Current Juce version number.
  31. Bits 16 to 32 = major version.
  32. Bits 8 to 16 = minor version.
  33. Bits 0 to 8 = point release.
  34. See also SystemStats::getJUCEVersion() for a string version.
  35. */
  36. #define JUCE_VERSION ((JUCE_MAJOR_VERSION << 16) + (JUCE_MINOR_VERSION << 8) + JUCE_BUILDNUMBER)
  37. //==============================================================================
  38. #include "juce_PlatformDefs.h"
  39. //==============================================================================
  40. // Now we'll include some common OS headers..
  41. #if JUCE_MSVC
  42. #pragma warning (push)
  43. #pragma warning (disable: 4514 4245 4100)
  44. #endif
  45. #include <cstdlib>
  46. #include <cstdarg>
  47. #include <climits>
  48. #include <limits>
  49. #include <cmath>
  50. #include <cwchar>
  51. #include <stdexcept>
  52. #include <typeinfo>
  53. #include <cstring>
  54. #include <cstdio>
  55. #include <iostream>
  56. #include <vector>
  57. #include <algorithm>
  58. #if JUCE_USE_INTRINSICS
  59. #include <intrin.h>
  60. #endif
  61. #if JUCE_MAC || JUCE_IOS
  62. #include <libkern/OSAtomic.h>
  63. #endif
  64. #if JUCE_LINUX
  65. #include <signal.h>
  66. #if __INTEL_COMPILER
  67. #if __ia64__
  68. #include <ia64intrin.h>
  69. #else
  70. #include <ia32intrin.h>
  71. #endif
  72. #endif
  73. #endif
  74. #if JUCE_MSVC && JUCE_DEBUG
  75. #include <crtdbg.h>
  76. #endif
  77. #if JUCE_MSVC
  78. #pragma warning (pop)
  79. #endif
  80. #if JUCE_ANDROID
  81. #include <sys/atomics.h>
  82. #include <byteswap.h>
  83. #endif
  84. // undef symbols that are sometimes set by misguided 3rd-party headers..
  85. #undef check
  86. #undef TYPE_BOOL
  87. #undef max
  88. #undef min
  89. //==============================================================================
  90. // DLL building settings on Windows
  91. #if JUCE_MSVC
  92. #ifdef JUCE_DLL_BUILD
  93. #define JUCE_API __declspec (dllexport)
  94. #pragma warning (disable: 4251)
  95. #elif defined (JUCE_DLL)
  96. #define JUCE_API __declspec (dllimport)
  97. #pragma warning (disable: 4251)
  98. #endif
  99. #ifdef __INTEL_COMPILER
  100. #pragma warning (disable: 1125) // (virtual override warning)
  101. #endif
  102. #elif defined (JUCE_DLL) || defined (JUCE_DLL_BUILD)
  103. #define JUCE_API __attribute__ ((visibility("default")))
  104. #endif
  105. //==============================================================================
  106. #ifndef JUCE_API
  107. #define JUCE_API /**< This macro is added to all juce public class declarations. */
  108. #endif
  109. #if JUCE_MSVC && JUCE_DLL_BUILD
  110. #define JUCE_PUBLIC_IN_DLL_BUILD(declaration) public: declaration; private:
  111. #else
  112. #define JUCE_PUBLIC_IN_DLL_BUILD(declaration) declaration;
  113. #endif
  114. /** This macro is added to all juce public function declarations. */
  115. #define JUCE_PUBLIC_FUNCTION JUCE_API JUCE_CALLTYPE
  116. #if (! defined (JUCE_CATCH_DEPRECATED_CODE_MISUSE)) && JUCE_DEBUG && ! DOXYGEN
  117. /** This turns on some non-essential bits of code that should prevent old code from compiling
  118. in cases where method signatures have changed, etc.
  119. */
  120. #define JUCE_CATCH_DEPRECATED_CODE_MISUSE 1
  121. #endif
  122. #ifndef DOXYGEN
  123. #define JUCE_NAMESPACE juce // This old macro is deprecated: you should just use the juce namespace directly.
  124. #endif
  125. #endif // JUCE_STANDARDHEADER_H_INCLUDED