X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <18395872.post@talk.nabble.com> Date: Thu, 10 Jul 2008 20:49:06 -0700 (PDT) From: Tony Last To: cygwin AT cygwin DOT com Subject: programming API to determine whether in "Cygwin environment" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: misc AT boyski DOT com X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 when it prints out a pathname (which happens a lot) a Cygwin user would prefer to see it in Cygwin style, including forward slashes. So I'm looking for a boolean method which will allow a program to tell whether it was run from within a Cygwin shell. An environment variable would be fine as long as it's standard. In fact I see a number of env vars which would enable an educated guess but am wondering if there's a defined standard and safe way. TIA -- View this message in context: http://www.nabble.com/programming-API-to-determine-whether-in-%22Cygwin-environment%22-tp18395872p18395872.html Sent from the Cygwin list mailing list archive at Nabble.com. -- 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/