[freetds] FreeTDS dbwillconvert discrepancy

Joseph W. Losco joe at sqpuv.com
Thu Dec 11 03:52:02 EST 2008


On Nov 29, 2008, at 8:38 PM, James K. Lowden wrote:

> Joe Losco wrote:
>> However, in the Objective C/GUI version it appears to return a  
>> Bool.  It
>>
>> seems to return 1 if it is convertable and 0 if it is not.  This
>> obviously messes up the rest of the allocations in the sample  
>> resulting
>> in truncation and overflow errors.
>
> My first instinct was to wonder if in fact you're linking to FreeTDS  
> and
> not one of the vendor libraries, or perhaps to a version prior to  
> 0.82.  I
> assume none of those is the case.
>
> My second guess is to wonder if Objective C is looking at the header  
> file
> (or something like that), interpreting each nonzero return code as  
> "true",
> and returning only 0 or 1.  Is there glue code that allows Objective  
> C to
> call a C library?  Is there some preprocessing that gets done to  
> make C
> functions available to it?
>
> If so, the solution might be to define the function as returning DBINT
> instead of DBBOOL.  Or something like that.

I just reread this to check if I missed anything and indeed I did.  If  
I would change the header file to be a DBINT instead of a DBBOOL, I  
would then have to change the .c file also and recompile correct?  If  
so, then I'll have to do some tinkering to figure out how to compile  
the code as a OS X framework.

Joe


More information about the FreeTDS mailing list