Skip to Content.
Sympa Menu

freetds - Re: [freetds] sqsh build fails with FreeTDS 1.0

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Stuart Henderson <stu AT spacehopper.org>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] sqsh build fails with FreeTDS 1.0
  • Date: Thu, 30 Jun 2016 13:16:18 +0000 (UTC)

On 2016-06-29, Merle Reinhart <merlereinhart AT 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 AT gmail.com> wrote:
> Hi, Stuart,
>
> On Tue, Jun 28, 2016 at 5:19 PM, Stuart Henderson <stu AT 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






Archive powered by MHonArc 2.6.24.

Top of Page