freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] DB connection library and dynamic linking
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] DB connection library and dynamic linking
- Date: Sun, 26 Sep 2010 13:49:49 -0400
James K. Lowden wrote:
> A systematic solution would be to prefix all the FreeTDS ct-lib names
> throughout the library, and use the preprocessor in ct.c to DTRT.
BTW, the ct.h changes don't have to be elaborate. Something like
$ grep ct_ doc/api_status.txt | awk '/OK/ {print $3}' | perl -ne'chomp;
$old=$_; s/^ct/CT/; printf qq(#define %-20s\t%s\n), $old, $_'
#define ct_bind CT_bind
#define ct_callback CT_callback
#define ct_cancel CT_cancel
#define ct_capability CT_capability
#define ct_close CT_close
#define ct_cmd_alloc CT_cmd_alloc
#define ct_cmd_drop CT_cmd_drop
#define ct_cmd_props CT_cmd_props
#define ct_command CT_command
#define ct_compute_info CT_compute_info
#define ct_con_alloc CT_con_alloc
#define ct_con_drop CT_con_drop
#define ct_con_props CT_con_props
#define ct_config CT_config
#define ct_connect CT_connect
#define ct_cursor CT_cursor
#define ct_data_info CT_data_info
#define ct_describe CT_describe
#define ct_diag CT_diag
#define ct_dynamic CT_dynamic
#define ct_exit CT_exit
#define ct_fetch CT_fetch
#define ct_get_data CT_get_data
#define ct_init CT_init
#define ct_options CT_options
#define ct_param CT_param
#define ct_res_info CT_res_info
#define ct_results CT_results
#define ct_send CT_send
#define ct_send_data CT_send_data
#define ct_setparam CT_setparam
would do the trick with most linkers. It's nice to keep any prefix very
short, for readability.
--jkl
-
[freetds] DB connection library and dynamic linking,
Julian Amso, 09/25/2010
-
Re: [freetds] DB connection library and dynamic linking,
James K. Lowden, 09/26/2010
-
Re: [freetds] DB connection library and dynamic linking,
James K. Lowden, 09/26/2010
-
Re: [freetds] DB connection library and dynamic linking,
Julian Amso, 09/26/2010
-
Re: [freetds] DB connection library and dynamic linking,
James K. Lowden, 09/26/2010
- Re: [freetds] DB connection library and dynamic linking, John Gavin, 09/26/2010
-
Re: [freetds] DB connection library and dynamic linking,
James K. Lowden, 09/26/2010
-
Re: [freetds] DB connection library and dynamic linking,
Julian Amso, 09/26/2010
-
Re: [freetds] DB connection library and dynamic linking,
James K. Lowden, 09/26/2010
-
Re: [freetds] DB connection library and dynamic linking,
James K. Lowden, 09/26/2010
Archive powered by MHonArc 2.6.24.