Re: sqsh build fails with FreeTDS 1.0
Frediano Ziglio <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <CAHt6W4eNRdBsU=_zUren+xWtTibNQcyubWM0FkVupiz6evc2Mg@mail.gmail.com> |
On 1 Jul 2016 05:37, "Stuart Henderson" <[email protected]> wrote: > > On 2016-06-29, Merle Reinhart <[email protected]> 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 <[email protected]> wrote: > > Hi, Stuart, > > > > On Tue, Jun 28, 2016 at 5:19 PM, Stuart Henderson <[email protected]> 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 > > Yes but this must be done in a ABI compatible way. Just adding fields to a structure is not enough. They must be set in the right way. Frediano