httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <>
Subject Re: cvs commit: apache-2.0/src/lib/apr/time/unix time.c
Date Wed, 06 Oct 1999 21:46:32 GMT
> According to Single Unix, any of asctime, ctime, getdate,
> gettimeofday, and gmtime can overwrite each other's values. So a
> per-function lock isn't enough in this case.

That's fine.  The idea is still valid, and is still the correct one.  In
this case, we can only protect the functions that APR functions may call,
but there is no way around this.  Of course, this shouldn't be a real
problem anyway, because as Ben pointed out, a threaded system which
doesn't have a real threaded library, is a broken system.  Anyway, the
only change, is instead of calling it with the actual function name,
change everything to use "timefuncs".

> Also, can we assume that if there are nonstandard _r functions (i.e.
> _POSIX_THREAD_SAFE_FUNCTIONS is not defined) that they will behave the
> same as pthreads/SUS dictate? If not, then we should check for
> _POSIX_THREAD_SAFE_FUNCTIONS instead of letting autoconf check for
> each _r function individually.

I don't see this as an issue.  If a system has a function that is defined
by a standard, and the function doesn't work according to the standard,
the platform is broken.  Do you know of any such system?  Or, is this
hand-waving over the issue?


Ryan Bloom
4205 S Miami Blvd	
RTP, NC 27709		It's a beautiful sight to see good dancers 
			doing simple steps.  It's a painful sight to
			see beginners doing complicated patterns.	

View raw message