Clisp on windows



"Andrej Vodopivec" <andrej.vodopivec@fmf.uni-lj.si> writes:

> On windows with clisp 2.32 I must change the function getpid in
> server.lisp to
[...]
> 	#-win32((consp (setq tem (errset (system::getenv "PID"))))
> 	 (read-from-string (car tem)))
[...]
> to make the CVS version of maxima work with sockets. Clisp has problems
> with errset.

I think ERRSET works.  It's just that CLISP's GETENV doesn't signal an
error if PID is not in the environment, it simply returns NIL, which
means that there's no point in using ERRSET at all.  Please try the
following fix (I also changed sys::getenv to ext::getenv since this is
its home package since at least 2001).

#+clisp
(defun getpid ( &aux tem)
  (cond #-win32((fboundp 'sys::program-id)
		(sys::program-id))
	((setq tem (ext::getenv "PID"))
	 (read-from-string tem))
	(t (format t "using fake value for pid") -1)))

Wolfgang