Skip to Content.
Sympa Menu

freetds - Re: [freetds] FreeTDS Digest, Vol 44, Issue 4

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • 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 14:21:26 -0400

On Sep 4, 2:15pm, entropy AT freetds.org (entropy AT freetds.org) wrote:
-- Subject: Re: [freetds] FreeTDS Digest, Vol 44, Issue 4

| Irrelevant to what we were discussing: use of the FreeTDS-defined CS_INT
| from user application code. CS_INT is part of CS-Library/CT-Library,
| not ODBC.

CS_INT should be int32_t, since it needs to be a 4 byte signed integer.
This is the problem. CS_INT is abused by the ODBC API (is that a formal
API?) to pass pointers around, and this of course does not work. Defining
CS_INT to long on LP32 machines is not very useful, but at least works
(modulo printf format breakage, that can be handled with casts).
Defining CS_INT to be long on 64 bit machines, plainly does not work.

| > Don't you get warnings when compiling?
|
| If you mean when compiling the FreeTDS OBDC library, yes, I do. I don't
| know enough about ODBC to fix it. Do you have a patch to offer?

I can silense the compiler, but I cannot provide a patch that works, since
it is impossible to fit 8 byte arbitrary pointers into 4 bytes. What needs
to be done, is to introduce CS_POINTER and use it where pointers are needed.
This is an API change.

christos




Archive powered by MHonArc 2.6.24.

Top of Page