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: "Lowden, James K" <LowdenJK AT bernstein.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 10:23:54 -0500

> From: Craig A. Berry [mailto:craigberry AT mac.com]
> Sent: January 26, 2003 7:25 PM
>
> 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?

Craig,

If I ever get VMS installed on my VAX (hobby media have been sold out for a
while), I'd like to try to build your port. Do you intend to send us
patches, so future versions will Just Work?

I'm not that keen on your patch. In a unixy system, the configure script
detects the availability of those functions, and generates a Makefile for
the replacement library that excludes system-provided functions. IOW, on a
system requiring no replacements, that library would be empty.

It sounds like even on VMS, you don't run into trouble unless you upgrade
the OS and rebuild FreeTDS without regenerating its makefiles. Why would
you do that?

In general and all other things equal, the less the preprocessor munges the
source code, the better. Granted, you're adding just one level of
indirection, but it's on top of a few others. Before I'd apply your patch,
I'd need to be convinced it's really necessary and is a complete answer.
Meaning: rebuilding without reconfiguring after upgrading the underlying
system is fraught with trouble, trouble easily avoided by reconfiguring.
(Too many gerunds, Sire.) If it's really necessary or helpful to rebuild
without reconfiguring on VMS, and this technique addresses all related
difficulties, I'd go along with it.

I hope that sounds reasonable to you. If I misunderstood something, please
correct me.

Regards,

--jkl



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