Fix Cygwin building and add CI (#15566)

Co-authored-by: TrueCat17 <truecat17@gmail.com>
Co-authored-by: Anonymous Maarten <anonymous.maarten@gmail.com>
Co-authored-by: Ozkan Sezer <sezeroz@gmail.com>
This commit is contained in:
stahta01 2026-05-15 11:48:24 -04:00 committed by GitHub
parent be97a18d82
commit 6586bebfec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 116 additions and 78 deletions

View file

@ -84,7 +84,7 @@
# else
# define GLAPIENTRY __stdcall
# endif
#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
#elif defined(__CYGWIN__) /* && defined(USE_OPENGL32) */ /* use native windows opengl32 */
# define GLAPI extern
# define GLAPIENTRY __stdcall
#elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))

View file

@ -317,7 +317,7 @@
#define SDL_PLATFORM_CYGWIN 1
#endif
#if (defined(_WIN32) || defined(SDL_PLATFORM_CYGWIN)) && !defined(__NGAGE__)
#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(__NGAGE__)
/**
* A preprocessor macro that is only defined if compiling for Windows.
@ -417,7 +417,7 @@
#define SDL_PLATFORM_WIN32 1
#endif
#endif /* defined(_WIN32) || defined(SDL_PLATFORM_CYGWIN) */
#endif /* (defined(_WIN32) || defined(__CYGWIN__)) && !defined(__NGAGE__) */
/* This is to support generic "any GDK" separate from a platform-specific GDK */

View file

@ -739,7 +739,7 @@ typedef Sint64 SDL_Time;
* <inttypes.h> should define these but this is not true all platforms.
* (for example win32) */
#ifndef SDL_PRIs64
#if defined(SDL_PLATFORM_WINDOWS)
#if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN)
#define SDL_PRIs64 "I64d"
#elif defined(PRId64)
#define SDL_PRIs64 PRId64
@ -750,7 +750,7 @@ typedef Sint64 SDL_Time;
#endif
#endif
#ifndef SDL_PRIu64
#if defined(SDL_PLATFORM_WINDOWS)
#if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN)
#define SDL_PRIu64 "I64u"
#elif defined(PRIu64)
#define SDL_PRIu64 PRIu64
@ -761,7 +761,7 @@ typedef Sint64 SDL_Time;
#endif
#endif
#ifndef SDL_PRIx64
#if defined(SDL_PLATFORM_WINDOWS)
#if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN)
#define SDL_PRIx64 "I64x"
#elif defined(PRIx64)
#define SDL_PRIx64 PRIx64
@ -772,7 +772,7 @@ typedef Sint64 SDL_Time;
#endif
#endif
#ifndef SDL_PRIX64
#if defined(SDL_PLATFORM_WINDOWS)
#if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN)
#define SDL_PRIX64 "I64X"
#elif defined(PRIX64)
#define SDL_PRIX64 PRIX64
@ -811,7 +811,7 @@ typedef Sint64 SDL_Time;
#endif
#endif
/* Specifically for the `long long` -- SDL-specific. */
#ifdef SDL_PLATFORM_WINDOWS
#if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN)
#ifndef SDL_NOLONGLONG
SDL_COMPILE_TIME_ASSERT(longlong_size64, sizeof(long long) == 8); /* using I64 for windows - make sure `long long` is 64 bits. */
#endif

View file

@ -48,7 +48,7 @@
/* Thread synchronization primitives */
#include <SDL3/SDL_atomic.h>
#if defined(SDL_PLATFORM_WINDOWS)
#if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN)
#include <process.h> /* _beginthreadex() and _endthreadex() */
#endif
@ -296,7 +296,7 @@ extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThreadWithProperties(SDL_Prop
/* The real implementation, hidden from the wiki, so it can show this as real functions that don't have macro magic. */
#ifndef SDL_WIKI_DOCUMENTATION_SECTION
# if defined(SDL_PLATFORM_WINDOWS)
# if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN)
# ifndef SDL_BeginThreadFunction
# define SDL_BeginThreadFunction _beginthreadex
# endif