Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed bug #615
Browse files Browse the repository at this point in the history
 Scott McCreary      2008-08-21 10:48:14 PDT

This patch adds support for Haiku.
http://ports.haiku-files.org/browser/haikuports/trunk/media-libs/libsdl/SDL-1.2.13-haiku.diff
Haiku is an open-source recreation of BeOS.  It has better POSIX compliance
than beOS did, and other improved features, which in some cases causes us to
have to "undo" previous BeOS workarounds.
Here's our port log entry for it, showing the steps to force the changes into
configure and Makefile:
http://ports.haiku-files.org/wiki/media-libs/libsdl/1.2.13/1
Note that this was only tried on 1.2.13 stable so far.
Haiku is using a newer config.guess / config.sub that doesn't yet seem to be in
the released libtool, so we are having to copy it in for now.
http://haiku-files.org/files/optional-packages/
  • Loading branch information
slouken committed Sep 21, 2009
1 parent 0bf9b81 commit 0842fde
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion configure.in
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions include/SDL_platform.h
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/begin_code.h
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion test/automated/platform/platform.c
Expand Up @@ -139,14 +139,16 @@ 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__
"BSDI"
#elif __DREAMCAST__
"Dreamcast"
#elif __FREEBSD__

"FreeBSD"
#elif __HPUX__
"HP-UX"
Expand Down
2 changes: 1 addition & 1 deletion test/configure.in
Expand Up @@ -20,7 +20,7 @@ case "$host" in
MATHLIB=""
SYS_GL_LIBS="-lopengl32"
;;
*-*-beos*)
*-*-beos* | *-*-haiku*)
EXE=""
MATHLIB=""
SYS_GL_LIBS="-lGL"
Expand Down
3 changes: 3 additions & 0 deletions test/testplatform.c
Expand Up @@ -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__
Expand Down

0 comments on commit 0842fde

Please sign in to comment.