[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetds
Subject:    Re: [freetds] sqsh build fails with FreeTDS 1.0
From:       Stuart Henderson <stu () spacehopper ! org>
Date:       2016-06-30 13:16:18
Message-ID: slrnnna6t2.ndd.stu () naiad ! spacehopper ! org
[Download RAW message or body]

On 2016-06-29, Merle Reinhart <merlereinhart@mac.com> wrote:
> I ran into this even before FreeTDS 1.0 when I was trying to check out 
> some of the features of 7.2 and 7.3 via sqsh.

Yes, that's the easily-fixed one I mentioned. 


On 2016-06-29, Igor Korot <ikorot01@gmail.com> wrote:
> Hi, Stuart,
> 
> On Tue, Jun 28, 2016 at 5:19 PM, Stuart Henderson <stu@spacehopper.org> wrote:
> > sqsh build is failing with newer FreeTDS. There's an easily fixed
> > CS_TDS_80 that can be replaced with CS_TDS_71, but when that's done
> > I run into this in src/dsp_conv.c:
> 
> What is you OS? What is you configure line? What is the exact error
> message you received?

OS is OpenBSD/amd64 -current (not that it's relevant in this
case), and I showed the exact error message:

> > dsp_conv.c: In function 'dsp_datetime_conv':
> > dsp_conv.c:665: error: 'CS_DATEREC' has no member named 'datesecfrac'

freetds-1.00.9/include/cspublic.h now lists new bind types e.g.

581:#define CS_BIGDATETIME_TYPE TDS_STATIC_CAST(CS_INT, 35)

The code in dsp_conv.c does this:

> > /*
> > * Take the existing format and strip it down according to the
> > * type of date that we are processing and replace the ms
> > * field if it exists.
> > */
> > #if defined(CS_BIGDATETIME_TYPE) && defined(CS_BIGTIME_TYPE)
> > if (dt_fmt->datatype == CS_BIGDATETIME_TYPE || dt_fmt->datatype == \
> > CS_BIGTIME_TYPE) fmt = dsp_datetime_strip( dt_fmt->datatype, conv_fmt, (int) \
> > dr.datesecfrac ); else
> > #endif
> > fmt = dsp_datetime_strip( dt_fmt->datatype, conv_fmt, (int) dr.datemsecond );

dr is a CS_DATEREC struct, but the definition in cstypes.h doesn't
have datesecfrac and datesecprec fields so it's clear why the error
occurs.

Perhaps the better fix would be for FreeTDS to add them to the struct
and cs_dt_crack().

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc20155.1550/html/newfesd/newfesd48.htm



_______________________________________________
FreeTDS mailing list
FreeTDS@lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic