Skip to Content.
Sympa Menu

freetds - Re: Patches

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Stan Liberman <stan AT vailsys.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Patches
  • Date: 27 Jun 2002 10:58:52 -0500


On Thu, 2002-06-27 at 03:45, ZIGLIO Frediano wrote:
> >
> > On 26 Jun 2002, Stan Liberman wrote:
> >
> > >
> > > 574400 - Several patches for thread safety in tds. Our apps
> > consistently
> > > core dumped at attempt to login from several threads.
> > Pretty much just
> > > replaced non thread-safe functions with their safe equivalents.
> >
> > This gets into a sticky situation, older unices will not have the _r
> > versions of the calls, so we should be checking via autoconf
> > for their
> > existence and using only then. So, something like
> >
> > #if HAVE_LOCALTIME_R
> > tm = localtime_r(&t, &res);
> > #else
> > tm = localtime(&t);
> > #endif
> >
> > and in configure.in adding:
> >
> > AC_CHECK_FUNCS(localtime_r)
> >
> > Otherwise, I'm all for this one going in.
> >
> You should apply patch #569044 too for thread safety.

This patch is not sufficient to make it thread safe. There is a list of
functions that have thread-safe versions.
Here is a snippet from 'man attributes':
=== cut ===
Reentrant functions for libc:


Unsafe Function Reentrant counterpart
ctime ctime_r
localtime localtime_r
asctime asctime_r
gmtime gmtime_r
ctermid ctermid_r
getlogin getlogin_r
rand rand_r
readdir readdir_r
strtok strtok_r
tmpnam tmpnam_r

=== cut ===

>
> freddy77
>
> =================================
> "STRICTLY PERSONAL AND CONFIDENTIAL
>
> This message may contain confidential and proprietary material for the sole
> use of the intended recipient. Any review or distribution by others is
> strictly prohibited. If you are not the intended recipient please contact
> the sender and delete all copies.
> The contents of this message that do not relate to the official business of
> our company shall be understood as neither given nor endorsed by it."
>
> =================================
>
> ---
> You are currently subscribed to freetds as: [stan AT vailsys.com]
> To unsubscribe, forward this message to $subst('Email.Unsub')
--
Regards,
Stan





Archive powered by MHonArc 2.6.24.

Top of Page