sdl2-compat: sync headers with latest SDL2. (a3b8d)

From a3b8da7a3c0e87f6996910d08b7d9870b3cc7bcd Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Thu, 11 Apr 2024 11:55:50 +0300
Subject: [PATCH] sync headers with latest SDL2.

---
 include/SDL2/SDL_atomic.h         |  4 +++-
 include/SDL2/SDL_blendmode.h      |  6 +++---
 include/SDL2/SDL_events.h         |  4 ++--
 include/SDL2/SDL_gamecontroller.h |  8 ++++----
 include/SDL2/SDL_guid.h           |  2 +-
 include/SDL2/SDL_hints.h          |  2 +-
 include/SDL2/SDL_keycode.h        |  4 ++--
 include/SDL2/SDL_log.h            |  4 ++--
 include/SDL2/SDL_messagebox.h     | 14 +++++++-------
 include/SDL2/SDL_mouse.h          |  4 ++--
 include/SDL2/SDL_power.h          |  2 +-
 include/SDL2/SDL_render.h         | 10 +++++-----
 include/SDL2/SDL_scancode.h       |  2 +-
 include/SDL2/SDL_stdinc.h         |  2 +-
 include/SDL2/SDL_surface.h        |  2 +-
 include/SDL2/SDL_system.h         |  4 ++--
 include/SDL2/SDL_syswm.h          |  7 ++++---
 include/SDL2/SDL_test_crc32.h     | 10 +++++-----
 include/SDL2/SDL_thread.h         |  2 +-
 include/SDL2/SDL_video.h          | 24 ++++++++++++------------
 20 files changed, 60 insertions(+), 57 deletions(-)

diff --git a/include/SDL2/SDL_atomic.h b/include/SDL2/SDL_atomic.h
index 1fa18f4..cb1cc6f 100644
--- a/include/SDL2/SDL_atomic.h
+++ b/include/SDL2/SDL_atomic.h
@@ -260,7 +260,9 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
  * \brief A type representing an atomic integer value.  It is a struct
  *        so people don't accidentally use numeric operations on it.
  */
-typedef struct { int value; } SDL_atomic_t;
+typedef struct SDL_atomic_t {
+    int value;
+} SDL_atomic_t;
 
 /**
  * Set an atomic variable to a new value if it is currently an old value.
diff --git a/include/SDL2/SDL_blendmode.h b/include/SDL2/SDL_blendmode.h
index 09d0147..1709b56 100644
--- a/include/SDL2/SDL_blendmode.h
+++ b/include/SDL2/SDL_blendmode.h
@@ -37,7 +37,7 @@ extern "C" {
 /**
  *  \brief The blend mode used in SDL_RenderCopy() and drawing operations.
  */
