SDL: Remove SDL_config.h from the public headers

From 63f307fe1fa662dbf2ffb2d2194d2d8b3191257d Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sat, 26 Nov 2022 01:41:46 -0800
Subject: [PATCH] Remove SDL_config.h from the public headers

The SDL headers are no longer dependent on the build configuration.

Fixes https://github.com/libsdl-org/SDL/issues/6643 and https://github.com/libsdl-org/SDL/issues/6641
---
 CMakeLists.txt                                | 21 ++--
 VisualC-GDK/SDL/SDL.vcxproj                   |  2 -
 VisualC-GDK/SDL/SDL.vcxproj.filters           |  6 --
 VisualC-WinRT/SDL-UWP.vcxproj                 |  3 -
 VisualC-WinRT/SDL-UWP.vcxproj.filters         | 11 +--
 VisualC/SDL/SDL.vcxproj                       |  2 -
 VisualC/SDL/SDL.vcxproj.filters               |  6 --
 WhatsNew.txt                                  |  1 +
 Xcode/SDL/SDL.xcodeproj/project.pbxproj       | 48 ++-------
 build-scripts/android-prefab.sh               |  4 -
 cmake/sdlchecks.cmake                         |  4 +-
 docs/README-cmake.md                          |  2 +-
 docs/README-migration.md                      |  1 +
 docs/README-porting.md                        |  5 +-
 include/SDL_endian.h                          |  4 +-
 include/SDL_opengl.h                          |  2 +-
 include/SDL_opengles.h                        |  2 +-
 include/SDL_opengles2.h                       |  2 +-
 include/SDL_stdinc.h                          | 99 +++----------------
 .../SDL_build_config.h}                       | 30 +++---
 .../SDL_build_config.h.cmake}                 |  8 +-
 .../SDL_build_config_android.h}               | 36 ++++---
 .../SDL_build_config_emscripten.h}            | 16 ++-
 .../SDL_build_config_ios.h}                   | 36 ++++---
 .../SDL_build_config_macos.h}                 | 39 ++++----
 .../SDL_build_config_minimal.h}               | 10 +-
 .../SDL_build_config_ngage.h}                 |  8 +-
 .../SDL_build_config_windows.h}               | 19 ++--
 .../SDL_build_config_wingdk.h}                | 16 +--
 .../SDL_build_config_winrt.h}                 | 19 ++--
 .../SDL_build_config_xbox.h}                  | 16 +--
 src/SDL_assert.c                              |  3 -
 src/SDL_assert_c.h                            |  1 +
 src/SDL_internal.h                            | 54 +++++++++-
 src/SDL_utils_c.h                             |  1 +
 src/core/winrt/SDL_winrtapp_common.h          |  2 +-
 src/core/winrt/SDL_winrtapp_xaml.h            |  2 +-
 src/cpuinfo/SDL_cpuinfo.c                     |  4 +-
 src/dynapi/SDL_dynapi.c                       |  6 +-
 src/dynapi/SDL_dynapi_overrides.h             |  1 +
 src/dynapi/SDL_dynapi_procs.h                 |  1 +
 src/events/SDL_quit.c                         |  2 +-
 src/haptic/android/SDL_syshaptic_c.h          | 24 ++++-
 src/locale/SDL_syslocale.h                    |  2 +-
 src/main/gdk/SDL_gdk_main.c                   |  1 -
 src/main/ps2/SDL_ps2_main.c                   |  3 +-
 src/main/psp/SDL_psp_main.c                   |  2 +-
 src/main/windows/SDL_windows_main.c           |  2 +-
 src/sensor/SDL_sensor_c.h                     |  3 +-
 src/sensor/SDL_syssensor.h                    |  3 +-
 src/sensor/android/SDL_androidsensor.c        |  2 -
 src/sensor/android/SDL_androidsensor.h        |  2 +-
 src/sensor/coremotion/SDL_coremotionsensor.h  |  2 +-
 src/sensor/coremotion/SDL_coremotionsensor.m  |  3 +-
 src/sensor/dummy/SDL_dummysensor.c            |  2 -
 src/sensor/dummy/SDL_dummysensor.h            |  2 +-
 src/sensor/vita/SDL_vitasensor.c              |  3 +-
 src/sensor/vita/SDL_vitasensor.h              |  2 +-
 src/sensor/windows/SDL_windowssensor.c        |  2 -
 src/sensor/windows/SDL_windowssensor.h        |  2 +-
 src/stdlib/SDL_stdlib.c                       | 33 +++++++
 src/stdlib/SDL_string.c                       |  1 -
 src/test/SDL_test_assert.c                    |  3 -
 src/test/SDL_test_common.c                    |  4 -
 src/test/SDL_test_compare.c                   |  3 -
 src/test/SDL_test_crc32.c                     |  3 -
 src/test/SDL_test_font.c                      |  2 -
 src/test/SDL_test_fuzzer.c                    | 22 +----
 src/test/SDL_test_harness.c                   |  8 +-
 src/test/SDL_test_imageBlit.c                 |  2 -
 src/test/SDL_test_imageBlitBlend.c            |  2 -
 src/test/SDL_test_imageFace.c                 |  2 -
 src/test/SDL_test_imagePrimitives.c           |  2 -
 src/test/SDL_test_imagePrimitivesBlend.c      |  2 -
 src/test/SDL_test_log.c                       | 11 +--
 src/test/SDL_test_md5.c                       |  3 -
 src/test/SDL_test_memory.c                    |  1 -
 src/test/SDL_test_random.c                    | 10 +-
 src/thread/stdcpp/SDL_sysmutex_c.h            |  2 +-
 src/thread/stdcpp/SDL_systhread_c.h           |  2 +-
 src/video/winrt/SDL_winrtevents_c.h           |  2 +-
 src/video/winrt/SDL_winrtgamebar_cpp.h        |  2 +-
 src/video/winrt/SDL_winrtmouse_c.h            |  2 +-
 src/video/winrt/SDL_winrtopengles.h           |  2 +-
 test/CMakeLists.txt                           | 13 ++-
 test/checkkeys.c                              |  2 -
 test/checkkeysthreads.c                       |  1 -
 test/controllermap.c                          | 14 ---
 test/loopwave.c                               |  3 -
 test/loopwavequeue.c                          |  1 -
 test/testatomic.c                             |  2 -
 test/testaudiocapture.c                       |  4 +-
 test/testaudiohotplug.c                       |  3 -
 test/testaudioinfo.c                          |  3 +-
 test/testautomation.c                         |  2 -
 test/testautomation_audio.c                   |  3 +-
 test/testautomation_clipboard.c               |  6 +-
 test/testautomation_events.c                  |  5 +-
 test/testautomation_guid.c                    |  2 +
 test/testautomation_hints.c                   |  4 +-
 test/testautomation_joystick.c                |  2 +
 test/testautomation_keyboard.c                |  6 +-
 test/testautomation_main.c                    | 16 ---
 test/testautomation_math.c                    |  9 +-
 test/testautomation_mouse.c                   |  4 +-
 test/testautomation_pixels.c                  |  5 +-
 test/testautomation_platform.c                |  5 +-
 test/testautomation_rect.c                    |  5 +-
 test/testautomation_render.c                  |  5 +-
 test/testautomation_rwops.c                   |  2 +
 test/testautomation_sdltest.c                 | 16 +--
 test/testautomation_stdlib.c                  |  5 +-
 test/testautomation_surface.c                 |  2 +
 test/testautomation_syswm.c                   |  5 +-
 test/testautomation_timer.c                   |  5 +-
 test/testautomation_video.c                   | 16 +--
 test/testbounds.c                             |  1 -
 test/testcustomcursor.c                       |  2 -
 test/testdisplayinfo.c                        |  6 +-
 test/testdraw2.c                              |  1 -
 test/testdrawchessboard.c                     |  4 +-
 test/testdropfile.c                           |  1 -
 test/testerror.c                              |  3 +-
 test/testevdev.c                              |  3 +
 test/testfile.c                               |  5 +-
 test/testfilesystem.c                         |  3 +-
 test/testgamecontroller.c                     | 17 ----
 test/testgeometry.c                           |  1 -
 test/testgesture.c                            |  4 +-
 test/testgl2.c                                |  9 +-
 test/testgles.c                               |  3 -
 test/testgles2.c                              |  7 --
 test/testgles2_sdf.c                          |  3 -
 test/testhaptic.c                             | 15 +--
 test/testhittesting.c                         | 14 ++-
 test/testhotplug.c                            | 14 +--
 test/testiconv.c                              |  2 +
 test/testime.c                                |  5 -
 test/testintersections.c                      |  1 -
 test/testjoystick.c                           | 15 ---
 test/testkeys.c                               |  5 +-
 test/testloadso.c                             |  4 +-
 test/testlocale.c                             |  1 -
 test/testlock.c                               |  3 +-
 test/testmessage.c                            |  3 +-
 test/testmultiaudio.c                         |  2 +
 test/testnative.c                             |  1 -
 test/testnativew32.c                          |  2 +
 test/testnativex11.c                          |  2 +
 test/testoffscreen.c                          |  1 -
 test/testplatform.c                           |  5 +-
 test/testpower.c                              |  3 +-
 test/testqsort.c                              |  1 -
 test/testrelative.c                           |  1 -
 test/testrendercopyex.c                       |  2 -
 test/testrendertarget.c                       |  2 -
 test/testresample.c                           |  2 +
 test/testrumble.c                             | 12 +--
 test/testscale.c                              |  2 -
 test/testsem.c                                |  4 +-
 test/testsensor.c                             |  2 +
 test/testshader.c                             |  2 +
 test/testshape.c                              |  3 +-
 test/testsprite2.c                            |  1 -
 test/testspriteminimal.c                      |  1 -
 test/teststreaming.c                          |  1 -
 test/testsurround.c                           |  3 +-
 test/testthread.c                             |  3 +-
 test/testtimer.c                              |  4 -
 test/testutils.c                              |  2 +
 test/testver.c                                |  6 +-
 test/testviewport.c                           |  2 -
 test/testvulkan.c                             |  5 +-
 test/testwm2.c                                |  1 -
 test/testyuv.c                                |  4 -
 test/torturethread.c                          |  4 +-
 176 files changed, 448 insertions(+), 712 deletions(-)
 rename include/{SDL_config.h => build_config/SDL_build_config.h} (72%)
 rename include/{SDL_config.h.cmake => build_config/SDL_build_config.h.cmake} (99%)
 rename include/{SDL_config_android.h => build_config/SDL_build_config_android.h} (90%)
 rename include/{SDL_config_emscripten.h => build_config/SDL_build_config_emscripten.h} (95%)
 rename include/{SDL_config_ios.h => build_config/SDL_build_config_ios.h} (92%)
 rename include/{SDL_config_macos.h => build_config/SDL_build_config_macos.h} (93%)
 rename include/{SDL_config_minimal.h => build_config/SDL_build_config_minimal.h} (94%)
 rename include/{SDL_config_ngage.h => build_config/SDL_build_config_ngage.h} (95%)
 rename include/{SDL_config_windows.h => build_config/SDL_build_config_windows.h} (97%)
 rename include/{SDL_config_wingdk.h => build_config/SDL_build_config_wingdk.h} (96%)
 rename include/{SDL_config_winrt.h => build_config/SDL_build_config_winrt.h} (95%)
 rename include/{SDL_config_xbox.h => build_config/SDL_build_config_xbox.h} (96%)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d3f5a8835359..bd9a1f84f22d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -56,7 +56,6 @@ endif()
 #cmake_policy(SET CMP0042 OLD)
 
 include(CheckLibraryExists)
