 +#endif
 +#if defined __HAIKU__
 +  #define ALLEGRO_PLATFORM_STR  "Haiku"
++  #define ALLEGRO_HAVE_LIBPTHREAD 1
 +#endif
  #define ALLEGRO_LITTLE_ENDIAN
  #define ALLEGRO_CONSOLE_OK
  #define ALLEGRO_USE_CONSTRUCTOR
+diff -urN allegro-4.3.10/include/allegro/platform/alunixac.hin allegro-4.3.10-haiku/include/allegro/platform/alunixac.hin
+--- allegro-4.3.10/include/allegro/platform/alunixac.hin	2007-07-14 22:28:14.000000000 -0700
++++ allegro-4.3.10-haiku/include/allegro/platform/alunixac.hin	2008-09-12 04:39:53.000000000 -0700
+@@ -68,7 +68,7 @@
+ #undef ALLEGRO_DARWIN
+ 
+ /* Define if you have the pthread library. */
+-#undef ALLEGRO_HAVE_LIBPTHREAD
++/* #undef ALLEGRO_HAVE_LIBPTHREAD */
+ 
+ /* Define if constructor attribute is supported. */
+ #undef ALLEGRO_USE_CONSTRUCTOR
+@@ -159,7 +159,7 @@
+ 
+ /* Define as the return type of signal handlers (`int' or `void'). */
+ /* TODO: rename this */
+-#undef RETSIGTYPE
++/* #undef RETSIGTYPE */
+ 
+ /* Define to empty if `const' does not conform to ANSI C. */
+ #undef const
+diff -urN allegro-4.3.10/include/allegro/system.h allegro-4.3.10-haiku/include/allegro/system.h
+--- allegro-4.3.10/include/allegro/system.h	2008-01-02 02:39:24.000000000 -0800
++++ allegro-4.3.10-haiku/include/allegro/system.h	2008-09-12 05:18:17.000000000 -0700
+@@ -61,6 +61,7 @@
+ #define OSTYPE_QNX         AL_ID('Q','N','X',' ')
+ #define OSTYPE_UNIX        AL_ID('U','N','I','X')
+ #define OSTYPE_BEOS        AL_ID('B','E','O','S')
++#define OSTYPE_HAIKU       AL_ID('H','A','I','K')
+ #define OSTYPE_MACOS       AL_ID('M','A','C',' ')
+ #define OSTYPE_MACOSX      AL_ID('M','A','C','X')
+ 
 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-09-12 03:49:24.000000000 -0700

          /* 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-09-12 03:49:24.000000000 -0700

    #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-09-12 04:28:30.000000000 -0700
@@ -31,7 +31,13 @@
 #define ALLEGRO_HAVE_SYS_TIME_H 1
 
 /* describe this platform */
