Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	autolearn_force=no version=3.4.0
X-Biglobe-Sender: <takimoto-j@kba.biglobe.ne.jp>
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\))
Subject: Re: V01zmodload fails on Cygwin
From: "Jun T." <takimoto-j@kba.biglobe.ne.jp>
In-Reply-To: <160124102244.ZM11864@torch.brasslantern.com>
Date: Mon, 25 Jan 2016 10:28:33 +0900
Content-Transfer-Encoding: 7bit
Message-Id: <94764D50-AD38-47A3-936F-198CFD7FD9E1@kba.biglobe.ne.jp>
References: <F46CF6DC-AC2E-4C64-B94E-E48B3FB68141@kba.biglobe.ne.jp> <160124102244.ZM11864@torch.brasslantern.com>
To: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
X-Mailer: Apple Mail (2.1510)
X-Biglobe-Spnum: 50764
X-Seq: zsh-workers 37771


On 2016/01/25, at 3:22, Bart Schaefer <schaefer@brasslantern.com> wrote:
> } So it seems some symbols from libzsh-5.2-dev-1.dll also exists
> } in param_private.dll, and gethashnode2 is one of those symbols:
> 
> Interesting.  gethashnode2 should be declared external, so it should
> be resolved for param_private.dll at link time.  Seems to have to do
> with whether the external function is *called* vs. merely referenced
> by name?

I'm not familiar with Cygwin (or Windows) dll.
Maybe create an import library libzsh.a?
Or explicitly dlopen("libzsh.dll") from the param_private.dll and
call dlsym("gethashnode2") ?

> Should probably save/restore ->getnode as well, just
> for completeness.

realparamtab->getnode is already saved in getparamnode in your
original code, and getparamnode() (not gethashnode()) is called
in getprivatenode().
On the other hand, gethashnode2() is called in getprivatenode2().

> Do you want to commit or should I?

Please commit it (with necessary modification if any).


