mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-16 06:45:59 +00:00
Switch header convention from #include "SDL.h"
to #include <SDL3/SDLh>
I ran this script in the include directory: ```sh sed -i '' -e 's,#include "\(SDL.*\)",#include <SDL3/\1>,' *.h ``` I ran this script in the src directory: ```sh for i in ../include/SDL3/SDL*.h do hdr=$(basename $i) if [ x"$(echo $hdr | egrep 'SDL_main|SDL_name|SDL_test|SDL_syswm|SDL_opengl|SDL_egl|SDL_vulkan')" != x ]; then find . -type f -exec sed -i '' -e 's,#include "\('$hdr'\)",#include <SDL3/\1>,' {} \; else find . -type f -exec sed -i '' -e '/#include "'$hdr'"/d' {} \; fi done ``` Fixes https://github.com/libsdl-org/SDL/issues/6575
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
#ifndef SDL_systhread_h_
|
||||
#define SDL_systhread_h_
|
||||
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_thread_c.h"
|
||||
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
|
@@ -22,10 +22,8 @@
|
||||
|
||||
/* System independent thread management routines for SDL */
|
||||
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_thread_c.h"
|
||||
#include "SDL_systhread.h"
|
||||
#include "SDL_hints.h"
|
||||
#include "../SDL_error_c.h"
|
||||
|
||||
|
||||
|
@@ -23,7 +23,6 @@
|
||||
#ifndef SDL_thread_c_h_
|
||||
#define SDL_thread_c_h_
|
||||
|
||||
#include "SDL_thread.h"
|
||||
|
||||
/* Need the definitions of SYS_ThreadHandle */
|
||||
#if SDL_THREADS_DISABLED
|
||||
|
@@ -26,7 +26,6 @@
|
||||
implementation, written by Christopher Tate and Owen Smith. Thanks!
|
||||
*/
|
||||
|
||||
#include "SDL_thread.h"
|
||||
|
||||
#include "../generic/SDL_syscond_c.h"
|
||||
|
||||
|
@@ -20,7 +20,6 @@
|
||||
*/
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#include "SDL_thread.h"
|
||||
|
||||
#ifndef SDL_syscond_generic_h_
|
||||
#define SDL_syscond_generic_h_
|
||||
|
@@ -22,7 +22,6 @@
|
||||
|
||||
/* An implementation of mutexes using semaphores */
|
||||
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_systhread_c.h"
|
||||
|
||||
|
||||
|
@@ -22,8 +22,6 @@
|
||||
|
||||
/* An implementation of semaphores using mutexes and condition variables */
|
||||
|
||||
#include "SDL_timer.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_systhread_c.h"
|
||||
|
||||
|
||||
|
@@ -22,7 +22,6 @@
|
||||
|
||||
/* Thread management routines for SDL */
|
||||
|
||||
#include "SDL_thread.h"
|
||||
#include "../SDL_systhread.h"
|
||||
|
||||
#ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD
|
||||
|
@@ -25,7 +25,6 @@
|
||||
|
||||
#include <3ds.h>
|
||||
|
||||
#include "SDL_mutex.h"
|
||||
|
||||
struct SDL_mutex
|
||||
{
|
||||
|
@@ -26,7 +26,6 @@
|
||||
|
||||
#include <3ds.h>
|
||||
|
||||
#include "SDL_thread.h"
|
||||
|
||||
struct SDL_semaphore
|
||||
{
|
||||
|
@@ -24,7 +24,6 @@
|
||||
|
||||
#include <e32std.h>
|
||||
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_systhread_c.h"
|
||||
|
||||
struct SDL_mutex
|
||||
|
@@ -24,8 +24,6 @@
|
||||
|
||||
#include <e32std.h>
|
||||
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_thread.h"
|
||||
|
||||
#define SDL_MUTEX_TIMEOUT -2
|
||||
|
||||
|
@@ -28,8 +28,6 @@
|
||||
|
||||
extern "C" {
|
||||
#undef NULL
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "../SDL_systhread.h"
|
||||
#include "../SDL_thread_c.h"
|
||||
};
|
||||
|
@@ -28,8 +28,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <timer_alarm.h>
|
||||
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_thread.h"
|
||||
|
||||
#include <kernel.h>
|
||||
|
||||
|
@@ -27,8 +27,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "../SDL_systhread.h"
|
||||
#include "../SDL_thread_c.h"
|
||||
#include <kernel.h>
|
||||
|
@@ -28,7 +28,6 @@
|
||||
implementation, written by Christopher Tate and Owen Smith. Thanks!
|
||||
*/
|
||||
|
||||
#include "SDL_thread.h"
|
||||
|
||||
struct SDL_cond
|
||||
{
|
||||
|
@@ -24,7 +24,6 @@
|
||||
|
||||
/* An implementation of mutexes using semaphores */
|
||||
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_systhread_c.h"
|
||||
|
||||
#include <pspthreadman.h>
|
||||
|
@@ -27,8 +27,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_thread.h"
|
||||
|
||||
#include <pspthreadman.h>
|
||||
#include <pspkerror.h>
|
||||
|
@@ -27,8 +27,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "../SDL_systhread.h"
|
||||
#include "../SDL_thread_c.h"
|
||||
#include <pspkerneltypes.h>
|
||||
|
@@ -26,7 +26,6 @@
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_sysmutex_c.h"
|
||||
|
||||
struct SDL_cond
|
||||
|
@@ -23,7 +23,6 @@
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "SDL_thread.h"
|
||||
|
||||
#if !SDL_THREAD_PTHREAD_RECURSIVE_MUTEX && \
|
||||
!SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP
|
||||
|
@@ -26,8 +26,6 @@
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_timer.h"
|
||||
|
||||
/* Wrapper around POSIX 1003.1b semaphores */
|
||||
|
||||
|
@@ -20,8 +20,6 @@
|
||||
*/
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#include "SDL_system.h"
|
||||
#include "SDL_hints.h"
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
@@ -48,7 +46,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "SDL_thread.h"
|
||||
#include "../SDL_thread_c.h"
|
||||
#include "../SDL_systhread.h"
|
||||
#ifdef __ANDROID__
|
||||
|
@@ -19,7 +19,6 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "../../SDL_internal.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "../SDL_systhread.h"
|
||||
#include "../SDL_thread_c.h"
|
||||
|
||||
|
@@ -21,7 +21,6 @@
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
extern "C" {
|
||||
#include "SDL_thread.h"
|
||||
}
|
||||
|
||||
#include <chrono>
|
||||
|
@@ -21,7 +21,6 @@
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
extern "C" {
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_systhread_c.h"
|
||||
}
|
||||
|
||||
|
@@ -23,7 +23,6 @@
|
||||
/* Thread management routines for SDL */
|
||||
|
||||
extern "C" {
|
||||
#include "SDL_thread.h"
|
||||
#include "../SDL_thread_c.h"
|
||||
#include "../SDL_systhread.h"
|
||||
}
|
||||
|
@@ -28,7 +28,6 @@
|
||||
implementation, written by Christopher Tate and Owen Smith. Thanks!
|
||||
*/
|
||||
|
||||
#include "SDL_thread.h"
|
||||
|
||||
struct SDL_cond
|
||||
{
|
||||
|
@@ -22,7 +22,6 @@
|
||||
|
||||
#if SDL_THREAD_VITA
|
||||
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_systhread_c.h"
|
||||
|
||||
#include <psp2/kernel/threadmgr.h>
|
||||
|
@@ -27,8 +27,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_thread.h"
|
||||
|
||||
#include <psp2/types.h>
|
||||
#include <psp2/kernel/error.h>
|
||||
|
@@ -27,8 +27,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "../SDL_systhread.h"
|
||||
#include "../SDL_thread_c.h"
|
||||
#include <psp2/types.h>
|
||||
|
@@ -20,8 +20,6 @@
|
||||
*/
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#include "SDL_hints.h"
|
||||
#include "SDL_thread.h"
|
||||
|
||||
#include "../generic/SDL_syscond_c.h"
|
||||
#include "SDL_sysmutex_c.h"
|
||||
|
@@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "SDL_hints.h"
|
||||
|
||||
#include "SDL_sysmutex_c.h"
|
||||
|
||||
|
@@ -22,7 +22,6 @@
|
||||
|
||||
#include "../../core/windows/SDL_windows.h"
|
||||
|
||||
#include "SDL_mutex.h"
|
||||
|
||||
typedef SDL_mutex * (*pfnSDL_CreateMutex)(void);
|
||||
typedef int (*pfnSDL_LockMutex)(SDL_mutex *);
|
||||
|
@@ -35,9 +35,6 @@
|
||||
|
||||
#include "../../core/windows/SDL_windows.h"
|
||||
|
||||
#include "SDL_hints.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_timer.h"
|
||||
|
||||
typedef SDL_sem * (*pfnSDL_CreateSemaphore)(Uint32);
|
||||
typedef void (*pfnSDL_DestroySemaphore)(SDL_sem *);
|
||||
|
@@ -24,8 +24,6 @@
|
||||
|
||||
/* Win32 thread management routines for SDL */
|
||||
|
||||
#include "SDL_hints.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "../SDL_thread_c.h"
|
||||
#include "../SDL_systhread.h"
|
||||
#include "SDL_systhread_c.h"
|
||||
|
@@ -25,7 +25,6 @@
|
||||
|
||||
#include "../../core/windows/SDL_windows.h"
|
||||
|
||||
#include "SDL_thread.h"
|
||||
#include "../SDL_thread_c.h"
|
||||
|
||||
#if WINAPI_FAMILY_WINRT
|
||||
|
Reference in New Issue
Block a user