-include(CheckIncludeFiles)
 include(CheckIncludeFile)
 include(CheckLanguage)
 include(CheckSymbolExists)
@@ -1038,7 +1037,6 @@ if(SDL_LIBC)
       set(HAVE_${_UPPER} 1)
     endforeach()
     set(HAVE_ALLOCA 1)
-    set(STDC_HEADERS 1)
   else()
     set(HAVE_LIBC TRUE)
     set(headers_to_check
@@ -1072,7 +1070,6 @@ if(SDL_LIBC)
     check_include_file(linux/input.h HAVE_LINUX_INPUT_H)
 
     set(STDC_HEADER_NAMES "stddef.h;stdarg.h;stdlib.h;string.h;stdio.h;wchar.h;float.h")
-    check_include_files("${STDC_HEADER_NAMES}" STDC_HEADERS)
     # TODO: refine the mprotect check
     check_c_source_compiles("#include <sys/types.h>
                              #include <sys/mman.h>
@@ -2897,17 +2894,18 @@ endif()
 #   endif()
 # endif()
 
-# config variables may contain generator expression, so we need to generate SDL_config.h in 2 steps:
+# config variables may contain generator expression, so we need to generate SDL_build_config.h in 2 steps:
 # 1. replace all `#cmakedefine`'s and `@abc@`
-configure_file("${SDL3_SOURCE_DIR}/include/SDL_config.h.cmake"
-  "${SDL3_BINARY_DIR}/SDL_config.h.intermediate")
+configure_file("${SDL3_SOURCE_DIR}/include/build_config/SDL_build_config.h.cmake"
+  "${SDL3_BINARY_DIR}/SDL_build_config.h.intermediate")
 # 2. Create the "include-config-${CMAKE_BUILD_TYPE}" folder (fails on older CMake versions when it does not exist)
 string(TOLOWER "${CMAKE_BUILD_TYPE}" lower_build_type)
 execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/include-config-${lower_build_type}")
-# 3. generate SDL_config in an build_type-dependent folder (which should be first in the include search path)
+execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/include-config-${lower_build_type}/build_config")
+# 3. generate SDL_build_config.h in an build_type-dependent folder (which should be first in the include search path)
 file(GENERATE
-    OUTPUT "${SDL3_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>/SDL_config.h"
-    INPUT "${SDL3_BINARY_DIR}/SDL_config.h.intermediate")
+    OUTPUT "${SDL3_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>/build_config/SDL_build_config.h"
+    INPUT "${SDL3_BINARY_DIR}/SDL_build_config.h.intermediate")
 
 # Prepare the flags and remove duplicates
 if(EXTRA_LDFLAGS)
@@ -2960,11 +2958,11 @@ configure_file("${SDL3_SOURCE_DIR}/include/SDL_revision.h.cmake"
   "${SDL3_BINARY_DIR}/include/SDL_revision.h")
 
 # Copy all non-generated headers to "${SDL3_BINARY_DIR}/include"
-# This is done to avoid the inclusion of a pre-generated SDL_config.h
+# This is done to avoid the inclusion of a pre-generated SDL_build_config.h
 file(GLOB SDL3_INCLUDE_FILES ${SDL3_SOURCE_DIR}/include/*.h)
 set(SDL3_COPIED_INCLUDE_FILES)
 foreach(_hdr IN LISTS SDL3_INCLUDE_FILES)
-  if(_hdr MATCHES ".*(SDL_config|SDL_revision).*")
+  if(_hdr MATCHES ".*SDL_revision.h")
     list(REMOVE_ITEM SDL3_INCLUDE_FILES "${_hdr}")
   else()
     get_filename_component(_name "${_hdr}" NAME)
@@ -3455,7 +3453,6 @@ if(NOT SDL3_DISABLE_INSTALL)
     FILES
       ${SDL3_INCLUDE_FILES}
       "${SDL3_BINARY_DIR}/include/SDL_revision.h"
-      "${SDL3_BINARY_DIR}/include-config-$<LOWER_CASE:$<CONFIG>>/SDL_config.h"
     DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SDL3)
 
   install(FILES "LICENSE.txt" DESTINATION "${LICENSES_PREFIX}")
diff --git a/VisualC-GDK/SDL/SDL.vcxproj b/VisualC-GDK/SDL/SDL.vcxproj
index 14b2d37c197f..5ec01d103df4 100644
--- a/VisualC-GDK/SDL/SDL.vcxproj
+++ b/VisualC-GDK/SDL/SDL.vcxproj
@@ -299,8 +299,6 @@
     <ClInclude Include="..\..\include\SDL_bits.h" />
     <ClInclude Include="..\..\include\SDL_blendmode.h" />
     <ClInclude Include="..\..\include\SDL_clipboard.h" />
-    <ClInclude Include="..\..\include\SDL_config.h" />
-    <ClInclude Include="..\..\include\SDL_config_wingdk.h" />
     <ClInclude Include="..\..\include\SDL_copying.h" />
     <ClInclude Include="..\..\include\SDL_cpuinfo.h" />
     <ClInclude Include="..\..\include\SDL_egl.h" />
diff --git a/VisualC-GDK/SDL/SDL.vcxproj.filters b/VisualC-GDK/SDL/SDL.vcxproj.filters
index aee609a4cbc6..8a47d06a7d8d 100644
--- a/VisualC-GDK/SDL/SDL.vcxproj.filters
+++ b/VisualC-GDK/SDL/SDL.vcxproj.filters
@@ -201,9 +201,6 @@
     <ClInclude Include="..\..\include\SDL_clipboard.h">
       <Filter>API Headers</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\include\SDL_config.h">
-      <Filter>API Headers</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\include\SDL_copying.h">
       <Filter>API Headers</Filter>
     </ClInclude>
@@ -824,9 +821,6 @@
       <Filter>render\direct3d12</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\hidapi\SDL_hidapi_c.h" />
-    <ClInclude Include="..\..\include\SDL_config_wingdk.h">
-      <Filter>API Headers</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\src\core\gdk\SDL_gdk.h">
       <Filter>core\gdk</Filter>
     </ClInclude>
diff --git a/VisualC-WinRT/SDL-UWP.vcxproj b/VisualC-WinRT/SDL-UWP.vcxproj
index a34357e73372..084e6ea6388e 100644
--- a/VisualC-WinRT/SDL-UWP.vcxproj
+++ b/VisualC-WinRT/SDL-UWP.vcxproj
@@ -43,9 +43,6 @@
     <ClInclude Include="..\include\SDL_audio.h" />
     <ClInclude Include="..\include\SDL_blendmode.h" />
     <ClInclude Include="..\include\SDL_clipboard.h" />
-    <ClInclude Include="..\include\SDL_config.h" />
-    <ClInclude Include="..\include\SDL_config_minimal.h" />
-    <ClInclude Include="..\include\SDL_config_winrt.h" />
     <ClInclude Include="..\include\SDL_copying.h" />
     <ClInclude Include="..\include\SDL_cpuinfo.h" />
     <ClInclude Include="..\include\SDL_egl.h" />
diff --git a/VisualC-WinRT/SDL-UWP.vcxproj.filters b/VisualC-WinRT/SDL-UWP.vcxproj.filters
index 6599cdabb0ba..cf0b7fa781e4 100644
--- a/VisualC-WinRT/SDL-UWP.vcxproj.filters
+++ b/VisualC-WinRT/SDL-UWP.vcxproj.filters
@@ -33,15 +33,6 @@
     <ClInclude Include="..\include\SDL_clipboard.h">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="..\include\SDL_config.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="..\include\SDL_config_minimal.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="..\include\SDL_config_winrt.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="..\include\SDL_copying.h">
       <Filter>Header Files</Filter>
     </ClInclude>
@@ -846,4 +837,4 @@
       <Filter>Source Files</Filter>
     </ClCompile>
   </ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/VisualC/SDL/SDL.vcxproj b/VisualC/SDL/SDL.vcxproj
index 40eed8f142db..b1697cf1f8d1 100644
--- a/VisualC/SDL/SDL.vcxproj
+++ b/VisualC/SDL/SDL.vcxproj
@@ -223,8 +223,6 @@
     <ClInclude Include="..\..\include\SDL_bits.h" />
     <ClInclude Include="..\..\include\SDL_blendmode.h" />
     <ClInclude Include="..\..\include\SDL_clipboard.h" />
-    <ClInclude Include="..\..\include\SDL_config.h" />
-    <ClInclude Include="..\..\include\SDL_config_windows.h" />
     <ClInclude Include="..\..\include\SDL_copying.h" />
     <ClInclude Include="..\..\include\SDL_cpuinfo.h" />
     <ClInclude Include="..\..\include\SDL_egl.h" />
diff --git a/VisualC/SDL/SDL.vcxproj.filters b/VisualC/SDL/SDL.vcxproj.filters
index b87cc866bf8e..1d6b5366370b 100644
--- a/VisualC/SDL/SDL.vcxproj.filters
+++ b/VisualC/SDL/SDL.vcxproj.filters
@@ -198,12 +198,6 @@
     <ClInclude Include="..\..\include\SDL_clipboard.h">
       <Filter>API Headers</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\include\SDL_config.h">
-      <Filter>API Headers</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\include\SDL_config_windows.h">
-      <Filter>API Headers</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\include\SDL_copying.h">
       <Filter>API Headers</Filter>
     </ClInclude>
diff --git a/WhatsNew.txt b/WhatsNew.txt
index 24283e8ef57f..858ca8b08a83 100644
--- a/WhatsNew.txt
+++ b/WhatsNew.txt
@@ -18,3 +18,4 @@ General:
 	* SDL_RWFromFP()
 	* SDL_SetWindowBrightness()
 	* SDL_SetWindowGammaRamp()
+* SDL_stdinc.h no longer includes stdio.h, stdlib.h, etc., it only provides the SDL C runtime functionality
diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
index 87c0789e52c9..44ea0ad594f1 100644
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
@@ -167,7 +167,6 @@
 		A75FCD1723E25AB700529352 /* SDL_clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CD1595D4D800BBD41B /* SDL_clipboard.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		A75FCD1823E25AB700529352 /* SDL_dataqueue.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A57023E2513D00DCD162 /* SDL_dataqueue.h */; };
 		A75FCD1923E25AB700529352 /* SDL_error_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A57523E2513D00DCD162 /* SDL_error_c.h */; };
