summaryrefslogtreecommitdiffstats
path: root/odbc-drivers
diff options
context:
space:
mode:
authorTreeve Jelbert2006-06-26 21:02:54 +0200
committerTreeve Jelbert2006-06-26 21:02:54 +0200
commit76a6dccfcf5cb2542a462c9af433aa70d14430b9 (patch)
treec53effb35f5cb4fd70d059f3e6299714b251103d /odbc-drivers
parentbc2ce79c31c6d0b06b654d42a87a814b89e398ac (diff)
odbcjdbc - fixes for libiodbc
Diffstat (limited to 'odbc-drivers')
-rwxr-xr-xodbc-drivers/odbcjdbc/BUILD6
-rw-r--r--odbc-drivers/odbcjdbc/HISTORY6
-rwxr-xr-xodbc-drivers/odbcjdbc/PRE_BUILD8
-rw-r--r--odbc-drivers/odbcjdbc/fix.diff74
4 files changed, 87 insertions, 7 deletions
diff --git a/odbc-drivers/odbcjdbc/BUILD b/odbc-drivers/odbcjdbc/BUILD
index 95791eca39..3a6e2068a9 100755
--- a/odbc-drivers/odbcjdbc/BUILD
+++ b/odbc-drivers/odbcjdbc/BUILD
@@ -1,3 +1,7 @@
cd $SOURCE_DIRECTORY/OdbcJdbc/Builds/Gcc.lin &&
-make -f makefile.linux
+if spell_ok unixodbc;then
+ make -f makefile.linux ODBCMANAGER=unixODBC
+else
+ make -f makefile.linux ODBCMANAGER=iODBC
+fi
diff --git a/odbc-drivers/odbcjdbc/HISTORY b/odbc-drivers/odbcjdbc/HISTORY
index a4f8bba073..e238c82fb2 100644
--- a/odbc-drivers/odbcjdbc/HISTORY
+++ b/odbc-drivers/odbcjdbc/HISTORY
@@ -1,3 +1,9 @@
+2006-06-26 Treeve Jelbert <treeve01@pi.be>
+ * PRE_BUILD: apply patches, removed sedit
+ * BUILD: make compatible with libiodbc
+ * fix.diff: add
+ integrates previous sedits and temporary patches
+
2006-06-22 Treeve Jelbert <treeve01@pi.be>
* DETAILS: version 2.0.0136
* FINAL, POST_RESURRECT: move to section level
diff --git a/odbc-drivers/odbcjdbc/PRE_BUILD b/odbc-drivers/odbcjdbc/PRE_BUILD
index 7e8a059922..27a04a89ee 100755
--- a/odbc-drivers/odbcjdbc/PRE_BUILD
+++ b/odbc-drivers/odbcjdbc/PRE_BUILD
@@ -1,7 +1,3 @@
default_pre_build &&
- cd $SOURCE_DIRECTORY/OdbcJdbc &&
-sedit "s|d:/Firebird|/usr/firebird|" Builds/makefile.environ &&
- cd Builds/Gcc.lin &&
-# can't use patch because file in msdos format
- sed -i "s|-g |-DPIC -fPIC $CFLAGS |;s|/opt|/usr|;s|/odbc||;s|-sh|$LDFLAGS -sh|" \
- makefile.linux
+ cd $SOURCE_DIRECTORY &&
+ patch -p1 <$SPELL_DIRECTORY/fix.diff
diff --git a/odbc-drivers/odbcjdbc/fix.diff b/odbc-drivers/odbcjdbc/fix.diff
new file mode 100644
index 0000000000..946910cc13
--- /dev/null
+++ b/odbc-drivers/odbcjdbc/fix.diff
@@ -0,0 +1,74 @@
+diff -uNr ODBC_V2-0-BETA/OdbcJdbc/Builds/Gcc.lin/makefile.linux ODBC_V2-0-BETA.cp/OdbcJdbc/Builds/Gcc.lin/makefile.linux
+--- ODBC_V2-0-BETA/OdbcJdbc/Builds/Gcc.lin/makefile.linux 2004-12-21 19:39:24.000000000 +0100
++++ ODBC_V2-0-BETA.cp/OdbcJdbc/Builds/Gcc.lin/makefile.linux 2006-06-26 15:39:04.000000000 +0200
+@@ -52,11 +52,11 @@
+ endif
+
+ ifdef INTERBASE
+-INCLUDEDIR := -I/opt/interbase/include -I/usr/include/odbc $(INCLUDEDIR)
+-EXTLIBDIR := -L/opt/interbase/lib -L/usr/lib/unixODBC $(EXTLIBDIR)
++INCLUDEDIR := -I/usr/interbase/include -I/usr/include $(INCLUDEDIR)
++EXTLIBDIR := -L/usr/interbase/lib -L/usr/lib/unixODBC $(EXTLIBDIR)
+ else
+-INCLUDEDIR = -I/opt/firebird/include -I/usr/include/odbc
+-EXTLIBDIR := -L/opt/firebird/lib -L/usr/lib/unixODBC $(EXTLIBDIR)
++INCLUDEDIR = -I/usr/firebird/include -I/usr/include
++EXTLIBDIR := -L/usr/firebird/lib -L/usr/lib/unixODBC $(EXTLIBDIR)
+ endif
+ #
+
+@@ -75,10 +75,10 @@
+ LIST_ODBCJDBCSETUPSRC = $(addprefix $(ODBCJDBCDIR)/, $(ODBCJDBCSETUPSRC_LINUX))
+ LIST_ODBCJDBCSETUPOBJ = $(addprefix $(BUILDDIR)/, $(ODBCJDBCSETUPSRC_LINUX:.cpp=.o))
+ #
+-COMPFLAGS = -g -w -D_REENTRANT -D_PTHREADS -DEXTERNAL $(INCLUDEDIR) -I$(FBINCDIR)
++COMPFLAGS = -DPIC -fPIC $(CFLAGS) -w -D_REENTRANT -D_PTHREADS -DEXTERNAL $(INCLUDEDIR) -I$(FBINCDIR)
+ #
+-#LINKFLAGS = -rdynamic -export-dynamic -shared
+-LINKFLAGS = -shared
++#LINKFLAGS = -rdynamic -export-dynamic -shared
++LINKFLAGS = -shared
+ EXTLIBS = $(EXTLIBDIR) -lcrypt -ldl
+ #
+ ISCDBC = libIscDbc.so
+diff -uNr ODBC_V2-0-BETA/OdbcJdbc/Builds/makefile.environ ODBC_V2-0-BETA.cp/OdbcJdbc/Builds/makefile.environ
+--- ODBC_V2-0-BETA/OdbcJdbc/Builds/makefile.environ 2003-12-13 19:27:26.000000000 +0100
++++ ODBC_V2-0-BETA.cp/OdbcJdbc/Builds/makefile.environ 2006-06-26 13:37:51.000000000 +0200
+@@ -3,8 +3,8 @@
+ #FBINCDIR = /mnt/third_party/interbase/sun5-2003-3-10/include
+ #FBLIBDIR = /mnt/third_party/interbase/sun5-2003-3-10/lib
+ #
+-FBINCDIR = d:/Firebird/include
+-FBLIBDIR = d:/Firebird/lib
++FBINCDIR = /usr/irebird/include
++FBLIBDIR = /usr/firebird/lib
+ #
+ ISCDBCDIR = ../../IscDbc
+ ODBCJDBCDIR = ../..
+diff -uNr ODBC_V2-0-BETA/OdbcJdbc/OdbcConnection.cpp ODBC_V2-0-BETA.cp/OdbcJdbc/OdbcConnection.cpp
+--- ODBC_V2-0-BETA/OdbcJdbc/OdbcConnection.cpp 2006-06-21 16:52:14.000000000 +0200
++++ ODBC_V2-0-BETA.cp/OdbcJdbc/OdbcConnection.cpp 2006-06-26 12:36:02.000000000 +0200
+@@ -1026,7 +1026,7 @@
+
+ void OdbcConnection::writeAttributeFileDSN(const char * attribute, const char * value)
+ {
+- SQLWriteFileDSN (savedsn, "ODBC", attribute, value);
++ SQLWriteFileDSN (savedsn, "ODBC", attribute, (char*)value);
+ }
+
+ SQLRETURN OdbcConnection::sqlGetFunctions(SQLUSMALLINT functionId, SQLUSMALLINT * supportedPtr)
+diff -uNr ODBC_V2-0-BETA/OdbcJdbc/OdbcJdbc.h ODBC_V2-0-BETA.cp/OdbcJdbc/OdbcJdbc.h
+--- ODBC_V2-0-BETA/OdbcJdbc/OdbcJdbc.h 2005-06-02 14:54:48.000000000 +0200
++++ ODBC_V2-0-BETA.cp/OdbcJdbc/OdbcJdbc.h 2006-06-23 19:13:10.000000000 +0200
+@@ -137,3 +137,11 @@
+
+ #endif
+
++#ifndef UINT
++#define UINT SQLUINTEGER
++#endif
++
++#ifndef DWORD
++#define DWORD SQLUINTEGER
++#endif
++