diff -up htmltidy-20092812/build/gmake/Makefile.orig htmltidy-20092812/build/gmake/Makefile
--- htmltidy-20092812/build/gmake/Makefile.orig	2008-03-22 15:13:38.035389440 -0600
+++ htmltidy-20092812/build/gmake/Makefile	2010-05-18 13:58:13.713293824 -0600
@@ -58,8 +58,13 @@ SHELL=/bin/sh
 PROJECT=tidy
 
 # Installation variables.  Spaces OK, only dir create and file copy operations.
+ifeq ($(shell uname), Haiku)
+runinst_prefix=${DESTDIR}/boot/common
+devinst_prefix=${DESTDIR}/boot/common
+else
 runinst_prefix=/usr/local
 devinst_prefix=/usr/local
+endif
 
 bininst = ${runinst_prefix}/bin
 libinst = ${devinst_prefix}/lib
@@ -93,7 +98,10 @@ DOCDIR = ${TOPDIR}/htmldoc
 CC= gcc
 CFLAGS= -g -pedantic -Wall -I $(INCDIR)
 # flags only supported with gcc 3.x
+GCC_MAJOR= $(shell $(CC) -v 2>&1 | grep " version " | cut -d' ' -f3  | cut -d'.' -f1)
+ifneq ($(GCC_MAJOR), 2)
 CFLAGS += -Wunused-parameter
+endif
 
 OTHERCFLAGS=
 OTHERCFLAGS+= -D_DEBUG=1
diff -up htmltidy-20092812/include/platform.h.orig htmltidy-20092812/include/platform.h
--- htmltidy-20092812/include/platform.h.orig	2008-03-17 06:57:01.048758784 -0600
+++ htmltidy-20092812/include/platform.h	2010-05-18 13:54:14.034865152 -0600
@@ -296,6 +296,15 @@ extern "C" {
 #endif
 #endif
 
+/* Convenience defines for Haiku platforms */
+
+#if defined(__HAIKU__)
+#define HAIKU_OS
+#ifndef PLATFORM_NAME
+#define PLATFORM_NAME "Haiku"
+#endif
+#endif
+
 /* Convenience defines for Cygwin platforms */
 
 #if defined(__CYGWIN__)
@@ -417,7 +426,7 @@ extern "C" {
 #if PRESERVE_FILE_TIMES
 
 #ifndef HAS_FUTIME
-#if defined(CYGWIN_OS) || defined(BE_OS) || defined(OS2_OS) || defined(HPUX_OS) || defined(SOLARIS_OS) || defined(LINUX_OS) || defined(BSD_BASED_OS) || defined(MAC_OS) || defined(__MSL__) || defined(IRIX_OS) || defined(AIX_OS) || defined(__BORLANDC__)
+#if defined(CYGWIN_OS) || defined(BE_OS) || defined(HAIKU_OS) || defined(OS2_OS) || defined(HPUX_OS) || defined(SOLARIS_OS) || defined(LINUX_OS) || defined(BSD_BASED_OS) || defined(MAC_OS) || defined(__MSL__) || defined(IRIX_OS) || defined(AIX_OS) || defined(__BORLANDC__)
 #define HAS_FUTIME 0
 #else
 #define HAS_FUTIME 1
@@ -513,10 +522,10 @@ extern "C" {
 
 /* hack for gnu sys/types.h file which defines uint and ulong */
 
-#if defined(BE_OS) || defined(SOLARIS_OS) || defined(BSD_BASED_OS) || defined(OSF_OS) || defined(IRIX_OS) || defined(AIX_OS)
+#if defined(BE_OS) || defined(HAIKU_OS) || defined(SOLARIS_OS) || defined(BSD_BASED_OS) || defined(OSF_OS) || defined(IRIX_OS) || defined(AIX_OS)
 #include <sys/types.h>
 #endif
-#if !defined(HPUX_OS) && !defined(CYGWIN_OS) && !defined(MAC_OS_X) && !defined(BE_OS) && !defined(SOLARIS_OS) && !defined(BSD_BASED_OS) && !defined(OSF_OS) && !defined(IRIX_OS) && !defined(AIX_OS) && !defined(LINUX_OS)
+#if !defined(HPUX_OS) && !defined(CYGWIN_OS) && !defined(MAC_OS_X) && !defined(BE_OS) && !defined(HAIKU_OS) && !defined(SOLARIS_OS) && !defined(BSD_BASED_OS) && !defined(OSF_OS) && !defined(IRIX_OS) && !defined(AIX_OS) && !defined(LINUX_OS)
 # undef uint
 typedef unsigned int uint;
 #endif
