[pg-devel] Portability to LispWorks

Sven Van Caekenberghe scaekenberghe at common-lisp.net
Tue Mar 18 14:19:30 UTC 2008


Hi,

I had to make a couple of small changes to compile/load the latest  
version (cvs head) of pg-dot-lisp with LispWorks 5.

Enclosed is a cvs diff -u (svc-lw5-changes). It would be very nice if  
pg-dot-lisp ran without modifications on LispWorks.

The main problem with LispWorks is that although no package with the  
name "POSTGRESQL" exists in the Personal and Professional editions of  
LW, that name is reserved and defining such a package results in an  
error. This is because in the Enterprise edition of LW, the addon  
product Common SQL does use a package with the name "POSTGRESQL".

Currently, the main package defined by pg-dot-lisp is called  
"POSTGRESQL" and has "PG" as nickname. I suggest to name this package  
"PG-DOT-LISP" (or even "PG.LISP") on LW (#+lispworks) and to use the  
same nickname. In all source files, I have replaced (in- 
package :postgresql) to (in-package :pg) - if you don't like this, we  
could do this conditionally for LW.

Furthermore, for some reason, I had to place an eval-when (:compile- 
toplevel) around the definition of the macro assemble-ub32 in  
md5.lisp, otherwise the defconstant +md5-magic-[abcd]+ failed to  
compile (full error).

In the pg.asd file, the LW dependency on "comm" does not work for me  
(full error) and might safely be removed.

I removed the (defvar *pg-client-encoding*) declaration in sysdep.lisp  
because it isn't needed there and is redefined pg.lisp, which gives a  
warning.

I also removed the declaim inline for %flush for LW since it didn't  
work (inline expansion failed).

All tests seem to run successfully.

Thanks again for pg.lisp, it works very well, is easy to understand  
and work with.

Regards,

Sven

-------------- next part --------------
A non-text attachment was scrubbed...
Name: svc-lw5-changes
Type: application/octet-stream
Size: 6524 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/pg-devel/attachments/20080318/c96c06de/attachment.obj>
-------------- next part --------------





More information about the pg-devel mailing list