[Openmcl-devel] [openmcl-devel] Pathname-host-sstr on cygwin x8664 Vista

Gary Byers gb at clozure.com
Fri Dec 5 03:40:37 UTC 2008


The best way to prevent that error from happening is to not call
internal functions like CCL::PATHNAME-HOST-SSTR, since those 
functions might change or disappear at any time.

As noted in <http://trac.clozure.com/openmcl/wiki/WindowsNotes>,
CCL doesn't recognize baclslashes as directory separators in
Windows pathname namestrings.

? (cl:pathname-host "C:/cygwin/home/ragerdl/acl2-3.4/bin/wx86cl64.exe")
should return :UNSPECIFIC : the directory separators in the namestring
make it clear that this is a physical pathname, and the C: prefix is
parsed as a reference to the Windows C drive letter (the PATHNAME-DEVICE).

A namestring like:

c:foo

is ambiguous: it's either a reference to something named "foo" in the
current directory on Windows drive C, or a reference to something named
"foo" relative to the logical pathname host "c".  We try to interpret
it as the latter, then get upset when we find that there's no logical
host named "C".  (This seems a little better than interpreting it
as a relative Windows pathname would be, since it's possible and not
extremely ugly to use syntax like:

c:./foo

to denote "foo in the current directory on drive C".)

In any case, since we're using the presence/absence of directory separators
as an imperfect heuristic and since we don't (yet) recognize backslashes
as directory separators,

c:\\no\\directory\\separators\\here

is treated as a logical pathname relative to the host C, which
probably doesn't exist.

(pathname (substitute #\/ #\\ "c:\\no\\directory\\separators\\here"))

Most things in the lisp that obtain namestrings from the OS do this
substitution for you; if you're dealing with a command-line argument
or an environment variable yourself, you may need to do it manually
(And yes, eventually all of the namestring-parsing code should be
rewritten to interpret backslashes as directory separators.)




On Thu, 4 Dec 2008, David L. Rager wrote:

> Greetings,
>
> Does anyone know how I can prevent the below error from occurring?  Is
> there a cygwin package I should install?  Is it a bug and would you
> like me to open something on tracker?
>
> Thank you,
> David
>
>
> sh-3.2$ ../bin/wx86cl64.exe
> Welcome to Clozure Common Lisp Version 1.3-dev-r11404M-trunk  (WindowsX8664)!
> ? (ccl::PATHNAME-HOST-SSTR
> "C:\\cygwin\\home\\ragerdl\\acl2-3.4\\bin\\wx86cl64.exe" 0 48 NIL)
>> Error: "C" is not a defined logical host
>> While executing: CCL::PATHNAME-HOST-SSTR, in process listener(1).
>> Type :POP to abort, :R for a list of available restarts.
>> Type :? for other options.
> 1 >
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list