1
0
Fork 0

- used osicat as provider for 'mkstemps'.

This commit is contained in:
cage 2022-02-24 17:38:57 +01:00
parent 9fab9d8771
commit 808dad006e
1 changed files with 4 additions and 6 deletions

View File

@ -358,13 +358,11 @@
(text-utils:strcat home *directory-sep*)
home)))
(cffi:defcfun (ffi-mkstemp "mkstemps") :int (template :pointer) (suffix-length :int))
(defun %mkstemp (prefix suffix)
(let ((template (text-utils:strcat prefix "XXXXXX" suffix)))
(cffi:with-foreign-string (ptr-template template)
(ffi-mkstemp ptr-template (length suffix))
(cffi:foreign-string-to-lisp ptr-template))))
(multiple-value-bind (x path)
(nix:mkstemps prefix suffix)
(declare (ignore x))
path))
(defparameter *temporary-files-created* ())