Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 53636 invoked from network); 24 Aug 2005 17:10:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Aug 2005 17:10:19 -0000 Received: (qmail 14715 invoked by uid 500); 24 Aug 2005 17:10:17 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 14677 invoked by uid 500); 24 Aug 2005 17:10:17 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 14653 invoked by uid 99); 24 Aug 2005 17:10:16 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Aug 2005 10:10:16 -0700 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [81.103.221.48] (HELO mta08-winn.ispmail.ntl.com) (81.103.221.48) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Aug 2005 10:10:32 -0700 Received: from aamta12-winn.ispmail.ntl.com ([81.103.221.35]) by mta08-winn.ispmail.ntl.com with ESMTP id <20050824171011.XLOJ23002.mta08-winn.ispmail.ntl.com@aamta12-winn.ispmail.ntl.com>; Wed, 24 Aug 2005 18:10:11 +0100 Received: from debian2 ([86.3.242.215]) by aamta12-winn.ispmail.ntl.com with ESMTP id <20050824171011.ECCS29701.aamta12-winn.ispmail.ntl.com@debian2>; Wed, 24 Aug 2005 18:10:11 +0100 Received: from pm by debian2 with local (Exim 4.50) id 1E7ylN-0000oN-O1; Wed, 24 Aug 2005 18:10:09 +0100 To: Jeff Trawick Cc: dev@apr.apache.org Subject: Re: Reducing #ifdef burden on APR applications References: <43071434.8070802@webthing.com> <20050820125919.GB14357@redhat.com> <43073611.1000309@webthing.com> From: Philip Martin Date: Wed, 24 Aug 2005 18:10:09 +0100 In-Reply-To: (Jeff Trawick's message of "Sat, 20 Aug 2005 10:29:55 -0400") Message-ID: <87vf1vjm6m.fsf@debian2.lan> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Jeff Trawick writes: > Solaris will link in APR_SUCCESS-style no-op pthread functions if your > application isn't built thread-capable. Glibc on Linux does the same for things like pthread_mutex_lock: $ cat z.c #include int main() { if (pthread_mutex_lock(NULL)) return 1; return 0; } $ gcc z.c # build without threads $ ./a.out $ echo $? 0 $ gcc -pthread z.c # with threads $ ./a.out Segmentation fault > If APR always provides such APIs and acts like they work, what is to > signal to a threaded APR app that they are picking up a non-threaded > libapr? Glibc doesn't provide no-op functions for things like pthread_mutex_create, those are only available when the full threading library replaces all the no-op functions. -- Philip Martin