This is the mail archive of the cygwin@cygwin.com 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: cygpath returns garbage if DOS/win2k input environment variable is too long?


Hi Ralf,

> 1) In my win2k, I set (a long) Java CLASSPATH
> 2) under cygwin I want to convert it (in my .tcshrc) an it 
> fails. If I do it
> on the command line, it looks like the following:
> rhauser@PCGF590K:~> cygpath --unix "$CLASSPATH"
> ô??a?
[...]
> 
> My questions:
> 1) is there a way to see an error-message from cygpath (a log 
> file or some
> way to see stderr if there is any of that)?

first of all: Even if cygpath would not indicate some buffer overflow, you cannot use cygpath to convert Java class paths, unfortunately.

If cygpath has to convert a path it uses an internal function of the Cygwin DLL that expects *real* paths and a Java class path typically have some jar files in it. I am not sure, whether this shoulkd be really fixed in the Cygwin DLL, since the called function uses internal path caching (at least what I saw from a *very* quick look) and the cache might not get filled with non-directory elements. This would require to implement the necessary functionality in cygpath. I already have it on my list, since I will change to Java development at some time, but the task is currently not scheduled. Anyone else may implenet it before *I* need it <g>.

OTOH, you might not convert yout path to --unix anyway, since I doubt that you have a JVM or Java compiler (except gjc) that understands cygwin paths.

> 2) I did a work-around with assembling the path again in my 
> .tcshrc. This is
> not convenient. Any better ideas...?

You could write a shell function that is generally able to do it.

Regards,
Jörg

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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