8000 postgrespro/postgres_cluster@3fe3acb · GitHub
[go: up one dir, main page]

Skip to content

Commit 3fe3acb

Browse files
committed
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
1 parent 85add42 commit 3fe3acb

File tree

5 files changed

+51
-3
lines changed
  • < 8000 div class="PRIVATE_TreeView-item-toggle PRIVATE_TreeView-item-toggle--end prc-TreeView-TreeViewItemToggle-gWUdE prc-TreeView-TreeViewItemToggleHover-nEgP- prc-TreeView-TreeViewItemToggleEnd-t-AEB">
    doc
  • src
  • 5 files changed

    +51
    -3
    lines changed

    configure.in

    Lines changed: 42 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -396,6 +396,48 @@ then
    396396
    fi
    397397
    AC_SUBST(ODBCINSTDIR)
    398398

    399+
    #check for unixODBC
    400+
    401+
    use_unixODBC=no
    402+
    AC_ARG_WITH(unixODBC,
    403+
    [ --with-unixODBC[=DIR] Use unixODBC located in DIR],
    404+
    [use_unixODBC=yes;unixODBC="$withval"],use_unixODBC=no)
    405+
    406+
    if test "x$use_unixODBC" = "xyes"
    407+
    then
    408+
    409+
    # default to /usr if not specified
    410+
    if test "x$unixODBC" = "x"
    411+
    then
    412+
    unixODBC="/usr";
    413+
    fi
    414+
    415+
    AC_ARG_WITH(unixODBC-includes,
    416+
    [ --with-unixODBC-includes=DIR Find unixODBC headers in DIR],
    417+
    unixODBC_includes="$withval",unixODBC_includes="$unixODBC/include")
    418+
    419+
    AC_ARG_WITH(unixODBC-libs,
    420+
    [ --with-unixODBC-libs=DIR Find unixODBC libraries in DIR],
    421+
    unixODBC_libs="$withval",unixODBC_libs="$unixODBC/lib")
    422+
    423+
    CPPFLAGS="$CPPFLAGS -I$unixODBC_includes"
    424+
    AC_CHECK_HEADERS(sql.h sqlext.h odbcinst.h,
    425+
    unixODBC_ok=yes;odbc_headers="$odbc_headers $ac_hdr",unixODBC_ok=no; break)
    426+
    427+
    if test "x$unixODBC_ok" != "xyes"
    428+
    then
    429+
    AC_MSG_ERROR([Unable to find the unixODBC headers in $1])
    430+
    fi
    431+
    432+
    save_LIBS="$LIBS"
    433+
    LIBS="-L$unixODBC_libs $LIBS"
    434+
    435+
    AC_CHECK_LIB(odbcinst,SQLGetPrivateProfileString,
    436+
    [AC_DEFINE(HAVE_SQLGETPRIVATEPROFILESTRING)
    437+
    LIBS="$LIBS -lodbcinst"],
    438+
    [LIBS="$save_LIBS"])
    439+
    fi
    440+
    399441
    dnl Unless we specify the command line options
    400442
    dnl --enable cassert to explicitly enable it
    401443
    dnl If you do not explicitly do it, it defaults to disabled

    doc/TODO

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -63,7 +63,7 @@ URGENT
    6363

    6464
    ADMIN
    6565

    66-
    * More access control over who can create tables and access the database
    66+
    * -More access control over who can create tables and use locks(Karal)
    6767
    * Test syslog functionality
    6868
    * Allow elog() to return error codes, not just messages
    6969
    * Allow international error message support and add error codes

    src/include/config.h.in

    Lines changed: 4 additions & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -8,7 +8,7 @@
    88
    * or in config.h afterwards. Of course, if you edit config.h, then your
    99
    * changes will be overwritten the next time you run configure.
    1010
    *
    11-
    * $Id: config.h.in,v 1.116 2000/06/04 15:06:32 petere Exp $
    11+
    * $Id: config.h.in,v 1.117 2000/06/09 16:03:07 momjian Exp $
    1212
    */
    1313

    1414
    #ifndef CONFIG_H
    @@ -305,6 +305,9 @@
    305305
    * Block of parameters for the ODBC code.
    306306
    */
    307307

    308+
    /* are we building against a libodbcinst */
    309+
    #undef HAVE_SQLGETPRIVATEPROFILESTRING
    310+
    308311
    /* Set to 1 if you have <pwd.h> */
    309312
    #undef HAVE_PWD_H
    310313

    src/interfaces/odbc/dlg_specific.c

    Lines changed: 2 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -23,8 +23,10 @@
    2323
    #ifndef WIN32
    2424
    #include <string.h>
    2525
    #include "gpps.h"
    26+
    #ifndef HAVE_SQLGETPRIVATEPROFILESTRING
    2627
    #define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f)
    2728
    #define SQLWritePrivateProfileString(a,b,c,d) WritePrivateProfileString(a,b,c,d)
    29+
    #endif
    2830
    #ifndef HAVE_STRICMP
    2931
    #define stricmp(s1,s2) strcasecmp(s1,s2)
    3032
    #define strnicmp(s1,s2,n) strncasecmp(s1,s2,n)

    src/interfaces/odbc/misc.h

    Lines changed: 2 additions & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -15,9 +15,10 @@
    1515
    #endif
    1616

    1717
    #ifndef WIN32
    18-
    #include "gpps.h"
    18+
    #ifndef HAVE_SQLGETPRIVATEPROFILESTRING
    1919
    #define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f)
    2020
    #endif
    21+
    #endif
    2122

    2223
    #include <stdio.h>
    2324

    0 commit comments

    Comments
     (0)
    0