Skip to Content.
Sympa Menu

freetds - Re: Coding style document

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: ZIGLIO Frediano <Frediano.Ziglio AT omnitelvodafone.it>
  • To: "'TDS Development Group'" <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: Coding style document
  • Date: Fri, 14 Jun 2002 16:52:01 +0200


>
> On 2002.06.13, James K. Lowden <jklowden AT speakeasy.org> wrote:
> > On Thu, 13 Jun 2002 16:12:56 -0400 "Dossy"
> <dossy AT panoptic.com> wrote:
> >
> > > While we're at it, in a greedy fit of self-interest, can
> I ask that
> > > thread-safe versions of the convert functions be created, so I can
> > > ditch the ones I hacked together for nsfreetds?
> >
> > I have a thread-poor system. Could you be more explicit
> about what's not
> > thread-safe in convert.c? I'm familiar with threading
> issues in general,
> > but not with the unix system calls or structure names.
>
> convert.c:
>
> 56 /*
> 57 this needs to go...
> 58 it won't handle binary or text/image when they are added
> 59 it's not thread safe
> 60 it works for the moment though til i decide how i
> really want to
> handle it
> 61 */
> 62 static TDS_CHAR tmp_str[4096];
>
> Global variables are not thread-safe.
>
> I just found this URL about "Writing Reentrant and Thread-Safe Code"
> which might be worth a quick read:
>
>
> http://www.unet.univie.ac.at/aix/aixprggd/genprogc/writing_ree
ntrant_thread_safe_code.htm

You are right. I written a simple patch to this (see patch #569044 on
SourceForge)

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page