Raymond Toy (RT/EUS) writes:
 > >  > I also now see there are a whole bunch of issues, like how should
 > >  > "..a" be parsed?  Is it name = "..a", type = nil, or name = ".", type
 > >  > "a", or something else?  My head hurts.
 > > 
 > > I suppose anything goes as long as you are consistent.  After all the
 > > concept of file type in the pathname is alien to the Unix filesystem.
 > > Though, I can immagine, different behaviours from different Lisp
 > > implementations may cause portability issues.
 > 
 > Converting strings to pathnames has never been portable.  If you want 
 > portability, you need to use make-pathname directly.

Well, there are situation where you can't use MAKE-PATHNAME yourself.
DIRECTORY, for instance, will use it for you.  That BTW was the source
of my problems.  Knowing in advance what goes in type and what goes in
name, I believe, does simplify writing portable code.

 > >  >     WP> that Unix allows things like "cat .", maybe SBCL's approach is 
 > > the
 > >  > 
 > >  > On Solaris, Mac OS X, and Linux:
 > >  > 
 > >  > $ /bin/cat .
 > >  > cat: input error on .: Is a directory
 > > 
 > > Are you working on a NFS filesystem?  That's not the behaviour of a
 > > Posix open().
 > 
 > Actually, on Solaris it was an NFS system.  But for Mac OS X, and Linux, 
 > it was not.  But on Solaris cat /bin dumps out the directory.

A friend confirmed that although Linux cat complains when fed with a
directory, the behaviour of its open(2) is in line with Posix.  That
is, it will happily open a directory.

Funny enough, I'm running FreeBSD from which Mac OS X should descend.

-- 
walter pelissero
http://www.pelissero.de

Reply via email to