This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: file path resolution in DOS window vs mintty window
- From: "Larry Hall (Cygwin)" <reply-to-list-only-lh at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Sat, 25 Jan 2014 17:52:33 -0500
- Subject: Re: file path resolution in DOS window vs mintty window
- Authentication-results: sourceware.org; auth=none
- References: <089001cf1a08$af3154a0$0d93fde0$ at lbmsys dot com>
- Reply-to: cygwin at cygwin dot com
On 1/25/2014 3:04 PM, Steven Bardwell wrote:
I would like to understand why Cygwin style paths do not work in a CMD (DOS)
window on my 32-bit Cygwin system, but work fine on my 64-bit Cygwin
install.
Here is a simple example of the issue:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
void main()
{
char path_test_file[]={"/tmp"};
/* look for file */
if (access(path_test_file,F_OK)!=0) {
fprintf(stderr, "%s does not exist\n", path_test_file);
exit(16);
}
fprintf(stderr, "%s exists\n", path_test_file);
exit(0);
}
Here is what I am seeing:
32-bit install DOS -- can't find /tmp SH.EXE -- finds /tmp
64-bit install DOS--finds /tmp SH.EXE -- finds /tmp
It's hard to tell what you're asking here. DOS won't understand Cygwin's
POSIX paths. It's possible to set things up so that the paths in both
worlds are close enough that in many cases they are synonymous but that
requires effort and isn't fool-proof. From the information you've given,
you haven't attempted this. But if you're expecting Cygwin's POSIX paths
to always "just work" in a DOS world (using cmd.exe), then you've
misunderstood what Cygwin does for you. You won't be able to achieve
this just by having Cygwin.
On the other hand, if you're claiming that running Cygwin's bash in cmd.exe
doesn't match the behavior you get running Cygwin's bash in mintty.exe on
your 32-bit install, it may very well be because of the orphan installs
you have in C:\Cygwin and C:\Windows as well as the duplicated cygwin1.dll
you have in your c:\Windows\system32 directory. Clean all that up, reboot,
and try again. Actually, do this no matter whether it helps or not. You'll
only have trouble later if you keep this stuff around.
--
Larry
_____________________________________________________________________
A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?
--
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