1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-03 03:30:06 +00:00
JUCE/modules/juce_core
brothatza f6e728e878 juce_core: guard juce_NewLine.h with #pragma once to prevent MSVC redefinition
On Windows/MSVC, our amalgamated build path can see juce_NewLine.h twice (via juce_core.cpp and juce_String.cpp), causing duplicate definitions of juce::NewLine and related operators (C2011/C2084). This breaks clean debug builds and can block launching.

Change
- Add `#pragma once` at the start of `text/juce_NewLine.h`.

Rationale
- Consistent with other JUCE headers using single-include guards.
- No ABI/runtime behavior change; header-only fix.
- MSVC/Clang/GCC all support `#pragma once`.

Impact
- Fixes duplicate definition errors on MSVC.
- Unblocks stable Debug/Release builds of the VST3/Standalone targets.

Tested
- VS 2022 Build Tools 17.14, MSVC 19.44
- CMake 4.1.1
- Builds: vs2022-debug-out, vs2022-release-out
- Targets: Standalone + VST3

Risk
- Minimal; compile-time only.

Upstream-Status
- Local vendor patch; suitable for an upstream PR if maintainers prefer a traditional include guard.
2025-09-13 13:33:48 -05:00
..
containers Docs: Replace doxygen preprocessor conditionals with @cond and @endconds 2025-07-21 18:11:43 +02:00
detail Docs: Replace doxygen preprocessor conditionals with @cond and @endconds 2025-07-21 18:11:43 +02:00
files Docs: Replace doxygen preprocessor conditionals with @cond and @endconds 2025-07-21 18:11:43 +02:00
json Docs: Replace doxygen preprocessor conditionals with @cond and @endconds 2025-07-21 18:11:43 +02:00
logging Update licensing information 2024-04-16 11:39:35 +01:00
maths Docs: Replace doxygen preprocessor conditionals with @cond and @endconds 2025-07-21 18:11:43 +02:00
memory Docs: Replace doxygen preprocessor conditionals with @cond and @endconds 2025-07-21 18:11:43 +02:00
misc Docs: Replace doxygen preprocessor conditionals with @cond and @endconds 2025-07-21 18:11:43 +02:00
native Android: Add new ActivityLifecycleCallbacks base class 2025-07-29 15:04:15 +01:00
network Docs: Replace doxygen preprocessor conditionals with @cond and @endconds 2025-07-21 18:11:43 +02:00
serialisation Docs: Replace doxygen preprocessor conditionals with @cond and @endconds 2025-07-21 18:11:43 +02:00
streams Update licensing information 2024-04-16 11:39:35 +01:00
system Bump version number to 8.0.9 2025-09-01 14:44:25 +01:00
text juce_core: guard juce_NewLine.h with #pragma once to prevent MSVC redefinition 2025-09-13 13:33:48 -05:00
threads Docs: Replace doxygen preprocessor conditionals with @cond and @endconds 2025-07-21 18:11:43 +02:00
time Time: Prevent errors calculating the UTC offset 2025-07-11 16:41:01 +01:00
unit_tests UnitTest: Add a way to get and run tests by name 2025-07-14 16:50:08 +01:00
xml Docs: Replace doxygen preprocessor conditionals with @cond and @endconds 2025-07-21 18:11:43 +02:00
zip Core: Prevent a preprocessor definition leak in zlib 2025-06-10 16:13:33 +01:00
juce_core.cpp Zlib: Update JUCE sources to support new zlib version 2025-02-25 12:47:13 +00:00
juce_core.h Bump version number to 8.0.9 2025-09-01 14:44:25 +01:00
juce_core.mm Update licensing information 2024-04-16 11:39:35 +01:00
juce_core_CompilationTime.cpp Core: Move __DATE__ and __TIME__ into a dedicated TU 2024-06-07 09:23:23 +01:00