From: John Cowan <>
Date: Sunday, July 21, 2019 12:56 PM

On Sun, Jul 21, 2019 at 12:14 PM <> wrote:


Which the UNIX/POSIX world has not seen fit to provide besides requiring you to follow a trail of crumbs to find the real file, on my Bionic Beaver it totals 5 files after /usr/include/errno.h. 

[ Using the compiler, grep etc. ]

Or EMACS Makes All Computing Simple starting from

If the specific system doesn't support some E-identifier, you'll get an "undefined variable" error from Scheme.

Creating errno/perm etc. will be a bit obnoxious if there are systems out there that don't actually define all of the POSIX set....

And that's where the fun begins.  My Bionic Beaver Linux defines all the base POSIX errnoes, but OpenBSD 6.5 lacks the STREAMS, i.e. AT&T not BSD ETIME, ENOSTR, ENOSR, and ENODATA, as well as ENOLINK and EMULTIHOP, outside of a last ditch LLVM c++ include file which is not C friendly.  There will no doubt be more examples of this, but this is by definition a messy SRFI for a messy world.

One reason I went ahead is the optional override?  argument in 3.3. File system procedures.  Which bring up a policy question, when create-directory and rename-file are given non-empty target directories and override? is #t, as well as 
 as it is now, should we recursively delete their contents if they have any?  On the one hand that's obviously dangerous, on the other, if you don't want your disk packs Bartonized, it's probably best that the SRFI implimentor does this carefully.

One alternative for the first two with override? as #t is to raise an error if not empty, and allow the user to fix this with delete-directory, ideally by adding a recursive optional argument it.  That would isolate the really dangerous behavior to that function with its obvious name and requiring the extra argument.

I'd like to add an override? or perhaps recursive-delete? argument to delete-directory anyway, there's utility in using that system call to delete only empty directories without trying a recursive delete (rmdir * in the shell), I prefer the symmetry of all of these taking an override?  type optional argument, and providing an in-your-face recursive directory deletion option is good.

Another option would be to emulate the rm command, except that's even more dangerous, and there's already a delete-file in R7RS.

- Harold