PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: mpeppler at itf dot ch (Michael Peppler)
Subject: Re: Sybperl 2.04 fails make for DBLIBVS<461
Date: Mar 4 1996 7:46AM

----------
X-Sun-Data-Type: text
X-Sun-Data-Description: text
X-Sun-Data-Name: text
X-Sun-Content-Lines: 24
X-Sun-Content-Length: 950

> From: Gerd Knops 
> 
> cc -arch m68k -arch i386 -arch hppa -arch sparc -c -I/usr/local/sybase/include -DUSE_NEXT_CTYPE -I/usr/local/include -O -DVERSION=\"2.04\" -DXS_VERSION=\"2.04\"  -I/usr/local/lib/perl5/fat-next/5.002/CORE -DDBLIBVS=420 -DSYBPLVER='"2.04"' -DDO_TIE DBlib..c
> For architecture m68k:
> DBlib.c: In function `XS_Sybase__DBlib_dbnextrow':
> DBlib.c:3753: `tmp' undeclared (first use this function)
> DBlib.c:3753: (Each undeclared identifier is reported only once
> DBlib.c:3753: for each function it appears in.)
> DBlib.c: In function `XS_Sybase__DBlib_dbretdata':
> DBlib.c:4012: `tmp' undeclared (first use this function)
> *** Exit 1
> Stop.
> 
> This probably went unnoticed because most people are using a later
> version of sybase.

Rats!

