public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Randall R Schulz <rrschulz@cris.com>
To: rich-paul@rich-paul.net, cygwin@cygwin.com
Subject: Re: HELP: java path and classpath question
Date: Sun, 17 Feb 2002 17:02:00 -0000	[thread overview]
Message-ID: <5.1.0.14.2.20020217162705.00aa7090@pop3.cris.com> (raw)
In-Reply-To: <20020217160248.C21117@monster.master-link.org>

Paul,

Whenever I see a hard-coded list of arbitrary values like that, I usually 
conclude there is a need for an externally controlled way to specify that 
list of values.

If I were going to go in and muck around with this code, I'd add a variable 
such as CYGPATHVARS or some such (naming rights go to the coder, of course) 
which took the form of a <somehow>-deliminted list of environment variable 
names which were to be transformed between Windows and POSIX path syntax as 
they passed in and out of the Cygwin world, as it were.

I see from the context of the patch you included there is a mix of 
PATH-like and single-name variables. I guess that might require either some 
special detection code during conversion or two separate control variables, 
one for the PATH-like variables one for the single-name ones.

I can see why a Java-specific patch would be rejected, but not a generic 
one. Did you submit a generic solution, and if so, what reason did you get 
for it being rejected? Was it rejected by the BASH principals or by the 
Cygwin principals?

Anyway, since my generic wrapper script works adequately for my needs, I'm 
content with the current situation.

Randall Schulz
Mountain View, CA USA


At 13:02 2002-02-17, rich-paul@rich-paul.net wrote:
>My suggestion is a simple patch and recompile to cygwin.  There
>is a file called environ.cc.  It contains the code that
>automaticly converts variables like PATH and HOME to cygwinformat
>when it enters cygwin, and back when it leaves.
>
>All you have to do is add the code preceded by the plus signs code right after
>the path entry, on about line 50 of the file:
>
>
>  static win_env conv_envvars[] =
>    {
>      {"PATH=", 5, NULL, NULL, cygwin_win32_to_posix_path_list,
>       cygwin_posix_to_win32_path_list,
>       cygwin_win32_to_posix_path_list_buf_size,
>       cygwin_posix_to_win32_path_list_buf_size},
>+     {"CLASSPATH=", 10, NULL, NULL, cygwin_win32_to_posix_path_list,
>+      cygwin_posix_to_win32_path_list,
>+      cygwin_win32_to_posix_path_list_buf_size,
>+      cygwin_posix_to_win32_path_list_buf_size},
>      {"HOME=", 5, NULL, NULL, cygwin_conv_to_full_posix_path, 
> cygwin_conv_to_full_win32_path,
>      return_MAX_PATH, return_MAX_PATH},
>     {"LD_LIBRARY_PATH=", 16, NULL, NULL, cygwin_conv_to_full_posix_path,
>      cygwin_conv_to_full_win32_path, return_MAX_PATH, return_MAX_PATH},
>     {"TMPDIR=", 7, NULL, NULL, cygwin_conv_to_full_posix_path, 
> cygwin_conv_to_full_win32_path,
>      return_MAX_PATH, return_MAX_PATH},
>     {"TMP=", 4, NULL, NULL, cygwin_conv_to_full_posix_path, 
> cygwin_conv_to_full_win32_path,
>      return_MAX_PATH, return_MAX_PATH},
>     {"TEMP=", 5, NULL, NULL, cygwin_conv_to_full_posix_path, 
> cygwin_conv_to_full_win32_path,
>      return_MAX_PATH, return_MAX_PATH},
>     {NULL, 0, NULL, NULL, NULL, NULL, 0, 0}
>   };
>
>
>Note that I just cut and pasted the entry for PATH, and changed the word 
>PATH to CLASSPATH, and the number 5 following ( which is the length, 
>including the equals sign) to 10.  If you want to add other variables, 
>feel free.  I compile using vc++, so I added the INCLUDES and LIBS 
>variables as well.
>
>I have tried to get them to include this patch, or even better to make the
>environment processing configurable, but to no avail.  :(
>
>
>On Mon, Feb 11, 2002 at 04:09:39PM -0800, Randall R Schulz wrote:
> > Wally,
> >
> > Unless a program has been ported to and compiled with Cygwin headers and
> > libraries it is a Windows program and knows nothing of POSIX (Unix-style)
> > file names and PATH (-type) variables. Cygwin programs will understand 
> both
> > kinds of arguments. To be more precise, the Cygwin libraries take either
> > kind of file name, but a program that was only minimally ported to Cygwin
> > might make its own assumptions about what a file name looks like, and 
> could
> > misinterpret a Windows-style name.
> >
> > The Java tools from Sun have _not_ been ported to Cygwin, and hence you
> > must supply arguments in the Windows format.
> >
> > Good luck.
> >
> > Randy


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

      reply	other threads:[~2002-02-18  1:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-11 10:45 wally liau
2002-02-11 11:06 ` Larry Hall (RFK Partners, Inc)
2002-02-11 11:11 ` Randall R Schulz
2002-02-11 14:39   ` wally liau
2002-02-11 16:09     ` Randall R Schulz
2002-02-17 13:11       ` rich-paul
2002-02-17 17:02         ` Randall R Schulz [this message]

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=5.1.0.14.2.20020217162705.00aa7090@pop3.cris.com \
    --to=rrschulz@cris.com \
    --cc=cygwin@cygwin.com \
    --cc=rich-paul@rich-paul.net \
    /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).