Thread: Compile troubles for RHEL 5.4 and tweaks
I thought I would pass along the steps I had to do to get Postgres drivers built on Red Hat 5.4 x86_64.
First, I had to build unixODBC-2.2.15pre since 2.2.14 had incorrect header files.
Here are the diffs from my changes to the postgres odbc code:
Edit misc.c
$ diff /content_dev/psqlodbc-08.04.0200/misc.c misc.c
152c152
< make_lstring_ifneeded(ConnectionClass *conn, const char *s, ssize_t len, BOOL ifallupper)
---
> make_lstring_ifneeded(ConnectionClass *conn, const SQLCHAR *s, ssize_t len, BOOL ifallupper)
Edit misc.h
$ diff /content_dev/psqlodbc-08.04.0200/misc.h misc.h
133c133
< char *make_lstring_ifneeded(ConnectionClass *, const char *s, ssize_t len, BOOL);
---
> char *make_lstring_ifneeded(ConnectionClass *, const SQLCHAR *s, ssize_t len, BOOL);
Edit odbcapi.c
$ diff /content_dev/psqlodbc-08.04.0200/odbcapi.c odbcapi.c
1115c1115,1116
< SQLROWSETSIZE *pcrow,
---
> //SQLROWSETSIZE *pcrow,
> SQLULEN *pcrow,
Hopefully this will make it easier for someone else.
Is there an easier way to get the latest ODBC driver installed?
Thanks.
-Don