[pg-devel] Pg doesn't compile on OpenMCL, patch below

Risto Laakso risto.laakso at gmail.com
Fri Jan 27 06:56:56 UTC 2006


--- sysdep.lisp~        2005-12-20 00:21:50.000000000 +0200
+++ sysdep.lisp 2006-01-26 21:42:52.000000000 +0200
@@ -340,10 +340,16 @@
            (t (error "unknown encoding ~A" encoding)))
      #+(and sbcl sb-unicode)
      (cond ((string= encoding "SQL_ASCII") :ascii)
-           ((string= encoding  "LATIN1") :latin1)
+           ((string= encoding "LATIN1") :latin1)
            ((string= encoding "LATIN9") :latin9)
            ((string= encoding "UNICODE") :utf8)
            (t (error "unknown encoding ~A" encoding)))
+     #+openmcl
+     (cond ((string= encoding "SQL_ASCII") :unix)
+           ((string= encoding "LATIN1") :unix)
+           ((string= encoding "LATIN9") :unix)
+           ((string= encoding "UNICODE") :unix)
+           (t (error "unknown encoding ~A" encoding)))
      #+(or cmu gcl ecl abcl)
      (cond ((string= encoding "SQL_ASCII") :ascii)
            ((string= encoding "LATIN1") :latin1)
@@ -360,7 +366,7 @@
      #+(and :sbcl :sb-unicode)
      (sb-ext:string-to-octets string
                               :external-format
(implementation-name-for-encoding encoding))
-     #+(or cmu gcl ecl abcl)
+     #+(or cmu gcl ecl abcl openmcl)
      (if (member encoding '("SQL_ASCII" "LATIN1" "LATIN9") :test
#'string-equal)
          (let ((octets (make-array (length string) :element-type
'(unsigned-byte 8))))
            (map-into octets #'char-code string))
@@ -378,7 +384,7 @@
     ;; for implementations that have no support for character
     ;; encoding, we assume that the encoding is an octet-for-octet
     ;; encoding, and convert directly
-    #+(or cmu (and sbcl (not :sb-unicode)) gcl ecl abcl)
+    #+(or cmu (and sbcl (not :sb-unicode)) gcl ecl abcl openmcl)
     (let ((string (make-string (length bytes))))
       (map-into string #'code-char bytes))))



More information about the pg-devel mailing list