This is the mail archive of the cygwin 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: programming API to determine whether in "Cygwin environment"


On Fri, Jul 11, 2008 at 08:34:17AM -0700, Karr, David wrote:
>The "ant" shell script checks to see if "`uname`" contains the string
>"CYGWIN". 

That just means that you have a Cygwin uname in your path.  It doesn't
mean you're necessarily running in a Cygwin "environment".  I thought the
intent was to print c:\foo at the CMD prompt and /cygdrive/c/foo when
running under some shell.

So, really the best test for that is the SHELL environment variable
containing just '/' and no '\' or ':'.  The Cygwin DLL doesn't mess with
that environment variable.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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]