From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6434 invoked from network); 15 Dec 1998 16:36:02 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 15 Dec 1998 16:36:02 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id LAA13575; Tue, 15 Dec 1998 11:34:50 -0500 (EST) Resent-Date: Tue, 15 Dec 1998 11:34:50 -0500 (EST) Message-Id: <9812151618.AA44316@ibmth.df.unipi.it> To: zsh-workers@math.gatech.edu Subject: Re: PATCH: unloading modules In-Reply-To: "Sven Wischnowsky"'s message of "Tue, 15 Dec 1998 16:45:37 NFT." <199812151545.QAA13568@beta.informatik.hu-berlin.de> Date: Tue, 15 Dec 1998 17:18:27 +0100 From: Peter Stephenson Resent-Message-ID: <"yoOGb.0.2K3.g-eTs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4807 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Sven Wischnowsky wrote: > Finally I added some code for the setup- and finish-thing inside the > `#ifdef AIXDYNAMIC' but I'm far from certain that this is correct (is > the calling convention for boot et al different under AIX??). I don't > have a AIX box available so I need your help here. Zoli's the expert here, but the example module seems to load, run and unload smoothly at the moment. Probably you need to alter Src/modentry.c to do what you want. Here was Zoli's comment about that. There is a new little C file in the Src directory called modentry.c which is used to create modentry..o which is then linked to every dynamic zsh module created on AIX. modentry..o contains the entry point for the module modentry(int, Module). Since we do not have dlsym, modentry is used to call the boot_/cleanup_ function. The first argument is nonzero for boot and zero for cleanup. Each module is linked with -emodentry. When the module loads, the load subroutine returns a function pointer to modentry. modentry is not exported by any module so there is no name collision. Maybe this requires the setup and finish routine to be defined by every module. One problem I am having is that 'zmodload deltochar' reports a name clash. This happens even immediately on starting zsh -f. % zmodload deltochar deltochar: name clash when adding ZLE function `delete-to-char' deltochar: name clash when adding ZLE function `delete-to-char' It does not seem to happen with any other module. Then there's dynamic loading under HP-UX 10 to support... -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy