recent change to src/server.lisp broke gcl compiled maxima - FIXED



I tried to build CVS maxima using gcl under windows recently, but found 
that the testsuite got stuck in the "compile(f);" test in rtest15.mac.

The problem was introduced in a patch on 2007-04-30 to src/server.lisp
(below).  Following this patch the lisp function (getpid) doesn't return.
The original code specifically excludes gcl, as the getpid function is 
imported from system: in file maxima-package.lisp.  Unfortunately this
was overlooked and a conflicting definition was provided.

I have committed the following patch to server.lisp.  Tested by building
cvs maxima with gcl-2.6.8 (cvs) on mingw and running the maxima testsuite. 
An alternative solution would be to not import system:getpid.

===================================================================
+++ server.lisp 2007-05-13 12:15:32.070659200 +1000
@@ -68,6 +68,8 @@
       (values (parse-integer (maxima-getenv "PID")))
     ((or type-error parse-error) () -1)))
 
+;;; For gcl, getpid is imported from system: in maxima-package.lisp
+#-gcl
 (defun getpid ()
 #+clisp (os:process-id)
 #+(or cmu scl) (unix:unix-getpid)
===================================================================

The problem patch is:

$ cvs diff -u -D  "2007-04-30 00:00 UTC" -D "2007-05-01 00:00 UTC"  server.lisp
Index: server.lisp
===================================================================
RCS file: /cvsroot/maxima/maxima/src/server.lisp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- server.lisp 27 Mar 2007 20:40:51 -0000      1.13
+++ server.lisp 30 Apr 2007 15:20:21 -0000      1.14
@@ -8,7 +8,6 @@
   (require 'sb-posix)
   (require 'sb-bsd-sockets))
 
-
 (defvar $in_netmath nil)
 (defvar $show_openplot t)
 (defvar *socket-connection*)
@@ -22,11 +21,10 @@
     (setq *error-output* sock)
     (setq *terminal-io* sock)
     (setq *trace-output* sock)
-    (format t "pid=~a~%"        (getpid))
+    (format t "pid=~a~%" (getpid))
     (force-output sock)
-    (setq *debug-io* sock)
-    (values)
-    ))
+    (setq *debug-io* sock))
+  (values))
 
 ;;; from CLOCC: <http://clocc.sourceforge.net>;
 (defun open-socket (host port &optional bin)
@@ -70,19 +68,14 @@
       (values (parse-integer (maxima-getenv "PID")))
     ((or type-error parse-error) () -1)))
 
-#+clisp
-(deff getpid (symbol-function
-             ;; Decide at load time which function to use.
-             (or (and (member :unix *features* :test #'eq)
-                      (or (find-symbol "PROCESS-ID" "SYS")
-                          (find-symbol "PROGRAM-ID" "SYS")))
-                 'getpid-from-environment)))
-
-#+(or cmu scl)
-(defun getpid () (unix:unix-getpid))
-
-#+sbcl
-(defun getpid () (sb-unix:unix-getpid))
+(defun getpid ()
+#+clisp (os:process-id)
+#+(or cmu scl) (unix:unix-getpid)
+#+sbcl (sb-unix:unix-getpid)
+#+gcl (system:getpid)
+#+openmcl (ccl::getpid)
+#-(or clisp cmu scl sbcl gcl openmcl) (getpid-from-environment)
+)
 
 #+(or gcl clisp cmu scl sbcl)
 (defun xchdir (w)


NOTICE
This e-mail and any attachments are private and confidential and may contain privileged information. If you are not an authorised recipient, the copying or distribution of this e-mail and any attachments is prohibited and you must not read, print or act in reliance on this e-mail or attachments.
This notice should not be removed.