This is the second version of this serie after Theo review. It includes the patch from Theo first and mine after.
Let me know if it looks ok. Thanks.
threads / discuss / 28028
Subject: [PATH 0/2] On Cygwin support both UNIX and DOS style path-names
This is the second version of this serie after Theo review. It includes the patch from Theo first and mine after.
Let me know if it looks ok. Thanks.
[PATCH 1/2] git-compat-util: add generic find_last_dir_sep that respects is_dir_sep
From: Theo Niessink <theo@taletn.com>
Move MinGW's find_last_dir_sep to git-compat-util.h, so it can also be used on other platforms that define is_dir_sep, e.g. Cygwin.
Signed-off-by: Theo Niessink <theo@taletn.com> Acked-by: Pascal Obry <pascal@obry.net> --- compat/mingw.h | 9 --------- git-compat-util.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/compat/mingw.h b/compat/mingw.h index ce9dd98..547568b 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -300,15 +300,6 @@ int winansi_fprintf(FILE *stream, const char *format, ...) __attribute__((format #define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':') #define is_dir_sep(c) ((c) == '/' || (c) == '\\') -static inline char *mingw_find_last_dir_sep(const char *path) -{ - char *ret = NULL; - for (; *path; ++path) - if (is_dir_sep(*path)) - ret = (char *)path; - return ret; -} -#define find_last_dir_sep mingw_find_last_dir_sep #define PATH_SEP ';' #define PRIuMAX "I64u" diff --git a/git-compat-util.h b/git-compat-util.h index ddfbf77..c2c94cd 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -211,6 +211,18 @@ extern char *gitbasename(char *); #define has_dos_drive_prefix(path) 0 #endif +#if !defined(find_last_dir_sep) && defined(is_dir_sep) +static inline char *compat_find_last_dir_sep(const char *path) +{ + char *ret = NULL; + for (; *path; ++path) + if (is_dir_sep(*path)) + ret = (char *)path; + return ret; +} +#define find_last_dir_sep compat_find_last_dir_sep +#endif + #ifndef is_dir_sep #define is_dir_sep(c) ((c) == '/') #endif
-- 1.7.6.404.g5d2fc
[PATCH 2/2] On Cygwin support both UNIX and DOS style path-names
In fact Cygwin supports both, so make Git agree with this. The failing case is when a file is committed in a sub-dir of the repository using a log message from a file specified with a DOS style path-name. To reproduce:
$ cd src $ git commit -F c:\tmp\log.txt file.c fatal: could not read log file 'src/c:\tmp\log.txt': No such file \ or directory.
Signed-off-by: Pascal Obry <pascal@obry.net> --- compat/cygwin.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/compat/cygwin.h b/compat/cygwin.h index a3229f5..de9737c 100644 --- a/compat/cygwin.h +++ b/compat/cygwin.h @@ -7,3 +7,6 @@ extern stat_fn_t cygwin_lstat_fn; #define stat(path, buf) (*cygwin_stat_fn)(path, buf) #define lstat(path, buf) (*cygwin_lstat_fn)(path, buf) + +#define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':') +#define is_dir_sep(c) ((c) == '/' || (c) == '\\')
-- 1.7.6.404.g5d2fc
Re: [PATCH 2/2] On Cygwin support both UNIX and DOS style path-names
On Fri, Aug 5, 2011 at 6:10 PM, Pascal Obry <pascal@obry.net> wrote:
> In fact Cygwin supports both, so make Git agree with this. > The failing case is when a file is committed in a sub-dir of the > repository using a log message from a file specified with a DOS > style path-name. To reproduce: > > $ cd src > $ git commit -F c:\tmp\log.txt file.c > fatal: could not read log file 'src/c:\tmp\log.txt': No such file \ > or directory.
Cygwin is a unix-layer on top of Windows, designed to play by the POSIX-rules. So why would you want to support Windows-style paths on Cygwin?
If you want a Git that handles Windows paths, use Git for Windows...
Re: [PATCH 2/2] On Cygwin support both UNIX and DOS style path-names
Le 05/08/2011 19:29, Erik Faye-Lund a écrit :
> Cygwin is a unix-layer on top of Windows, designed to play by the > POSIX-rules. So why would you want to support Windows-style paths on > Cygwin?
Because cygwin toolset does support \.
> If you want a Git that handles Windows paths, use Git for Windows...
Note that Windows is a special case as even the Win32 API does support \ and /, so every tool on Windows seems to handle nicely this. Why not Git, be it Cygwin/Git. If it does not break anything else.
-- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net - http://v2p.fr.eu.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver keys.gnupg.net --recv-key F949BD3B
Re: [PATCH 2/2] On Cygwin support both UNIX and DOS style path-names
On Fri, Aug 5, 2011 at 7:35 PM, Pascal Obry <pascal@obry.net> wrote:
> Le 05/08/2011 19:29, Erik Faye-Lund a écrit : >> >> Cygwin is a unix-layer on top of Windows, designed to play by the >> POSIX-rules. So why would you want to support Windows-style paths on >> Cygwin? > > Because cygwin toolset does support \. >
Are you saying that the built-in Cygwin tools (like ls etc) support Windows-style paths (C:\path\to\file)? If that is the case, I completely understand the desire to accept Windows-paths.
>> If you want a Git that handles Windows paths, use Git for Windows... > > Note that Windows is a special case as even the Win32 API does support \ and > /, so every tool on Windows seems to handle nicely this. Why not Git, be it > Cygwin/Git. If it does not break anything else.
If the Cygwin-tools does not support drive-prefixes (i.e "C:\") but does support both slashes as path-separators, then I agree with the patch but not with the commit message.
Re: [PATCH 2/2] On Cygwin support both UNIX and DOS style path-names
On Fri, Aug 5, 2011 at 7:39 PM, Erik Faye-Lund <kusmabite@gmail.com> wrote:
> On Fri, Aug 5, 2011 at 7:35 PM, Pascal Obry <pascal@obry.net> wrote: >> Le 05/08/2011 19:29, Erik Faye-Lund a écrit : >>> >>> Cygwin is a unix-layer on top of Windows, designed to play by the >>> POSIX-rules. So why would you want to support Windows-style paths on >>> Cygwin? >> >> Because cygwin toolset does support \. >> > > Are you saying that the built-in Cygwin tools (like ls etc) support > Windows-style paths (C:\path\to\file)? If that is the case, I > completely understand the desire to accept Windows-paths. > >>> If you want a Git that handles Windows paths, use Git for Windows... >> >> Note that Windows is a special case as even the Win32 API does support \ and >> /, so every tool on Windows seems to handle nicely this. Why not Git, be it >> Cygwin/Git. If it does not break anything else. > > If the Cygwin-tools does not support drive-prefixes (i.e "C:\") but > does support both slashes as path-separators, then I agree with the > patch but not with the commit message. >
correction: if that is the case, I agree with the is_dir_sep-part, but not the has_dos_drive_prefix-part of the patch (and also not the example from the commit message)
Re: [PATCH 2/2] On Cygwin support both UNIX and DOS style path-names
Le 05/08/2011 19:39, Erik Faye-Lund a écrit :
> Are you saying that the built-in Cygwin tools (like ls etc) support > Windows-style paths (C:\path\to\file)? If that is the case, I > completely understand the desire to accept Windows-paths.
Exactly.
-- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net - http://v2p.fr.eu.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver keys.gnupg.net --recv-key F949BD3B
Re: [PATCH 2/2] On Cygwin support both UNIX and DOS style path-names
Pascal Obry wrote:
> Le 05/08/2011 19:29, Erik Faye-Lund a écrit : >> Cygwin is a unix-layer on top of Windows, designed to play by the >> POSIX-rules. So why would you want to support Windows-style paths on >> Cygwin? > > Because cygwin toolset does support \.
Hmm, if you don't mind escaping it in bash all the time!
> >> If you want a Git that handles Windows paths, use Git for Windows... > > Note that Windows is a special case as even the Win32 API does support \ > and /, so every tool on Windows seems to handle nicely this. Why not > Git, be it Cygwin/Git. If it does not break anything else.
Hmm, I wouldn't be too sure of that, either ...
ATB, Ramsay Jones
Re: [PATCH 2/2] On Cygwin support both UNIX and DOS style path-names
Erik Faye-Lund wrote:
> On Fri, Aug 5, 2011 at 6:10 PM, Pascal Obry <pascal@obry.net> wrote: >> In fact Cygwin supports both, so make Git agree with this. >> The failing case is when a file is committed in a sub-dir of the >> repository using a log message from a file specified with a DOS >> style path-name. To reproduce: >> >> $ cd src >> $ git commit -F c:\tmp\log.txt file.c >> fatal: could not read log file 'src/c:\tmp\log.txt': No such file \ >> or directory. > > Cygwin is a unix-layer on top of Windows, designed to play by the > POSIX-rules. So why would you want to support Windows-style paths on > Cygwin? > > If you want a Git that handles Windows paths, use Git for Windows...
Indeed, I have to agree. This takes the cygwin port in the wrong direction ...
ATB, Ramsay Jones
Re: [PATCH 2/2] On Cygwin support both UNIX and DOS style path-names
Pascal Obry <pascal@obry.net> writes:
> In fact Cygwin supports both, so make Git agree with this. > The failing case is when a file is committed in a sub-dir of the > repository using a log message from a file specified with a DOS > style path-name. To reproduce: > > $ cd src > $ git commit -F c:\tmp\log.txt file.c > fatal: could not read log file 'src/c:\tmp\log.txt': No such file \ > or directory. > > Signed-off-by: Pascal Obry <pascal@obry.net> > --- > compat/cygwin.h | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/compat/cygwin.h b/compat/cygwin.h > index a3229f5..de9737c 100644 > --- a/compat/cygwin.h > +++ b/compat/cygwin.h > @@ -7,3 +7,6 @@ extern stat_fn_t cygwin_lstat_fn; > > #define stat(path, buf) (*cygwin_stat_fn)(path, buf) > #define lstat(path, buf) (*cygwin_lstat_fn)(path, buf) > + > +#define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':') > +#define is_dir_sep(c) ((c) == '/' || (c) == '\\')
I wonder if these two that are the same as mingw should further be consolidated into one implementation, something like below.
Note that I am just wondering, not suggesting, without knowing which is better.
compat/cygwin.h | 5 ++--- compat/mingw.h | 3 +-- git-compat-util.h | 11 ++++------- 3 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/compat/cygwin.h b/compat/cygwin.h index de9737c..ef0889b 100644 --- a/compat/cygwin.h +++ b/compat/cygwin.h @@ -1,12 +1,11 @@ #include <sys/types.h> #include <sys/stat.h> +#define DOS_STYLE_DIR_SEP 1 + typedef int (*stat_fn_t)(const char*, struct stat*); extern stat_fn_t cygwin_stat_fn; extern stat_fn_t cygwin_lstat_fn; #define stat(path, buf) (*cygwin_stat_fn)(path, buf) #define lstat(path, buf) (*cygwin_lstat_fn)(path, buf) - -#define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':') -#define is_dir_sep(c) ((c) == '/' || (c) == '\\') diff --git a/compat/mingw.h b/compat/mingw.h index 547568b..26ca0ef 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -298,8 +298,7 @@ int winansi_fprintf(FILE *stream, const char *format, ...) __attribute__((format * git specific compatibility */ -#define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':') -#define is_dir_sep(c) ((c) == '/' || (c) == '\\') +#define DOS_STYLE_DIR_SEP 1 #define PATH_SEP ';' #define PRIuMAX "I64u" diff --git a/git-compat-util.h b/git-compat-util.h index c2c94cd..133f331 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -211,7 +211,9 @@ extern char *gitbasename(char *); #define has_dos_drive_prefix(path) 0 #endif -#if !defined(find_last_dir_sep) && defined(is_dir_sep) +#if defined(DOS_STYLE_DIR_SEP) +#define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':') +#define is_dir_sep(c) ((c) == '/' || (c) == '\\') static inline char *compat_find_last_dir_sep(const char *path) { char *ret = NULL; @@ -221,13 +223,8 @@ static inline char *compat_find_last_dir_sep(const char *path) return ret; } #define find_last_dir_sep compat_find_last_dir_sep -#endif - -#ifndef is_dir_sep +#else #define is_dir_sep(c) ((c) == '/') -#endif - -#ifndef find_last_dir_sep #define find_last_dir_sep(path) strrchr(path, '/') #endif
Re: [PATCH 2/2] On Cygwin support both UNIX and DOS style path-names
On Fri, Aug 5, 2011 at 7:48 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Pascal Obry <pascal@obry.net> writes: > >> In fact Cygwin supports both, so make Git agree with this. >> The failing case is when a file is committed in a sub-dir of the >> repository using a log message from a file specified with a DOS >> style path-name. To reproduce: >> >> $ cd src >> $ git commit -F c:\tmp\log.txt file.c >> fatal: could not read log file 'src/c:\tmp\log.txt': No such file \ >> or directory. >> >> Signed-off-by: Pascal Obry <pascal@obry.net> >> --- >> compat/cygwin.h | 3 +++ >> 1 files changed, 3 insertions(+), 0 deletions(-) >> >> diff --git a/compat/cygwin.h b/compat/cygwin.h >> index a3229f5..de9737c 100644 >> --- a/compat/cygwin.h >> +++ b/compat/cygwin.h >> @@ -7,3 +7,6 @@ extern stat_fn_t cygwin_lstat_fn; >> >> #define stat(path, buf) (*cygwin_stat_fn)(path, buf) >> #define lstat(path, buf) (*cygwin_lstat_fn)(path, buf) >> + >> +#define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':') >> +#define is_dir_sep(c) ((c) == '/' || (c) == '\\') > > I wonder if these two that are the same as mingw should further be > consolidated into one implementation, something like below. > > Note that I am just wondering, not suggesting, without knowing which is > better.
IMO this becomes a bit hard to read as you have to ping-pong between sources to understand exactly what that flag does. We have compat/win32.h, perhaps we should move the macros there and include it from both compat/mingw.h and compat/cygwin.h instead (given that we're going to do this, of course)?
Re: [PATCH 2/2] On Cygwin support both UNIX and DOS style path-names
Le 05/08/2011 19:48, Junio C Hamano a écrit :
> I wonder if these two that are the same as mingw should further be > consolidated into one implementation, something like below.
Fine with me.
-- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net - http://v2p.fr.eu.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver keys.gnupg.net --recv-key F949BD3B
Re: [PATCH 2/2] On Cygwin support both UNIX and DOS style path-names
Pascal Obry wrote:
> In fact Cygwin supports both, so make Git agree with this. > The failing case is when a file is committed in a sub-dir of the > repository using a log message from a file specified with a DOS > style path-name. To reproduce: > > $ cd src > $ git commit -F c:\tmp\log.txt file.c > fatal: could not read log file 'src/c:\tmp\log.txt': No such file \ > or directory.
Hmm, are you using bash or cmd.exe? Using bash I get the following:
$ cd src
$ git commut -F c:\tmp\log.txt file.c
fatal: could not read file 'src/c:tmplog.txt': No such file or directory
$ Which is what I would expect of (any) posix shell, viz:
$ ls c:\
> ^C
$ ls c:\\
AUTOEXEC.BAT* NTDETECT.COM* WATCOM/ msysgit/
CMPNENTS/ Program Files/ WINDOWS/ msysgit-old/
CONFIG.SYS* RECYCLER/ boot.ini* ntldr*
Documents and Settings/ SUPPORT/ cygwin/ pagefile.sys
I386/ SWSTAMP.TXT* cygwintemp/ ssl/
IO.SYS* System Volume Information/ dm/ uname/
MSDOS.SYS* TOOLSCD/ dm840/ zlib/
MSOCache/ VALUEADD/ hiberfil.sys
$ If you want to use cmd.exe as your shell, I suspect msysGit (Git For Windows) may be a better fit.
ATB, Ramsay Jones
Re: [PATCH 2/2] On Cygwin support both UNIX and DOS style path-names
Le 09/08/2011 19:24, Ramsay Jones a écrit :
> Pascal Obry wrote: >> In fact Cygwin supports both, so make Git agree with this. >> The failing case is when a file is committed in a sub-dir of the >> repository using a log message from a file specified with a DOS >> style path-name. To reproduce: >> >> $ cd src >> $ git commit -F c:\tmp\log.txt file.c >> fatal: could not read log file 'src/c:\tmp\log.txt': No such file \ >> or directory. > > Hmm, are you using bash or cmd.exe? Using bash I get the following:
bash.
> > $ cd src > $ git commut -F c:\tmp\log.txt file.c > fatal: could not read file 'src/c:tmplog.txt': No such file or directory > $ > > Which is what I would expect of (any) posix shell, viz: > > $ ls c:\ > > ^C > $ ls c:\\ > AUTOEXEC.BAT* NTDETECT.COM* WATCOM/ msysgit/ > CMPNENTS/ Program Files/ WINDOWS/ msysgit-old/ > CONFIG.SYS* RECYCLER/ boot.ini* ntldr* > Documents and Settings/ SUPPORT/ cygwin/ pagefile.sys > I386/ SWSTAMP.TXT* cygwintemp/ ssl/ > IO.SYS* System Volume Information/ dm/ uname/ > MSDOS.SYS* TOOLSCD/ dm840/ zlib/ > MSOCache/ VALUEADD/ hiberfil.sys
Exactly, \\ this is what I have used and this is the bug. Cygwin supports ls c:\\ so should Cygwin/Git. My quoted example was missing the escape \.
-- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net - http://v2p.fr.eu.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver keys.gnupg.net --recv-key F949BD3B
Re: [PATCH 2/2] On Cygwin support both UNIX and DOS style path-names
Pascal Obry wrote:
> Le 09/08/2011 19:24, Ramsay Jones a écrit : >> Pascal Obry wrote: >>> In fact Cygwin supports both, so make Git agree with this. >>> The failing case is when a file is committed in a sub-dir of the >>> repository using a log message from a file specified with a DOS >>> style path-name. To reproduce: >>> >>> $ cd src >>> $ git commit -F c:\tmp\log.txt file.c >>> fatal: could not read log file 'src/c:\tmp\log.txt': No such file \ >>> or directory. >> Hmm, are you using bash or cmd.exe? Using bash I get the following: > > bash.
Ah, OK. The example in your commit message looked odd (ie incorrect) which made me think that you were probably using cnd.exe, so ...
>> $ cd src >> $ git commut -F c:\tmp\log.txt file.c >> fatal: could not read file 'src/c:tmplog.txt': No such file or directory >> $ >> >> Which is what I would expect of (any) posix shell, viz: >> >> $ ls c:\ >> > ^C >> $ ls c:\\ >> AUTOEXEC.BAT* NTDETECT.COM* WATCOM/ msysgit/ >> CMPNENTS/ Program Files/ WINDOWS/ msysgit-old/ >> CONFIG.SYS* RECYCLER/ boot.ini* ntldr* >> Documents and Settings/ SUPPORT/ cygwin/ pagefile.sys >> I386/ SWSTAMP.TXT* cygwintemp/ ssl/ >> IO.SYS* System Volume Information/ dm/ uname/ >> MSDOS.SYS* TOOLSCD/ dm840/ zlib/ >> MSOCache/ VALUEADD/ hiberfil.sys > > Exactly, \\ this is what I have used and this is the bug. Cygwin > supports ls c:\\ so should Cygwin/Git. My quoted example was missing the > escape \.
... could you please correct your commit message. Thanks!
ATB, Ramsay Jones
Re: [PATCH 2/2] On Cygwin support both UNIX and DOS style path-names
Le 11/08/2011 22:35, Ramsay Jones a écrit :
> ... could you please correct your commit message. Thanks!
Done, thanks for your review.
Pascal.
-- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net - http://v2p.fr.eu.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver keys.gnupg.net --recv-key F949BD3B
Re: [PATCH 2/2] On Cygwin support both UNIX and DOS style path-names
Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:
> Pascal Obry wrote: >> In fact Cygwin supports both, so make Git agree with this. >> The failing case is when a file is committed in a sub-dir of the >> repository using a log message from a file specified with a DOS >> style path-name. To reproduce: >> >> $ cd src >> $ git commit -F c:\tmp\log.txt file.c >> fatal: could not read log file 'src/c:\tmp\log.txt': No such file \ >> or directory. > > Hmm, are you using bash or cmd.exe? Using bash I get the following: > > $ cd src > $ git commut -F c:\tmp\log.txt file.c > fatal: could not read file 'src/c:tmplog.txt': No such file or directory > $ > > Which is what I would expect of (any) posix shell, viz: > > $ ls c:\ > > ^C > $ ls c:\\ > AUTOEXEC.BAT* NTDETECT.COM* WATCOM/ msysgit/ > CMPNENTS/ Program Files/ WINDOWS/ msysgit-old/ > CONFIG.SYS* RECYCLER/ boot.ini* ntldr* > Documents and Settings/ SUPPORT/ cygwin/ pagefile.sys > I386/ SWSTAMP.TXT* cygwintemp/ ssl/ > IO.SYS* System Volume Information/ dm/ uname/ > MSDOS.SYS* TOOLSCD/ dm840/ zlib/ > MSOCache/ VALUEADD/ hiberfil.sys > $
FWIW, I use git on Cygwin and it works quite well. Cygwin supports Windows paths when quoted. So
$ ls 'C:\Users\vijay\Desktop'
works as expected. This is very useful when you're copying paths from, say, Windows Explorer, to Cygwin.
> ATB, > Ramsay Jones > > -- > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html
-- Cheers ~vijay Gnus should be more complicated.
Re: [PATCH 2/2] On Cygwin support both UNIX and DOS style path-names
Am 05.08.2011 18:10, schrieb Pascal Obry:
> In fact Cygwin supports both, so make Git agree with this. > The failing case is when a file is committed in a sub-dir of the > repository using a log message from a file specified with a DOS > style path-name. To reproduce: > > $ cd src > $ git commit -F c:\tmp\log.txt file.c > fatal: could not read log file 'src/c:\tmp\log.txt': No such file \ > or directory.
Do you also want to support this:
$ git add src\file.c
i.e., backslash in pathspec? Then you need more than this:
> +#define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':') > +#define is_dir_sep(c) ((c) == '/' || (c) == '\\')
In particular, you have to enable backslash processing in setup.c:prefix_filename(), but then you lose the ability to escape special characters with the backslash.
-- Hannes