httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@covalent.net>
Subject Re: [PATCH] 2.0.x pre-alpha support for Cygwin
Date Thu, 30 Aug 2001 06:26:10 GMT

> >   * srclib/apr/file_io/unix/dir.c: changed a suspicious #ifdef
> > statement. Is this a missconfiguration of thread vs. non-thread #ifdef
> > exclusion?!?!
>
> I am leaving the question of this patch to the more gifted.  I see where
> you are coming from, but I read the original (and patch) three times, and
> came to three different conclusions.  Someone want to determine before we
> tag and roll?
>
>
> --- httpd-2_0_22/srclib/apr/file_io/unix/dir.c Fri Jun 15 20:04:43 2001
> +++ httpd-2_0_22-cygwin/srclib/apr/file_io/unix/dir.c Thu Aug  9 10:00:09
> 2001 @@ -112,7 +112,7 @@
>  {
>      apr_status_t ret = 0;
>  #if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS) \
> -    && !defined(READDIR_IS_THREAD_SAFE)
> +    && defined(READDIR_IS_THREAD_SAFE)
>      struct dirent *retent;
>
>      ret = readdir_r(thedir->dirstruct, thedir->entry, &retent);

The code is correct as it is today.  Basically, it is possible for platforms to have
defined _POSIX_THREAD_SAFE_FUNCTIONS, and a thread-safe readdir.

If both of those conditions are true, then we want to use readdir, not readdir_r.
This if statement handle that condition.

Ryan

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Mime
View raw message