Skip to Content.
Sympa Menu

freetds - call to dberrhandle fails in dblib

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Harald Fernengel <harry AT bnro.de>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: call to dberrhandle fails in dblib
  • Date: Mon, 3 Sep 2001 21:44:31 +0200


Hello,

in my dblib apps I'm using the following call:

dberrhandle( (EHANDLEFUNC)myErrHandler );

myErrHandler is a "extern C" function which works fine using the Sybase / M$
dblib. Unfortunately, this call fails using FreeTDS:

cannot convert `int (*)(DBPROCESS*, int, int, int, char*, char*)' to
`int(*)()' for argument `1' to `int (* dberrhandle(int (*)()))()'

in FreeTDS's sybdb.h dberrhandle is defined as follows:
extern int (*dberrhandle( int (*handler)() )) ();

in Sybase's Headers it is defined differently:
EHANDLEFUNC CS_PUBLIC dberrhandle PROTOTYPE((EHANDLEFUNC handler));


Unfortunately, I do not know much about function pointers, can anyone help me
with this? I think it would be nice to fix this in the FreeTDS header files
so that it gets a little bit more compatible with Sybase and M$.

Thanks,

Harry




Archive powered by MHonArc 2.6.24.

Top of Page