From ad86dc9811763fac4cc7300069856f6f37fcde91 Mon Sep 17 00:00:00 2001 From: Tim Stahlhut Date: Sun, 24 May 2026 17:43:22 -0400 Subject: [PATCH] Cygwin: testautomation run-time fix [sdl-ci-filter cygwin] [sdl-ci-filter msys2-*] --- src/stdlib/SDL_getenv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/stdlib/SDL_getenv.c b/src/stdlib/SDL_getenv.c index 1517b5974b..e058c0c90d 100644 --- a/src/stdlib/SDL_getenv.c +++ b/src/stdlib/SDL_getenv.c @@ -22,7 +22,7 @@ #include "SDL_getenv_c.h" -#if defined(SDL_PLATFORM_WINDOWS) +#if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN) #include "../core/windows/SDL_windows.h" #endif @@ -30,7 +30,7 @@ #include "../core/android/SDL_android.h" #endif -#if defined(SDL_PLATFORM_WINDOWS) +#if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN) #define HAVE_WIN32_ENVIRONMENT #elif defined(HAVE_GETENV) && \ (defined(HAVE_SETENV) || defined(HAVE_PUTENV)) && \ @@ -103,7 +103,7 @@ SDL_Environment *SDL_CreateEnvironment(bool populated) env->lock = SDL_CreateMutex(); if (populated) { -#ifdef SDL_PLATFORM_WINDOWS +#if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN) LPWCH strings = GetEnvironmentStringsW(); if (strings) { for (LPWCH string = strings; *string; string += SDL_wcslen(string) + 1) { @@ -146,7 +146,7 @@ SDL_Environment *SDL_CreateEnvironment(bool populated) SDL_InsertIntoHashTable(env->strings, variable, value, true); } } -#endif // SDL_PLATFORM_WINDOWS +#endif // SDL_PLATFORM_WINDOWS && !SDL_PLATFORM_CYGWIN } return env;