diff -urN -x CYGWIN-PATCHES -x 'aclocal.m4*' -x autom4te.cache -x config.cache -x config.log -x config.status -x config.h -x config.h.in -x ABOUT-NLS -x Makefile.in.in -x Makevars.template -x '*SlackBuild*' -x '*.egg-info' -x '*.class' -x '*.pyc' -x '*.mo' -x '*.gmo' -x libwin32-0.24.orig -x '*.rej' -x '*.spec' -x '*.temp' -x 'APIFile-0.24-cyg.patch~' -x 'Process-CurrentID.patch~' -x 'README~' -x 'Win32-ODBC-iodbc.patch~' -x 'perl-libwin32-0.191-2.patch~' -x 'perl-libwin32-0.191-2.sh~' -x 'perl-libwin32-0.191-4.sh~' -x 'perl-libwin32-0.191-5.sh~' -x 'perl-libwin32-0.24-1.patch~' -x 'perl-libwin32-0.26-1.check~' -x 'perl-libwin32-0.26-1.patch~' -x 'perl-libwin32-0.26-1.sh~' -x 'perl-libwin32-0.27-1.patch~' -x 'perl-libwin32-0.27-1.sh~' -x 'perl-libwin32-0.28-1.sh~' -x 'perl-libwin32-0.28-2.cygport~' -x 'setup.hint~' -x '*.stackdump' -x COPYING -x INSTALL -x compile -x config-ml.in -x config.guess -x config.sub -x depcomp -x elisp-comp -x install-sh -x ltmain.sh -x mdate-sh -x missing -x mkinstalldirs -x py-compile -x symlink-tree -x texinfo.tex -x ylwrap -x config.rpath -x omf.make -x xmldocs.make -x gnome-doc-utils.make -x gnome-doc-utils.m4 -x intltool.m4 -x intltool-extract -x intltool-extract.in -x intltool-merge -x intltool-merge.in -x intltool-update -x intltool-update.in origsrc/libwin32-0.28/ODBC/Makefile.PL src/libwin32-0.28/ODBC/Makefile.PL
--- origsrc/libwin32-0.28/ODBC/Makefile.PL	2005-09-17 20:36:35.000000000 +0000
+++ src/libwin32-0.28/ODBC/Makefile.PL	2008-02-16 13:58:30.656250000 +0000
@@ -32,7 +32,9 @@
     my ($self) = @_;
     if ($^O eq "MSWin32" && $Config{cc} =~ /^gcc/i) {
 	$self->{LDLOADLIBS} .= " -lodbccp32";
-
+    }
+    if ($^O eq "cygwin") {
+	$self->{LDLOADLIBS} .= " -liodbc -liodbcinst";
     }
     return $self->SUPER::const_loadlibs;
 }
diff -urN -x CYGWIN-PATCHES -x 'aclocal.m4*' -x autom4te.cache -x config.cache -x config.log -x config.status -x config.h -x config.h.in -x ABOUT-NLS -x Makefile.in.in -x Makevars.template -x '*SlackBuild*' -x '*.egg-info' -x '*.class' -x '*.pyc' -x '*.mo' -x '*.gmo' -x libwin32-0.24.orig -x '*.rej' -x '*.spec' -x '*.temp' -x 'APIFile-0.24-cyg.patch~' -x 'Process-CurrentID.patch~' -x 'README~' -x 'Win32-ODBC-iodbc.patch~' -x 'perl-libwin32-0.191-2.patch~' -x 'perl-libwin32-0.191-2.sh~' -x 'perl-libwin32-0.191-4.sh~' -x 'perl-libwin32-0.191-5.sh~' -x 'perl-libwin32-0.24-1.patch~' -x 'perl-libwin32-0.26-1.check~' -x 'perl-libwin32-0.26-1.patch~' -x 'perl-libwin32-0.26-1.sh~' -x 'perl-libwin32-0.27-1.patch~' -x 'perl-libwin32-0.27-1.sh~' -x 'perl-libwin32-0.28-1.sh~' -x 'perl-libwin32-0.28-2.cygport~' -x 'setup.hint~' -x '*.stackdump' -x COPYING -x INSTALL -x compile -x config-ml.in -x config.guess -x config.sub -x depcomp -x elisp-comp -x install-sh -x ltmain.sh -x mdate-sh -x missing -x mkinstalldirs -x py-compile -x symlink-tree -x texinfo.tex -x ylwrap -x config.rpath -x omf.make -x xmldocs.make -x gnome-doc-utils.make -x gnome-doc-utils.m4 -x intltool.m4 -x intltool-extract -x intltool-extract.in -x intltool-merge -x intltool-merge.in -x intltool-update -x intltool-update.in origsrc/libwin32-0.28/ODBC/ODBC.xs src/libwin32-0.28/ODBC/ODBC.xs
--- origsrc/libwin32-0.28/ODBC/ODBC.xs	2005-09-17 20:36:36.000000000 +0000
+++ src/libwin32-0.28/ODBC/ODBC.xs	2008-02-16 13:59:34.468750000 +0000
@@ -29,10 +29,14 @@
 #include <windows.h>
 #include <stdio.h>
     
-    //  ODBC Stuff
+//  ODBC Stuff
+#ifdef __CYGWIN__
+#include <iodbcinst.h>
+#else
 #include <sql.h>
 #include <sqlext.h>
 #include <odbcinst.h>
+#endif
 
     //  Win32 Perl Stuff
 #if defined(__cplusplus)
@@ -366,7 +370,7 @@
     }
     strcpy((char *)h->Error->szSqlState, "");
     strcpy(h->Error->szError, "");
-    SQLError(h->henv, h->hdbc->hdbc, h->hstmt, (UCHAR *)h->Error->szSqlState, (long *)&(h->Error->ErrNum), (unsigned char *)h->Error->szError, ODBC_BUFF_SIZE, (short *)&cbErrorMsg);
+    SQLError(h->henv, h->hdbc->hdbc, h->hstmt, (SQLCHAR *)h->Error->szSqlState, (SQLINTEGER *)&(h->Error->ErrNum), (SQLCHAR *)h->Error->szError, ODBC_BUFF_SIZE, (SQLSMALLINT *)&cbErrorMsg);
 
         //  Next couple of lines should be NOT needed. If there is no error, then
         //  we should not have come here in the first place. If, however, there

