Raymond Toy pushed to branch issue-394-getcwd-retry-buffer-size at cmucl / cmucl
Commits:
-
cee8ce72
by Raymond Toy at 2025-03-31T14:40:40-07:00
3 changed files:
Changes:
... | ... | @@ -370,26 +370,10 @@ |
370 | 370 | nil)
|
371 | 371 | |
372 | 372 | |
373 | -;; Use getcwd instead of getwd. But what should we do if the path
|
|
374 | -;; won't fit? Try again with a larger size? We don't do that right
|
|
375 | -;; now.
|
|
376 | -#+nil
|
|
377 | -(defun unix-current-directory ()
|
|
378 | - ;; 5120 is some randomly selected maximum size for the buffer for getcwd.
|
|
379 | - (with-alien ((buf (array c-call:char 5120)))
|
|
380 | - (let ((result
|
|
381 | - (alien-funcall
|
|
382 | - (extern-alien "getcwd"
|
|
383 | - (function (* c-call:char)
|
|
384 | - (* c-call:char) c-call:int))
|
|
385 | - (cast buf (* c-call:char))
|
|
386 | - 5120)))
|
|
387 | -
|
|
388 | - (values (not (zerop
|
|
389 | - (sap-int (alien-sap result))))
|
|
390 | - (%file->name (cast buf c-call:c-string))))))
|
|
391 | - |
|
392 | 373 | (defun unix-current-directory ()
|
374 | + "Get the current working directory. If the directory could be
|
|
375 | + determined, T and the directory name as a string are returned.
|
|
376 | + Otherwise, both values are NIL."
|
|
393 | 377 | (let (result)
|
394 | 378 | (unwind-protect
|
395 | 379 | (progn
|
... | ... | @@ -28,6 +28,13 @@ msgstr "" |
28 | 28 | msgid "Syscall ~A failed: ~A"
|
29 | 29 | msgstr ""
|
30 | 30 | |
31 | +#: src/code/unix.lisp
|
|
32 | +msgid ""
|
|
33 | +"Get the current working directory. If the directory could be\n"
|
|
34 | +" determined, T and the directory name as a string are returned.\n"
|
|
35 | +" Otherwise, both values are NIL."
|
|
36 | +msgstr ""
|
|
37 | + |
|
31 | 38 | #: src/code/unix.lisp
|
32 | 39 | msgid "Test for read permission"
|
33 | 40 | msgstr ""
|
... | ... | @@ -9667,6 +9667,15 @@ msgid "" |
9667 | 9667 | " an otherwise undefined logical host."
|
9668 | 9668 | msgstr ""
|
9669 | 9669 | |
9670 | +#: src/code/pathname.lisp
|
|
9671 | +msgid ""
|
|
9672 | +"When non-NIL, pathnames are on Darwin are normalized when created.\n"
|
|
9673 | +" Otherwise, the pathnames are unchanged.\n"
|
|
9674 | +"\n"
|
|
9675 | +" This must be NIL during bootstrapping because Unicode is not yet\n"
|
|
9676 | +" available."
|
|
9677 | +msgstr ""
|
|
9678 | + |
|
9670 | 9679 | #: src/code/pathname.lisp
|
9671 | 9680 | msgid "A path specification, either a string, file-stream or pathname."
|
9672 | 9681 | msgstr ""
|