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: "Ed Avis" <eda at waniasset dot com>
Subject: RE: Sybperl and FreeTDS and MSSQL
Date: Jul 24 2009 10:20AM

Michael Peppler  wrote:

>Sybase::DBlib will certainly work with FreeTDS.

In that case my follow-up question is about this build error:

DBlib.xs: In function 'XS_Sybase__DBlib__DateTime_crack':
DBlib.xs:6068: error: 'DBDATEREC' has no member named 'dateyear'
DBlib.xs:6069: error: 'DBDATEREC' has no member named 'datemonth'
DBlib.xs:6070: error: 'DBDATEREC' has no member named 'datedmonth'

Looking at the file DBlib.c (which I assume is generated from DBlib.xs) there is
a definition for DBDATEREC, but it is inside a #ifndef DBBOTH conditional.  The
definition that's used is from /usr/include/sybdb.h, which has

typedef struct dbdaterec
{
#ifdef MSDBLIB
        DBINT year;
        DBINT month;
        DBINT day;
        DBINT dayofyear;
        DBINT weekday;
        DBINT hour;
        DBINT minute;
        DBINT second;
        DBINT millisecond;
        DBINT tzone;
#else
        DBINT dateyear;
        DBINT datemonth;
        DBINT datedmonth;
        DBINT datedyear;
        DBINT datedweek;
        DBINT datehour;
        DBINT dateminute;
        DBINT datesecond;
        DBINT datemsecond;
        DBINT datetzone;
#endif
} DBDATEREC;

I suppose MSDBLIB is defined for some reason?  Does DBlib.xs need adapting to
build with this set?

-- 
Ed Avis  

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________