-		A75FCD1B23E25AB700529352 /* SDL_config.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CF1595D4D800BBD41B /* SDL_config.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		A75FCD1C23E25AB700529352 /* SDL_d3dmath.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8DC23E2514000DCD162 /* SDL_d3dmath.h */; };
 		A75FCD1F23E25AB700529352 /* SDL_egl_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A60423E2513D00DCD162 /* SDL_egl_c.h */; };
 		A75FCD2023E25AB700529352 /* SDL_copying.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D01595D4D800BBD41B /* SDL_copying.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -543,7 +542,6 @@
 		A75FCED023E25AC700529352 /* SDL_clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CD1595D4D800BBD41B /* SDL_clipboard.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		A75FCED123E25AC700529352 /* SDL_dataqueue.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A57023E2513D00DCD162 /* SDL_dataqueue.h */; };
 		A75FCED223E25AC700529352 /* SDL_error_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A57523E2513D00DCD162 /* SDL_error_c.h */; };
-		A75FCED423E25AC700529352 /* SDL_config.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CF1595D4D800BBD41B /* SDL_config.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		A75FCED523E25AC700529352 /* SDL_d3dmath.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8DC23E2514000DCD162 /* SDL_d3dmath.h */; };
 		A75FCED823E25AC700529352 /* SDL_egl_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A60423E2513D00DCD162 /* SDL_egl_c.h */; };
 		A75FCED923E25AC700529352 /* SDL_copying.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D01595D4D800BBD41B /* SDL_copying.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -896,12 +894,6 @@
 		A75FDAC023E28B8000529352 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A75FDABF23E28B8000529352 /* CoreMotion.framework */; };
 		A75FDAC223E28B9600529352 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A75FDAC123E28B9600529352 /* CoreGraphics.framework */; };
 		A75FDAC423E28BA700529352 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A75FDAC323E28BA700529352 /* CoreBluetooth.framework */; };
