From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8626 invoked from network); 28 Jul 2000 14:52:20 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 28 Jul 2000 14:52:20 -0000 Received: (qmail 19352 invoked by alias); 28 Jul 2000 14:52:01 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12423 Received: (qmail 19345 invoked from network); 28 Jul 2000 14:52:00 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "ZSH workers mailing list" Subject: Dynamic loading on Cygwin - status Date: Fri, 28 Jul 2000 18:51:57 +0400 Message-ID: <000101bff8a3$60aad7b0$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 O.K., it almost works :-) It was much easier than I suspected due to the fact, that you can simply link with DLL - no additional stub library is needed. That enourmosly simplified makefiles. There are still some gotchas: - for dlsym() to find a symbol, it has to explcitly exported. It means, that module's setup() etc functions are not found. They has to be defined with __attribute__((__dllexport__)). All exported symbols (that have mod_export) currently get this automatically. - external function or variable imported from another module is not considered a constant on Cygwin (actually, on Windows). Hence, any static initializer fails, e.g BUILTIN("cap", 0, bin_cap, 0, 1, 0, NULL, NULL), where bin_cap is redefined to bin_notavail that in imported from mail DLL. This is not just as easy to solve. - some more Makefiles tweaking is needed; because now modules depend on other module's DLL, we need rules to rebuild them. - of course, zsh.dll has to be installed into $(bindir) else it is not found. But still, I did run Zsh compiled with dynamic loading support :-))) My thanks to Zefram for excellent build system! (And good configure tests). -andrej Have a nice DOS! B >>