diff --git a/configure.in b/configure.in index 3e8cda7bb..55489b676 100644 --- a/configure.in +++ b/configure.in @@ -2542,7 +2542,7 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main" SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows" ;; - *-*-beos*) + *-*-beos* | *-*-haiku*) ARCH=beos ac_default_prefix=/boot/develop/tools/gnupro CheckDummyVideo diff --git a/include/SDL_platform.h b/include/SDL_platform.h index cc2e67fa4..bb35e378e 100644 --- a/include/SDL_platform.h +++ b/include/SDL_platform.h @@ -33,6 +33,10 @@ #undef __BEOS__ #define __BEOS__ 1 #endif +#if defined(__HAIKU__) +#undef __HAIKU__ +#define __HAIKU__ 1 +#endif #if defined(bsdi) || defined(__bsdi) || defined(__bsdi__) #undef __BSDI__ #define __BSDI__ 1 diff --git a/include/begin_code.h b/include/begin_code.h index e3183ba64..f51bae4f8 100644 --- a/include/begin_code.h +++ b/include/begin_code.h @@ -33,7 +33,7 @@ /* Some compilers use a special export keyword */ #ifndef DECLSPEC -# if defined(__BEOS__) +# if defined(__BEOS__) || defined(__HAIKU__) # if defined(__GNUC__) # define DECLSPEC __declspec(dllexport) # else diff --git a/test/automated/platform/platform.c b/test/automated/platform/platform.c index c0a180d24..a18cee2fe 100644 --- a/test/automated/platform/platform.c +++ b/test/automated/platform/platform.c @@ -139,6 +139,9 @@ const char *platform_getPlatform (void) return #if __AIX__ "AIX" +#elif __HAIKU__ +/* Haiku must appear here before BeOS, since it also defines __BEOS__ */ + "Haiku" #elif __BEOS__ "BeOS" #elif __BSDI__ @@ -146,7 +149,6 @@ const char *platform_getPlatform (void) #elif __DREAMCAST__ "Dreamcast" #elif __FREEBSD__ - "FreeBSD" #elif __HPUX__ "HP-UX" diff --git a/test/configure.in b/test/configure.in index fa13dc941..b24b6a6fe 100644 --- a/test/configure.in +++ b/test/configure.in @@ -20,7 +20,7 @@ case "$host" in MATHLIB="" SYS_GL_LIBS="-lopengl32" ;; - *-*-beos*) + *-*-beos* | *-*-haiku*) EXE="" MATHLIB="" SYS_GL_LIBS="-lGL" diff --git a/test/testplatform.c b/test/testplatform.c index 7a858483c..ce792ba33 100644 --- a/test/testplatform.c +++ b/test/testplatform.c @@ -160,6 +160,9 @@ main(int argc, char *argv[]) printf("This system is running %s\n", #if __AIX__ "AIX" +#elif __HAIKU__ +/* Haiku must appear here before BeOS, since it also defines __BEOS__ */ + "Haiku" #elif __BEOS__ "BeOS" #elif __BSDI__