On 04/03/2012 06:47 PM, Andrey Repin wrote:
> Greetings, Buchbinder, Barry (NIH/NIAID) [E]!
> 
>> Is there a reason that something like the following wouldn't work?
> 
>> if [ -f /bin/cygwin1.dll ]
> 
> Hm. Turned out, this is more reliable check, than
> test "$OSTYPE" = "cygwin" && ...
> 
> But, oh, so much for consistency...
> 
> Question to Cygwin staff: shouldn't $OSTYPE be declared for Cygwin programs,
> even if they are not started from Cygwin shell? Is this at all possible?

No, not possible - $OSTYPE is not standardized, so there's no point in
expecting cygwin to provide it (of course, you can export it in your
~/.bashrc).  Furthermore, even if cygwin exported it, the moment your
cygwin process starts a non-cygwin process, that process would also see
the same setting.

-- 
Eric Blake   ebl...@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to