[freetds] Has anyone integrate Sybase Library with FreeTDS library
James K. Lowden
jklowden at freetds.org
Wed Nov 7 10:21:59 EST 2007
Fu, Steve wrote:
> 1. Prefix all functions with tds_, e.g. tds_ct_connect() (as in
> tdsdbopen), and compile a library, let's say, libtdscore.a
> 2. Create stub functions with names the same as Sybase and call the
> implementation function, e.g. ct_connect to call tds_ct_connect, and
> package these functions with libtdscore.a to libsybdb.a or libct.a....
If you submit a patch that does this for ct-lib, I'll apply it to CVS
It's not necessary for db-lib. Because both vendors (still) provide a
db-lib implementation, the need to use FreeTDS and <vendor lib>
simultaneously is pretty rare. For ct-lib, however, it's valuable,
because it would make it possible to modify DBD::Sybase to choose its
library according to server.
As an aesthetic judgement, I think ct_connect_freetds is better than
tds_ct_connect. It puts the important part of the name up front, and
"tds" nomally indicates a libtds function/structure or something specific
to the protocol.
Depending on your skills, a giant search-and-replace and some autoconf
magic might be easier. We could have two libraries: the existing libct,
and the new libct_freetds. The CVS build process could run sed(1) over
the needed files to produce the new ones.
More information about the FreeTDS