Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 20825 invoked from network); 9 Sep 2005 16:11:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Sep 2005 16:11:47 -0000 Received: (qmail 67801 invoked by uid 500); 9 Sep 2005 16:11:47 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 67454 invoked by uid 500); 9 Sep 2005 16:11:44 -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 67434 invoked by uid 99); 9 Sep 2005 16:11:44 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Sep 2005 09:11:44 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [69.225.174.131] (HELO x.win.covalent.net) (69.225.174.131) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Sep 2005 09:11:56 -0700 Received: from [192.168.0.21] ([24.13.128.132]) by x.win.covalent.net over TLS secured channel with Microsoft SMTPSVC(5.0.2195.6713); Fri, 9 Sep 2005 09:10:25 -0700 Message-ID: <4321B40C.8050902@rowe-clan.net> Date: Fri, 09 Sep 2005 11:10:52 -0500 From: "William A. Rowe, Jr." User-Agent: Mozilla Thunderbird 1.0.6-1.1.fc3 (X11/20050720) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Joe Orton CC: dev@apr.apache.org Subject: Re: [PATCH] apr_dso_load2() with flags support References: <20050909110506.GA11389@redhat.com> In-Reply-To: <20050909110506.GA11389@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 09 Sep 2005 16:10:25.0828 (UTC) FILETIME=[FD1E0640:01C5B558] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Joe Orton wrote: > Any objections? This adds support for the usual RTLD_* flags to be > specified by the caller along with the glibc-specific and very useful > RTLD_DEEPBIND; any other implementation-specific flags can be added too > of course. Yup - the proposal you presented is totally nonportable, so -1 as presented. Take a look at; http://www.hmug.org/man/3/dyld.php http://docs.hp.com/en/B2355-90695/shl_load.3X.html http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/loadlibraryex.asp (FYI, on HP/UX, shl API is used on PA32, while dl API is used on PA64... I actually need to modify the ./configure schema to differentiate if we are doing a PA32 or PA64 build.) And note the BEOS, OS2 support no flags at all; http://www.yellowtab.com/develop/dev_docs/doxygen_html/image_8h.html#a19 http://www.edm2.com/os2api/Dos/DosLoadModule.html Really want to see something wild? Check out my favorite; http://xaxxon.slackworks.com/phuku/sharedlib.html In terms of what -we- should do with an apr_dso_load_ex() or whatever it's named (aren't we using _ex designations?)... The new implementation can't define this in RTDL constructs; we need to decide default behavior; and then provide flags to override --- on those platforms which support the override. We also need to determine how an application determines if the platform supports the option, and how apr will react to an unrecognized/unsupported option. E.g. - by default dll's are loaded global, the override should try to allow local, but what do we do when it's not supported by the platform? There are also flags, especially on shl_load, which determine how global constructors and destructors are invoked on load. Perhaps we also need to be able to override these; our C++ users complained quite frequently so we support them now, but perhaps there are applications which need to disable that. Anyways, +1 to the concept and effort, let's flesh this out first before we modify an API that we become stuck with. Bill