freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Brian Bruns <camber AT umcc.ais.org>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: Re: 0.46pre2
- Date: Tue, 24 Aug 1999 09:01:47 -0400 (EDT)
On Tue, 24 Aug 1999, Paul Schaap wrote:
> Brian,
>
> I downgraded my php to version 3.0.12 and now my CHAR's are working
> correctly, so I'd like to warn anybody trying to use php4.0beta 1 & 2 (zend
> in particular was giving the errors) which is a shame because zend is MUCH
> faster, also the mathematical functions were not working in php4.0beta1 & 2
> possibly because I was doing them on CHAR fields but I have not retested
> ?!?
>
Hmmm...now this is something I can look at! I'll pull down 4.0beta and
have a look. Much of FreeTDS is coded to what's out there. The API's
(especially ctlib) are quite large and it makes sense to concentrate on
things programs actually use than some obscure functions. The problem,
and Sybperl for one has done this continually, is applications add
features as they go and use more of the API. This is good, except it means
a bit of a lag time between thier release and when freetds works correctly
with it.
> So my big endian hack is working except for the floats which are getting
> automatically rounded up to the nearest integer, could this be freetds or
> php3 doing this ? It is definitely round up (ie. 0.50 = 1 & 0.49 = 0) and
> the only solution is to multiply each float by 100 and then divide by 100
> in the php (for dollars). Also to add to the woes dates are no good either
> but I cast those as char anyway.
>
Have you tried sqsh to see if floats work there? It may just be some
strange interaction between php and freetds. I'll look into dates, but I'm
not sure what the endian issues are there.
BTW, I fixed the FAQ to include how to compile SQSH 1.7
> Basically you already seem to have most (if not all) of the required big
> endian logic, it just not being correctly identified at build time.
>
> REGARDS
> Paul
>
I was looking at it last night and is does something like:
main() {
union {
long l;
char c[sizeof(long)];
} u;
u.l=1;
exit ([u.c[sizeof(long)-1]==1);
}
then compiles and runs it. The logic seems sound, i just can't figure out
what goes wrong.
Brian
-
0.46pre2,
Brian Bruns, 08/23/1999
- <Possible follow-up(s)>
- Re: 0.46pre2, Paul Schaap, 08/23/1999
- Re: 0.46pre2, Brian Bruns, 08/23/1999
- Re: 0.46pre2, Paul Schaap, 08/23/1999
- Re: 0.46pre2, Paul Schaap, 08/23/1999
- Re: 0.46pre2, Brian Bruns, 08/24/1999
- Re: 0.46pre2, yan, 08/24/1999
- Re: 0.46pre2, Jon Pounder, 08/24/1999
- Re: 0.46pre2, Brian Bruns, 08/24/1999
- Re: 0.46pre2, yan, 08/24/1999
- 0.46pre2, Craig Spannring, 08/24/1999
- Re: 0.46pre2, Brian Bruns, 08/26/1999
Archive powered by MHonArc 2.6.24.