Added missing guards in implementation for PSP.
Thanks to Martin Gerhardy for pointing this out.
1.1 --- a/src/audio/psp/SDL_pspaudio.c Sat Jan 31 22:43:05 2015 +0100
1.2 +++ b/src/audio/psp/SDL_pspaudio.c Sat Jan 31 22:45:54 2015 +0100
1.3 @@ -20,6 +20,8 @@
1.4 */
1.5 #include "../../SDL_internal.h"
1.6
1.7 +#if SDL_AUDIO_DRIVER_PSP
1.8 +
1.9 #include <stdio.h>
1.10 #include <string.h>
1.11 #include <stdlib.h>
1.12 @@ -192,5 +194,6 @@
1.13
1.14 /* SDL_AUDI */
1.15
1.16 +#endif /* SDL_AUDIO_DRIVER_PSP */
1.17
1.18 -
1.19 +/* vi: set ts=4 sw=4 expandtab: */
2.1 --- a/src/joystick/psp/SDL_sysjoystick.c Sat Jan 31 22:43:05 2015 +0100
2.2 +++ b/src/joystick/psp/SDL_sysjoystick.c Sat Jan 31 22:45:54 2015 +0100
2.3 @@ -20,6 +20,8 @@
2.4 */
2.5 #include "../../SDL_internal.h"
2.6
2.7 +#if SDL_JOYSTICK_PSP
2.8 +
2.9 /* This is the PSP implementation of the SDL joystick API */
2.10 #include <pspctrl.h>
2.11 #include <pspkernel.h>
2.12 @@ -263,5 +265,7 @@
2.13 return guid;
2.14 }
2.15
2.16 +#endif /* SDL_JOYSTICK_PSP */
2.17 +
2.18 /* vim: ts=4 sw=4
2.19 */
3.1 --- a/src/main/psp/SDL_psp_main.c Sat Jan 31 22:43:05 2015 +0100
3.2 +++ b/src/main/psp/SDL_psp_main.c Sat Jan 31 22:45:54 2015 +0100
3.3 @@ -1,6 +1,9 @@
3.4 /*
3.5 SDL_psp_main.c, placed in the public domain by Sam Lantinga 3/13/14
3.6 */
3.7 +#include "SDL_config.h"
3.8 +
3.9 +#ifdef __PSP__
3.10
3.11 #include "SDL_main.h"
3.12 #include <pspkernel.h>
3.13 @@ -61,3 +64,7 @@
3.14 (void)SDL_main(argc, argv);
3.15 return 0;
3.16 }
3.17 +
3.18 +#endif /* __PSP__ */
3.19 +
3.20 +/* vi: set ts=4 sw=4 expandtab: */
4.1 --- a/src/thread/psp/SDL_syscond.c Sat Jan 31 22:43:05 2015 +0100
4.2 +++ b/src/thread/psp/SDL_syscond.c Sat Jan 31 22:45:54 2015 +0100
4.3 @@ -20,6 +20,8 @@
4.4 */
4.5 #include "../../SDL_internal.h"
4.6
4.7 +#if SDL_THREAD_PSP
4.8 +
4.9 /* An implementation of condition variables using semaphores and mutexes */
4.10 /*
4.11 This implementation borrows heavily from the BeOS condition variable
4.12 @@ -217,4 +219,6 @@
4.13 return SDL_CondWaitTimeout(cond, mutex, SDL_MUTEX_MAXWAIT);
4.14 }
4.15
4.16 +#endif /* SDL_THREAD_PSP */
4.17 +
4.18 /* vi: set ts=4 sw=4 expandtab: */
5.1 --- a/src/thread/psp/SDL_sysmutex.c Sat Jan 31 22:43:05 2015 +0100
5.2 +++ b/src/thread/psp/SDL_sysmutex.c Sat Jan 31 22:45:54 2015 +0100
5.3 @@ -20,6 +20,8 @@
5.4 */
5.5 #include "../../SDL_internal.h"
5.6
5.7 +#if SDL_THREAD_PSP
5.8 +
5.9 /* An implementation of mutexes using semaphores */
5.10
5.11 #include "SDL_thread.h"
5.12 @@ -129,4 +131,6 @@
5.13 #endif /* SDL_THREADS_DISABLED */
5.14 }
5.15
5.16 +#endif /* SDL_THREAD_PSP */
5.17 +
5.18 /* vi: set ts=4 sw=4 expandtab: */
6.1 --- a/src/thread/psp/SDL_syssem.c Sat Jan 31 22:43:05 2015 +0100
6.2 +++ b/src/thread/psp/SDL_syssem.c Sat Jan 31 22:45:54 2015 +0100
6.3 @@ -20,6 +20,8 @@
6.4 */
6.5 #include "../../SDL_internal.h"
6.6
6.7 +#if SDL_THREAD_PSP
6.8 +
6.9 /* Semaphore functions for the PSP. */
6.10
6.11 #include <stdio.h>
6.12 @@ -153,5 +155,7 @@
6.13 return 0;
6.14 }
6.15
6.16 +#endif /* SDL_THREAD_PSP */
6.17 +
6.18 /* vim: ts=4 sw=4
6.19 */
7.1 --- a/src/thread/psp/SDL_systhread.c Sat Jan 31 22:43:05 2015 +0100
7.2 +++ b/src/thread/psp/SDL_systhread.c Sat Jan 31 22:45:54 2015 +0100
7.3 @@ -20,6 +20,8 @@
7.4 */
7.5 #include "../../SDL_internal.h"
7.6
7.7 +#if SDL_THREAD_PSP
7.8 +
7.9 /* PSP thread management routines for SDL */
7.10
7.11 #include <stdio.h>
7.12 @@ -104,5 +106,7 @@
7.13
7.14 }
7.15
7.16 +#endif /* SDL_THREAD_PSP */
7.17 +
7.18 /* vim: ts=4 sw=4
7.19 */
8.1 --- a/src/timer/psp/SDL_systimer.c Sat Jan 31 22:43:05 2015 +0100
8.2 +++ b/src/timer/psp/SDL_systimer.c Sat Jan 31 22:45:54 2015 +0100
8.3 @@ -20,6 +20,8 @@
8.4 */
8.5 #include "../../SDL_internal.h"
8.6
8.7 +#ifdef SDL_TIMERS_PSP
8.8 +
8.9 #include "SDL_thread.h"
8.10 #include "SDL_timer.h"
8.11 #include "SDL_error.h"
8.12 @@ -83,5 +85,7 @@
8.13 sceKernelDelayThreadCB(ms * 1000);
8.14 }
8.15
8.16 +#endif /* SDL_TIMERS_PSP */
8.17 +
8.18 /* vim: ts=4 sw=4
8.19 */
9.1 --- a/src/video/psp/SDL_pspevents.c Sat Jan 31 22:43:05 2015 +0100
9.2 +++ b/src/video/psp/SDL_pspevents.c Sat Jan 31 22:45:54 2015 +0100
9.3 @@ -20,6 +20,8 @@
9.4 */
9.5 #include "../../SDL_internal.h"
9.6
9.7 +#if SDL_VIDEO_DRIVER_PSP
9.8 +
9.9 /* Being a null driver, there's no event stream. We just define stubs for
9.10 most of the API. */
9.11
9.12 @@ -283,3 +285,6 @@
9.13
9.14 /* end of SDL_pspevents.c ... */
9.15
9.16 +#endif /* SDL_VIDEO_DRIVER_PSP */
9.17 +
9.18 +/* vi: set ts=4 sw=4 expandtab: */
10.1 --- a/src/video/psp/SDL_pspgl.c Sat Jan 31 22:43:05 2015 +0100
10.2 +++ b/src/video/psp/SDL_pspgl.c Sat Jan 31 22:45:54 2015 +0100
10.3 @@ -20,6 +20,8 @@
10.4 */
10.5 #include "../../SDL_internal.h"
10.6
10.7 +#if SDL_VIDEO_DRIVER_PSP
10.8 +
10.9 #include <stdlib.h>
10.10 #include <string.h>
10.11
10.12 @@ -204,3 +206,6 @@
10.13 return;
10.14 }
10.15
10.16 +#endif /* SDL_VIDEO_DRIVER_PSP */
10.17 +
10.18 +/* vi: set ts=4 sw=4 expandtab: */
11.1 --- a/src/video/psp/SDL_pspmouse.c Sat Jan 31 22:43:05 2015 +0100
11.2 +++ b/src/video/psp/SDL_pspmouse.c Sat Jan 31 22:45:54 2015 +0100
11.3 @@ -20,6 +20,7 @@
11.4 */
11.5 #include "../../SDL_internal.h"
11.6
11.7 +#if SDL_VIDEO_DRIVER_PSP
11.8
11.9 #include <stdio.h>
11.10
11.11 @@ -34,3 +35,7 @@
11.12 struct WMcursor {
11.13 int unused;
11.14 };
11.15 +
11.16 +#endif /* SDL_VIDEO_DRIVER_PSP */
11.17 +
11.18 +/* vi: set ts=4 sw=4 expandtab: */