1.0.25.2: Eliminate untagged pointers to heap space in cold-init
[sbcl.git] / src / code / unix.lisp
index 368665e..9959ae4 100644 (file)
@@ -190,7 +190,7 @@ corresponds to NAME, or NIL if there is none."
 (defun sb-mkstemp (template-string mode)
   (declare (type string template-string)
            (type unix-file-mode mode))
-  (let ((template-buffer (string-to-octets template-string)))
+  (let ((template-buffer (string-to-octets template-string :null-terminate t)))
     (with-pinned-objects (template-buffer)
       (let ((fd (alien-funcall (extern-alien "sb_mkstemp"
                                              (function int (* char) int))
@@ -395,15 +395,15 @@ corresponds to NAME, or NIL if there is none."
   ;; comma not inside a backquote. This error has absolutely nothing
   ;; to do with the actual meaning of the error (and little to do with
   ;; its location, either).
-  #!-(or linux openbsd freebsd netbsd sunos osf1 darwin win32) (,stub,)
-  #!+(or linux openbsd freebsd netbsd sunos osf1 darwin win32)
+  #!-(or linux openbsd freebsd netbsd sunos osf1 darwin hpux win32) (,stub,)
+  #!+(or linux openbsd freebsd netbsd sunos osf1 darwin hpux win32)
   (or (newcharstar-string (alien-funcall (extern-alien "getcwd"
                                                        (function (* char)
                                                                  (* char)
                                                                  size-t))
                                          nil
                                          #!+(or linux openbsd freebsd netbsd darwin win32) 0
-                                         #!+(or sunos osf1) 1025))
+                                         #!+(or sunos osf1 hpux) 1025))
       (simple-perror "getcwd")))
 
 ;;; Return the Unix current directory as a SIMPLE-STRING terminated