I *knew* I was going to miss something :-(

Alright - here is a patch. It also patches one of the test scripts
which would fail if DBLIBVS is lower than 461.

Michael
----------
X-Sun-Data-Type: default
X-Sun-Data-Description: default
X-Sun-Data-Name: patch.2.04a
X-Sun-Content-Lines: 183
X-Sun-Content-Length: 4013

# Just in case someone feeds this to sh...
exit

Index: patchlevel.h
Prereq: 1.8
*** sybperl-2.04/patchlevel.h	Mon Feb  5 12:23:19 1996
--- sybperl-2.04a/patchlevel.h	Mon Mar  4 08:38:42 1996
***************
*** 1,7 ****
! /*	@(#)patchlevel.h	1.8	2/5/96 */
  
  #define VERSION		2
  
  #define PATCHLEVEL 	04
  
! /*#define UNOFFICIAL	/**/
--- 1,7 ----
! /*	@(#)patchlevel.h	1.9	3/4/96 */
  
  #define VERSION		2
  
  #define PATCHLEVEL 	04
  
! #define UNOFFICIAL	a
Index: DBlib/DBlib.pm
Prereq: 1.22
*** sybperl-2.04/DBlib/DBlib.pm	Thu Feb 29 16:11:44 1996
--- sybperl-2.04a/DBlib/DBlib.pm	Mon Mar  4 08:34:23 1996
***************
*** 1,5 ****
  # -*-Perl-*-
! # @(#)DBlib.pm	1.22	2/29/96
  
  # Copyright (c) 1991-1996
  #   Michael Peppler
--- 1,5 ----
  # -*-Perl-*-
! # @(#)DBlib.pm	1.23	3/4/96
  
  # Copyright (c) 1991-1996
  #   Michael Peppler
***************
*** 219,225 ****
  require DynaLoader;
  use Carp;
  
! use subs qw(SUCCEED FAIL NO_MORE_RESULTS);
  
  use vars qw(%Att);
  
--- 219,225 ----
  require DynaLoader;
  use Carp;
  
! use subs qw(SUCCEED FAIL NO_MORE_RESULTS SYBESMSG INT_CANCEL);
  
  use vars qw(%Att);
  
Index: DBlib/DBlib.xs
Prereq: 1.27
*** sybperl-2.04/DBlib/DBlib.xs	Thu Feb 29 16:11:44 1996
--- sybperl-2.04a/DBlib/DBlib.xs	Mon Mar  4 08:32:54 1996
***************
*** 1,5 ****
  /* -*-C-*-
!  *	@(#)DBlib.xs	1.27	2/29/96
   */	
  
  
--- 1,5 ----
  /* -*-C-*-
!  *	@(#)DBlib.xs	1.28	3/4/96
   */	
  
  
***************
*** 695,701 ****
  	if((sv = perl_get_sv("Sybase::DBlib::Version", TRUE)))
  	{
  	    char buff[256];
! 	    sprintf(buff, "This is sybperl, version %s\n\nSybase::DBlib version 1.27 2/29/96\n\nCopyright (c) 1991-1996 Michael Peppler\n\n",
  		    SYBPLVER);
  	    sv_setnv(sv, atof(SYBPLVER));
  	    sv_setpv(sv, buff);
--- 695,701 ----
  	if((sv = perl_get_sv("Sybase::DBlib::Version", TRUE)))
  	{
  	    char buff[256];
! 	    sprintf(buff, "This is sybperl, version %s\n\nSybase::DBlib version 1.28 3/4/96\n\nCopyright (c) 1991-1996 Michael Peppler\n\n",
  		    SYBPLVER);
  	    sv_setnv(sv, atof(SYBPLVER));
  	    sv_setpv(sv, buff);
***************
*** 3309,3314 ****
--- 3309,3316 ----
      int is_null;
  #if DBLIBVS >= 461
      DBMONEY tv_money;
+ #else
+     DBFLT8 tmp;
  #endif
      int dbKeepNumeric = 0;
      int dbBin0x = 0;
***************
*** 3467,3473 ****
  #else
  	      case SYBMONEY:
  		dbconvert(dbproc, SYBMONEY, data, len,
! 			  SYBFLT8, &tmp, -1);
  		if(dbKeepNumeric)
  		    sv = newSVnv(tmp);
  		else
--- 3469,3475 ----
  #else
  	      case SYBMONEY:
  		dbconvert(dbproc, SYBMONEY, data, len,
! 			  SYBFLT8, (BYTE*)&tmp, -1);
  		if(dbKeepNumeric)
  		    sv = newSVnv(tmp);
  		else
***************
*** 3585,3590 ****
--- 3587,3594 ----
      int is_null;
  #if DBLIBVS >= 461
      DBMONEY tv_money;
+ #else
+     DBFLT8 tmp;
  #endif
      int dbKeepNumeric = 0;
      int dbBin0x = 0;
***************
*** 3712,3718 ****
  #else
  	      case SYBMONEY:
  		dbconvert(dbproc, SYBMONEY, data, len,
! 			  SYBFLT8, &tmp, -1);
  		if(dbKeepNumeric)
  		    sv = newSVnv(tmp);
  		else
--- 3716,3722 ----
  #else
  	      case SYBMONEY:
  		dbconvert(dbproc, SYBMONEY, data, len,
! 			  SYBFLT8, (BYTE*)&tmp, -1);
  		if(dbKeepNumeric)
  		    sv = newSVnv(tmp);
  		else
Index: DBlib/t/money.t
Prereq: 1.1
*** sybperl-2.04/DBlib/t/money.t	Tue Feb 20 13:22:25 1996
--- sybperl-2.04a/DBlib/t/money.t	Mon Mar  4 08:32:39 1996
***************
*** 1,10 ****
  #!./perl
  
! #	@(#)money.t	1.1	2/20/96
  
  print "1..13\n";
  
  use Sybase::DBlib qw(2.04);
  
  # This test file is still under construction...
  # Find the passwd file:
--- 1,18 ----
  #!./perl
  
! #	@(#)money.t	1.2	3/4/96
  
  print "1..13\n";
  
  use Sybase::DBlib qw(2.04);
+ 
+ if($Sybase::DBlib::DBLIBVS < 461) {
+     print STDERR "Money routines are not implemented in this version.\n";
+     for (1 .. 13) {
+ 	print "ok $_\n";
+     }
+     exit(0);
+ }
  
  # This test file is still under construction...
  # Find the passwd file: