chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] CMake chicken-setup fails on MinGW and MSVC


From: Brandon J. Van Every
Subject: Re: [Chicken-users] CMake chicken-setup fails on MinGW and MSVC
Date: Fri, 18 Aug 2006 10:34:35 -0700
User-agent: Thunderbird 1.5.0.5 (Windows/20060719)

John Cowan wrote:
Brandon J. Van Every scripsit:

  
The platform specific behavior is in library.scm, buried as a primitive:


(define ##sys#pathname-directory-separator
 (let ([st (software-type)])
   (if (and (eq? 'windows st) (not (eq? (build-platform) 'cygwin)))
   #\\
   #\/) ) )


This is wrong for a URL.  I haven't exactly figured it out, but it 
appears that make-pathname is being used for URL construction, which 
ultimately ends up with system-specific behavior when it shouldn't.  
    

IMHO the Right Thing is to use "/" as the pathname directory separator
in all circumstances.  The Windows kernel has accepted both "/" and "\"
as separators since the dark days of DOS 2.0.  It's true that standard
command-line utilities use "/" for options, and the Open File dialogue
box rejects "/" altogether, but when you pass a pathname to a system
call, having a "/" in it is perfectly okay -- I do it all the time when
running Java programs, since Java has no Cygwin build.
  

I'm not inclined to agree, since I believe I've fixed a fair number of bugs where reversing pathname polarity was in fact required.  What clearly should happen, however, is URLs should be formed with forward slashes.


Cheers,
Brandon Van Every


reply via email to

[Prev in Thread] Current Thread [Next in Thread]