public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Bernard Dautrevaux <Dautrevaux@microprocess.com>
To: "'cygwin@sources.redhat.com'" <cygwin@sources.redhat.com>,
	cygwin@sourceware.cygnus.com
Subject: RE: Strange cd/CDPATH behavior
Date: Tue, 26 Sep 2000 11:25:00 -0000	[thread overview]
Message-ID: <17B78BDF120BD411B70100500422FC6309E10F@IIS000> (raw)

> -----Original Message-----
> From: Chris Faylor [ mailto:cgf@cygnus.com ]
> Sent: Tuesday, September 26, 2000 7:56 PM
> To: cygwin@sourceware.cygnus.com
> Subject: Re: Strange cd/CDPATH behavior
> 
> 
> On Tue, Sep 26, 2000 at 11:40:54AM -0600, Erik Nolte wrote:
> >> > The obvious answer is to stop using DOS style paths with 
> cygwin cd's.
> >> > Unfortunately, what I'm really doing is "cd $SRC_PATH" 
> where SRC_PATH is
> >> > "W:/src".  SRC_PATH must be a DOS style path to keep 
> javac and other
> >> > windows-based software happy (they can't grok paths without drive
> >> letters).
> >>
> >> Use cygpath...
> >> >cygpath -u -p c:/
> >> /
> >>
> >> In your example, something like:
> >> cd $(cygpath -u -p $SRC_PATH)
> >> would probably work.
> >
> >
> >I wish I could, unfortunately the cd's are inside makefiles 
> and scripts that
> >run both on cygwin/NT/Win2K and on Solaris.  And the Suns 
> aren't too happy
> >about cygpath.  I can hack around the problem by unsetting CDPATH or
> >creating a SHELL_SRC_PATH (/c) and a APP_SRC_PATH (c:/).  
	...
> 
> FWIW, I haven't seen anyone mention that this is a *bash* 
> idiosyncrasy.  Bash is
> apparently not dealing well with c:\foo style paths, which is 
> hardly surprising.

We had the same kind of problems in our port of UNIX tools to Windows
(having the tools correctly handling X:/foo as an absolute path) and the
only solution we found was looking at all the places in our source code base
where we compare something with '/' then manually check iw we were looking
for an absolute path, then if true recode it to call some locally defined
macro (IS_ABSOLUTE_PATH) that depending on the platform either check the
first char (on UNIX) or call some function that is able to handle drive
letters correctly ;-(

We were quite reluctant at having to do that but we do not find any other
way to handle correctly DOS-style path names. Note that we even have more
hard time trying to handle DOS-style path names in UNIX-style
(':'-separated) path lists, but this is another story :-) (I can describe
how we do that if anybody is interested).

> 
> I doubt that these problems show up in Solaris since there is 
> no possibility
> that you'll ever see a x:\ path there.  

I think what he wants to say is that he can't rewrite its makefile rules
using cd `cygpath ${SRC_DIR}` as Solaris will choke on cygpath :-) and he
has to have the same makefiles for UNIX and CYGWIN (after all this *was* the
reason of creating cygwin: be able to port UNIX packages to Windows).

Just my .02EUR

	Bernard

--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:	+33 (0) 1 47 68 80 80
Fax:	+33 (0) 1 47 88 97 85
e-mail:	dautrevaux@microprocess.com
		b.dautrevaux@usa.net
-------------------------------------------- 

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

             reply	other threads:[~2000-09-26 11:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-26 11:25 Bernard Dautrevaux [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-09-26 13:16 Earnie Boyd
2000-09-26 16:53 ` Chris Faylor
     [not found]   ` <002b01c02819$1508b700$c4acb018@home.com>
2000-09-26 17:22     ` Chris Faylor
2000-09-26 13:12 Earnie Boyd
2000-09-26 11:19 Earnie Boyd
2000-09-26 12:22 ` Erik Nolte
2000-09-26 12:30   ` Chris Faylor
2000-09-26 10:11 kulack
2000-09-26 10:37 ` Erik Nolte
2000-09-26 10:57   ` Chris Faylor
2000-09-26 10:03 Schaible, Joerg
2000-09-26  9:29 Erik Nolte
2000-09-26 10:56 ` Bob McGowan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17B78BDF120BD411B70100500422FC6309E10F@IIS000 \
    --to=dautrevaux@microprocess.com \
    --cc=cygwin@sources.redhat.com \
    --cc=cygwin@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).