Hello community,

here is the log from the commit of package perl-DBD-ODBC for openSUSE:Factory 
checked in at 2020-02-04 19:55:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-DBD-ODBC (Old)
 and      /work/SRC/openSUSE:Factory/.perl-DBD-ODBC.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-DBD-ODBC"

Tue Feb  4 19:55:42 2020 rev:45 rq:769857 version:1.61

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-DBD-ODBC/perl-DBD-ODBC.changes      
2018-11-12 09:40:44.153248195 +0100
+++ /work/SRC/openSUSE:Factory/.perl-DBD-ODBC.new.26092/perl-DBD-ODBC.changes   
2020-02-04 19:55:43.653404688 +0100
@@ -1,0 +2,21 @@
+Sat Feb  1 21:35:37 UTC 2020 - Markus Beth <[email protected]>
+
+- updated to 1.61
+   see /usr/share/doc/packages/perl-DBD-ODBC/Changes
+
+  1.61 2020-01-30
+
+    [BUG FIXES]
+
+    Fix 12blob.t test by pali
+    Fix searching for ODBC libraries in system by pali (#15)
+
+    [ENHANCEMENTS]
+
+    use PERL_NO_GET_CONTEXT for more performance by markusbeth (#13)
+
+    [MISCELLANEOUS]
+
+    Fix travis builds for older Perls by pali
+
+-------------------------------------------------------------------

Old:
----
  DBD-ODBC-1.60.tar.gz

New:
----
  DBD-ODBC-1.61.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-DBD-ODBC.spec ++++++
--- /var/tmp/diff_new_pack.IfAFQy/_old  2020-02-04 19:55:44.289405059 +0100
+++ /var/tmp/diff_new_pack.IfAFQy/_new  2020-02-04 19:55:44.289405059 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-DBD-ODBC
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,13 @@
 
 
 Name:           perl-DBD-ODBC
-Version:        1.60
+Version:        1.61
 Release:        0
 %define cpan_name DBD-ODBC
 Summary:        ODBC Driver for DBI
 License:        Artistic-1.0 OR GPL-1.0-or-later
 Group:          Development/Libraries/Perl
-Url:            https://metacpan.org/release/%{cpan_name}
+URL:            https://metacpan.org/release/%{cpan_name}
 Source0:        
https://cpan.metacpan.org/authors/id/M/MJ/MJEVANS/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
 Patch0:         perl-DBD-ODBC-1.29-Makefile.diff

++++++ DBD-ODBC-1.60.tar.gz -> DBD-ODBC-1.61.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBD-ODBC-1.60/Changes new/DBD-ODBC-1.61/Changes
--- old/DBD-ODBC-1.60/Changes   2018-10-31 17:00:57.000000000 +0100
+++ new/DBD-ODBC-1.61/Changes   2020-01-30 15:59:57.000000000 +0100
@@ -5,6 +5,21 @@
 
 DBD::ODBC::Changes - Log of significant changes to the DBD::ODBC
 
+1.61 2020-01-30
+
+  [BUG FIXES]
+
+  Fix 12blob.t test by pali
+  Fix searching for ODBC libraries in system by pali (#15)
+
+  [ENHANCEMENTS]
+
+  use PERL_NO_GET_CONTEXT for more performance by markusbeth (#13)
+
+  [MISCELLANEOUS]
+
+  Fix travis builds for older Perls by pali
+
 1.60 2018-10-31
 
   [BUG FIXES]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBD-ODBC-1.60/META.yml new/DBD-ODBC-1.61/META.yml
--- old/DBD-ODBC-1.60/META.yml  2018-10-31 16:58:52.000000000 +0100
+++ new/DBD-ODBC-1.61/META.yml  2020-01-30 16:00:25.000000000 +0100
@@ -1,7 +1,7 @@
 #--- #YAML:1.0
 name: DBD-ODBC
 abstract: ODBC DBD for Perl DBI
-version: 1.60
+version: 1.61
 version_from: ODBC.pm
 author:
   - Martin J. Evans <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBD-ODBC-1.60/Makefile.PL 
new/DBD-ODBC-1.61/Makefile.PL
--- old/DBD-ODBC-1.60/Makefile.PL       2018-10-31 15:54:52.000000000 +0100
+++ new/DBD-ODBC-1.61/Makefile.PL       2020-01-30 13:09:46.000000000 +0100
@@ -310,9 +310,15 @@
         $opts{dynamic_lib} = { OTHERLDFLAGS => "$ilibpath" };
     }
     else {
-        # remove lib prefix and .so suffix so "-l" style link can be used
-        $ilibname =~ s/^lib(odbc.*?)\.\w+$/$1/;
-        $opts{LIBS} = "-L$odbclibdir -l$ilibname";
+        if ($ilibname =~ /^lib(odbc[^.]*?)\.\w+$/) {
+            # remove lib prefix and .so suffix so "-l" style link can be used
+            $ilibname = $1;
+            $opts{LIBS} = "-L$odbclibdir -l$ilibname";
+        } else {
+            # cannot use "-l" style link so specify pull path
+            $opts{LIBS} = q{};
+            $opts{dynamic_lib} = { OTHERLDFLAGS => "$ilibpath" };
+        }
         warn "Warning: LD_LIBRARY_PATH doesn't include $odbclibdir\n"
             unless (exists($ENV{LD_LIBRARY_PATH}) &&
                         ($ENV{LD_LIBRARY_PATH} =~ /\Q$odbclibdir/));
@@ -573,9 +579,15 @@
             $opts{dynamic_lib} = { OTHERLDFLAGS => "$ilibpath" };
         }
         else {
-            # remove lib prefix and .so suffix so "-l" style link can be used
-            $ilibname =~ s/^lib(iodbc.*?)\.\w+$/$1/;
-            $opts{LIBS} = "-L$odbclibdir -l$ilibname";
+            if ($ilibname =~ /^lib(iodbc[^.]*?)\.\w+$/) {
+                # remove lib prefix and .so suffix so "-l" style link can be 
used
+                $ilibname = $1;
+                $opts{LIBS} = "-L$odbclibdir -l$ilibname";
+            } else {
+                # cannot use "-l" style link so specify pull path
+                $opts{LIBS} = q{};
+                $opts{dynamic_lib} = { OTHERLDFLAGS => "$ilibpath" };
+            }
             warn "Warning: LD_LIBRARY_PATH doesn't include $odbchome/lib\n"
                 if (!defined($ENV{LD_LIBRARY_PATH})) ||
                     ($ENV{LD_LIBRARY_PATH} =~ /\Q$odbclibdir/);
@@ -638,8 +650,15 @@
             $ilibpath = $ilibs[0];
             $ilibpath =~ s/(.*\.$soext).*$/$1/;
             $ilibname = basename($ilibpath);
-            $ilibname =~ s/^lib(odbc.*)\.\w+$/$1/;
-            $opts{LIBS} = "-L$odbclibdir -l$ilibname";
+            if ($ilibname =~ /^lib(odbc[^.]*?)\.\w+$/) {
+                # remove lib prefix and .so suffix so "-l" style link can be 
used
+                $ilibname = $1;
+                $opts{LIBS} = "-L$odbclibdir -l$ilibname";
+            } else {
+                # cannot use "-l" style link so specify pull path
+                $opts{LIBS} = q{};
+                $opts{dynamic_lib} = { OTHERLDFLAGS => "$ilibpath" };
+            }
             warn "Warning: LD_LIBRARY_PATH=", ($ENV{LD_LIBRARY_PATH} ? 
$ENV{LD_LIBRARY_PATH} : ""), " doesn't include $odbclibdir\n"
                 unless (exists($ENV{LD_LIBRARY_PATH}) &&
                             ($ENV{LD_LIBRARY_PATH} =~ /\Q$odbclibdir/));
@@ -647,8 +666,15 @@
             $ilibpath = $ilibs[0];
             $ilibpath =~ s/(.*\.$dlext).*$/$1/;
             $ilibname = basename($ilibpath);
-            $ilibname =~ s/^lib(odbc.*)\.\w+$/$1/;
-            $opts{LIBS} = "-L$odbclibdir -l$ilibname";
+            if ($ilibname =~ /^lib(odbc[^.]*?)\.\w+$/) {
+                # remove lib prefix and .so suffix so "-l" style link can be 
used
+                $ilibname = $1;
+                $opts{LIBS} = "-L$odbclibdir -l$ilibname";
+            } else {
+                # cannot use "-l" style link so specify pull path
+                $opts{LIBS} = q{};
+                $opts{dynamic_lib} = { OTHERLDFLAGS => "$ilibpath" };
+            }
         } elsif (@ilibs = grep /\.($arext)$/, @libs) {
             $ilibpath = $ilibs[0];
             $ilibname = basename($ilibpath);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBD-ODBC-1.60/ODBC.h new/DBD-ODBC-1.61/ODBC.h
--- old/DBD-ODBC-1.60/ODBC.h    2014-04-24 15:13:23.000000000 +0200
+++ new/DBD-ODBC-1.61/ODBC.h    2020-01-30 15:57:53.000000000 +0100
@@ -7,7 +7,9 @@
  */
 #include "dbdodbc.h"   /* Get SQL_* defs *before* loading DBIXS.h      */
 
-#define NEED_DBIXS_VERSION 9
+#define NEED_DBIXS_VERSION 93
+
+#define PERL_NO_GET_CONTEXT
 
 #include <DBIXS.h>     /* from DBI. Load this after dbdodbc.h */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBD-ODBC-1.60/ODBC.pm new/DBD-ODBC-1.61/ODBC.pm
--- old/DBD-ODBC-1.60/ODBC.pm   2018-10-31 17:01:18.000000000 +0100
+++ new/DBD-ODBC-1.61/ODBC.pm   2020-01-30 16:00:17.000000000 +0100
@@ -18,7 +18,7 @@
 # see discussion on dbi-users at
 # http://www.nntp.perl.org/group/perl.dbi.dev/2010/07/msg6096.html and
 # http://www.dagolden.com/index.php/369/version-numbers-should-be-boring/
-$DBD::ODBC::VERSION = '1.60';
+$DBD::ODBC::VERSION = '1.61';
 
 {
     ## no critic (ProhibitMagicNumbers ProhibitExplicitISA)
@@ -671,7 +671,7 @@
 
 =head1 VERSION
 
-This documentation refers to DBD::ODBC version 1.60.
+This documentation refers to DBD::ODBC version 1.61.
 
 
 =head1 WARNING
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBD-ODBC-1.60/dbdimp.c new/DBD-ODBC-1.61/dbdimp.c
--- old/DBD-ODBC-1.60/dbdimp.c  2018-10-31 15:54:52.000000000 +0100
+++ new/DBD-ODBC-1.61/dbdimp.c  2020-01-31 10:18:15.000000000 +0100
@@ -100,8 +100,8 @@
                        size_t max_msg);
 static SQLSMALLINT default_parameter_type(
     char *why, imp_sth_t *imp_sth, phs_t *phs);
-static int post_connect(SV *dbh, imp_dbh_t *imp_dbh, SV *attr);
-static int set_odbc_version(SV *dbh, imp_dbh_t *imp_dbh, SV* attr);
+static int post_connect(pTHX_ SV *dbh, imp_dbh_t *imp_dbh, SV *attr);
+static int set_odbc_version(pTHX_ SV *dbh, imp_dbh_t *imp_dbh, SV* attr);
 static const char *S_SqlTypeToString (SWORD sqltype);
 static const char *S_SqlCTypeToString (SWORD sqltype);
 static const char *cSqlTables = "SQLTables(%s,%s,%s,%s)";
@@ -113,11 +113,11 @@
 static SQLRETURN bind_columns(SV *h, imp_sth_t *imp_sth);
 static void AllODBCErrors(HENV henv, HDBC hdbc, HSTMT hstmt, int output,
                           PerlIO *logfp);
-static int check_connection_active(SV *h);
-static int build_results(SV *sth, imp_sth_t *imp_sth,
+static int check_connection_active(pTHX_ SV *h);
+static int build_results(pTHX_ SV *sth, imp_sth_t *imp_sth,
                          SV *dbh, imp_dbh_t *imp_dbh,
                          RETCODE orc);
-static int  rebind_param(SV *sth, imp_sth_t *imp_sth, imp_dbh_t *imp_dbh, 
phs_t *phs);
+static int  rebind_param(pTHX_ SV *sth, imp_sth_t *imp_sth, imp_dbh_t 
*imp_dbh, phs_t *phs);
 static void get_param_type(SV *sth, imp_sth_t *imp_sth, imp_dbh_t *imp_dbh, 
phs_t *phs);
 static void check_for_unicode_param(imp_sth_t *imp_sth, phs_t *phs);
 
@@ -178,7 +178,9 @@
 
 void dbd_init(dbistate_t *dbistate)
 {
-   DBIS = dbistate;
+   dTHX;
+   DBISTATE_INIT;
+   PERL_UNUSED_ARG(dbistate);
 }
 
 
@@ -208,6 +210,7 @@
 
 static void odbc_clear_result_set(SV *sth, imp_sth_t *imp_sth)
 {
+   dTHX;
    SV *value;
    char *key;
    I32 keylen;
@@ -250,7 +253,7 @@
 
 
 
-static void odbc_handle_outparams(imp_sth_t *imp_sth, int debug)
+static void odbc_handle_outparams(pTHX_ imp_sth_t *imp_sth, int debug)
 {
    int i = (imp_sth->out_params_av) ? AvFILL(imp_sth->out_params_av)+1 : 0;
    if (debug >= 3)
@@ -341,7 +344,7 @@
 
 
 
-static int build_results(SV *sth,
+static int build_results(pTHX_ SV *sth,
                          imp_sth_t *imp_sth,
                          SV *dbh,
                          imp_dbh_t *imp_dbh,
@@ -407,6 +410,7 @@
 int odbc_discon_all(SV *drh,
                     imp_drh_t *imp_drh)
 {
+   dTHX;
    /* The disconnect_all concept is flawed and needs more work */
    if (!PL_dirty && !SvTRUE(get_sv("DBI::PERL_ENDING",0))) {
        DBIh_SET_ERR_CHAR(drh, (imp_xxh_t*)imp_drh, Nullch, 1,
@@ -422,13 +426,14 @@
 SQLLEN dbd_db_execdirect(SV *dbh,
                       SV *statement )
 {
+   dTHX;
    D_imp_dbh(dbh);
    SQLRETURN ret;                               /* SQLxxx return value */
    SQLLEN rows;
    SQLHSTMT stmt;
    int dbh_active;
 
-   if ((dbh_active = check_connection_active(dbh)) == 0) return 0;
+   if ((dbh_active = check_connection_active(aTHX_ dbh)) == 0) return 0;
 
    ret = SQLAllocHandle(SQL_HANDLE_STMT,  imp_dbh->hdbc, &stmt );
    if (!SQL_SUCCEEDED(ret)) {
@@ -460,7 +465,7 @@
 
        sql_copy = sv_mortalcopy(statement);
 
-       SV_toWCHAR(sql_copy);
+       SV_toWCHAR(aTHX_ sql_copy);
 
        wsql = (SQLWCHAR *)SvPV(sql_copy, wsql_len);
 
@@ -598,6 +603,7 @@
     SV *pwd,
     SV *attr)
 {
+   dTHX;
 #ifndef WITH_UNICODE
    if (DBIc_TRACE(imp_dbh, CONNECTION_TRACING, 0, 0))
        TRACE0(imp_dbh, "non-Unicode login6_sv\n");
@@ -626,7 +632,7 @@
       dbd_error(dbh, rc, "db_login6_sv/SQLAllocHandle(env)");
       if (!SQL_SUCCEEDED(rc)) return 0;
 
-      if (set_odbc_version(dbh, imp_dbh, attr) != 1) return 0;
+      if (set_odbc_version(aTHX_ dbh, imp_dbh, attr) != 1) return 0;
    }
    imp_dbh->henv = imp_drh->henv;      /* needed for dbd_error */
 
@@ -706,8 +712,10 @@
        sv_catpv(dbname, ";");
        /*sv_catpvf(dbname, ";UID=%s;PWD=%s;",
         SvPV_nolen(uid), SvPV_nolen(pwd));*/
+       /*
        if (DBIc_TRACE(imp_dbh, CONNECTION_TRACING, 0, 0))
            TRACE1(imp_dbh, "Now using dbname = %s\n", SvPV_nolen(dbname));
+       */
    }
 
    if (DBIc_TRACE(imp_dbh, CONNECTION_TRACING, 0, 0))
@@ -715,7 +723,7 @@
              SvPV_nolen(dbname), neatsvpv(uid, 0));
 
    wconstr = sv_mortalcopy(dbname);
-   utf8sv_to_wcharsv(wconstr);
+   utf8sv_to_wcharsv(aTHX_ wconstr);
 
    /* The following is to work around a bug in SQLDriverConnectW in unixODBC
       which in at least 2.2.11 (and probably up to 2.2.13 official release
@@ -757,10 +765,13 @@
        }
 #endif
        if (SQL_SUCCEEDED(rc)) {
-           imp_dbh->out_connect_string = sv_newwvn(wout_str, wout_str_len);
+           imp_dbh->out_connect_string = sv_newwvn(aTHX_ wout_str,
+                                                   wout_str_len);
+           /*
            if (DBIc_TRACE(imp_dbh, CONNECTION_TRACING, 0, 0))
                TRACE1(imp_dbh, "Out connection string: %s\n",
                       SvPV_nolen(imp_dbh->out_connect_string));
+           */
        }
    }
 
@@ -804,10 +815,10 @@
                   neatsvpv(dbname, 0), neatsvpv(uid, 0));
 
        wconstr = sv_mortalcopy(dbname);
-       utf8sv_to_wcharsv(wconstr);
+       utf8sv_to_wcharsv(aTHX_ wconstr);
        if (SvOK(uid)) {
            wuid = sv_mortalcopy(uid);
-           utf8sv_to_wcharsv(wuid);
+           utf8sv_to_wcharsv(aTHX_ wuid);
            wuidp = (SQLWCHAR *)SvPV_nolen(wuid);
            uid_len = SvCUR(wuid) / sizeof(SQLWCHAR);
        } else {
@@ -817,7 +828,7 @@
 
        if (SvOK(pwd)) {
            wpwd = sv_mortalcopy(pwd);
-           utf8sv_to_wcharsv(wpwd);
+           utf8sv_to_wcharsv(aTHX_ wpwd);
            wpwdp = (SQLWCHAR *)SvPV_nolen(wpwd);
            pwd_len = SvCUR(wpwd) / sizeof(SQLWCHAR);
        } else {
@@ -845,7 +856,7 @@
        dbd_error(dbh, rc, "db_login6sv/SQLConnectW");
    }
 
-   if (post_connect(dbh, imp_dbh, attr) != 1) return 0;
+   if (post_connect(aTHX_ dbh, imp_dbh, attr) != 1) return 0;
 
    imp_drh->connects++;
    DBIc_IMPSET_on(imp_dbh);    /* imp_dbh set up now                   */
@@ -884,6 +895,7 @@
     char *pwd,
     SV *attr)
 {
+   dTHX;
    D_imp_drh_from_dbh;
 
    RETCODE rc;
@@ -901,7 +913,7 @@
       dbd_error(dbh, rc, "db_login6/SQLAllocHandle(env)");
       if (!SQL_SUCCEEDED(rc)) return 0;
 
-      if (set_odbc_version(dbh, imp_dbh, attr) != 1) return 0;
+      if (set_odbc_version(aTHX_ dbh, imp_dbh, attr) != 1) return 0;
    }
    imp_dbh->henv = imp_drh->henv;      /* needed for dbd_error */
 
@@ -1008,7 +1020,8 @@
                               &wout_str_len,
                               SQL_DRIVER_NOPROMPT);
        if (SQL_SUCCEEDED(rc)) {
-           imp_dbh->out_connect_string = sv_newwvn(wout_str, wout_str_len);
+           imp_dbh->out_connect_string = sv_newwvn(aTHX_ wout_str,
+                                                   wout_str_len);
            if (DBIc_TRACE(imp_dbh, CONNECTION_TRACING, 0, 0))
                TRACE1(imp_dbh, "Out connection string: %s\n",
                       SvPV_nolen(imp_dbh->out_connect_string));
@@ -1155,7 +1168,7 @@
        dbd_error(dbh, rc, "db_login6/SQLConnect");
    }
 
-   if (post_connect(dbh, imp_dbh, attr) != 1) return 0;
+   if (post_connect(aTHX_ dbh, imp_dbh, attr) != 1) return 0;
 
    imp_drh->connects++;
    DBIc_IMPSET_on(imp_dbh);    /* imp_dbh set up now                   */
@@ -1167,6 +1180,7 @@
 
 int dbd_db_disconnect(SV *dbh, imp_dbh_t *imp_dbh)
 {
+   dTHX;
    RETCODE rc;
    D_imp_drh_from_dbh;
    SQLUINTEGER autoCommit = SQL_AUTOCOMMIT_OFF;
@@ -1284,6 +1298,7 @@
     HDBC hdbc,
     HSTMT hstmt)
 {
+    dTHX;
     D_imp_xxh(h);
     int error_found = 0;
 
@@ -1451,6 +1466,7 @@
 ------------------------------------------------------------*/
 void dbd_error(SV *h, RETCODE err_rc, char *what)
 {
+    dTHX;
     D_imp_xxh(h);
 
     struct imp_dbh_st *imp_dbh = NULL;
@@ -1499,6 +1515,7 @@
 -------------------------------------------------------------------------*/
 void dbd_preparse(imp_sth_t *imp_sth, char *statement)
 {
+   dTHX;
    enum STATES {DEFAULT, LITERAL, COMMENT, LINE_COMMENT};
    enum STATES state = DEFAULT;
    enum STYLES {
@@ -1663,6 +1680,7 @@
     SV *table,
     SV *table_type)
 {
+    dTHX;
     D_imp_dbh(dbh);
     D_imp_sth(sth);
     RETCODE rc;
@@ -1685,7 +1703,7 @@
                       (table && SvOK(table)) ? SvPV_nolen(table) : "undef",
                       (table_type && SvOK(table_type)) ? 
SvPV_nolen(table_type) : "undef");
 
-    if ((dbh_active = check_connection_active(dbh)) == 0) return 0;
+    if ((dbh_active = check_connection_active(aTHX_ dbh)) == 0) return 0;
 
     rc = SQLAllocHandle(SQL_HANDLE_STMT, imp_dbh->hdbc, &imp_sth->hstmt);
     if (rc != SQL_SUCCESS) {
@@ -1732,22 +1750,22 @@
            /*printf("CATALOG OK %"IVdf" /%s/\n", SvCUR(catalog), 
SvPV_nolen(catalog));*/
 
            copy = sv_mortalcopy(catalog);
-           SV_toWCHAR(copy);
+           SV_toWCHAR(aTHX_ copy);
            wcatalog = (SQLWCHAR *)SvPV(copy, wlen);
        }
        if (SvOK(schema)) {
            copy = sv_mortalcopy(schema);
-           SV_toWCHAR(copy);
+           SV_toWCHAR(aTHX_ copy);
            wschema = (SQLWCHAR *)SvPV(copy, wlen);
        }
        if (SvOK(table)) {
            copy = sv_mortalcopy(table);
-           SV_toWCHAR(copy);
+           SV_toWCHAR(aTHX_ copy);
            wtable = (SQLWCHAR *)SvPV(copy, wlen);
        }
        if (SvOK(table_type)) {
            copy = sv_mortalcopy(table_type);
-           SV_toWCHAR(copy);
+           SV_toWCHAR(aTHX_ copy);
            wtype = (SQLWCHAR *)SvPV(copy, wlen);
        }
        /*
@@ -1785,7 +1803,7 @@
       imp_sth->hstmt = SQL_NULL_HSTMT;
       return 0;
    }
-   return build_results(sth, imp_sth, dbh, imp_dbh, rc);
+   return build_results(aTHX_ sth, imp_sth, dbh, imp_dbh, rc);
 
 }
 
@@ -1798,6 +1816,7 @@
     char *table,
     char *table_type)
 {
+   dTHX;
    D_imp_dbh(dbh);
    D_imp_sth(sth);
    RETCODE rc;
@@ -1809,7 +1828,7 @@
 
    imp_sth->done_desc = 0;
 
-   if ((dbh_active = check_connection_active(dbh)) == 0) return 0;
+   if ((dbh_active = check_connection_active(aTHX_ dbh)) == 0) return 0;
 
    rc = SQLAllocHandle(SQL_HANDLE_STMT, imp_dbh->hdbc, &imp_sth->hstmt);
    if (rc != SQL_SUCCESS) {
@@ -1847,7 +1866,7 @@
       imp_sth->hstmt = SQL_NULL_HSTMT;
       return 0;
    }
-   return build_results(sth, imp_sth, dbh, imp_dbh, rc);
+   return build_results(aTHX_ sth, imp_sth, dbh, imp_dbh, rc);
 }
 #endif  /* OLD_ONE_BEFORE_SCALARS */
 
@@ -1860,6 +1879,7 @@
     char *schema,
     char *table)
 {
+   dTHX;
    D_imp_dbh(dbh);
    D_imp_sth(sth);
    RETCODE rc;
@@ -1871,7 +1891,7 @@
 
    imp_sth->done_desc = 0;
 
-   if ((dbh_active = check_connection_active(dbh)) == 0) return 0;
+   if ((dbh_active = check_connection_active(aTHX_ dbh)) == 0) return 0;
 
    rc = SQLAllocHandle(SQL_HANDLE_STMT, imp_dbh->hdbc, &imp_sth->hstmt);
    if (rc != SQL_SUCCESS) {
@@ -1912,7 +1932,7 @@
       return 0;
    }
 
-   return build_results(sth, imp_sth, dbh, imp_dbh, rc);
+   return build_results(aTHX_ sth, imp_sth, dbh, imp_dbh, rc);
 }
 
 
@@ -1926,6 +1946,7 @@
     int unique,
     int quick)
 {
+   dTHX;
    D_imp_dbh(dbh);
    D_imp_sth(sth);
    RETCODE rc;
@@ -1939,7 +1960,7 @@
 
    imp_sth->done_desc = 0;
 
-   if ((dbh_active = check_connection_active(dbh)) == 0) return 0;
+   if ((dbh_active = check_connection_active(aTHX_ dbh)) == 0) return 0;
 
    rc = SQLAllocHandle(SQL_HANDLE_STMT, imp_dbh->hdbc, &imp_sth->hstmt);
    if (rc != SQL_SUCCESS) {
@@ -1987,7 +2008,7 @@
        return 0;
    }
 
-   return build_results(sth, imp_sth, dbh, imp_dbh, rc);
+   return build_results(aTHX_ sth, imp_sth, dbh, imp_dbh, rc);
 }
 
 
@@ -2010,6 +2031,7 @@
    char *statement,
    SV *attribs)
 {
+    dTHX;
     SV *sql;
 
     sql = sv_newmortal();
@@ -2037,6 +2059,7 @@
     SV *statement,
     SV *attribs)
 {
+   dTHX;
    D_imp_dbh_from_sth;
    RETCODE rc;
    int dbh_active;
@@ -2068,7 +2091,7 @@
               (long)imp_dbh->odbc_query_timeout);
    }
 
-   if ((dbh_active = check_connection_active(sth)) == 0) return 0;
+   if ((dbh_active = check_connection_active(aTHX_ sth)) == 0) return 0;
 
    rc = SQLAllocHandle(SQL_HANDLE_STMT, imp_dbh->hdbc, &imp_sth->hstmt);
    if (!SQL_SUCCEEDED(rc)) {
@@ -2185,7 +2208,7 @@
 #else
            SvUTF8_on(sql_copy);
 #endif
-           SV_toWCHAR(sql_copy);
+           SV_toWCHAR(aTHX_ sql_copy);
 
            wsql = (SQLWCHAR *)SvPV(sql_copy, wsql_len);
 
@@ -2352,6 +2375,7 @@
  */
 int dbd_describe(SV *sth, imp_sth_t *imp_sth, int more)
 {
+    dTHX;
     SQLRETURN rc;                           /* ODBC fn return value */
     SQLSMALLINT column_n;                   /* column we are describing */
     imp_fbh_t *fbh;
@@ -2809,6 +2833,7 @@
 int dbd_st_execute(
     SV *sth, imp_sth_t *imp_sth)
 {
+    dTHX;
     IV ret;
 
     if (DBIc_TRACE(imp_sth, DBD_TRACING, 0, 3))
@@ -2831,6 +2856,7 @@
 IV dbd_st_execute_iv(
     SV *sth, imp_sth_t *imp_sth)
 {
+    dTHX;
     RETCODE rc;
     D_imp_dbh_from_sth;
     int outparams = 0;
@@ -2872,7 +2898,7 @@
             while( (sv = hv_iternextsv(hv, &key, &retlen)) != NULL ) {
                 if (sv != &PL_sv_undef) {
                     phs_t *phs = (phs_t*)(void*)SvPVX(sv);
-                    if (!rebind_param(sth, imp_sth, imp_dbh, phs)) return -2;
+                    if (!rebind_param(aTHX_ sth, imp_sth, imp_dbh, phs)) 
return -2;
                     if (DBIc_TRACE(imp_sth, DBD_TRACING, 0, 8)) {
                         if (SvOK(phs->sv) && (phs->value_type == SQL_C_CHAR)) {
                             char sbuf[256];
@@ -2908,7 +2934,7 @@
                 || (SvPVX(phs->sv) != phs->sv_buf) /* has the string buffer 
moved? */
                 || (SvOK(phs->sv) != phs->svok)
                 ) {
-                if (!rebind_param(sth, imp_sth, imp_dbh, phs))
+                if (!rebind_param(aTHX_ sth, imp_sth, imp_dbh, phs))
                     croak("Can't rebind placeholder %s", phs->name);
             } else {
                 /* no mutation found */
@@ -3150,7 +3176,7 @@
     }
 
     if (outparams) {   /* check validity of bound output SV's  */
-        odbc_handle_outparams(imp_sth, DBIc_TRACE_LEVEL(imp_sth));
+        odbc_handle_outparams(aTHX_ imp_sth, DBIc_TRACE_LEVEL(imp_sth));
     }
 
     /*
@@ -3183,6 +3209,7 @@
  */
 AV *dbd_st_fetch(SV *sth, imp_sth_t *imp_sth)
 {
+    dTHX;
     D_imp_dbh_from_sth;
     int i;
     AV *av;
@@ -3288,7 +3315,7 @@
                     imp_sth->moreResults = 0;
                     imp_sth->done_desc = 1;
                     if (outparams) {
-                        odbc_handle_outparams(imp_sth, 
DBIc_TRACE_LEVEL(imp_sth));
+                        odbc_handle_outparams(aTHX_ imp_sth, 
DBIc_TRACE_LEVEL(imp_sth));
                     }
                     /* XXX need to 'finish' here */
                     dbd_st_finish(sth, imp_sth);
@@ -3415,7 +3442,8 @@
                         TRACE2(imp_sth, "    Unicode ChopBlanks orig len=%ld, 
new len=%ld\n",
                                orig_len, fbh->datalen);
                 }
-                
sv_setwvn(sv,(SQLWCHAR*)fbh->data,fbh->datalen/sizeof(SQLWCHAR));
+                sv_setwvn(aTHX_ sv, (SQLWCHAR*)fbh->data,
+                          fbh->datalen/sizeof(SQLWCHAR));
                 if (DBIc_TRACE(imp_sth, UNICODE_TRACING, 0, 0)) { /* 
odbcunicode */
                     /* unsigned char dlog[256]; */
                     /* unsigned char *src; */
@@ -3524,6 +3552,7 @@
 
 int dbd_st_finish(SV *sth, imp_sth_t *imp_sth)
 {
+    dTHX;
     D_imp_dbh_from_sth;
     RETCODE rc;
 
@@ -3555,6 +3584,7 @@
 
 void dbd_st_destroy(SV *sth, imp_sth_t *imp_sth)
 {
+    dTHX;
     D_imp_dbh_from_sth;
     RETCODE rc;
 
@@ -3788,6 +3818,7 @@
 /*                                                                      */
 /*======================================================================*/
 static int rebind_param(
+    pTHX_
     SV *sth,
     imp_sth_t *imp_sth,
     imp_dbh_t *imp_dbh,
@@ -3866,7 +3897,7 @@
         /* Convert the sv in place to UTF-16 encoded characters
            NOTE: the SV_toWCHAR may modify SvPV(phs->sv */
         if (SvOK(phs->sv)) {
-            SV_toWCHAR(phs->sv);
+            SV_toWCHAR(aTHX_ phs->sv);
             /* get new buffer and length */
             phs->sv_buf = SvPV(phs->sv, value_len);
         } else {                                 /* it is undef */
@@ -4407,6 +4438,7 @@
     int is_inout,
     IV maxlen)
 {
+   dTHX;
    SV **phs_svp;
    STRLEN name_len;
    char *name;
@@ -4532,7 +4564,7 @@
 
    if (DBIc_TRACE(imp_sth, DBD_TRACING, 0, 4))
        TRACE0(imp_dbh, "    -dbd_bind_ph=rebind_param\n");
-   return rebind_param(sth, imp_sth, imp_dbh, phs);
+   return rebind_param(aTHX_ sth, imp_sth, imp_dbh, phs);
 }
 
 /*------------------------------------------------------------
@@ -4549,6 +4581,7 @@
 SV *destrv;
 long destoffset;
 {
+   dTHX;
    SQLLEN retl;
    SV *bufsv;
    RETCODE rc;
@@ -4707,6 +4740,7 @@
 /*======================================================================*/
 int dbd_db_STORE_attrib(SV *dbh, imp_dbh_t *imp_dbh, SV *keysv, SV *valuesv)
 {
+    dTHX;
     RETCODE rc;
     STRLEN kl;
     char *key = SvPV(keysv,kl);
@@ -5062,6 +5096,7 @@
 /*======================================================================*/
 SV *dbd_db_FETCH_attrib(SV *dbh, imp_dbh_t *imp_dbh, SV *keysv)
 {
+    dTHX;
     RETCODE rc;
     STRLEN kl;
     char *key = SvPV(keysv,kl);
@@ -5328,6 +5363,7 @@
 /*======================================================================*/
 SV *dbd_st_FETCH_attrib(SV *sth, imp_sth_t *imp_sth, SV *keysv)
 {
+   dTHX;
    STRLEN kl;
    char *key = SvPV(keysv,kl);
    int i;
@@ -5394,7 +5430,7 @@
              }
 #ifdef WITH_UNICODE
              av_store(av, i,
-                      sv_newwvn((SQLWCHAR *)imp_sth->fbh[i].ColName,
+                      sv_newwvn(aTHX_ (SQLWCHAR *)imp_sth->fbh[i].ColName,
                                 imp_sth->fbh[i].ColNameLen));
 #else
              av_store(av, i, newSVpv(imp_sth->fbh[i].ColName, 0));
@@ -5458,7 +5494,7 @@
                        "    numfields == 0 && moreResults = 0 finish\n");
            }
            if (outparams) {
-              odbc_handle_outparams(imp_sth, DBIc_TRACE_LEVEL(imp_sth));
+              odbc_handle_outparams(aTHX_ imp_sth, DBIc_TRACE_LEVEL(imp_sth));
            }
         imp_sth->done_desc = 0;                 /* redo describe */
 
@@ -5573,6 +5609,7 @@
 /*======================================================================*/
 int dbd_st_STORE_attrib(SV *sth, imp_sth_t *imp_sth, SV *keysv, SV *valuesv)
 {
+    dTHX;
     STRLEN kl;
     char *key = SvPV(keysv,kl);
     T_st_params *par;
@@ -5642,6 +5679,7 @@
 SV *dbh;
 int ftype;
 {
+    dTHX;
     D_imp_dbh(dbh);
     RETCODE rc;
     SV *retsv = NULL;
@@ -5704,6 +5742,7 @@
 char * TableName;
 int             Unique;
 {
+    dTHX;
     D_imp_dbh(dbh);
     D_imp_sth(sth);
     RETCODE rc;
@@ -5714,7 +5753,7 @@
 
     imp_sth->done_desc = 0;
 
-    if ((dbh_active = check_connection_active(dbh)) == 0) return 0;
+    if ((dbh_active = check_connection_active(aTHX_ dbh)) == 0) return 0;
 
     rc = SQLAllocHandle(SQL_HANDLE_STMT, imp_dbh->hdbc, &imp_sth->hstmt);
     if (rc != SQL_SUCCESS) {
@@ -5734,7 +5773,7 @@
         dbd_error(sth, rc, "odbc_get_statistics/SQLGetStatistics");
         return 0;
     }
-    return build_results(sth, imp_sth, dbh, imp_dbh, rc);
+    return build_results(aTHX_ sth, imp_sth, dbh, imp_dbh, rc);
 }
 #endif /* THE_FOLLOWING_NO_LONGER_USED_REPLACE_BY_dbd_st_statistics */
 
@@ -5746,6 +5785,7 @@
 char * SchemaName;
 char * TableName;
 {
+    dTHX;
     D_imp_dbh(dbh);
     D_imp_sth(sth);
     RETCODE rc;
@@ -5756,7 +5796,7 @@
 
     imp_sth->done_desc = 0;
 
-    if ((dbh_active = check_connection_active(dbh)) == 0) return 0;
+    if ((dbh_active = check_connection_active(aTHX_ dbh)) == 0) return 0;
 
     rc = SQLAllocHandle(SQL_HANDLE_STMT, imp_dbh->hdbc, &imp_sth->hstmt);
     if (rc != SQL_SUCCESS) {
@@ -5774,7 +5814,7 @@
         dbd_error(sth, rc, "odbc_get_primary_keys/SQLPrimaryKeys");
         return 0;
     }
-    return build_results(sth, imp_sth, dbh, imp_dbh, rc);
+    return build_results(aTHX_ sth, imp_sth, dbh, imp_dbh, rc);
 }
 #endif /* THE_FOLLOWING_NO_LONGER_USED_REPLACE_BY_dbd_st_primary_keys */
 
@@ -5790,6 +5830,7 @@
 int    Scope;
 int    Nullable;
 {
+    dTHX;
     D_imp_dbh(dbh);
     D_imp_sth(sth);
     RETCODE rc;
@@ -5800,7 +5841,7 @@
 
     imp_sth->done_desc = 0;
 
-    if ((dbh_active = check_connection_active(dbh)) == 0) return 0;
+    if ((dbh_active = check_connection_active(aTHX_ dbh)) == 0) return 0;
 
     rc = SQLAllocHandle(SQL_HANDLE_STMT, imp_dbh->hdbc, &imp_sth->hstmt);
     if (rc != SQL_SUCCESS) {
@@ -5821,7 +5862,7 @@
         dbd_error(sth, rc, "odbc_get_special_columns/SQLSpecialClumns");
         return 0;
     }
-    return build_results(sth, imp_sth, dbh, imp_dbh, rc);
+    return build_results(aTHX_ sth, imp_sth, dbh, imp_dbh, rc);
 }
 
 
@@ -5836,6 +5877,7 @@
 char * FK_SchemaName;
 char * FK_TableName;
 {
+    dTHX;
     D_imp_dbh(dbh);
     D_imp_sth(sth);
     RETCODE rc;
@@ -5847,7 +5889,7 @@
 
     imp_sth->done_desc = 0;
 
-    if ((dbh_active = check_connection_active(dbh)) == 0) return 0;
+    if ((dbh_active = check_connection_active(aTHX_ dbh)) == 0) return 0;
 
     rc = SQLAllocHandle(SQL_HANDLE_STMT, imp_dbh->hdbc, &imp_sth->hstmt);
     if (rc != SQL_SUCCESS) {
@@ -5891,7 +5933,7 @@
         dbd_error(sth, rc, "odbc_get_foreign_keys/SQLForeignKeys");
         return 0;
     }
-    return build_results(sth, imp_sth, dbh, imp_dbh, rc);
+    return build_results(aTHX_ sth, imp_sth, dbh, imp_dbh, rc);
 }
 
 
@@ -5930,6 +5972,7 @@
     SV *sth,
     int ftype)
 {
+   dTHX;
    D_imp_dbh(dbh);
    D_imp_sth(sth);
    RETCODE rc;
@@ -5946,7 +5989,7 @@
 
    imp_sth->done_desc = 0;
 
-   if ((dbh_active = check_connection_active(dbh)) == 0) return 0;
+   if ((dbh_active = check_connection_active(aTHX_ dbh)) == 0) return 0;
 
    rc = SQLAllocHandle(SQL_HANDLE_STMT, imp_dbh->hdbc, &imp_sth->hstmt);
    if (rc != SQL_SUCCESS) {
@@ -5975,13 +6018,14 @@
       return 0;
    }
 
-   return build_results(sth, imp_sth, dbh, imp_dbh, rc);
+   return build_results(aTHX_ sth, imp_sth, dbh, imp_dbh, rc);
 }
 
 
 
 SV *odbc_cancel(SV *sth)
 {
+    dTHX;
     D_imp_sth(sth);
     RETCODE rc;
 
@@ -6002,6 +6046,7 @@
     UV length,
     IV type)
 {
+    dTHX;
     D_imp_sth(sth);
     SQLLEN len = 0;
     SQLRETURN rc;
@@ -6095,6 +6140,7 @@
 /************************************************************************/
 SV *odbc_col_attributes(SV *sth, int colno, int desctype)
 {
+    dTHX;
     D_imp_sth(sth);
     RETCODE rc;
     SV *retsv = NULL;
@@ -6227,6 +6273,7 @@
 char *table;
 char *column;
 {
+    dTHX;
     D_imp_dbh(dbh);
     D_imp_sth(sth);
     RETCODE rc;
@@ -6237,7 +6284,7 @@
 
     imp_sth->done_desc = 0;
 
-    if ((dbh_active = check_connection_active(dbh)) == 0) return 0;
+    if ((dbh_active = check_connection_active(aTHX_ dbh)) == 0) return 0;
 
     rc = SQLAllocHandle(SQL_HANDLE_STMT, imp_dbh->hdbc, &imp_sth->hstmt);
     if (rc != SQL_SUCCESS) {
@@ -6279,7 +6326,7 @@
         imp_sth->hstmt = SQL_NULL_HSTMT;
         return 0;
     }
-    return build_results(sth, imp_sth, dbh, imp_dbh, rc);
+    return build_results(aTHX_ sth, imp_sth, dbh, imp_dbh, rc);
 }
 #endif  /* OLD_ONE_BEFORE_SCALARS */
 
@@ -6292,6 +6339,7 @@
     SV *table,
     SV *column)
 {
+    dTHX;
     D_imp_dbh(dbh);
     D_imp_sth(sth);
     RETCODE rc;
@@ -6306,7 +6354,7 @@
 
     imp_sth->done_desc = 0;
 
-    if ((dbh_active = check_connection_active(dbh)) == 0) return 0;
+    if ((dbh_active = check_connection_active(aTHX_ dbh)) == 0) return 0;
 
     rc = SQLAllocHandle(SQL_HANDLE_STMT, imp_dbh->hdbc, &imp_sth->hstmt);
     if (rc != SQL_SUCCESS) {
@@ -6344,22 +6392,22 @@
 
        if (SvOK(catalog)) {
            copy = sv_mortalcopy(catalog);
-           SV_toWCHAR(copy);
+           SV_toWCHAR(aTHX_ copy);
            wcatalog = (SQLWCHAR *)SvPV(copy, wlen);
        }
        if (SvOK(schema)) {
            copy = sv_mortalcopy(schema);
-           SV_toWCHAR(copy);
+           SV_toWCHAR(aTHX_ copy);
            wschema = (SQLWCHAR *)SvPV(copy, wlen);
        }
        if (SvOK(table)) {
            copy = sv_mortalcopy(table);
-           SV_toWCHAR(copy);
+           SV_toWCHAR(aTHX_ copy);
            wtable = (SQLWCHAR *)SvPV(copy, wlen);
        }
        if (SvOK(column)) {
            copy = sv_mortalcopy(column);
-           SV_toWCHAR(copy);
+           SV_toWCHAR(aTHX_ copy);
            wcolumn = (SQLWCHAR *)SvPV(copy, wlen);
        }
        rc = SQLColumnsW(imp_sth->hstmt,
@@ -6393,7 +6441,7 @@
         imp_sth->hstmt = SQL_NULL_HSTMT;
         return 0;
     }
-    return build_results(sth, imp_sth, dbh, imp_dbh, rc);
+    return build_results(aTHX_ sth, imp_sth, dbh, imp_dbh, rc);
 }
 
 
@@ -6439,7 +6487,7 @@
 /*  =======================                                             */
 /*                                                                      */
 /************************************************************************/
-static int check_connection_active(SV *h)
+static int check_connection_active(pTHX_ SV *h)
 {
     D_imp_xxh(h);
     struct imp_dbh_st *imp_dbh = NULL;
@@ -6482,6 +6530,7 @@
 /*                                                                      */
 /************************************************************************/
 static int set_odbc_version(
+    pTHX_
     SV *dbh,
     imp_dbh_t *imp_dbh,
     SV* attr)
@@ -6532,6 +6581,7 @@
  */
 
 static int post_connect(
+    pTHX_
     SV *dbh,
     imp_dbh_t *imp_dbh,
     SV *attr)
@@ -7002,6 +7052,7 @@
 IV odbc_st_rowcount(
     SV *sth)
 {
+    dTHX;
     D_imp_sth(sth);
 /*    SQLLEN rows;
       SQLRETURN rc;*/
@@ -7029,6 +7080,7 @@
     IV count,                  /* count of rows */
     SV *tuple_status)          /* returned tuple status */
 {
+    dTHX;
     D_imp_sth(sth);
     D_imp_dbh_from_sth;
     SQLRETURN rc;
@@ -7293,7 +7345,7 @@
             }
             else {
 #if defined(WITH_UNICODE)
-                SV_toWCHAR(sv);
+                SV_toWCHAR(aTHX_ sv);
                 sv_val = SvPV(sv, sv_len);
                 memcpy((char *)(phs->param_array_buf + (row * maxlen[p-1] * 
sizeof(SQLWCHAR))),
                        sv_val, sv_len);
@@ -7595,6 +7647,7 @@
     int type,
     int event) {
 
+    dTHX;
     int return_count;
     int ret;
     SV* dbh = (SV *)handle;
@@ -7662,7 +7715,7 @@
 
 
 AV* dbd_data_sources(SV *drh ) {
-       int numDataSources = 0;
+    dTHX;
        SQLUSMALLINT fDirection = SQL_FETCH_FIRST;
        RETCODE rc;
     SQLCHAR dsn[SQL_MAX_DSN_LENGTH+1+9 /* strlen("DBI:ODBC:") */];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBD-ODBC-1.60/t/12blob.t new/DBD-ODBC-1.61/t/12blob.t
--- old/DBD-ODBC-1.60/t/12blob.t        2013-12-17 10:32:07.000000000 +0100
+++ new/DBD-ODBC-1.61/t/12blob.t        2020-01-30 13:05:09.000000000 +0100
@@ -132,7 +132,7 @@
 
     local $dbh->{RaiseError} = 1;
     my $max = 60001;
-    $max = 120001 if ($type == SQL_WLONGVARCHAR);
+    $max = 120001 if ($type == SQL_WLONGVARCHAR || $dbh->{odbc_has_unicode});
     local $dbh->{LongReadLen} = $max;
 
     my $row = $dbh->selectall_arrayref(q/select a from DBD_ODBC_drop_me/);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBD-ODBC-1.60/unicode_helper.c 
new/DBD-ODBC-1.61/unicode_helper.c
--- old/DBD-ODBC-1.60/unicode_helper.c  2013-12-17 10:42:25.000000000 +0100
+++ new/DBD-ODBC-1.61/unicode_helper.c  2020-01-31 10:18:15.000000000 +0100
@@ -10,7 +10,7 @@
 static long utf16_len(UTF16 *wp);
 static void utf16_copy(UTF16 *d, UTF16 *s);
 
-static SV * _dosvwv(SV * sv, UTF16 * wp, STRLEN len, new_cat_set_t mode);
+static SV * _dosvwv(pTHX_ SV * sv, UTF16 * wp, STRLEN len, new_cat_set_t mode);
 
 
 
@@ -19,7 +19,7 @@
  * termination character.
  * If len==-1, wp is a null-terminated wide string
  */
-static SV * _dosvwv(SV * sv, UTF16 * wp, STRLEN len, new_cat_set_t mode)
+static SV * _dosvwv(pTHX_ SV * sv, UTF16 * wp, STRLEN len, new_cat_set_t mode)
 {
     char * p=NULL;
     STRLEN svlen;
@@ -131,18 +131,18 @@
  *
  * wp is an array of <len> wide characters without a termination character
  */
-void sv_setwvn(SV * sv, UTF16 * wp, STRLEN len)
+void sv_setwvn(pTHX_ SV * sv, UTF16 * wp, STRLEN len)
 {
     if (wp==NULL) {
         sv_setpvn(sv,NULL,len);
     } else if (len==0) {
         sv_setpvn(sv,"",0);
     } else {
-        _dosvwv(sv,wp,len,do_set);
+        _dosvwv(aTHX_ sv,wp,len,do_set);
     }
 }
 
-SV *sv_newwvn(UTF16 * wp, STRLEN len)
+SV *sv_newwvn(pTHX_ UTF16 * wp, STRLEN len)
 {
     SV *sv;
 
@@ -153,7 +153,7 @@
     } else if (len==0) {
         sv = newSVpvn("",0);
     } else {
-        sv = _dosvwv(NULL,wp,len,do_new);
+        sv = _dosvwv(aTHX_ NULL,wp,len,do_new);
     }
     return sv;
 
@@ -343,7 +343,7 @@
  * Turns the UTF8 flag OFF unconditionally, because SV becomes a byte array
  * (for Perl).
  */
-void SV_toWCHAR(SV * sv)
+void SV_toWCHAR(pTHX_ SV * sv)
 {
     STRLEN len;
     UTF16 * wp;
@@ -366,14 +366,14 @@
 }
 
 /* change a UTF8 encoded SV to a wide chr string in place - see SV_toWCHAR */
-void utf8sv_to_wcharsv(SV *sv)
+void utf8sv_to_wcharsv(pTHX_ SV *sv)
 {
 #ifdef sv_utf8_decode
     sv_utf8_decode(sv);
 #else
     SvUTF8_on(sv);
 #endif
-    SV_toWCHAR(sv);
+    SV_toWCHAR(aTHX_ sv);
 }
 
 static long utf16_len(UTF16 *wp)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBD-ODBC-1.60/unicode_helper.h 
new/DBD-ODBC-1.61/unicode_helper.h
--- old/DBD-ODBC-1.60/unicode_helper.h  2013-12-17 10:42:32.000000000 +0100
+++ new/DBD-ODBC-1.61/unicode_helper.h  2020-01-31 10:18:15.000000000 +0100
@@ -8,16 +8,16 @@
 
 void WVfree(UTF16 * wp);
 
-void sv_setwvn(SV * sv, UTF16 * wp, STRLEN len);
-SV *sv_newwvn(UTF16 * wp, STRLEN len);
+void sv_setwvn(pTHX_ SV * sv, UTF16 * wp, STRLEN len);
+SV *sv_newwvn(pTHX_ UTF16 * wp, STRLEN len);
 
 
 char * PVallocW(UTF16 * wp);
 
 void PVfreeW(char * s);
 
-void SV_toWCHAR(SV * sv);
-void utf8sv_to_wcharsv(SV *sv);
+void SV_toWCHAR(pTHX_ SV * sv);
+void utf8sv_to_wcharsv(pTHX_ SV *sv);
 
 #endif /* defined unicode_helper_h */
 #endif /* WITH_UNICODE */

++++++ perl-DBD-ODBC-1.29-Makefile.diff ++++++
--- /var/tmp/diff_new_pack.IfAFQy/_old  2020-02-04 19:55:44.525405197 +0100
+++ /var/tmp/diff_new_pack.IfAFQy/_new  2020-02-04 19:55:44.529405199 +0100
@@ -1,8 +1,8 @@
 Index: Makefile.PL
 ===================================================================
---- Makefile.PL.orig   2014-07-22 11:55:35.089027443 +0200
-+++ Makefile.PL        2014-07-22 12:04:44.751518221 +0200
-@@ -210,6 +210,7 @@ EOT
+--- Makefile.PL.orig
++++ Makefile.PL
+@@ -213,6 +213,7 @@ EOT
  }
  print "Overriding ODBC Directory with command line option: $opt_o\n"
      if $opt_o ;
@@ -10,7 +10,7 @@
  if ($opt_g) {
     print "Setting debug options!\n";
     if ($OSNAME eq 'MSWin32') {
-@@ -346,7 +347,7 @@ EOT
+@@ -355,7 +356,7 @@ EOT
              #$tmp_odbchome =~ s/\\/\//g;
              #$odbchome = $tmp_odbchome if (-e "$tmp_odbchome/odbc.ini")
              chomp($odbchome = `cygpath \$WINDIR`);
@@ -19,7 +19,7 @@
              $odbchome = '/opt/sapdb/interfaces/odbc/';
          }
      }
-@@ -444,7 +445,7 @@ EOT
+@@ -453,7 +454,7 @@ EOT
      $opts{INC}  .= " -I/usr/include/w32api" if $OSNAME eq 'cygwin';
  
      # TO_DO all this needs to move until later
@@ -28,7 +28,7 @@
  #    my $lib_d2 = "$odbchome/dlls";
  #    my $libs   = "odbc";
  #    $opts{LIBS} = " -L$lib_d1 -R$lib_d1 -L$lib_d2 -R$lib_d2 -l$libs";
-@@ -487,32 +488,32 @@ EOT
+@@ -496,32 +497,32 @@ EOT
                           -e "$odbchome/odbc32.dll"));
  
      $myodbc = 'empress'
@@ -67,7 +67,7 @@
  
      if (!$myodbc) {
        local($LIST_SEPARATOR) = ", ";
-@@ -540,7 +541,7 @@ EOT
+@@ -549,7 +550,7 @@ EOT
  
      if ($myodbc eq 'Microsoft ODBC') {
          print "\nBuilding for Microsoft under Cygwin\n";
@@ -76,16 +76,16 @@
          print {$sqlhfh} "#include <windows.h>\n";
          print {$sqlhfh} "#include <sql.h>\n";
          print {$sqlhfh} "#include <sqltypes.h>\n";
-@@ -573,7 +574,7 @@ EOT
-             # remove lib prefix and .so suffix so "-l" style link can be used
-             $ilibname =~ s/^lib(iodbc.*?)\.\w+$/$1/;
-             $opts{LIBS} = "-L$odbclibdir -l$ilibname";
+@@ -588,7 +589,7 @@ EOT
+                 $opts{LIBS} = q{};
+                 $opts{dynamic_lib} = { OTHERLDFLAGS => "$ilibpath" };
+             }
 -            warn "Warning: LD_LIBRARY_PATH doesn't include $odbchome/lib\n"
 +          warn "Warning: LD_LIBRARY_PATH doesn't include $odbchome/$lib\n"
                  if (!defined($ENV{LD_LIBRARY_PATH})) ||
                      ($ENV{LD_LIBRARY_PATH} =~ /\Q$odbclibdir/);
          }
-@@ -700,7 +701,11 @@ EOT
+@@ -729,7 +730,11 @@ EOT
        print {$sqlhfh} qq{#define DBD_ODBC_NO_DATASOURCES\n};
  
        $opts{INC} .= " -I$odbchome/incl";
@@ -98,7 +98,7 @@
      }
      elsif ($myodbc eq 'adabas') {
        print {$sqlhfh} "#define FAR \n#define EXPORT \n#define CALLBACK \n";
-@@ -759,7 +764,7 @@ if ($OSNAME eq 'darwin') {
+@@ -788,7 +793,7 @@ if ($OSNAME eq 'darwin') {
      # SQLGetPrivateProfileString is in libiodbcinst.a
      my $osver = `uname -r`;
      if ($osver && ($osver =~ /^8/)) {


Reply via email to