freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: entropy AT freetds.org
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] CS_INT size bug
- Date: Tue, 05 Sep 2006 10:02:53 -0400
Norbert Sendetzky wrote:
On Monday 04 September 2006 23:25, freetds-request AT lists.ibiblio.org wrote:
It's not that I want to make assumptions about types but printf forces meErr, no, it works just fine on Alpha where I just tested it, and I see
to do so. Your example above works as long as it doesn't hit a plattform
where "long" is defined as 64 bit type (e.g. Alpha, AIX). On these
plattforms, it will fail miserably.
no reason why it shouldn't work on any other platform with 64-bit longs.
Can you explain why you think it should "fail miserably?" If so,
perhaps I can help you see where you're going wrong.
I assume, you've used gcc which probably don't define long to 64 bit. Maybe it's only a problem when using the native plattform compiler - but who does this today.
On the other hand, did you get warnings in -Wall -pedantic mode?
It doesn't get warnings with gcc. It doesn't get warnings with gcc -Wall -pedantic. It doesn't get warnings with the native platform compiler.
In fact, there is no reason why it should get any warnings with any compiler with any switches on any platform where long is at least 32 bits (and I guarantee you that that applies to every host you're ever likely to care about), which is precisely why I suggested the code to you in the first place.
The code I suggested is *correct*. Instead of speculating endlessly why don't you just try it?
--
Cheers,
entropy
-
[freetds] CS_INT size bug,
Norbert Sendetzky, 09/02/2006
- Re: [freetds] CS_INT size bug, jklowden, 09/02/2006
- <Possible follow-up(s)>
-
Re: [freetds] CS_INT size bug,
Norbert Sendetzky, 09/03/2006
-
Re: [freetds] CS_INT size bug,
entropy, 09/03/2006
-
Re: [freetds] CS_INT size bug,
jklowden, 09/03/2006
- Re: [freetds] CS_INT size bug, entropy, 09/03/2006
-
Re: [freetds] CS_INT size bug,
jklowden, 09/03/2006
-
Re: [freetds] CS_INT size bug,
entropy, 09/03/2006
- Re: [freetds] CS_INT size bug, michael . peppler, 09/04/2006
-
Re: [freetds] CS_INT size bug,
Norbert Sendetzky, 09/05/2006
- Re: [freetds] CS_INT size bug, entropy, 09/05/2006
-
Re: [freetds] CS_INT size bug,
Lowden, James K, 09/05/2006
- Re: [freetds] CS_INT size bug, entropy, 09/06/2006
-
Re: [freetds] CS_INT size bug,
Norbert Sendetzky, 09/06/2006
- Re: [freetds] CS_INT size bug, entropy, 09/06/2006
- Re: [freetds] CS_INT size bug, Norbert Sendetzky, 09/07/2006
Archive powered by MHonArc 2.6.24.