Subject: Re: pthreads plan
To: Charles M. Hannum <firstname.lastname@example.org>
From: Michael Graff <email@example.com>
Date: 11/06/1999 08:47:24
firstname.lastname@example.org (Charles M. Hannum) writes:
> > What about something like this?
> > _getc(): no multithreaded support
> > _getc_MT(): locking
> > and in the header file:
> > #if defined(_REENTRANT)
> > rename(getc, _getc_MT);
> > #else
> > rename(getc, _getc);
> > #endif
> That doesn't really help, since getc() is a macro.
Ok, I chose the wrong function to give an example against, but if you
replace getc with, say, printf, would this idea work?