freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: christos AT zoulas.com (Christos Zoulas)
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] FreeTDS Digest, Vol 44, Issue 4
- Date: Mon, 4 Sep 2006 13:58:27 -0400
On Sep 4, 1:25pm, entropy AT freetds.org (entropy AT freetds.org) wrote:
-- Subject: Re: [freetds] FreeTDS Digest, Vol 44, Issue 4
| Norbert Sendetzky wrote:
| > On Monday 04 September 2006 18:00, freetds-request AT lists.ibiblio.org
wrote:
| >> The problem is that your code is making assumptions about what type a
| >> CS_INT is. If it were reasonable for your code to do that, then there
| >> would be no such thing as a CS_INT, and instead it would just be "int"
| >> or "long".
| >>
| >> The most portable thing your code can do in this case is explicitly cast
| >> to a type, then use the printf(3) format for that type.
| >>
| >> CS_INT foo;
| >> ...
| >> printf("%ld\n", (long) foo);
| >>
| >> That should compile without warnings and execute properly, using FreeTDS
| >> or Sybase headers, on any 32 or 64 bit platform.
| >
| > It's not that I want to make assumptions about types but printf forces me
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.
|
| Err, no, it works just fine on Alpha where I just tested it, and I see
| 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.
The odbc stuff cannot possibly work, for the reasons I explained in a previous
post. Don't you get warnings when compiling?
christos
-
Re: [freetds] FreeTDS Digest, Vol 44, Issue 4,
Norbert Sendetzky, 09/04/2006
-
Re: [freetds] FreeTDS Digest, Vol 44, Issue 4,
entropy, 09/04/2006
-
Re: [freetds] FreeTDS Digest, Vol 44, Issue 4,
Christos Zoulas, 09/04/2006
-
Re: [freetds] FreeTDS Digest, Vol 44, Issue 4,
entropy, 09/04/2006
-
Re: [freetds] FreeTDS Digest, Vol 44, Issue 4,
Christos Zoulas, 09/04/2006
-
Re: [freetds] FreeTDS Digest, Vol 44, Issue 4,
entropy, 09/04/2006
-
Re: [freetds] FreeTDS Digest, Vol 44, Issue 4,
Christos Zoulas, 09/04/2006
- Re: [freetds] FreeTDS Digest, Vol 44, Issue 4, entropy, 09/04/2006
- Re: [freetds] FreeTDS Digest, Vol 44, Issue 4, Christos Zoulas, 09/04/2006
-
Re: [freetds] FreeTDS Digest, Vol 44, Issue 4,
Christos Zoulas, 09/04/2006
-
Re: [freetds] FreeTDS Digest, Vol 44, Issue 4,
entropy, 09/04/2006
-
Re: [freetds] FreeTDS Digest, Vol 44, Issue 4,
Christos Zoulas, 09/04/2006
-
Re: [freetds] FreeTDS Digest, Vol 44, Issue 4,
entropy, 09/04/2006
-
Re: [freetds] FreeTDS Digest, Vol 44, Issue 4,
Christos Zoulas, 09/04/2006
-
Re: [freetds] FreeTDS Digest, Vol 44, Issue 4,
entropy, 09/04/2006
Archive powered by MHonArc 2.6.24.