Re: odbc patches - Mailing list pgsql-patches
From | Peter Eisentraut |
---|---|
Subject | Re: odbc patches |
Date | |
Msg-id | Pine.LNX.4.21.0006171358480.348-100000@localhost.localdomain Whole thread Raw |
In response to | Re: odbc patches (Bruce Momjian <pgman@candle.pha.pa.us>) |
Responses |
Re: odbc patches
|
List | pgsql-patches |
Sorry, I'm going to have to remove this. It breaks the build for those *not* using unixODBC. (Nice marketing move, but really... :) Bruce Momjian writes: > Sorry. Found your nice diff. Applied. Thanks. > > > > Hello. > > > > I have made the couple of mods required to make the odbc driver with > > postgres build and use unixODBC (http://www.unixodbc.org) > > > > This patch was applied against the postgresql-7.0beta1 build > > > > Any problems let me know. > > > > Nick Gorham > > > Only in .: pg-beta-unixODBC.patch > > diff -c -r -p1 ../pgsql/src/configure.in ./src/configure.in > > *** ../pgsql/src/configure.in Mon Feb 21 08:00:25 2000 > > --- ./src/configure.in Thu Mar 2 16:42:40 2000 > > *************** AC_SUBST(ODBCINSTDIR) > > *** 391,392 **** > > --- 391,434 ---- > > > > + #check for unixODBC > > + > > + use_unixODBC=no > > + AC_ARG_WITH(unixODBC, > > + [ --with-unixODBC[=DIR] Use unixODBC located in DIR], > > + [use_unixODBC=yes;unixODBC="$withval"],use_unixODBC=no) > > + > > + if test "x$use_unixODBC" = "xyes" > > + then > > + > > + # default to /usr if not specified > > + if test "x$unixODBC" = "x" > > + then > > + unixODBC="/usr"; > > + fi > > + > > + AC_ARG_WITH(unixODBC-includes, > > + [ --with-unixODBC-includes=DIR Find unixODBC headers in DIR], > > + unixODBC_includes="$withval",unixODBC_includes="$unixODBC/include") > > + > > + AC_ARG_WITH(unixODBC-libs, > > + [ --with-unixODBC-libs=DIR Find unixODBC libraries in DIR], > > + unixODBC_libs="$withval",unixODBC_libs="$unixODBC/lib") > > + > > + CPPFLAGS="$CPPFLAGS -I$unixODBC_includes" > > + AC_CHECK_HEADERS(sql.h sqlext.h odbcinst.h, > > + unixODBC_ok=yes;odbc_headers="$odbc_headers $ac_hdr",unixODBC_ok=no; break) > > + > > + if test "x$unixODBC_ok" != "xyes" > > + then > > + AC_MSG_ERROR([Unable to find the unixODBC headers in $1]) > > + fi > > + > > + save_LIBS="$LIBS" > > + LIBS="-L$unixODBC_libs $LIBS" > > + > > + AC_CHECK_LIB(odbcinst,SQLGetPrivateProfileString, > > + [AC_DEFINE(HAVE_SQLGETPRIVATEPROFILESTRING) > > + LIBS="$LIBS -lodbcinst"], > > + [LIBS="$save_LIBS"]) > > + fi > > + > > dnl Unless we specify the command line options > > diff -c -r -p1 ../pgsql/src/include/config.h.in ./src/include/config.h.in > > *** ../pgsql/src/include/config.h.in Mon Feb 21 08:00:25 2000 > > --- ./src/include/config.h.in Thu Mar 2 16:42:58 2000 > > *************** > > *** 310,311 **** > > --- 310,314 ---- > > > > + /* are we building against a libodbcinst */ > > + #undef HAVE_SQLGETPRIVATEPROFILESTRING > > + > > /* Set to 1 if you have <pwd.h> */ > > diff -c -r -p1 ../pgsql/src/interfaces/odbc/dlg_specific.c ./src/interfaces/odbc/dlg_specific.c > > *** ../pgsql/src/interfaces/odbc/dlg_specific.c Tue Nov 30 08:00:26 1999 > > --- ./src/interfaces/odbc/dlg_specific.c Thu Mar 2 16:43:40 2000 > > *************** > > *** 25,28 **** > > --- 25,30 ---- > > #include "gpps.h" > > + #ifndef HAVE_SQLGETPRIVATEPROFILESTRING > > #define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f) > > #define SQLWritePrivateProfileString(a,b,c,d) WritePrivateProfileString(a,b,c,d) > > + #endif > > #ifndef HAVE_STRICMP > > diff -c -r -p1 ../pgsql/src/interfaces/odbc/misc.h ./src/interfaces/odbc/misc.h > > *** ../pgsql/src/interfaces/odbc/misc.h Thu Dec 31 00:26:44 1998 > > --- ./src/interfaces/odbc/misc.h Thu Mar 2 16:43:23 2000 > > *************** > > *** 17,20 **** > > #ifndef WIN32 > > ! #include "gpps.h" > > #define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f) > > #endif > > --- 17,21 ---- > > #ifndef WIN32 > > ! #ifndef HAVE_SQLGETPRIVATEPROFILESTRING > > #define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f) > > + #endif > > #endif > > > -- Peter Eisentraut Sernanders väg 10:115 peter_e@gmx.net 75262 Uppsala http://yi.org/peter-e/ Sweden
pgsql-patches by date: