From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dhruva Newsgroups: gmane.emacs.devel Subject: Re: A plea for dynamically loadable extension modules Date: Sun, 19 Aug 2007 08:52:29 +0530 Message-ID: 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: quoted-printable X-Trace: sea.gmane.org 1187493758 3962 80.91.229.12 (19 Aug 2007 03:22:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 19 Aug 2007 03:22:38 +0000 (UTC) Cc: emacs-devel@gnu.org To: Leo , "Richard Stallman" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 19 05:22:36 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 1IMbN6-0000he-6b for ged-emacs-devel@m.gmane.org; Sun, 19 Aug 2007 05:22:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IMbN6-0004CV-2K for ged-emacs-devel@m.gmane.org; Sat, 18 Aug 2007 23:22:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IMbN3-0004CM-Gv for emacs-devel@gnu.org; Sat, 18 Aug 2007 23:22:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IMbN2-0004C6-3r for emacs-devel@gnu.org; Sat, 18 Aug 2007 23:22:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IMbN1-0004C3-SV for emacs-devel@gnu.org; Sat, 18 Aug 2007 23:22:31 -0400 Original-Received: from mu-out-0910.google.com ([209.85.134.188]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IMbN1-00007S-FN for emacs-devel@gnu.org; Sat, 18 Aug 2007 23:22:31 -0400 Original-Received: by mu-out-0910.google.com with SMTP id g7so1057272muf for ; Sat, 18 Aug 2007 20:22:29 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Mi2fEm7XavK9miJgh6kYUPMrJDZiCLCccvVBIDHL3nhG5tYACmRQ7OAyxuJeMZ2KWLkG5dFShLGUwSzZSLGTiYduC2/2pPynz1C6eYgffeJ97tWVyJAUMDeMcGJXA3WthRf2+uSpxHG76V7/UN3RWFrsn2O0HBZhjcHzSEuW9gU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nxxomdgV2C/Zx6N4gW8Y9YgtMebT5XOT/aV4tws4Ichdou27bT9lCipeczKdaPpnDYrDRZZj+BN/46P//12Wl0IqmmH2erz3iIWS+2ud0Pq3vVsIwx8o0gdXia3Ds7NZjMiisXQG2GRf/hkUZEmukLwXs8Bhl+5YjgHVm8ejA58= Original-Received: by 10.78.136.9 with SMTP id j9mr1422204hud.1187493749382; Sat, 18 Aug 2007 20:22:29 -0700 (PDT) Original-Received: by 10.78.206.20 with HTTP; Sat, 18 Aug 2007 20:22:29 -0700 (PDT) In-Reply-To: Content-Disposition: inline X-Detected-Kernel: Linux 2.6 (newer, 2) 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:76737 Archived-At: Hi, On 8/19/07, Leo wrote: > But is it OK to include this patch=B9 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? -dky --=20 Dhruva Krishnamurthy Contents reflect my personal views only!