Browse Source

Add a few include guards to private headers

Anonymous Maarten 1 week ago
parent
commit
7b501ae71f
5 changed files with 25 additions and 0 deletions
  1. 5 0
      src/process/SDL_sysprocess.h
  2. 5 0
      test/gamepadutils.h
  3. 5 0
      test/testautomation_images.h
  4. 5 0
      test/testnative.h
  5. 5 0
      test/testyuv_cvt.h

+ 5 - 0
src/process/SDL_sysprocess.h

@@ -20,6 +20,9 @@
 */
 */
 #include "SDL_internal.h"
 #include "SDL_internal.h"
 
 
+#ifndef SDL_sysprocess_h_
+#define SDL_sysprocess_h_
+
 typedef struct SDL_ProcessData SDL_ProcessData;
 typedef struct SDL_ProcessData SDL_ProcessData;
 
 
 struct SDL_Process
 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_KillProcess(SDL_Process *process, bool force);
 bool SDL_SYS_WaitProcess(SDL_Process *process, bool block, int *exitcode);
 bool SDL_SYS_WaitProcess(SDL_Process *process, bool block, int *exitcode);
 void SDL_SYS_DestroyProcess(SDL_Process *process);
 void SDL_SYS_DestroyProcess(SDL_Process *process);
+
+#endif // SDL_sysprocess_h_

+ 5 - 0
test/gamepadutils.h

@@ -12,6 +12,9 @@
 
 
 /* Gamepad image */
 /* Gamepad image */
 
 
+#ifndef gamepadutils_h_
+#define gamepadutils_h_
+
 typedef struct GamepadImage GamepadImage;
 typedef struct GamepadImage GamepadImage;
 
 
 typedef enum
 typedef enum
@@ -210,3 +213,5 @@ extern bool MappingHasBinding(const char *mapping, const char *binding);
 
 
 /* Clear any previous binding */
 /* Clear any previous binding */
 extern char *ClearMappingBinding(char *mapping, const char *binding);
 extern char *ClearMappingBinding(char *mapping, const char *binding);
+
+#endif /* gamepadutils_h_ */

+ 5 - 0
test/testautomation_images.h

@@ -12,6 +12,9 @@
 
 
 /* Defines some images for tests */
 /* Defines some images for tests */
 
 
+#ifndef testautomation_images_h_
+#define testautomation_images_h_
+
 /**
 /**
  * Type for test images.
  * Type for test images.
  */
  */
@@ -32,3 +35,5 @@ extern SDL_Surface *SDLTest_ImagePrimitives(void);
 extern SDL_Surface *SDLTest_ImageBlendingBackground(void);
 extern SDL_Surface *SDLTest_ImageBlendingBackground(void);
 extern SDL_Surface *SDLTest_ImageBlendingSprite(void);
 extern SDL_Surface *SDLTest_ImageBlendingSprite(void);
 extern SDL_Surface *SDLTest_ImageWrappingSprite(void);
 extern SDL_Surface *SDLTest_ImageWrappingSprite(void);
+
+#endif // testautomation_images_h_

+ 5 - 0
test/testnative.h

@@ -14,6 +14,9 @@
    integration with native windows
    integration with native windows
 */
 */
 
 
+#ifndef testnative_h_
+#define testnative_h_
+
 #include <SDL3/SDL.h>
 #include <SDL3/SDL.h>
 
 
 #include "SDL_build_config.h"
 #include "SDL_build_config.h"
@@ -44,3 +47,5 @@ extern NativeWindowFactory X11WindowFactory;
 #define TEST_NATIVE_COCOA
 #define TEST_NATIVE_COCOA
 extern NativeWindowFactory CocoaWindowFactory;
 extern NativeWindowFactory CocoaWindowFactory;
 #endif
 #endif
+
+#endif // testnative_h_

+ 5 - 0
test/testyuv_cvt.h

@@ -12,6 +12,9 @@
 
 
 /* These functions are designed for testing correctness, not for speed */
 /* These functions are designed for testing correctness, not for speed */
 
 
+#ifndef testyuv_cvt_h_
+#define testyuv_cvt_h_
+
 typedef enum
 typedef enum
 {
 {
     YUV_CONVERSION_JPEG,        /**< Full range JPEG */
     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 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 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);
 extern int CalculateYUVPitch(Uint32 format, int width);
+
+#endif /* testyuv_cvt_h_ */