httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: [?PATCH?] using getpwnam_r in mod_userdir
Date Sat, 11 Nov 2000 17:26:59 GMT

> > There are certainly theoretical difficulties...  I almost suggested
> > something similar+ but I don't know how many folks will find it cool
> > to throw out the ability to thread on FreeBSD.
> > 
> > Are we sure that this won't be an issue for other APR apps too?
> > 
> > +have APR refuse to configure --with-threads if
> > _POSIX_THREAD_SAFE_FUNCTIONS was defined but getpwnam_r() wasn't
> > available, and document that getpwnam() better be thread-safe if we
> > have threads but no _POSIX_THREAD_SAFE_FUNCTIONS
> 
> +1

I had a brainstorm this morning.  We are re-inventing the wheel here.  APR
has already solved this EXACT problem for readdir and other
functions.  Let's just move getpwnam into APR under a new user
directory.  That is about as non-portable as you can get right now, so
this makes sense for APR anyway.  Then, we just solve this the same way it
was solved for readdir.

When configuring APR, we should output an error message that alerts people
to a possible problem if they try to compile APR with threads on a
platform that has _POSIX_THREAD_SAFE_FUNCTIONS, but they don't have _r
functions.  Obviously this message wouldn't be output on platforms without
this problem.  I can post a patch later today for unix if that's what
people want.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message