-typedef enum
+typedef enum SDL_BlendMode
 {
     SDL_BLENDMODE_NONE = 0x00000000,     /**< no blending
                                               dstRGBA = srcRGBA */
@@ -62,7 +62,7 @@ typedef enum
 /**
  *  \brief The blend operation used when combining source and destination pixel components
  */
-typedef enum
+typedef enum SDL_BlendOperation
 {
     SDL_BLENDOPERATION_ADD              = 0x1,  /**< dst + src: supported by all renderers */
     SDL_BLENDOPERATION_SUBTRACT         = 0x2,  /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
@@ -74,7 +74,7 @@ typedef enum
 /**
  *  \brief The normalized factor used to multiply pixel components
  */
-typedef enum
+typedef enum SDL_BlendFactor
 {
     SDL_BLENDFACTOR_ZERO                = 0x1,  /**< 0, 0, 0, 0 */
     SDL_BLENDFACTOR_ONE                 = 0x2,  /**< 1, 1, 1, 1 */
diff --git a/include/SDL2/SDL_events.h b/include/SDL2/SDL_events.h
index eccbba2..a504d83 100644
--- a/include/SDL2/SDL_events.h
+++ b/include/SDL2/SDL_events.h
@@ -52,7 +52,7 @@ extern "C" {
 /**
  * The types of events that can be delivered.
  */
-typedef enum
+typedef enum SDL_EventType
 {
     SDL_FIRSTEVENT     = 0,     /**< Unused (do not remove) */
 
@@ -696,7 +696,7 @@ SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == sizeof(((SDL_Event *)NUL
 extern DECLSPEC void SDLCALL SDL_PumpEvents(void);
 
 /* @{ */
-typedef enum
+typedef enum SDL_eventaction
 {
     SDL_ADDEVENT,
     SDL_PEEKEVENT,
diff --git a/include/SDL2/SDL_gamecontroller.h b/include/SDL2/SDL_gamecontroller.h
index 281fa35..44089cf 100644
--- a/include/SDL2/SDL_gamecontroller.h
+++ b/include/SDL2/SDL_gamecontroller.h
@@ -58,7 +58,7 @@ extern "C" {
 struct _SDL_GameController;
 typedef struct _SDL_GameController SDL_GameController;
 
-typedef enum
+typedef enum SDL_GameControllerType
 {
     SDL_CONTROLLER_TYPE_UNKNOWN = 0,
     SDL_CONTROLLER_TYPE_XBOX360,
@@ -77,7 +77,7 @@ typedef enum
     SDL_CONTROLLER_TYPE_MAX
 } SDL_GameControllerType;
 
-typedef enum
+typedef enum SDL_GameControllerBindType
 {
     SDL_CONTROLLER_BINDTYPE_NONE = 0,
     SDL_CONTROLLER_BINDTYPE_BUTTON,
@@ -617,7 +617,7 @@ extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void);
  *  (fully pressed) when reported by SDL_GameControllerGetAxis(). Note that this is not the
  *  same range that will be reported by the lower-level SDL_GetJoystickAxis().
  */
-typedef enum
+typedef enum SDL_GameControllerAxis
 {
     SDL_CONTROLLER_AXIS_INVALID = -1,
     SDL_CONTROLLER_AXIS_LEFTX,
@@ -727,7 +727,7 @@ SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, SDL_GameController
 /**
  *  The list of buttons available from a controller
  */
-typedef enum
+typedef enum SDL_GameControllerButton
 {
     SDL_CONTROLLER_BUTTON_INVALID = -1,
     SDL_CONTROLLER_BUTTON_A,
diff --git a/include/SDL2/SDL_guid.h b/include/SDL2/SDL_guid.h
index 7daa5f1..2e36572 100644
--- a/include/SDL2/SDL_guid.h
+++ b/include/SDL2/SDL_guid.h
@@ -52,7 +52,7 @@ extern "C" {
  * GUIDs may be platform-dependent (i.e., the same device may report
  *   different GUIDs on different operating systems).
  */
-typedef struct {
+typedef struct SDL_GUID {
     Uint8 data[16];
 } SDL_GUID;
 
diff --git a/include/SDL2/SDL_hints.h b/include/SDL2/SDL_hints.h
index e775a65..4c0e09f 100644
--- a/include/SDL2/SDL_hints.h
+++ b/include/SDL2/SDL_hints.h
@@ -2702,7 +2702,7 @@ extern "C" {
 /**
  *  \brief  An enumeration of hint priorities
  */
-typedef enum
+typedef enum SDL_HintPriority
 {
     SDL_HINT_DEFAULT,
     SDL_HINT_NORMAL,
diff --git a/include/SDL2/SDL_keycode.h b/include/SDL2/SDL_keycode.h
index 57a71bd..1939252 100644
--- a/include/SDL2/SDL_keycode.h
+++ b/include/SDL2/SDL_keycode.h
@@ -47,7 +47,7 @@ typedef Sint32 SDL_Keycode;
 #define SDLK_SCANCODE_MASK (1<<30)
 #define SDL_SCANCODE_TO_KEYCODE(X)  (X | SDLK_SCANCODE_MASK)
 
-typedef enum
+typedef enum SDL_KeyCode
 {
     SDLK_UNKNOWN = 0,
 
@@ -329,7 +329,7 @@ typedef enum
 /**
  * \brief Enumeration of valid key mods (possibly OR'd together).
  */
-typedef enum
+typedef enum SDL_Keymod
 {
     KMOD_NONE = 0x0000,
     KMOD_LSHIFT = 0x0001,
diff --git a/include/SDL2/SDL_log.h b/include/SDL2/SDL_log.h
index bd030c6..7f8123b 100644
--- a/include/SDL2/SDL_log.h
+++ b/include/SDL2/SDL_log.h
@@ -61,7 +61,7 @@ extern "C" {
  *  at the VERBOSE level and all other categories are enabled at the
  *  ERROR level.
  */
-typedef enum
+typedef enum SDL_LogCategory
 {
     SDL_LOG_CATEGORY_APPLICATION,
     SDL_LOG_CATEGORY_ERROR,
@@ -99,7 +99,7 @@ typedef enum
 /**
  *  \brief The predefined log priorities
  */
-typedef enum
+typedef enum SDL_LogPriority
 {
     SDL_LOG_PRIORITY_VERBOSE = 1,
     SDL_LOG_PRIORITY_DEBUG,
diff --git a/include/SDL2/SDL_messagebox.h b/include/SDL2/SDL_messagebox.h
index 5ace6f2..f7ba729 100644
--- a/include/SDL2/SDL_messagebox.h
+++ b/include/SDL2/SDL_messagebox.h
@@ -34,7 +34,7 @@ extern "C" {
 /**
  * SDL_MessageBox flags. If supported will display warning icon, etc.
  */
-typedef enum
+typedef enum SDL_MessageBoxFlags
 {
     SDL_MESSAGEBOX_ERROR                 = 0x00000010,   /**< error dialog */
     SDL_MESSAGEBOX_WARNING               = 0x00000020,   /**< warning dialog */
@@ -46,7 +46,7 @@ typedef enum
 /**
  * Flags for SDL_MessageBoxButtonData.
  */
-typedef enum
+typedef enum SDL_MessageBoxButtonFlags
 {
     SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 0x00000001,  /**< Marks the default button when return is hit */
     SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = 0x00000002   /**< Marks the default button when escape is hit */
@@ -55,7 +55,7 @@ typedef enum
 /**
  * Individual button data.
  */
-typedef struct
+typedef struct SDL_MessageBoxButtonData
 {
     Uint32 flags;       /**< ::SDL_MessageBoxButtonFlags */
     int buttonid;       /**< User defined button id (value returned via SDL_ShowMessageBox) */
@@ -65,12 +65,12 @@ typedef struct
 /**
  * RGB value used in a message box color scheme
  */
-typedef struct
+typedef struct SDL_MessageBoxColor
 {
     Uint8 r, g, b;
 } SDL_MessageBoxColor;
 
-typedef enum
+typedef enum SDL_MessageBoxColorType
 {
     SDL_MESSAGEBOX_COLOR_BACKGROUND,
     SDL_MESSAGEBOX_COLOR_TEXT,
@@ -83,7 +83,7 @@ typedef enum
 /**
  * A set of colors to use for message box dialogs
  */
-typedef struct
+typedef struct SDL_MessageBoxColorScheme
 {
     SDL_MessageBoxColor colors[SDL_MESSAGEBOX_COLOR_MAX];
 } SDL_MessageBoxColorScheme;
@@ -91,7 +91,7 @@ typedef struct
 /**
  * MessageBox structure containing title, text, window, etc.
  */
-typedef struct
+typedef struct SDL_MessageBoxData
 {
     Uint32 flags;                       /**< ::SDL_MessageBoxFlags */
     SDL_Window *window;                 /**< Parent window, can be NULL */
diff --git a/include/SDL2/SDL_mouse.h b/include/SDL2/SDL_mouse.h
index 687ff12..f110a05 100644
--- a/include/SDL2/SDL_mouse.h
+++ b/include/SDL2/SDL_mouse.h
@@ -43,7 +43,7 @@ typedef struct SDL_Cursor SDL_Cursor;   /**< Implementation dependent */
 /**
  * \brief Cursor types for SDL_CreateSystemCursor().
  */
-typedef enum
+typedef enum SDL_SystemCursor
 {
     SDL_SYSTEM_CURSOR_ARROW,     /**< Arrow */
     SDL_SYSTEM_CURSOR_IBEAM,     /**< I-beam */
@@ -63,7 +63,7 @@ typedef enum
 /**
  * \brief Scroll direction types for the Scroll event
  */
-typedef enum
+typedef enum SDL_MouseWheelDirection
 {
     SDL_MOUSEWHEEL_NORMAL,    /**< The scroll direction is normal */
     SDL_MOUSEWHEEL_FLIPPED    /**< The scroll direction is flipped / natural */
diff --git a/include/SDL2/SDL_power.h b/include/SDL2/SDL_power.h
index 0520065..4120292 100644
--- a/include/SDL2/SDL_power.h
+++ b/include/SDL2/SDL_power.h
@@ -39,7 +39,7 @@ extern "C" {
 /**
  *  The basic state for the system's power supply.
  */
-typedef enum
+typedef enum SDL_PowerState
 {
     SDL_POWERSTATE_UNKNOWN,      /**< cannot determine power status */
     SDL_POWERSTATE_ON_BATTERY,   /**< Not plugged in, running on the battery */
diff --git a/include/SDL2/SDL_render.h b/include/SDL2/SDL_render.h
index b7135bb..fc94c1c 100644
--- a/include/SDL2/SDL_render.h
+++ b/include/SDL2/SDL_render.h
@@ -61,7 +61,7 @@ extern "C" {
 /**
  * Flags used when creating a rendering context
  */
-typedef enum
+typedef enum SDL_RendererFlags
 {
     SDL_RENDERER_SOFTWARE = 0x00000001,         /**< The renderer is a software fallback */
     SDL_RENDERER_ACCELERATED = 0x00000002,      /**< The renderer uses hardware
@@ -98,7 +98,7 @@ typedef struct SDL_Vertex
 /**
  * The scaling mode for a texture.
  */
-typedef enum
+typedef enum SDL_ScaleMode
 {
     SDL_ScaleModeNearest, /**< nearest pixel sampling */
     SDL_ScaleModeLinear,  /**< linear filtering */
@@ -108,7 +108,7 @@ typedef enum
 /**
  * The access pattern allowed for a texture.
  */
-typedef enum
+typedef enum SDL_TextureAccess
 {
     SDL_TEXTUREACCESS_STATIC,    /**< Changes rarely, not lockable */
     SDL_TEXTUREACCESS_STREAMING, /**< Changes frequently, lockable */
@@ -118,7 +118,7 @@ typedef enum
 /**
  * The texture channel modulation used in SDL_RenderCopy().
  */
-typedef enum
+typedef enum SDL_TextureModulate
 {
     SDL_TEXTUREMODULATE_NONE = 0x00000000,     /**< No modulation */
     SDL_TEXTUREMODULATE_COLOR = 0x00000001,    /**< srcC = srcC * color */
@@ -128,7 +128,7 @@ typedef enum
 /**
  * Flip constants for SDL_RenderCopyEx
  */
-typedef enum
+typedef enum SDL_RendererFlip
 {
     SDL_FLIP_NONE = 0x00000000,     /**< Do not flip */
     SDL_FLIP_HORIZONTAL = 0x00000001,    /**< flip horizontally */
diff --git a/include/SDL2/SDL_scancode.h b/include/SDL2/SDL_scancode.h
index fe13d5b..bb8bdee 100644
--- a/include/SDL2/SDL_scancode.h
+++ b/include/SDL2/SDL_scancode.h
@@ -40,7 +40,7 @@
  *  The values in this enumeration are based on the USB usage page standard:
  *  https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
  */
-typedef enum
+typedef enum SDL_Scancode
 {
     SDL_SCANCODE_UNKNOWN = 0,
 
diff --git a/include/SDL2/SDL_stdinc.h b/include/SDL2/SDL_stdinc.h
index 3ddf042..e4f44d9 100644
--- a/include/SDL2/SDL_stdinc.h
+++ b/include/SDL2/SDL_stdinc.h
@@ -107,7 +107,7 @@
 # elif defined(__MRC__)
 void *alloca(unsigned);
 # else
-char *alloca();
+void *alloca(size_t);
 # endif
 #endif
 
diff --git a/include/SDL2/SDL_surface.h b/include/SDL2/SDL_surface.h
index ceeb86b..029f5f4 100644
--- a/include/SDL2/SDL_surface.h
+++ b/include/SDL2/SDL_surface.h
@@ -105,7 +105,7 @@ typedef int (SDLCALL *SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
 /**
  * \brief The formula used for converting between YUV and RGB
  */
-typedef enum
+typedef enum SDL_YUV_CONVERSION_MODE
 {
     SDL_YUV_CONVERSION_JPEG,        /**< Full range JPEG */
     SDL_YUV_CONVERSION_BT601,       /**< BT.601 (the default) */
diff --git a/include/SDL2/SDL_system.h b/include/SDL2/SDL_system.h
index ddae4f8..3a21333 100644
--- a/include/SDL2/SDL_system.h
+++ b/include/SDL2/SDL_system.h
@@ -472,7 +472,7 @@ extern DECLSPEC int SDLCALL SDL_AndroidSendMessage(Uint32 command, int param);
 /**
  *  \brief WinRT / Windows Phone path types
  */
-typedef enum
+typedef enum SDL_WinRT_Path
 {
     /** \brief The installed app's root directory.
         Files here are likely to be read-only. */
@@ -496,7 +496,7 @@ typedef enum
 /**
  *  \brief WinRT Device Family
  */
-typedef enum
+typedef enum SDL_WinRT_DeviceFamily
 {
     /** \brief Unknown family  */
     SDL_WINRT_DEVICEFAMILY_UNKNOWN,
diff --git a/include/SDL2/SDL_syswm.h b/include/SDL2/SDL_syswm.h
index 7b8bd6e..f0dedc7 100644
--- a/include/SDL2/SDL_syswm.h
+++ b/include/SDL2/SDL_syswm.h
@@ -33,14 +33,15 @@
 #include "SDL_video.h"
 #include "SDL_version.h"
 
-/**
- *  \brief SDL_syswm.h
+/*
+ *  \file SDL_syswm.h
  *
  *  Your application has access to a special type of event ::SDL_SYSWMEVENT,
  *  which contains window-manager specific information and arrives whenever
  *  an unhandled window event occurs.  This event is ignored by default, but
  *  you can enable it with SDL_EventState().
  */
+
 struct SDL_SysWMinfo;
 
 #if !defined(SDL_PROTOTYPES_ONLY)
@@ -132,7 +133,7 @@ extern "C" {
 /**
  *  These are the various supported windowing subsystems
  */
-typedef enum
+typedef enum SDL_SYSWM_TYPE
 {
     SDL_SYSWM_UNKNOWN,
     SDL_SYSWM_WINDOWS,
diff --git a/include/SDL2/SDL_test_crc32.h b/include/SDL2/SDL_test_crc32.h
index e347831..e8747ac 100644
--- a/include/SDL2/SDL_test_crc32.h
+++ b/include/SDL2/SDL_test_crc32.h
@@ -19,7 +19,7 @@
   3. This notice may not be removed or altered from any source distribution.
 */
 
-/**
+/*
  *  \file SDL_test_crc32.h
  *
  *  Include file for SDL test framework.
@@ -60,7 +60,7 @@ extern "C" {
  #define CRC32_POLY 0xEDB88320   /* Perl String::CRC32 compatible */
 #endif
 
-/**
+/*
  * Data structure for CRC32 (checksum) computation
  */
   typedef struct {
@@ -69,7 +69,7 @@ extern "C" {
 
 /* ---------- Function Prototypes ------------- */
 
-/**
+/*
  * \brief Initialize the CRC context
  *
  * Note: The function initializes the crc table required for all crc calculations.
@@ -82,7 +82,7 @@ extern "C" {
  int SDLTest_Crc32Init(SDLTest_Crc32Context * crcContext);
 
 
-/**
+/*
  * \brief calculate a crc32 from a data block
  *
  * \param crcContext         pointer to context variable
@@ -101,7 +101,7 @@ int SDLTest_Crc32CalcEnd(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32);
 int SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);
 
 
-/**
+/*
  * \brief clean up CRC context
  *
  * \param crcContext        pointer to context variable
diff --git a/include/SDL2/SDL_thread.h b/include/SDL2/SDL_thread.h
index dc7f536..f39f513 100644
--- a/include/SDL2/SDL_thread.h
+++ b/include/SDL2/SDL_thread.h
@@ -72,7 +72,7 @@ typedef unsigned int SDL_TLSID;
  *
  *  \note On many systems you require special privileges to set high or time critical priority.
  */
-typedef enum {
+typedef enum SDL_ThreadPriority {
     SDL_THREAD_PRIORITY_LOW,
     SDL_THREAD_PRIORITY_NORMAL,
     SDL_THREAD_PRIORITY_HIGH,
diff --git a/include/SDL2/SDL_video.h b/include/SDL2/SDL_video.h
index b0d7598..667880f 100644
--- a/include/SDL2/SDL_video.h
+++ b/include/SDL2/SDL_video.h
@@ -50,7 +50,7 @@ extern "C" {
  *  \sa SDL_SetWindowDisplayMode()
  *  \sa SDL_GetWindowDisplayMode()
  */
-typedef struct
+typedef struct SDL_DisplayMode
 {
     Uint32 format;              /**< pixel format */
     int w;                      /**< width, in screen coordinates */
@@ -99,7 +99,7 @@ typedef struct SDL_Window SDL_Window;
  *
  *  \sa SDL_GetWindowFlags()
  */
-typedef enum
+typedef enum SDL_WindowFlags
 {
     SDL_WINDOW_FULLSCREEN = 0x00000001,         /**< fullscreen window */
     SDL_WINDOW_OPENGL = 0x00000002,             /**< window usable with OpenGL context */
@@ -151,7 +151,7 @@ typedef enum
 /**
  *  \brief Event subtype for window events
  */
-typedef enum
+typedef enum SDL_WindowEventID
 {
     SDL_WINDOWEVENT_NONE,           /**< Never used */
     SDL_WINDOWEVENT_SHOWN,          /**< Window has been shown */
@@ -182,7 +182,7 @@ typedef enum
 /**
  *  \brief Event subtype for display events
  */
-typedef enum
+typedef enum SDL_DisplayEventID
 {
     SDL_DISPLAYEVENT_NONE,          /**< Never used */
     SDL_DISPLAYEVENT_ORIENTATION,   /**< Display orientation has changed to data1 */
@@ -194,7 +194,7 @@ typedef enum
 /**
  *  \brief Display orientation
  */
-typedef enum
+typedef enum SDL_DisplayOrientation
 {
     SDL_ORIENTATION_UNKNOWN,            /**< The display orientation can't be determined */
     SDL_ORIENTATION_LANDSCAPE,          /**< The display is in landscape mode, with the right side up, relative to portrait mode */
@@ -206,7 +206,7 @@ typedef enum
 /**
  *  \brief Window flash operation
  */
-typedef enum
+typedef enum SDL_FlashOperation
 {
     SDL_FLASH_CANCEL,                   /**< Cancel any window flash state */
     SDL_FLASH_BRIEFLY,                  /**< Flash the window briefly to get attention */
@@ -221,7 +221,7 @@ typedef void *SDL_GLContext;
 /**
  *  \brief OpenGL configuration attributes
  */
-typedef enum
+typedef enum SDL_GLattr
 {
     SDL_GL_RED_SIZE,
     SDL_GL_GREEN_SIZE,
@@ -253,14 +253,14 @@ typedef enum
     SDL_GL_FLOATBUFFERS
 } SDL_GLattr;
 
-typedef enum
+typedef enum SDL_GLprofile
 {
     SDL_GL_CONTEXT_PROFILE_CORE           = 0x0001,
     SDL_GL_CONTEXT_PROFILE_COMPATIBILITY  = 0x0002,
     SDL_GL_CONTEXT_PROFILE_ES             = 0x0004 /**< GLX_CONTEXT_ES2_PROFILE_BIT_EXT */
 } SDL_GLprofile;
 
-typedef enum
+typedef enum SDL_GLcontextFlag
 {
     SDL_GL_CONTEXT_DEBUG_FLAG              = 0x0001,
     SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = 0x0002,
@@ -268,13 +268,13 @@ typedef enum
     SDL_GL_CONTEXT_RESET_ISOLATION_FLAG    = 0x0008
 } SDL_GLcontextFlag;
 
-typedef enum
+typedef enum SDL_GLcontextReleaseFlag
 {
     SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE   = 0x0000,
     SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH  = 0x0001
 } SDL_GLcontextReleaseFlag;
 
-typedef enum
+typedef enum SDL_GLContextResetNotification
 {
     SDL_GL_CONTEXT_RESET_NO_NOTIFICATION = 0x0000,
     SDL_GL_CONTEXT_RESET_LOSE_CONTEXT    = 0x0001
@@ -1715,7 +1715,7 @@ extern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window,
  *
  * \sa SDL_HitTest
  */
-typedef enum
+typedef enum SDL_HitTestResult
 {
     SDL_HITTEST_NORMAL,  /**< Region is normal. No special properties. */
     SDL_HITTEST_DRAGGABLE,  /**< Region can drag entire window. */