Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -1079,35 +1079,42 @@ ], [ AC_MSG_RESULT(no) OBJCFLAGS="$old_OBJCFLAGS" ]) - old_OBJCFLAGS="$OBJCFLAGS" - OBJCFLAGS="$OBJCFLAGS -pedantic" - AC_MSG_CHECKING(whether -pedantic is buggy) - AC_TRY_COMPILE([ - #import - - #ifdef __has_attribute - # if __has_attribute(objc_root_class) - __attribute__((__objc_root_class__)) - # endif - #endif - @interface Foo - { - void *foo; - } - @end - - @interface Bar: Foo - @end - ], [], [ - AC_MSG_RESULT(no) - ], [ - AC_MSG_RESULT(yes) - OBJCFLAGS="$old_OBJCFLAGS" - ]) + case "$host" in + *-psp*) + # PSP headers don't work with -pedantic + ;; + *) + old_OBJCFLAGS="$OBJCFLAGS" + OBJCFLAGS="$OBJCFLAGS -pedantic" + AC_MSG_CHECKING(whether -pedantic is buggy) + AC_TRY_COMPILE([ + #import + + #ifdef __has_attribute + # if __has_attribute(objc_root_class) + __attribute__((__objc_root_class__)) + # endif + #endif + @interface Foo + { + void *foo; + } + @end + + @interface Bar: Foo + @end + ], [], [ + AC_MSG_RESULT(no) + ], [ + AC_MSG_RESULT(yes) + OBJCFLAGS="$old_OBJCFLAGS" + ]) + ;; + esac ]) AS_IF([test x"$cross_compiling" = x"yes"], [ AC_SUBST(BIN_PREFIX, "${host_alias}-") Index: src/OFApplication.m ================================================================== --- src/OFApplication.m +++ src/OFApplication.m @@ -160,10 +160,11 @@ + (void)terminateWithStatus: (int)status { #ifdef _PSP sceKernelExitGame(); + abort(); /* sceKernelExitGame() is not marked noreturn */ #else exit(status); #endif } Index: src/OFThread.m ================================================================== --- src/OFThread.m +++ src/OFThread.m @@ -13,10 +13,11 @@ * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #define OF_THREAD_M +#define _POSIX_TIMERS #define __NO_EXT_QNX #include "config.h" #include @@ -36,12 +37,14 @@ # include #endif #ifdef __wii__ # define BOOL OGC_BOOL +# define nanosleep ogc_nanosleep # include # undef BOOL +# undef nanosleep #endif #import "OFThread.h" #import "OFThread+Private.h" #import "OFRunLoop.h" @@ -185,15 +188,11 @@ rqtp.tv_nsec = lrint((timeInterval - rqtp.tv_sec) * 1000000000); if (rqtp.tv_sec != floor(timeInterval)) @throw [OFOutOfRangeException exception]; -# ifndef __wii__ nanosleep(&rqtp, NULL); -# else - nanosleep(&rqtp); -# endif #elif defined(OF_NINTENDO_DS) uint64_t counter; if (timeInterval > UINT64_MAX / 60) @throw [OFOutOfRangeException exception]; Index: src/of_asprintf.m ================================================================== --- src/of_asprintf.m +++ src/of_asprintf.m @@ -26,10 +26,20 @@ #include #import "OFString.h" #define MAX_SUBFORMAT_LEN 64 + +#ifndef HAVE_ASPRINTF +/* + * (v)asprintf might be declared, but HAVE_ASPRINTF not defined because + * configure determined it is broken. In this case, we must make sure there is + * no name clash. + */ +# define asprintf asprintf_ +# define vasprintf vasprintf_ +#endif struct context { const char *format; size_t formatLen; char subformat[MAX_SUBFORMAT_LEN + 1];