From 2cc0b4ec3352f0f9bd189496b1ab3eeeeb89dc9f Mon Sep 17 00:00:00 2001
From: Mark Hellegers <mark@firedisk.net>
Date: Wed, 10 Jun 2015 23:30:01 +0200
Subject: [PATCH] Changes to make psqlodbc run on Haiku

---
 config/config.guess | 6 ++++++
 config/config.sub   | 2 +-
 configure.ac        | 2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/config/config.guess b/config/config.guess
index 0e30d56..9070f97 100755
--- a/config/config.guess
+++ b/config/config.guess
@@ -1131,6 +1131,12 @@ EOF
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
 	echo i586-pc-beos
 	exit 0 ;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	echo i586-pc-haiku
+	exit ;;
+    x86_64:Haiku:*:*)
+	echo x86_64-unknown-haiku
+	exit ;;
     SX-4:SUPER-UX:*:*)
 	echo sx4-nec-superux${UNAME_RELEASE}
 	exit 0 ;;
diff --git a/config/config.sub b/config/config.sub
index 9d7f733..19ac113 100755
--- a/config/config.sub
+++ b/config/config.sub
@@ -1140,7 +1140,7 @@ case $os in
 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -haiku*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
diff --git a/configure.ac b/configure.ac
index 5f4b9cb..3bffe33 100644
--- a/configure.ac
+++ b/configure.ac
@@ -102,7 +102,7 @@ fi
 # SQLCOLATTRIBUTE_SQLLEN check
 #
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-	[[#include <sql.h>>
+	[[#include <sql.h>
 	SQLRETURN  SQL_API SQLColAttribute
 	(SQLHSTMT StatementHandle,SQLUSMALLINT ColumnNumber,
 	SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttribute,
-- 
2.2.2

