Previously we relied on Foundation.framework being implicitly linked by other frameworks, but this change is required when building with Xcode 12 targeting older macOS versions to fix missing CFNetwork symbols.
We use a manual-reset event rather than an auto-reset event to cancel IO
on the pipe. This avoids unlucky cases where new IO would start just
after signalling the event and would block indefinitely while waiting on
the newly-unsignalled event.
As far as I can tell, if a read was cancelled from a background thread,
the IO operation wasn't cancelled, so the system was poking at the
stack-allocated OVERLAPPED structure after it had been removed from the
stack, at which point something else might be occupying that region of
stack memory.
I'm pretty sure Address Sanitizer should be able to catch this sort of
thing so I'm surprised it didn't complain here.
Previously, calls to `open` blocked when creating a writeable pipe.
This could cause other calls to block indefinitely, waiting for the pipe
to become available.
Now, we open the pipe in nonblocking mode, which allows us to retry
indefinitely, checking `stopReadOperation` each time to find out whether
`close` has been called and allowing a graceful exit.
Also allows optionally ignoring callbacks during disconnect, so that the
call to `connectionLost` can be bypassed when disconnect is called from
the derived class destructor.
In order to avoid collisions in the JucePlugin_Build preprocessor
definitions, we were only propagating the JUCE_MODULE_AVAILABLE defs
from the shared code target to the plugin wrapper targets.
After this change, we propagate everything *but* the JucePlugin_Build
definitions.
When a global AppConfig file is not added to a project, preprocessor defines from project, exporter and target settings now override defines that would have been in this file, matching the previous behaviour.