Raymond Toy pushed to branch issue-364-add-mkstemp-mkdtemp at cmucl / cmucl
Commits:
-
3d4af597
by Raymond Toy at 2025-01-03T13:35:21-08:00
1 changed file:
Changes:
... | ... | @@ -2932,27 +2932,12 @@ |
2932 | 2932 | which must have \"XXXXXX\" as the last six characters. The
|
2933 | 2933 | directory is created with permissions 0700. The name of the
|
2934 | 2934 | directory is returned."
|
2935 | - (let* ((new-template (copy-seq template))
|
|
2935 | + (let* ((octets (%name->file template))
|
|
2936 | 2936 | (result (alien-funcall
|
2937 | 2937 | (extern-alien "mkdtemp"
|
2938 | 2938 | (function (* char)
|
2939 | 2939 | c-call:c-string))
|
2940 | - new-template)))
|
|
2941 | - (if (zerop (deref result 0))
|
|
2942 | - (values nil (unix-errno))
|
|
2943 | - (cast result c-call:c-string))))
|
|
2944 | - |
|
2945 | -(defun unix-mkdtemp (template)
|
|
2946 | - _N"Generate a uniquely named temporary directory from Template,
|
|
2947 | - which must have \"XXXXXX\" as the last six characters. The
|
|
2948 | - directory is created with permissions 0700. The name of the
|
|
2949 | - directory is returned."
|
|
2950 | - (let* ((new-template (copy-seq template))
|
|
2951 | - (result (alien-funcall
|
|
2952 | - (extern-alien "mkdtemp"
|
|
2953 | - (function (* char)
|
|
2954 | - c-call:c-string))
|
|
2955 | - new-template)))
|
|
2940 | + octets)))
|
|
2956 | 2941 | (if (zerop (sap-int (alien-sap result)))
|
2957 | 2942 | (values nil (unix-errno))
|
2958 | - (cast result c-string)))) |
|
2943 | + (%file->name octets)))) |