From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Aur=C3=A9lien_Aptel?= Newsgroups: gmane.emacs.devel Subject: Re: Dynamic loading progress Date: Fri, 10 Oct 2014 17:05:06 +0200 Message-ID: References: <87y4t9m76w.fsf@lifelogs.com> <83lhopb1bp.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1412953538 18116 80.91.229.3 (10 Oct 2014 15:05:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Oct 2014 15:05:38 +0000 (UTC) Cc: Emacs development discussions To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 10 17:05:31 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xcbl5-0000or-6M for ged-emacs-devel@m.gmane.org; Fri, 10 Oct 2014 17:05:31 +0200 Original-Received: from localhost ([::1]:48839 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xcbl4-0004zi-O4 for ged-emacs-devel@m.gmane.org; Fri, 10 Oct 2014 11:05:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xcbkl-0004xj-0x for emacs-devel@gnu.org; Fri, 10 Oct 2014 11:05:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xcbkk-0004pH-2W for emacs-devel@gnu.org; Fri, 10 Oct 2014 11:05:10 -0400 Original-Received: from mail-lb0-x22f.google.com ([2a00:1450:4010:c04::22f]:49188) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xcbki-0004oL-JP; Fri, 10 Oct 2014 11:05:08 -0400 Original-Received: by mail-lb0-f175.google.com with SMTP id u10so3169999lbd.20 for ; Fri, 10 Oct 2014 08:05:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=7Lm0nbO+pgNkUjHPcss00dxMHYT5KDhbwcGf4rNL9Mg=; b=Hc4XSZL71PtvEWlHEbjZylGp5Eamxe8rwInJqMJQpqVAdaVJEV2ZBDi2ZgMsRYwvCN ftKyI4MIENfOozitWZcuwKXtbx8CN7CxTo4cK4mylKsXK2DY5s1uDCRrdkEwFsIHy6WS d+7UR5JeBX3lpTitMuwCz4iNddxG8BV/K5SnsYDq/yQSMocTYO3uFWVzf/uoVx18158W KCNBPS+U/Xqd3KdflHtShKaVGVzegnQrGN6eTViwP2NpPKJ+aOjxGiXi8DETI3I+geVO 2BNEWuLLdswoHWJ4nr4BP67wHCYsKqy5+Y22pIjjUZULeAlb2jEtrJ7YnF13/mxGCnb9 cPTQ== X-Received: by 10.112.151.99 with SMTP id up3mr5340487lbb.45.1412953506730; Fri, 10 Oct 2014 08:05:06 -0700 (PDT) Original-Received: by 10.114.77.131 with HTTP; Fri, 10 Oct 2014 08:05:06 -0700 (PDT) In-Reply-To: <83lhopb1bp.fsf@gnu.org> X-Google-Sender-Auth: 1VfCiTs_SoFlXh-oER8L67E22Wk X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::22f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:175221 Archived-At: On Thu, Oct 9, 2014 at 7:27 PM, Eli Zaretskii wrote: > Well, how about removing this issue by using lt_dlopenext? I use the .so extension to know whether a file is a binary module or elisp (compiled or source). In order to let libltdl guess & try various extensions with dlopenext I have to leave `load-suffixes' alone and try to load the file as a module everytime. If it's actually a module, continue loading it, else load as elisp. I find this messy. What Stefan is proposing is to add the plateform specific suffixes in `load-suffixes' at compilation time. Somehing like this: /* Somwhere in a platform abstraction header (which one?) (I don't know the actual system defines) */ #ifdef HAVE_LTDL #if defined(WINDOWS) #define MODULE_SUFFIX ".dll" #elif defined(UNIX) #define MODULE_SUFFIX ".so" #elif defined(MAC) #define MODULE_SUFFIX ".dylib" #else #error "Modules not supported on this system" #endif #endif /* Now in `load-suffixes' definition */ #ifdef HAVE_LTDL Vload_suffixes = list3 (build_pure_c_string (MODULE_SUFFIX), build_pure_c_string (".elc"), build_pure_c_string (".el")); #else Vload_suffixes = list2 (build_pure_c_string (".elc"), build_pure_c_string (".el")); #endif I'm not familiar enough with every system but having only one extension per system is maybe limiting. After a quick search I found that Mac OSX use both .so and .dylib. Another solution would be to define a new Lisp variable `load-module-suffixes' with every possible module extensions (system specific or not) and use that to test if a file is a module or not.