At 03:58 PM 8/14/2001 +0000, Piyush Avichal wrote to vmsperl:

>> I am trying to build the DBD::FreeTDS module for Perl, but
>> I am encountering and error when I do the perl makefile.pl 
>> command :

Below is a minimal patch to get DBD::FreeTDS 0.02 to build with Compaq C 
V6.4-005 on OpenVMS Alpha V7.2-1, Perl 5.6.1, DBI  1.15.  IIRC, the use of 
File::Spec breaks compatibility with Perl 5.004.  Piyush, note that 
DBD::FreeTDS is not under active development and the recommended method is 
to use DBD::Sybase with the FreeTDS library.  Unfortunately the latter does 
not yet appear to have been ported to VMS.

The bottom line of my tests results were (against a SQL Server 7.0 database):

Failed 14/46 test scripts, 69.57% okay. 30/550 subtests failed, 94.55% okay.

with a number of failures looking like:

D0:[CRAIG.DBD-FREETDS-0_02]TDSLAYER.C;3:1774: Not implemented for data type 110
D0:[CRAIG.DBD-FREETDS-0_02]TDSLAYER.C;3:2294: Unhandled subpacket type 0x04


--- dbdimp.c;-0 Thu Feb 18 12:57:00 1999
+++ dbdimp.c    Tue Aug 14 11:25:36 2001
@@ -836,7 +836,7 @@
 static AV *get_row(imp_sth_t  *imp_sth)
 {
    AV       *result;
-   boolean   okay;
+   boolean   okay = false;
    int       num_columns = colinfo_num_columns(imp_sth->tds->colinfo);
    int       i;
    SV       *sv;
@@ -847,7 +847,7 @@
     * We already peeked and found that the next byte will 
     * be a TDS_ROW_TOKEN.  Just skip it.
     */
-   okay = okay && tds_skip(imp_sth->tds, 1);
+   okay = tds_skip(imp_sth->tds, 1);
          
    result = DBIS->get_fbav(imp_sth);
 
--- FreeTDS.xs;-0       Wed Dec  9 23:52:45 1998
+++ FreeTDS.xs  Tue Aug 14 11:35:11 2001
@@ -44,7 +44,7 @@
     CODE:
     /* D_imp_dbh(dbh); */ 
     /* ST(0) = sv_2mortal(newSViv(imp_dbh->isDead)); */
-    do { void *nowarn[] = {&dbh, &nowarn}; } while (0)
+    do { void *nowarn[] = {&dbh, &nowarn}; } while (0);
     assert("Not"=="implemented");
 
 
--- Makefile.PL;-0      Wed Feb 17 13:00:15 1999
+++ Makefile.PL Tue Aug 14 11:16:06 2001
@@ -43,8 +43,9 @@
 use Config;
 
 use vars qw($LINKTYPE $lib_string);
-my $dbidir = "$Config{sitearchexp}/auto/DBI";
-die unless -e "$dbidir/DBIXS.h";
+use File::Spec;
+my $dbidir = File::Spec->catdir($Config{sitearchexp},'auto','DBI');
+die unless -e File::Spec->catfile($dbidir,'DBIXS.h');
 my $include_string = "-I$dbidir -I/usr/local/include";
 my $libdirs = '-L/usr/local/lib -llibdibs';
 $lib_string="";
--- tdslayer.c;-0       Tue Feb 16 21:21:42 1999
+++ tdslayer.c  Tue Aug 14 11:44:00 2001
@@ -1581,8 +1581,8 @@
          unsigned short   tmp_days;
          unsigned short   tmp_minutes;
 
-         okay = okay && tds_get_tdsshort(tds, &tmp_days);
-         okay = okay && tds_get_tdsshort(tds, &tmp_minutes);
+         okay = okay && tds_get_tdsshort(tds, (short *) &tmp_days);
+         okay = okay && tds_get_tdsshort(tds, (short *) &tmp_minutes);
 
          days         = (long)tmp_days + era_to_tds_day_diff;
          milliseconds = (long)tmp_minutes * msec_per_minute;
@@ -3180,6 +3180,7 @@
    long        l)
 {
    abort();
+   return -1;
 } /* tds_write_tdslong()  */
 
 
[end of patch]

Reply via email to