From dev-return-2893-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Sat Jun 30 06:37:17 2001 Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 98488 invoked by uid 500); 30 Jun 2001 06:37:17 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 98477 invoked from network); 30 Jun 2001 06:37:17 -0000 Date: Fri, 29 Jun 2001 23:36:58 -0700 From: Aaron Bannert To: "Pier P. Fumagalli" Cc: dev@apr.apache.org Subject: Re: [PATCH] Can't build locks... Message-ID: <20010629233658.P2041@ebuilt.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from pier@betaversion.org on Sat, Jun 30, 2001 at 02:53:44AM +0100 X-AntiVirus: scanned for viruses by AMaViS 0.2.1-pre3 (http://amavis.org/) X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N On Sat, Jun 30, 2001 at 02:53:44AM +0100, Pier P. Fumagalli wrote: > On Darwin 1.3.7 I had an error building locks/unix/crossproc.c What was the error? Maybe autoconf is incorrectly detecting some headers or library functions on Darwin that aren't really there? > >From what it seems in the configure.in AutoConf source, the locking > mechanism is determined in lines around 950-980 and defines some > APR_USE_*_SERIALIZE, those are copied over to apr.h.in in lines 60-70, but > the onther following four (APR_HAS_*_SERIALIZE) are initialized randomly. Your evaluation seems correct to me. What do the various APR_USE_*_SERIALIZE and APR_HAS_*_SERIALIZE lines end up as in your apr.h file? > Crossproc.c uses the APR_HAS ones while configure sets the APR_USE group. I > replaced the APR_HAS with APR_USE and the whole thing went thru... > > Am I missing something? :) The functions in crossproc.c don't actually define which lock implementation gets *used*, but intead is just a conditional compile for that functionality if you have it on your system. For that reason I believe crossproc.c is using APR_HAS_* correctly. The implementation is actually chosen at runtime, for example in locks/unix/locks.c's chose_method() function. OTOH, I think this part may be incorrect. I would expect the part that (at runtime) choses which implementation to use would be defined by autoconf's APR_USE_*_SERIALIZE symbols, but instead it is using APR_HAS_*. -aaron