File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,11 @@ extern "C" char **_environ;
187187#endif
188188#endif
189189
190- #ifdef ENVIRON
190+ #if !SWIFT_STDLIB_HAS_ENVIRON
191+ void swift::runtime::environment::initialize (void *context) {
192+ (void )context;
193+ }
194+ #elif defined(ENVIRON)
191195void swift::runtime::environment::initialize (void *context) {
192196 // On platforms where we have an environment variable array available, scan it
193197 // directly. This optimizes for the common case where no variables are set,
@@ -241,7 +245,7 @@ void swift::runtime::environment::initialize(void *context) {
241245 if (SWIFT_DEBUG_HELP_variable)
242246 printHelp (nullptr );
243247}
244- #elif SWIFT_STDLIB_HAS_ENVIRON
248+ #else
245249void swift::runtime::environment::initialize (void *context) {
246250 // Emit a getenv call for each variable. This is less efficient but works
247251 // everywhere.
@@ -259,10 +263,6 @@ void swift::runtime::environment::initialize(void *context) {
259263 printHelp (" Using getenv to read variables. Unknown SWIFT_DEBUG_ variables "
260264 " will not be flagged." );
261265}
262- #else
263- void swift::runtime::environment::initialize (void *context) {
264- (void )context;
265- }
266266#endif
267267
268268SWIFT_RUNTIME_EXPORT
You can’t perform that action at this time.
0 commit comments