Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 19259 invoked by uid 500); 30 Aug 2001 06:25:24 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 19141 invoked by uid 500); 30 Aug 2001 06:25:24 -0000 Delivered-To: apmail-new-httpd@apache.org Content-Type: text/plain; charset="iso-8859-1" From: Ryan Bloom Reply-To: rbb@covalent.net Organization: Covalent Technologies To: dev@httpd.apache.org, "William A. Rowe, Jr." , Subject: Re: [PATCH] 2.0.x pre-alpha support for Cygwin Date: Wed, 29 Aug 2001 23:26:10 -0700 X-Mailer: KMail [version 1.3] References: <3B751898.AB17E3B7@wapme-systems.de> <0d2401c13119$66dbd170$94c0b0d0@roweclan.net> In-Reply-To: <0d2401c13119$66dbd170$94c0b0d0@roweclan.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20010830062611.252B546993@koj.rkbloom.net> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Status: O X-Status: X-Keywords: X-UID: 1598 > > * 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 --------------------------------------------------------------