Re: programming API to determine whether in 'Cygwin environment'

2008-07-12 Thread Thorsten Kampe
* William Sutton (Fri, 11 Jul 2008 08:34:30 -0400 (EDT)) > All the same, you should probably check to see that whatever variables you > choose to key off of don't alter the way your program behaves in other > alternate Windows shells. A co-worker of mine uses 4NT, which provides > UNIX command

Re: programming API to determine whether in "Cygwin environment"

2008-07-11 Thread Christopher Faylor
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 wa

RE: programming API to determine whether in "Cygwin environment"

2008-07-11 Thread Dave Korn
Karr, David wrote on 11 July 2008 16:34: > The "ant" shell script checks to see if "`uname`" contains the string > "CYGWIN". Won't help here: >> -Original Message- >> From: cygwin-owner On Behalf Of Tony Last >> Sent: Thursday, July 10, 2008 8:49 PM >> So I'm looking for a boolean met

Re: programming API to determine whether in "Cygwin environment"

2008-07-11 Thread Tony Last
Dave Korn wrote: > Tony Last wrote on 11 July 2008 16:24: > >> I have no idea who sets MAKE_MODE. > > Probably you did! It used to mean something to make a long time ago, > but > was always a user-controlled variable even then. Or it's possible he (and others) just picked it up from '/etc

Re: programming API to determine whether in "Cygwin environment"

2008-07-11 Thread Larry Hall (Cygwin)
Dave Korn wrote: Tony Last wrote on 11 July 2008 16:24: I have no idea who sets MAKE_MODE. Probably you did! It used to mean something to make a long time ago, but was always a user-controlled variable even then. Or it's possible he (and others) just picked it up from '/etc/defaults/et

RE: programming API to determine whether in "Cygwin environment"

2008-07-11 Thread Dave Korn
Tony Last wrote on 11 July 2008 16:24: > I have no idea who sets MAKE_MODE. Probably you did! It used to mean something to make a long time ago, but was always a user-controlled variable even then. cheers, DaveK -- Can't think of a witty .sigline today -- Unsubscribe info:

RE: programming API to determine whether in "Cygwin environment"

2008-07-11 Thread Karr, David
The "ant" shell script checks to see if "`uname`" contains the string "CYGWIN". > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Tony Last > Sent: Thursday, July 10, 2008 8:49 PM > To: cygwin@cygwin.com > Subject: programming API to determine whethe

Re: programming API to determine whether in "Cygwin environment"

2008-07-11 Thread Tony Last
What about the following EVs which a quick "env" shows: "MAKE_MODE", "SHLVL", and "!C:"? I assume SHLVL is an artifact of bash and only present if bash is an ancestor? I have no idea who sets MAKE_MODE. And "!C:" is a very strange one but presumably is exported by Cygwin? -- View this message in

Re: programming API to determine whether in 'Cygwin environment'

2008-07-11 Thread Christopher Faylor
On Fri, Jul 11, 2008 at 08:34:30AM -0400, William Sutton wrote: >All the same, you should probably check to see that whatever variables >you choose to key off of don't alter the way your program behaves in >other alternate Windows shells. A co-worker of mine uses 4NT, which >provides UNIX command

Re: programming API to determine whether in 'Cygwin environment'

2008-07-11 Thread Christopher Faylor
On Thu, Jul 10, 2008 at 10:32:57PM -0700, Yitzchak Scott-Thoennes wrote: >On Thu, July 10, 2008 10:06 pm, Christopher Faylor wrote: >> On Thu, Jul 10, 2008 at 08:49:06PM -0700, Tony Last wrote: >>> My console program is built for native Windows (thus does not reply on >>> cygwin1.dll). >>> >>> So I

Re: programming API to determine whether in 'Cygwin environment'

2008-07-11 Thread William Sutton
All the same, you should probably check to see that whatever variables you choose to key off of don't alter the way your program behaves in other alternate Windows shells. A co-worker of mine uses 4NT, which provides UNIX command and shell emulation in a native Windows format. I expect it has

Re: programming API to determine whether in 'Cygwin environment'

2008-07-11 Thread Corinna Vinschen
On Jul 10 22:32, Yitzchak Scott-Thoennes wrote: > On Thu, July 10, 2008 10:06 pm, Christopher Faylor wrote: > > On Thu, Jul 10, 2008 at 08:49:06PM -0700, Tony Last wrote: > >> My console program is built for native Windows (thus does not reply on > >> cygwin1.dll). > >> > >> So I'm looking for a bo

Re: programming API to determine whether in 'Cygwin environment'

2008-07-10 Thread Yitzchak Scott-Thoennes
On Thu, July 10, 2008 10:06 pm, Christopher Faylor wrote: > On Thu, Jul 10, 2008 at 08:49:06PM -0700, Tony Last wrote: >> My console program is built for native Windows (thus does not reply on >> cygwin1.dll). >> >> So I'm looking for a boolean method which will allow a program to tell >> whether i

Re: programming API to determine whether in "Cygwin environment"

2008-07-10 Thread Christopher Faylor
On Thu, Jul 10, 2008 at 08:49:06PM -0700, Tony Last wrote: > >My console program is built for native Windows (thus does not reply on >cygwin1.dll). However, people may want to use it in a Cygwin environment and >if they do I want it to behave in a suitably "Unixy" way. The obvious >example is that