From dcc5369ed47d40fe7c4ec8d719aa06b96894313c Mon Sep 17 00:00:00 2001 From: Scott McCreary Date: Wed, 27 Aug 2008 07:02:55 +0000 Subject: [PATCH] Second pass at making a patch to build Allegro on Haiku. This patch merges the haiku changes into the current BeOS files and should make for a cleaner patch. --- .../allegro/allegro-4.3.10-haiku-2.diff | 657 ++++++++++++++++++ 1 file changed, 657 insertions(+) create mode 100644 media-libs/allegro/allegro-4.3.10-haiku-2.diff diff --git a/media-libs/allegro/allegro-4.3.10-haiku-2.diff b/media-libs/allegro/allegro-4.3.10-haiku-2.diff new file mode 100644 index 000000000..362496b24 --- /dev/null +++ b/media-libs/allegro/allegro-4.3.10-haiku-2.diff @@ -0,0 +1,657 @@ +diff -urN allegro-4.3.10/fix.sh allegro-4.3.10-haiku/fix.sh +--- allegro-4.3.10/fix.sh 2008-01-01 13:59:18.000000000 -0800 ++++ allegro-4.3.10-haiku/fix.sh 2008-08-26 23:51:47.000000000 -0700 +@@ -9,7 +9,7 @@ + echo + echo "Usage: $0 [--quick|--dtou|--utod|--utom|--mtou]" + echo +- echo "Where platform is one of: bcc32, beos, djgpp, mingw, qnx, unix" ++ echo "Where platform is one of: bcc32, beos, djgpp, haiku, mingw, qnx, unix" + echo "mac, macosx, macosx-universal and watcom." + echo "The --quick parameter turns off text file conversion, --dtou converts from" + echo "DOS/Win32 format to Unix, --utod converts from Unix to DOS/Win32 format," +@@ -140,6 +140,7 @@ + "bcc32" ) proc_fix "Windows (BCC32)" "makefile.bcc" "ALLEGRO_BCC32";; + "beos" ) proc_fix "BeOS" "makefile.be" "ALLEGRO_BEOS";; + "djgpp" ) proc_fix "DOS (djgpp)" "makefile.dj" "ALLEGRO_DJGPP";; ++ "haiku" ) proc_fix "Haiku" "makefile.be" "ALLEGRO_HAIKU";; + "mingw" ) proc_fix "Windows (MinGW)" "makefile.mgw" "ALLEGRO_MINGW32";; + "mingw32" ) proc_fix "Windows (MinGW)" "makefile.mgw" "ALLEGRO_MINGW32";; + # The 'msvc' target is undocumented in the help message, but is used +diff -urN allegro-4.3.10/include/allegro/internal/aintern.h allegro-4.3.10-haiku/include/allegro/internal/aintern.h +--- allegro-4.3.10/include/allegro/internal/aintern.h 2008-01-05 14:37:14.000000000 -0800 ++++ allegro-4.3.10-haiku/include/allegro/internal/aintern.h 2008-08-26 22:35:46.000000000 -0700 +@@ -189,7 +189,7 @@ + + + #if (defined ALLEGRO_DOS) || (defined ALLEGRO_DJGPP) || (defined ALLEGRO_WATCOM) || \ +- (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS) ++ (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS) || (defined ALLEGRO_HAIKU) + + AL_ARRAY(char *, _pckeys_names); + +diff -urN allegro-4.3.10/include/allegro/internal/alconfig.h allegro-4.3.10-haiku/include/allegro/internal/alconfig.h +--- allegro-4.3.10/include/allegro/internal/alconfig.h 2007-06-24 01:13:22.000000000 -0700 ++++ allegro-4.3.10-haiku/include/allegro/internal/alconfig.h 2008-08-26 22:20:39.000000000 -0700 +@@ -48,6 +48,8 @@ + #include "allegro/platform/albcc32.h" + #elif defined ALLEGRO_MSVC + #include "allegro/platform/almsvc.h" ++ #elif defined ALLEGRO_HAIKU ++ #include "allegro/platform/albecfg.h" + #elif defined ALLEGRO_BEOS + #include "allegro/platform/albecfg.h" + #elif defined ALLEGRO_MPW +diff -urN allegro-4.3.10/include/allegro/platform/albecfg.h allegro-4.3.10-haiku/include/allegro/platform/albecfg.h +--- allegro-4.3.10/include/allegro/platform/albecfg.h 2007-06-15 19:52:28.000000000 -0700 ++++ allegro-4.3.10-haiku/include/allegro/platform/albecfg.h 2008-08-26 22:24:41.000000000 -0700 +@@ -31,7 +31,12 @@ + #define ALLEGRO_HAVE_SYS_TIME_H 1 + + /* describe this platform */ +-#define ALLEGRO_PLATFORM_STR "BeOS" ++#if defined __BEOS__ && !defined __HAIKU__ ++ #define ALLEGRO_PLATFORM_STR "BeOS" ++#endif ++#if defined __HAIKU__ ++ #define ALLEGRO_PLATFORM_STR "Haiku" ++#endif + #define ALLEGRO_LITTLE_ENDIAN + #define ALLEGRO_CONSOLE_OK + #define ALLEGRO_USE_CONSTRUCTOR +diff -urN allegro-4.3.10/makefile.all allegro-4.3.10-haiku/makefile.all +--- allegro-4.3.10/makefile.all 2008-01-14 03:55:28.000000000 -0800 ++++ allegro-4.3.10-haiku/makefile.all 2008-08-23 17:44:44.000000000 -0700 +@@ -8,7 +8,7 @@ + # DEBUGMODE=2 selects a build intended to debug Allegro itself. + # PROFILEMODE=1 selects a profiling build. + # WARNMODE=1 selects strict compiler warnings. +-# STATICLINK=1 use static linking (MinGW32, MSVC, BeOS). ++# STATICLINK=1 use static linking (MinGW32, MSVC, BeOS, Haiku). + # STATICRUNTIME=1 link to a static C runtime library (/MT) (MSVC) + # TARGET_ARCH_COMPAT optimize for the given processor while preserving backwards + # compatibility with older processors (GCC-based platforms). +@@ -132,7 +132,7 @@ + # XXX this is duplicated in makefile.in + DOCBASEFILES = ahack changes faq mistakes help thanks allegro const abi api packfile \ + readme makedoc datafile grabber dat dat2c dat2s license addons targets +-DOCBUILDFILES = bcc32 beos darwin djgpp dmc linux macosx mingw32 msvc qnx unix watcom ++DOCBUILDFILES = bcc32 beos darwin djgpp dmc haiku linux macosx mingw32 msvc qnx unix watcom + DOCTXTBUILDFILES = $(addprefix docs/build/,$(addsuffix .txt,$(DOCBUILDFILES))) + + DOCS = $(addprefix docs/txt/,$(addsuffix .txt,$(filter-out changes thanks readme, $(DOCBASEFILES)))) +diff -urN allegro-4.3.10/makefile.be allegro-4.3.10-haiku/makefile.be +--- allegro-4.3.10/makefile.be 2008-01-11 03:30:16.000000000 -0800 ++++ allegro-4.3.10-haiku/makefile.be 2008-08-26 22:11:32.000000000 -0700 +@@ -10,7 +10,15 @@ + + # -------- define some variables that the primary makefile will use -------- + ++ ++ifeq ($(OS),BeOS) + PLATFORM = BeOS ++endif ++ ++ifeq ($(OS),Haiku) ++PLATFORM = Haiku ++endif ++ + CC = gcc + EXE = + OBJ = .o +@@ -123,7 +131,13 @@ + + OBJECT_LIST = $(COMMON_OBJECTS) $(MY_OBJECTS) $(basename $(notdir $(ALLEGRO_SRC_BEOS_FILES))) + ++ifeq ($(OS),BeOS) + LIBRARIES = -lbe -lgame -ldevice -lmidi -lmedia -lnet ++endif ++ ++ifeq ($(OS),Haiku) ++LIBRARIES = -lbe -lgame -ldevice -lmidi -lmedia -lnetwork ++endif + + PROGRAMS = bfixicon + +@@ -167,7 +181,14 @@ + sed -e "s/@LIBS@/$(LIBRARIES)/" temp2 > temp + sed -e "s/include/headers/" temp >temp2 + sed -e "s/ -l\$${lib_type}_unsharable//" temp2 >temp ++ ++ifeq ($(OS),BeOS) + sed -e "s/libdirs=-L\$${exec_prefix}\/lib/libdirs=\"-L\$${exec_prefix}\/lib\/x86 -L\/boot\/home\/config\/lib\"/" temp >/bin/allegro-config ++endif ++ifeq ($(OS),Haiku) ++ sed -e "s/libdirs=-L\$${exec_prefix}\/lib/libdirs=\"-L\$${exec_prefix}\/lib\/x86 -L\/boot\/common\/lib\"/" temp >/bin/allegro-config ++endif ++ + rm -f temp temp2 + chmod a+x /bin/allegro-config + +diff -urN allegro-4.3.10/misc/mkunixdists.sh allegro-4.3.10-haiku/misc/mkunixdists.sh +--- allegro-4.3.10/misc/mkunixdists.sh 2008-01-10 13:45:48.000000000 -0800 ++++ allegro-4.3.10-haiku/misc/mkunixdists.sh 2008-08-23 20:56:44.000000000 -0700 +@@ -73,9 +73,9 @@ + # Hack'n'slash + echo "Stripping to form end-user distribution" + (cd $dir/$basename && { +- (cd src && rm -rf beos qnx dos mac ppc win) +- (cd obj && rm -rf bcc32 beos qnx djgpp mingw32 msvc watcom) +- (cd lib && rm -rf bcc32 beos qnx djgpp mingw32 msvc watcom) ++ (cd src && rm -rf beos haiku qnx dos mac ppc win) ++ (cd obj && rm -rf bcc32 beos haiku qnx djgpp mingw32 msvc watcom) ++ (cd lib && rm -rf bcc32 beos haiku qnx djgpp mingw32 msvc watcom) + (cd include && rm -f bealleg.h qnxalleg.h macalleg.h winalleg.h) + (cd misc && rm -f cmplog.pl dllsyms.lst findtext.sh fixpatch.sh fixver.sh) + (cd misc && rm -f allegro-config-qnx.sh zipup.sh zipwin.sh *.bat *.c) +@@ -91,11 +91,11 @@ + + # jpgalleg addon + (cd addons/jpgalleg && rm -rf examples) +- (cd addons/jpgalleg && rm -f makefile.be makefile.mgw makefile.dj) ++ (cd addons/jpgalleg && rm -f makefile.be makefile.haiku makefile.mgw makefile.dj) + (cd addons/jpgalleg && rm -f makefile.osx makefile.vc fix.bat readme.txt) + (cd addons/jpgalleg/misc && rm -f fixver.sh runner.c) +- (cd addons/jpgalleg/lib && rm -rf beos djgpp macosx mingw32 msvc) +- (cd addons/jpgalleg/obj && rm -rf beos djgpp macosx mingw32 msvc) ++ (cd addons/jpgalleg/lib && rm -rf beos djgpp haiku macosx mingw32 msvc) ++ (cd addons/jpgalleg/obj && rm -rf beos djgpp haiku macosx mingw32 msvc) + + # logg addon + (cd addons/logg && rm -f Makefile.mingw play_ogg.c stream_ogg.c fix.bat) +diff -urN allegro-4.3.10/misc/zipup.sh allegro-4.3.10-haiku/misc/zipup.sh +--- allegro-4.3.10/misc/zipup.sh 2008-01-19 04:16:56.000000000 -0800 ++++ allegro-4.3.10-haiku/misc/zipup.sh 2008-08-23 20:53:10.000000000 -0700 +@@ -126,6 +126,14 @@ + make depend UNIX_TOOLS=1 CC=gcc + + ++# generate dependencies for Haiku ++echo "Generating Haiku dependencies..." ++ ++./fix.sh haiku --quick ++ ++make depend UNIX_TOOLS=1 CC=gcc ++ ++ + # generate dependencies for QNX + echo "Generating QNX dependencies..." + +@@ -164,7 +172,7 @@ + for base in abi ahack allegro const faq help mistakes; do + ./_makedoc.exe -ascii docs/txt/$base.txt docs/src/$base._tx + done +-for base in bcc32 beos darwin djgpp linux macosx mingw32 msvc qnx unix watcom; do ++for base in bcc32 beos darwin djgpp haiku linux macosx mingw32 msvc qnx unix watcom; do + ./_makedoc.exe -ascii docs/build/$base.txt docs/src/build/$base._tx + done + +diff -urN allegro-4.3.10/setup/keyconf.c allegro-4.3.10-haiku/setup/keyconf.c +--- allegro-4.3.10/setup/keyconf.c 2005-04-07 16:37:20.000000000 -0700 ++++ allegro-4.3.10-haiku/setup/keyconf.c 2008-08-26 22:40:30.000000000 -0700 +@@ -25,8 +25,8 @@ + + + /* The code can't link on platforms that don't use src/misc/pckeys.c (everything +- * but DOS, QNX, BEOS). */ +-#if (defined ALLEGRO_DOS) || (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS) ++ * but DOS, QNX, BEOS, HAIKU). */ ++#if (defined ALLEGRO_DOS) || (defined ALLEGRO_QNX) || (defined ALLEGRO_BEOS) || (defined ALLEGRO_HAIKU) + + + char *ascii_name[32] = +diff -urN allegro-4.3.10/src/beos/baccel.cpp allegro-4.3.10-haiku/src/beos/baccel.cpp +--- allegro-4.3.10/src/beos/baccel.cpp 2002-09-01 16:18:56.000000000 -0700 ++++ allegro-4.3.10-haiku/src/beos/baccel.cpp 2008-08-26 22:44:08.000000000 -0700 +@@ -20,7 +20,7 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile + #endif + +diff -urN allegro-4.3.10/src/beos/bdispsw.cpp allegro-4.3.10-haiku/src/beos/bdispsw.cpp +--- allegro-4.3.10/src/beos/bdispsw.cpp 2002-04-06 07:18:16.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/bdispsw.cpp 2008-08-26 22:44:30.000000000 -0700 +@@ -19,7 +19,7 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile + #endif + +diff -urN allegro-4.3.10/src/beos/bdwindow.cpp allegro-4.3.10-haiku/src/beos/bdwindow.cpp +--- allegro-4.3.10/src/beos/bdwindow.cpp 2005-10-27 13:57:00.000000000 -0700 ++++ allegro-4.3.10-haiku/src/beos/bdwindow.cpp 2008-08-26 22:44:57.000000000 -0700 +@@ -21,7 +21,7 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile + #endif + +diff -urN allegro-4.3.10/src/beos/bgfx.c allegro-4.3.10-haiku/src/beos/bgfx.c +--- allegro-4.3.10/src/beos/bgfx.c 2004-11-26 08:05:12.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/bgfx.c 2008-08-26 22:45:13.000000000 -0700 +@@ -19,9 +19,9 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile +-#endif ++#endif + + + +diff -urN allegro-4.3.10/src/beos/bgfxapi.cpp allegro-4.3.10-haiku/src/beos/bgfxapi.cpp +--- allegro-4.3.10/src/beos/bgfxapi.cpp 2002-12-07 13:12:30.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/bgfxapi.cpp 2008-08-26 22:45:26.000000000 -0700 +@@ -19,7 +19,7 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile + #endif + +diff -urN allegro-4.3.10/src/beos/bgfxdrv.c allegro-4.3.10-haiku/src/beos/bgfxdrv.c +--- allegro-4.3.10/src/beos/bgfxdrv.c 2001-11-06 07:30:48.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/bgfxdrv.c 2008-08-26 22:45:49.000000000 -0700 +@@ -18,9 +18,9 @@ + #include "allegro.h" + #include "allegro/internal/aintern.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile +-#endif ++#endif + + BEGIN_GFX_DRIVER_LIST + GFX_DRIVER_BEOS +diff -urN allegro-4.3.10/src/beos/bjoy.c allegro-4.3.10-haiku/src/beos/bjoy.c +--- allegro-4.3.10/src/beos/bjoy.c 2001-11-06 09:16:42.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/bjoy.c 2008-08-26 22:46:06.000000000 -0700 +@@ -19,7 +19,7 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile + #endif + +diff -urN allegro-4.3.10/src/beos/bjoyapi.cpp allegro-4.3.10-haiku/src/beos/bjoyapi.cpp +--- allegro-4.3.10/src/beos/bjoyapi.cpp 2004-07-04 07:44:50.000000000 -0700 ++++ allegro-4.3.10-haiku/src/beos/bjoyapi.cpp 2008-08-26 22:46:32.000000000 -0700 +@@ -19,9 +19,9 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile +-#endif ++#endif + + static BJoystick *be_joy = NULL; + static int32 num_devices, num_axes, num_hats, num_buttons; +diff -urN allegro-4.3.10/src/beos/bjoydrv.c allegro-4.3.10-haiku/src/beos/bjoydrv.c +--- allegro-4.3.10/src/beos/bjoydrv.c 2001-11-06 07:30:48.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/bjoydrv.c 2008-08-26 22:46:46.000000000 -0700 +@@ -18,9 +18,9 @@ + #include "allegro.h" + #include "allegro/internal/aintern.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile +-#endif ++#endif + + BEGIN_JOYSTICK_DRIVER_LIST + JOYSTICK_DRIVER_BEOS +diff -urN allegro-4.3.10/src/beos/bkey.c allegro-4.3.10-haiku/src/beos/bkey.c +--- allegro-4.3.10/src/beos/bkey.c 2004-12-03 12:56:28.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/bkey.c 2008-08-26 22:47:00.000000000 -0700 +@@ -19,9 +19,9 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile +-#endif ++#endif + + + +diff -urN allegro-4.3.10/src/beos/bkeyapi.cpp allegro-4.3.10-haiku/src/beos/bkeyapi.cpp +--- allegro-4.3.10/src/beos/bkeyapi.cpp 2005-10-27 13:57:00.000000000 -0700 ++++ allegro-4.3.10-haiku/src/beos/bkeyapi.cpp 2008-08-26 22:47:20.000000000 -0700 +@@ -22,9 +22,9 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile +-#endif ++#endif + + #define KEY_ID_PC101 0 // the docs say it should be 0x83ab, but they lie + +diff -urN allegro-4.3.10/src/beos/bkeydrv.c allegro-4.3.10-haiku/src/beos/bkeydrv.c +--- allegro-4.3.10/src/beos/bkeydrv.c 2001-11-06 07:30:48.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/bkeydrv.c 2008-08-26 22:47:53.000000000 -0700 +@@ -18,9 +18,9 @@ + #include "allegro.h" + #include "allegro/internal/aintern.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile +-#endif ++#endif + + _DRIVER_INFO _keyboard_driver_list[] = + { +diff -urN allegro-4.3.10/src/beos/bmidi.c allegro-4.3.10-haiku/src/beos/bmidi.c +--- allegro-4.3.10/src/beos/bmidi.c 2006-03-18 07:05:34.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/bmidi.c 2008-08-26 22:48:11.000000000 -0700 +@@ -19,9 +19,9 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile +-#endif ++#endif + + MIDI_DRIVER midi_beos = + { +diff -urN allegro-4.3.10/src/beos/bmidiapi.cpp allegro-4.3.10-haiku/src/beos/bmidiapi.cpp +--- allegro-4.3.10/src/beos/bmidiapi.cpp 2007-08-09 14:48:38.000000000 -0700 ++++ allegro-4.3.10-haiku/src/beos/bmidiapi.cpp 2008-08-26 22:48:29.000000000 -0700 +@@ -19,9 +19,9 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile +-#endif ++#endif + + + BMidiSynth *_be_midisynth = NULL; +diff -urN allegro-4.3.10/src/beos/bmididrv.c allegro-4.3.10-haiku/src/beos/bmididrv.c +--- allegro-4.3.10/src/beos/bmididrv.c 2001-11-06 07:30:48.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/bmididrv.c 2008-08-26 22:48:50.000000000 -0700 +@@ -18,9 +18,9 @@ + #include "allegro.h" + #include "allegro/internal/aintern.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile +-#endif ++#endif + + BEGIN_MIDI_DRIVER_LIST + MIDI_DRIVER_BEOS +diff -urN allegro-4.3.10/src/beos/bmousapi.cpp allegro-4.3.10-haiku/src/beos/bmousapi.cpp +--- allegro-4.3.10/src/beos/bmousapi.cpp 2005-10-27 13:57:00.000000000 -0700 ++++ allegro-4.3.10-haiku/src/beos/bmousapi.cpp 2008-08-26 22:49:09.000000000 -0700 +@@ -23,9 +23,9 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile +-#endif ++#endif + + #define MOUSE_THREAD_NAME "mouse driver" + #define MOUSE_THREAD_PRIORITY 60 +diff -urN allegro-4.3.10/src/beos/bmousdrv.c allegro-4.3.10-haiku/src/beos/bmousdrv.c +--- allegro-4.3.10/src/beos/bmousdrv.c 2001-11-06 07:30:48.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/bmousdrv.c 2008-08-26 22:49:25.000000000 -0700 +@@ -18,9 +18,9 @@ + #include "allegro.h" + #include "allegro/internal/aintern.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile +-#endif ++#endif + + + +diff -urN allegro-4.3.10/src/beos/bmouse.c allegro-4.3.10-haiku/src/beos/bmouse.c +--- allegro-4.3.10/src/beos/bmouse.c 2004-12-04 05:24:16.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/bmouse.c 2008-08-26 22:49:38.000000000 -0700 +@@ -19,9 +19,9 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile +-#endif ++#endif + + + +diff -urN allegro-4.3.10/src/beos/boverlay.cpp allegro-4.3.10-haiku/src/beos/boverlay.cpp +--- allegro-4.3.10/src/beos/boverlay.cpp 2002-11-15 03:53:40.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/boverlay.cpp 2008-08-26 22:49:53.000000000 -0700 +@@ -19,7 +19,7 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile + #endif + +diff -urN allegro-4.3.10/src/beos/bsnd.c allegro-4.3.10-haiku/src/beos/bsnd.c +--- allegro-4.3.10/src/beos/bsnd.c 2006-03-18 07:05:34.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/bsnd.c 2008-08-26 22:50:07.000000000 -0700 +@@ -19,9 +19,9 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile +-#endif ++#endif + + DIGI_DRIVER digi_beos = + { +diff -urN allegro-4.3.10/src/beos/bsndapi.cpp allegro-4.3.10-haiku/src/beos/bsndapi.cpp +--- allegro-4.3.10/src/beos/bsndapi.cpp 2006-03-18 07:05:34.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/bsndapi.cpp 2008-08-26 22:50:22.000000000 -0700 +@@ -20,7 +20,7 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile + #endif + +diff -urN allegro-4.3.10/src/beos/bsnddrv.c allegro-4.3.10-haiku/src/beos/bsnddrv.c +--- allegro-4.3.10/src/beos/bsnddrv.c 2001-11-06 07:30:48.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/bsnddrv.c 2008-08-26 22:50:52.000000000 -0700 +@@ -19,9 +19,9 @@ + #include "allegro/internal/aintern.h" + + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile +-#endif ++#endif + + BEGIN_DIGI_DRIVER_LIST + DIGI_DRIVER_BEOS +diff -urN allegro-4.3.10/src/beos/bsysapi.cpp allegro-4.3.10-haiku/src/beos/bsysapi.cpp +--- allegro-4.3.10/src/beos/bsysapi.cpp 2005-10-27 13:57:00.000000000 -0700 ++++ allegro-4.3.10-haiku/src/beos/bsysapi.cpp 2008-08-26 22:51:53.000000000 -0700 +@@ -27,9 +27,9 @@ + #include + #endif + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile +-#endif ++#endif + + #define SYS_THREAD_PRIORITY B_NORMAL_PRIORITY + #define SYS_THREAD_NAME "system driver" +diff -urN allegro-4.3.10/src/beos/bsysdrv.c allegro-4.3.10-haiku/src/beos/bsysdrv.c +--- allegro-4.3.10/src/beos/bsysdrv.c 2001-11-06 07:30:48.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/bsysdrv.c 2008-08-26 22:52:11.000000000 -0700 +@@ -18,9 +18,9 @@ + #include "allegro.h" + #include "allegro/internal/aintern.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile +-#endif ++#endif + + _DRIVER_INFO _system_driver_list[] = + { +diff -urN allegro-4.3.10/src/beos/bsystem.c allegro-4.3.10-haiku/src/beos/bsystem.c +--- allegro-4.3.10/src/beos/bsystem.c 2002-12-07 13:10:58.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/bsystem.c 2008-08-26 23:39:03.000000000 -0700 +@@ -19,11 +19,9 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile +-#endif +- +- ++#endif + + SYSTEM_DRIVER system_beos = { + SYSTEM_BEOS, +diff -urN allegro-4.3.10/src/beos/btimeapi.cpp allegro-4.3.10-haiku/src/beos/btimeapi.cpp +--- allegro-4.3.10/src/beos/btimeapi.cpp 2004-07-27 04:33:22.000000000 -0700 ++++ allegro-4.3.10-haiku/src/beos/btimeapi.cpp 2008-08-26 22:52:45.000000000 -0700 +@@ -19,7 +19,7 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile + #endif + +diff -urN allegro-4.3.10/src/beos/btimedrv.c allegro-4.3.10-haiku/src/beos/btimedrv.c +--- allegro-4.3.10/src/beos/btimedrv.c 2001-11-06 07:30:48.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/btimedrv.c 2008-08-26 22:53:00.000000000 -0700 +@@ -18,9 +18,9 @@ + #include "allegro.h" + #include "allegro/internal/aintern.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile +-#endif ++#endif + + _DRIVER_INFO _timer_driver_list[] = { + {TIMER_BEOS, &timer_beos, TRUE}, +diff -urN allegro-4.3.10/src/beos/btimer.c allegro-4.3.10-haiku/src/beos/btimer.c +--- allegro-4.3.10/src/beos/btimer.c 2004-08-21 19:57:14.000000000 -0700 ++++ allegro-4.3.10-haiku/src/beos/btimer.c 2008-08-26 22:53:13.000000000 -0700 +@@ -19,7 +19,7 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile + #endif + +diff -urN allegro-4.3.10/src/beos/bwindow.cpp allegro-4.3.10-haiku/src/beos/bwindow.cpp +--- allegro-4.3.10/src/beos/bwindow.cpp 2002-11-15 03:53:40.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/bwindow.cpp 2008-08-26 22:53:28.000000000 -0700 +@@ -19,7 +19,7 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile + #endif + +diff -urN allegro-4.3.10/src/beos/bwscreen.cpp allegro-4.3.10-haiku/src/beos/bwscreen.cpp +--- allegro-4.3.10/src/beos/bwscreen.cpp 2004-11-26 09:27:02.000000000 -0800 ++++ allegro-4.3.10-haiku/src/beos/bwscreen.cpp 2008-08-26 22:53:51.000000000 -0700 +@@ -19,7 +19,7 @@ + #include "allegro/internal/aintern.h" + #include "allegro/platform/aintbeos.h" + +-#ifndef ALLEGRO_BEOS ++#if !defined ALLEGRO_BEOS && !defined ALLEGRO_HAIKU + #error something is wrong with the makefile + #endif + +diff -urN allegro-4.3.10/src/midi.c allegro-4.3.10-haiku/src/midi.c +--- allegro-4.3.10/src/midi.c 2007-04-12 09:19:54.000000000 -0700 ++++ allegro-4.3.10-haiku/src/midi.c 2008-08-26 22:56:43.000000000 -0700 +@@ -1122,7 +1122,7 @@ + running_status = 0; + + while (p < end) { /* work through data stream */ +-#ifdef ALLEGRO_BEOS ++#if defined ALLEGRO_BEOS || defined ALLEGRO_HAIKU + /* Is there a bug in this routine, or in gcc under BeOS/x86? --PW */ + { int i; for (i=1; i; i--); } + #endif +diff -urN allegro-4.3.10/tools/dat2c.c allegro-4.3.10-haiku/tools/dat2c.c +--- allegro-4.3.10/tools/dat2c.c 2005-04-28 02:53:38.000000000 -0700 ++++ allegro-4.3.10-haiku/tools/dat2c.c 2008-08-23 20:44:06.000000000 -0700 +@@ -342,7 +342,7 @@ + } + + if (dat2c->lformat == lineformat_default) +-#if (defined ALLEGRO_UNIX || defined ALLEGRO_QNX || defined ALLEGRO_BEOS || defined ALLEGRO_MACOSX) ++#if (defined ALLEGRO_UNIX || defined ALLEGRO_QNX || defined ALLEGRO_BEOS || defined ALLEGRO_HAIKU || defined ALLEGRO_MACOSX) + dat2c->lformat = lineformat_unix; + #elif (defined ALLEGRO_WINDOWS || defined ALLEGRO_DOS) + dat2c->lformat = lineformat_dos; +diff -urN allegro-4.3.10/tools/datedit.c allegro-4.3.10-haiku/tools/datedit.c +--- allegro-4.3.10/tools/datedit.c 2007-10-08 09:23:36.000000000 -0700 ++++ allegro-4.3.10-haiku/tools/datedit.c 2008-08-23 20:42:07.000000000 -0700 +@@ -121,6 +121,8 @@ + #include "obj/dmc/plugins.h" + #elif defined ALLEGRO_BEOS + #include "obj/beos/plugins.h" ++ #elif defined ALLEGRO_HAIKU ++ #include "obj/beos/plugins.h" + #elif defined ALLEGRO_BCC32 + #include "obj/bcc32/plugins.h" + #elif defined ALLEGRO_MPW