X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:reply-to:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=SvF8f1yu8MYL7dFc NyM98BtdwHUOAO/Mly5PMgvIA3zIeSqPv+Gb1f6PFPM+89N9De3X243IVLkJVYcJ +9zLbV8BXhFKkRCgJj7I+xNkOVP847znsTl33Ypm60wPgi47Tb+5+guLJ/CUH7Gf euwhuaRjd1TENaDRzCDTapuhPQc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:reply-to:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=default; bh=H+cWZ37AXkruuB2dDFMVUa MfrZA=; b=CUiycWGWqbMoMyHNa56CL8F+1S5f8w7Baq3nooxpp+FQApbituRCx3 FQah12WGvlHzJTpj2TSm7oYAXIQRnk8IWATN3FkMRQHZ+SrJ5+h5gXlk0GPB9etm bgSbQg/Qv3tmqyn2Zt0Y88vBiMjXPBa9fxktVjuSU/aOSxXqjoDZU= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: vms173025pub.verizon.net Message-id: <52E44031.6030800@cygwin.com> Date: Sat, 25 Jan 2014 17:52:33 -0500 From: "Larry Hall (Cygwin)" Reply-to: cygwin AT cygwin DOT com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: file path resolution in DOS window vs mintty window References: <089001cf1a08$af3154a0$0d93fde0$@lbmsys.com> In-reply-to: <089001cf1a08$af3154a0$0d93fde0$@lbmsys.com> Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit 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 > #include > #include > #include > > 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