From 7b501ae71f83d973e7c7d6706bb8d72f7e689941 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Fri, 1 Aug 2025 02:00:08 +0200
Subject: [PATCH] Add a few include guards to private headers
---
src/process/SDL_sysprocess.h | 5 +++++
test/gamepadutils.h | 5 +++++
test/testautomation_images.h | 5 +++++
test/testnative.h | 5 +++++
test/testyuv_cvt.h | 5 +++++
5 files changed, 25 insertions(+)
diff --git a/src/process/SDL_sysprocess.h b/src/process/SDL_sysprocess.h
index 839ef9db13f50..8d8932ef9ee57 100644
--- a/src/process/SDL_sysprocess.h
+++ b/src/process/SDL_sysprocess.h
@@ -20,6 +20,9 @@
*/
#include "SDL_internal.h"
+#ifndef SDL_sysprocess_h_
+#define SDL_sysprocess_h_
+
typedef struct SDL_ProcessData SDL_ProcessData;
struct SDL_Process
@@ -35,3 +38,5 @@ bool SDL_SYS_CreateProcessWithProperties(SDL_Process *process, SDL_PropertiesID
bool SDL_SYS_KillProcess(SDL_Process *process, bool force);
bool SDL_SYS_WaitProcess(SDL_Process *process, bool block, int *exitcode);
void SDL_SYS_DestroyProcess(SDL_Process *process);
+
+#endif // SDL_sysprocess_h_
diff --git a/test/gamepadutils.h b/test/gamepadutils.h
index 5e1dcd3093560..ea00dc7256480 100644
--- a/test/gamepadutils.h
+++ b/test/gamepadutils.h
@@ -12,6 +12,9 @@
/* Gamepad image */
+#ifndef gamepadutils_h_
+#define gamepadutils_h_
+
typedef struct GamepadImage GamepadImage;
typedef enum
@@ -210,3 +213,5 @@ extern bool MappingHasBinding(const char *mapping, const char *binding);
/* Clear any previous binding */
extern char *ClearMappingBinding(char *mapping, const char *binding);
+
+#endif /* gamepadutils_h_ */
diff --git a/test/testautomation_images.h b/test/testautomation_images.h
index 7af58c835f9f2..076def67c1e29 100644
--- a/test/testautomation_images.h
+++ b/test/testautomation_images.h
@@ -12,6 +12,9 @@
/* Defines some images for tests */
+#ifndef testautomation_images_h_
+#define testautomation_images_h_
+
/**
* Type for test images.
*/
@@ -32,3 +35,5 @@ extern SDL_Surface *SDLTest_ImagePrimitives(void);
extern SDL_Surface *SDLTest_ImageBlendingBackground(void);
extern SDL_Surface *SDLTest_ImageBlendingSprite(void);
extern SDL_Surface *SDLTest_ImageWrappingSprite(void);
+
+#endif // testautomation_images_h_
diff --git a/test/testnative.h b/test/testnative.h
index 85666d79284a0..bb90e2c959f01 100644
--- a/test/testnative.h
+++ b/test/testnative.h
@@ -14,6 +14,9 @@
integration with native windows
*/
+#ifndef testnative_h_
+#define testnative_h_
+
#include <SDL3/SDL.h>
#include "SDL_build_config.h"
@@ -44,3 +47,5 @@ extern NativeWindowFactory X11WindowFactory;
#define TEST_NATIVE_COCOA
extern NativeWindowFactory CocoaWindowFactory;
#endif
+
+#endif // testnative_h_
diff --git a/test/testyuv_cvt.h b/test/testyuv_cvt.h
index 460026debd729..aea810b1b8f38 100644
--- a/test/testyuv_cvt.h
+++ b/test/testyuv_cvt.h
@@ -12,6 +12,9 @@
/* These functions are designed for testing correctness, not for speed */
+#ifndef testyuv_cvt_h_
+#define testyuv_cvt_h_
+
typedef enum
{
YUV_CONVERSION_JPEG, /**< Full range JPEG */
@@ -26,3 +29,5 @@ extern YUV_CONVERSION_MODE GetYUVConversionModeForResolution(int width, int heig
extern SDL_Colorspace GetColorspaceForYUVConversionMode(YUV_CONVERSION_MODE mode);
extern bool ConvertRGBtoYUV(Uint32 format, Uint8 *src, int pitch, Uint8 *out, int w, int h, YUV_CONVERSION_MODE mode, int monochrome, int luminance);
extern int CalculateYUVPitch(Uint32 format, int width);
+
+#endif /* testyuv_cvt_h_ */