Skip to Content.
Sympa Menu

freetds - RE: [freetds] [PATCH] make replacements more configurable

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Castellano, Nicholas" <Nicholas_Castellano AT acml.com>
  • To: "'freetds AT lists.ibiblio.org'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] [PATCH] make replacements more configurable
  • Date: Mon, 27 Jan 2003 09:32:06 -0500

This patch is wrong. The whole idea of the autoconf AC_REPLACE_FUNCS() is
to make this sort of kludgery unnecessary. UNIX shared libraries have
versioning information to make this sort of brain damage unnecessary.

In other words, you shouldn't be compile-time linking against one version of
the C library, and run-time linking against an incompatible version.
Attempting to do so will only get you into trouble, as you have already
discovered. Hiding the problem by tricking the system into making this work
is only going to get you into worse trouble later on.

Cheers,
--nick

-----Original Message-----
From: freetds-admin AT lists.ibiblio.org
[mailto:freetds-admin AT lists.ibiblio.org]
Sent: Sunday, January 26, 2003 7:25 PM
To: freetds AT lists.ibiblio.org
Subject: [freetds] [PATCH] make replacements more configurable


In porting FreeTDS to VMS (which is nearly finished) I hit a small snag
using the strtok_r function supplied in src/replacements/strtok_r.c. The
latest version of the C run-time has its own strtok_r, but the second
latest doesn't. If I build FreeTDS with the older version, then upgrade
the C run-time, then link against the TDS libraries, I'll get a multiply
defined symbol error because the home-made strtok_r collides with the
system-supplied one. Similar problems are latent for the other
replacement functions.

The easiest around this was to prefix all the function names with
"freetds_" and then locate them when and where needed via the HAVE_xxx
macros. Patch below. Does anyone have any objections or see any
potential problems with this?

This was taken against the nightly snapshot from about a week ago; let
me know if anything's changed that would make it need to be reformulated.




The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that we do not accept account orders and/or
instructions by e-mail, and therefore will not be responsible for carrying
out such orders and/or instructions.






Archive powered by MHonArc 2.6.24.

Top of Page