<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>Hans,<br></div>
<div> </div>
<div>The example is below. I put all of it in a single file. When I load the file I get<br></div>
<div> </div>
<div>;Compiler warnings for "bug.lisp" :<br></div>
<div>; In GENERATE-KEY: In the call to GENERATE-KEY with arguments (NEW-USER NEW-PASSWD *LIBRARY-KEYS-DIR*),<br></div>
<div>; 3 arguments were provided, but at most 2 are accepted<br></div>
<div>; by the lexically visible definition of GENERATE-KEY<br></div>
<div> </div>
<div>In the real project this was hidden by Quicklisp. It also fails on both CCL linux 64b and SBCL linux 64b with the same warning. So this was my mistake. I will have to read up on scoping rules again.<br></div>
<div> </div>
<div>Thanks for your time.<br></div>
<div> </div>
<div> </div>
<div>#|****************************************************************************|#<br></div>
<div>(in-package #:cl-user)<br></div>
<div> </div>
<div>(defpackage #:encryption<br></div>
<div> (:use #:cl)<br></div>
<div> (:export #:generate-key)) <br></div>
<div> </div>
<div>(in-package #:encryption)<br></div>
<div> </div>
<div>(defun generate-key (new-user new-passwd home-dir <br></div>
<div> &optional (out *standard-output*))<br></div>
<div> (declare (ignore new-user new-passwd home-dir out))<br></div>
<div> (print "Correct function called."))<br></div>
<div> </div>
<div>#|****************************************************************************|#<br></div>
<div>(in-package #:cl-user)<br></div>
<div> </div>
<div>(defpackage #:director<br></div>
<div> (:use #:cl<br></div>
<div> #:encryption)<br></div>
<div> (:export #:generate-key))<br></div>
<div> </div>
<div>(in-package #:director)<br></div>
<div> </div>
<div>(defparameter *library-keys-dir* #P"C:/tmp/keys")<br></div>
<div> </div>
<div>(defun generate-key (new-user new-passwd)<br></div>
<div> (encryption:generate-key new-user new-passwd *library-keys-dir*))<br></div>
<div> </div>
<div>#|****************************************************************************|#<br></div>
<div>(in-package :cl-user)<br></div>
<div> </div>
<div>(defpackage #:main<br></div>
<div> (:use #:cl))<br></div>
<div> </div>
<div>(in-package #:main)<br></div>
<div> </div>
<div>(director:generate-key "username" "gpg-passphrase")<br></div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div id="sig28947945"><div class="signature">--<br></div>
<div class="signature">Wimpie Nortje<br></div>
<div class="signature">Strongroom - Host-proof notepad<br></div>
<div class="signature">Selective Share - Encryption-as-a-Service<br></div>
<div class="signature"><a href="https://www.selectiveshare.com/?pk_campaign=email-sig">https://www.selectiveshare.com</a><br></div>
</div>
<div> </div>
<div> </div>
<div>On Mon, Jun 8, 2015, at 01:16 PM, Hans Hübner wrote:<br></div>
<blockquote type="cite"><div dir="ltr"><div>Wimpie,<br></div>
<div> </div>
<div>can you please supply us with a complete, working example of code that demonstrates the problem, in particular including the defpackage forms?<br></div>
<div> </div>
<div>Thanks,<br></div>
<div>Hans<br></div>
</div>
<div><div> </div>
<div><div>2015-06-08 7:03 GMT-04:00 Wimpie Nortje <span dir="ltr"><<a href="mailto:wimpie@selectiveshare.com">wimpie@selectiveshare.com</a>></span>:<br></div>
<blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);padding-left:1ex;">Hi everyone,<br> <br>
I am porting my application from linux 64b to windows 32b. On windows<br>
CCL calls the wrong function while it works fine in linux.<br> <br>
In principle the code looks like this<br> <br>
(in-package :b)<br>
(defun fn (par1 par2 &optional (out *standard-output*)) [3]<br>
(do-stuff))<br> <br>
(in-package :a)<br>
(defun fn (par1 par2) [2]<br>
(b:fn par1 par2 *some-global*)) [1]<br> <br>
(in-package :main)<br>
(a:fn Val1 Val2)<br> <br> <br>
When I run this I get the following error:<br>
Too many arguments in call to #<Compiled-function B:FN #xE0A390E>:<br>
3 arguments provided, at most 2 accepted.<br>
[Condition of type CCL::TOO-MANY-ARGUMENTS]<br> <br>
It seems that the function call at [1] is calling the definition at [2]<br>
instead of the one at [3]. Also, when I do M-. (slime-edit-definition)<br>
at [1] it jumps to [2].<br> <br>
If I rename b:fn to something else without any other code changes, it<br>
works.<br> <br>
This code works unmodified on linux 64b. I have not yet tried on windows<br>
64b<br> <br>
Is this a bug or am I doing something wrong?<br> <br>
I am running CCL Version 1.10-r16196 (WindowsX8632) on Windows XP SP3.<br> <br> <br>
--<br>
Wimpie Nortje<br>
Strongroom - Host-proof notepad<br>
Selective Share - Encryption-as-a-Service<br> <a href="https://www.selectiveshare.com">https://www.selectiveshare.com</a><br>
_______________________________________________<br>
Openmcl-devel mailing list<br> <a href="mailto:Openmcl-devel@clozure.com">Openmcl-devel@clozure.com</a><br> <a href="https://lists.clozure.com/mailman/listinfo/openmcl-devel">https://lists.clozure.com/mailman/listinfo/openmcl-devel</a></blockquote></div>
<div> </div>
</div>
</blockquote><div> </div>
</body>
</html>