From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Hansen Newsgroups: gmane.emacs.devel Subject: Re: A plea for dynamically loadable extension modules Date: Sun, 19 Aug 2007 15:06:34 +0200 Organization: disorganized Message-ID: <87mywn8yhx.fsf@localhorst.mine.nu> References: <87wue0i51a.fsf@lexx.delysid.org> <871xw8i3tr.fsf@tapsellferrier.co.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1187528956 10857 80.91.229.12 (19 Aug 2007 13:09:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 19 Aug 2007 13:09:16 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 19 15:09:13 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IMkWm-0001Wb-Kd for ged-emacs-devel@m.gmane.org; Sun, 19 Aug 2007 15:09:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IMkWl-0008Om-Vo for ged-emacs-devel@m.gmane.org; Sun, 19 Aug 2007 09:09:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IMkWh-0008Oh-Uz for emacs-devel@gnu.org; Sun, 19 Aug 2007 09:09:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IMkWf-0008MW-Bo for emacs-devel@gnu.org; Sun, 19 Aug 2007 09:09:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IMkWf-0008MO-8U for emacs-devel@gnu.org; Sun, 19 Aug 2007 09:09:05 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IMkWe-0000kH-VQ for emacs-devel@gnu.org; Sun, 19 Aug 2007 09:09:05 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IMkWa-0005HQ-IU for emacs-devel@gnu.org; Sun, 19 Aug 2007 15:09:00 +0200 Original-Received: from e178020074.adsl.alicedsl.de ([85.178.20.74]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 19 Aug 2007 15:09:00 +0200 Original-Received: from david.hansen by e178020074.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 19 Aug 2007 15:09:00 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 32 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: e178020074.adsl.alicedsl.de Mail-Copies-To: nobody User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:myaJoHgqD0XlLJxoI40hjf5+YcM= X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:76747 Archived-At: On Sun, 19 Aug 2007 08:52:29 +0530 dhruva wrote: > On 8/19/07, Leo wrote: >> But is it OK to include this patch¹ in Emacs? It allows C DEFUN >> functions to be placed in external libraries and dynamically loaded when >> they were needed. > > I personally feel it would be an extremely nice feature to have the > above functionality in Emacs. If the concern is to make sure such > libraries are released under GPL, I propose the following method: > > 1. All dynamic libraries loaded dynamically (through explicit call to > LoadLibrary/dlopen) must expose a function 'IsGPLed' > 2. In main Emacs, we load it and look for that function > (GetProcAdderess/dlsym) and execute if found. It could return a > 'bool'. > 3. The absence of the function or a false return can prevent loading > that extension library > 4. We could cover the meaning and legal bindings of having 'IsGPLed' > somewhere in the license and it is the responsibility of the > library/owner to make sure it is completely covered under GPL if the > function is implemented to return 'true' and Emacs does not take any > responsibility beyond checking for the function and it's return value > and no more. > > Would this be a feasible approach? Isn't that similar to what Linux does with kernel modules? I think what the FSF wants to avoid is exactly the current situation with Linux and some non free kernel modules. David