This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: allow executing a path in backslash notation


The problem is that DOS paths are treated differently, even within the
same program.
Take for instance, bash:

$ builtin test -x "$WINDIR\system32\cmd.exe" && echo ok
yes
$ builtin exec "$WINDIR\system32\cmd.exe" /C echo ok
-bash: exec: C:\WINDOWS\system32\cmd.exe: not found

That makes a lot of headache both for users and for programmers who
have to remember about all such special cases

Cheers
Ilya

On 10 March 2010 10:25, Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
> On Mar Â9 13:47, Ilguiz Latypov wrote:
>>
>> > The bottom line is that if you want to use MS-DOS
>> > paths, then use a MinGW or DJGPP version of make.exe. Âmake.exe is not
>> > going to be patched.
>>
>> The patch was to cygwin1.dll, but I am not insisting.
>
> Trouble is, I don't even see the problem. ÂExecuting a file in DOS
> notation is already possible:
>
> Âbash$ cat << EOF > exec.c
> Â#include <unistd.h>
>
> Âint
> Âmain (int argc, char **argv)
> Â{
> Â Âchar *args[] = { argv[1], "abc", 0};
> Â Âexecv (argv[1], args);
> Â Âreturn 1;
> Â}
> ÂEOF
> Âbash$ gcc -o exec exec.c
> Âbash$ ./exec /bin/echo
> Âabc
> Âbash$ ./exec C:\\cygwin\\bin\\echo
> Âabc
>
>
> Corinna
>
> --
> Corinna Vinschen         ÂPlease, send mails regarding Cygwin to
> Cygwin Project Co-Leader     Âcygwin AT cygwin DOT com
> Red Hat
>
> --
> Problem reports: Â Â Â http://cygwin.com/problems.html
> FAQ: Â Â Â Â Â Â Â Â Â http://cygwin.com/faq/
> Documentation: Â Â Â Â http://cygwin.com/docs.html
> Unsubscribe info: Â Â Âhttp://cygwin.com/ml/#unsubscribe-simple
>
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]