delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/01/26/01:35:51

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:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=CckIM8jhSDTHBPkt
jwFm0yt2BH6+w8UY4VVAg012nZkAILtxxdZzN80CGd/wEM8qvfqde8XcU29yNAz/
Xb9EYlKoSDKcnHugDe/U0I86h/7Ie9GQrSybi8QqUonvQHTf5jlTzbdBsBk6LETo
LOjR4VZTGssEC5BLIiYWrkfg15s=
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:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=USX8A+BWu2mG+ibR10sDyF
Zc4aA=; b=uK3OQn261HNE/2fSkx1Ot7IjxCZe27UjZPU0Phm8dWPK1CJ9ZF4Wtw
WwRM5rqHyl2g2r3Y7WQ3hKf3kR+0lLgWUIlWleXtGs4mxlx6y+Vcazus+VYy1jnH
Fzb6G01sI73KJNyjO8FRpmFWJJt0aNtVniN+aS+QMI+7SKKds1qO4=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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=4.3 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2
X-HELO: smtpback.ht-systems.ru
Date: Sun, 26 Jan 2014 10:34:27 +0400
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: Andrey Repin <cygwin AT cygwin DOT com>
Message-ID: <185665080.20140126103427@mtu-net.ru>
To: "Larry Hall (Cygwin)" <cygwin AT cygwin DOT com>
Subject: Re: file path resolution in DOS window vs mintty window
In-Reply-To: <52E44031.6030800@cygwin.com>
References: <089001cf1a08$af3154a0$0d93fde0$@lbmsys.com> <52E44031 DOT 6030800 AT cygwin DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes

Greetings, Larry Hall (Cygwin)!

>> 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.

If I understand the test case provided, the OP compiling and running it's own
Cygwin-based application.
Incidentally, he expects it to work quite transparently across the broad of
different Cygwin installs. Which seems to not be the case.


--
WBR,
Andrey Repin (anrdaemon AT yandex DOT ru) 26.01.2014, <10:33>

Sorry for my terrible english...


--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019