X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Funix.lisp;h=9959ae42c052e30a068a7cd644088c89dea26c33;hb=9603675940cce3bcac93b354dca62d20c991cbce;hp=368665e758d386d8046ec8cd7a4f457baa540ba5;hpb=db770d287bb64a58967d08fdd8225c02cdd4d45a;p=sbcl.git diff --git a/src/code/unix.lisp b/src/code/unix.lisp index 368665e..9959ae4 100644 --- a/src/code/unix.lisp +++ b/src/code/unix.lisp @@ -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