Skip to Content.
Sympa Menu

freetds - Re: Solaris Question

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Gregg Jensen <greggj AT savvis.net>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Cc: friendc AT nicanor.acu.edu
  • Subject: Re: Solaris Question
  • Date: Thu, 29 Apr 1999 09:04:26 -0500


At 09:08 AM 4/29/99, you wrote:
...
>I have downloaded the latest code from CVS, hardwired the endianess,
>hardwired the libtool, and compiled. Now, the int4 field works fine,
>however the flt8 does not. I found a message that said to change the
>tds_convert_flt8. What do I need to change?

Cory,
This is what I have done to that function (see complete function below).
This is probably not the correct place to do this fix, but it will help in
the short run.

TDS_INT tds_convert_flt8(int srctype,unsigned char *src,int desttype,unsigned
char *dest,TDS_INT destlen)
{
//TDS_FLOAT the_value = *(double*)src;
char *a, *b;
double x;
int i;

a = (char*)src;
b = (char*)&x;

for(i=0; i < 4; i++) { (*b++) = (*a++); }


switch(desttype) {
case SYBCHAR:
case SYBVARCHAR:
/* sprintf(dest,"%10.0f", the_value); */
sprintf(dest,"%10.0f", x);
return strlen(dest);
}
return TDS_FAIL;
}






Archive powered by MHonArc 2.6.24.

Top of Page