Skip to Content.
Sympa Menu

freetds - Re: testing latest snapshot...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Bill Thompson" <thompbil AT exchange.uk.ml.com>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Re: testing latest snapshot...
  • Date: Mon, 27 May 2002 10:34:59 -0400


Replying to myself...something wrong surely....
P'raps someone can patch these fixes in :

convert.c

line 590 should read:

dt_days = (unsigned int)4294967295U - dt_days;

and line 1212 should read:

dt_days = 4294967295U; /* 0xffffffff */

dblib.c

We need this declaration at the top of dblib.c :

static int days_this_year (int years);

and the line in dbdatecrack should read :

dt_days = (unsigned int)4294967295U - dt_days;

Also, I made some changes to function buffer_transfer_bound_data, which
are required to be compatible with changes I made to convert.c .
It's possible Brian left these out for good reason. However my copy now
looks like this:

declare variable destlen at the top:

int destlen;

...and the section of code near the bottom should now look like this:

if (tds_get_null(resinfo->current_row,i)) {
_set_null_value(dbproc, curcol->varaddr, desttype,
curcol->column_bindlen);
} else {

if (curcol->column_bindtype == STRINGBIND)
destlen = -2;
else if (curcol->column_bindtype == NTBSTRINGBIND)
destlen = -1;
else
destlen = curcol->column_bindlen;

dbconvert(dbproc,
srctype, /* srctype */
src, /* src */
srclen, /* srclen */
desttype, /* desttype */
(BYTE *)curcol->varaddr, /* dest */
destlen); /* destlen */
} /* else not null */

cheers!

Bill




Archive powered by MHonArc 2.6.24.

Top of Page