-		A75FDAF623E35EC400529352 /* SDL_config_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDAF523E35EC400529352 /* SDL_config_ios.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		A75FDAF723E35EC400529352 /* SDL_config_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDAF523E35EC400529352 /* SDL_config_ios.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		A75FDAF823E35ED500529352 /* SDL_config_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDAF523E35EC400529352 /* SDL_config_ios.h */; };
-		A75FDAF923E35ED500529352 /* SDL_config_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDAF523E35EC400529352 /* SDL_config_ios.h */; };
-		A75FDAFA23E35ED600529352 /* SDL_config_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDAF523E35EC400529352 /* SDL_config_ios.h */; };
-		A75FDAFB23E35ED700529352 /* SDL_config_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDAF523E35EC400529352 /* SDL_config_ios.h */; };
 		A75FDB5823E39E6100529352 /* hidapi.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDB5723E39E6100529352 /* hidapi.h */; };
 		A75FDB5923E39E6100529352 /* hidapi.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDB5723E39E6100529352 /* hidapi.h */; };
 		A75FDB5A23E39E6100529352 /* hidapi.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDB5723E39E6100529352 /* hidapi.h */; };
@@ -1257,7 +1249,6 @@
 		A7D88A1F23E2437C00DCD162 /* SDL_blendmode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CC1595D4D800BBD41B /* SDL_blendmode.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		A7D88A2023E2437C00DCD162 /* SDL_egl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C2EF7001FC9EF0F003F5197 /* SDL_egl.h */; };
 		A7D88A2123E2437C00DCD162 /* SDL_clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CD1595D4D800BBD41B /* SDL_clipboard.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		A7D88A2323E2437C00DCD162 /* SDL_config.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CF1595D4D800BBD41B /* SDL_config.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		A7D88A2523E2437C00DCD162 /* SDL_copying.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D01595D4D800BBD41B /* SDL_copying.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		A7D88A2623E2437C00DCD162 /* SDL_cpuinfo.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D11595D4D800BBD41B /* SDL_cpuinfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		A7D88A2723E2437C00DCD162 /* SDL_endian.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D21595D4D800BBD41B /* SDL_endian.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -1325,7 +1316,6 @@
 		A7D88BD623E24BED00DCD162 /* SDL_blendmode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CC1595D4D800BBD41B /* SDL_blendmode.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		A7D88BD723E24BED00DCD162 /* SDL_egl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C2EF7001FC9EF0F003F5197 /* SDL_egl.h */; };
 		A7D88BD823E24BED00DCD162 /* SDL_clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CD1595D4D800BBD41B /* SDL_clipboard.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		A7D88BDA23E24BED00DCD162 /* SDL_config.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CF1595D4D800BBD41B /* SDL_config.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		A7D88BDC23E24BED00DCD162 /* SDL_copying.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D01595D4D800BBD41B /* SDL_copying.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		A7D88BDD23E24BED00DCD162 /* SDL_cpuinfo.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D11595D4D800BBD41B /* SDL_cpuinfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		A7D88BDE23E24BED00DCD162 /* SDL_endian.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D21595D4D800BBD41B /* SDL_endian.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -3250,8 +3240,6 @@
 		AA7558021595D4D800BBD41B /* SDL_audio.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CB1595D4D800BBD41B /* SDL_audio.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		AA7558041595D4D800BBD41B /* SDL_blendmode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CC1595D4D800BBD41B /* SDL_blendmode.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		AA7558061595D4D800BBD41B /* SDL_clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CD1595D4D800BBD41B /* SDL_clipboard.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		AA7558081595D4D800BBD41B /* SDL_config_macos.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CE1595D4D800BBD41B /* SDL_config_macos.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		AA75580A1595D4D800BBD41B /* SDL_config.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CF1595D4D800BBD41B /* SDL_config.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		AA75580C1595D4D800BBD41B /* SDL_copying.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D01595D4D800BBD41B /* SDL_copying.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		AA75580E1595D4D800BBD41B /* SDL_cpuinfo.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D11595D4D800BBD41B /* SDL_cpuinfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		AA7558101595D4D800BBD41B /* SDL_endian.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D21595D4D800BBD41B /* SDL_endian.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -3315,8 +3303,6 @@
 		DB313FCC17554B71006C0E22 /* SDL_audio.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CB1595D4D800BBD41B /* SDL_audio.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		DB313FCD17554B71006C0E22 /* SDL_blendmode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CC1595D4D800BBD41B /* SDL_blendmode.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		DB313FCE17554B71006C0E22 /* SDL_clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CD1595D4D800BBD41B /* SDL_clipboard.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		DB313FCF17554B71006C0E22 /* SDL_config_macos.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CE1595D4D800BBD41B /* SDL_config_macos.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		DB313FD017554B71006C0E22 /* SDL_config.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CF1595D4D800BBD41B /* SDL_config.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		DB313FD117554B71006C0E22 /* SDL_copying.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D01595D4D800BBD41B /* SDL_copying.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		DB313FD217554B71006C0E22 /* SDL_cpuinfo.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D11595D4D800BBD41B /* SDL_cpuinfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		DB313FD317554B71006C0E22 /* SDL_endian.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D21595D4D800BBD41B /* SDL_endian.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -3713,7 +3699,6 @@
 		A75FDABF23E28B8000529352 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
 		A75FDAC123E28B9600529352 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
 		A75FDAC323E28BA700529352 /* CoreBluetooth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreBluetooth.framework; path = System/Library/Frameworks/CoreBluetooth.framework; sourceTree = SDKROOT; };
-		A75FDAF523E35EC400529352 /* SDL_config_ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_config_ios.h; sourceTree = "<group>"; };
 		A75FDB5723E39E6100529352 /* hidapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = hidapi.h; path = hidapi/hidapi.h; sourceTree = "<group>"; };
 		A75FDB9223E4C8DB00529352 /* hid.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hid.c; sourceTree = "<group>"; };
 		A75FDBA323E4CB6F00529352 /* LICENSE-bsd.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "LICENSE-bsd.txt"; sourceTree = "<group>"; };
@@ -4047,8 +4032,6 @@
 		AA7557CB1595D4D800BBD41B /* SDL_audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_audio.h; sourceTree = "<group>"; };
 		AA7557CC1595D4D800BBD41B /* SDL_blendmode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_blendmode.h; sourceTree = "<group>"; };
 		AA7557CD1595D4D800BBD41B /* SDL_clipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_clipboard.h; sourceTree = "<group>"; };
-		AA7557CE1595D4D800BBD41B /* SDL_config_macos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_config_macos.h; sourceTree = "<group>"; };
-		AA7557CF1595D4D800BBD41B /* SDL_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_config.h; sourceTree = "<grou

(Patch may be truncated, please check the link at the top of this post.)