Wed Feb 9 04:13:03 GMT 2022
I realize that I can create my own env variables. I just think that Cygwin
should provide them so that programmers writing software can rely on the
variable name and value. If there is no consistent value when Cygwin is
installed then dozens of tools that work on other bash solutions for Windows
can't be made to work on Cygwin.
From: Cygwin <firstname.lastname@example.org> On Behalf Of
Sent: Tuesday, February 8, 2022 6:46 PM
Subject: Re: CygwinPaltform Identification
On 2022-02-08 15:01, email@example.com wrote:
> Cygwin doesn't create an environment variable in bash to indicate that
> the platform is Cygwin under Windows.
> This causes compatibility problems when running various tools. Most of
> my issues have been with Python tools running Windows Python.
> I have been addressing this issue by grepping PATH for cygdrive which
> doesn't seem like a very good approach.
> Both msys2 and mingw solve this issue by setting the MSYSTEM
> environment variable which lets tools check that OS=Windows_NT and
> MSYSTEM=MSYS Please add some way of identifying that programs are running
I have been switching env/OS/arch/triple dependent profile and rc files and
sections for years with:
64 $ echo $OSTYPE $OS $HOSTTYPE $MACHTYPE cygwin Windows_NT x86_64
32 $ echo $OSTYPE $OS $HOSTTYPE $MACHTYPE cygwin Windows_NT i686
Please note that *only* $OS is exported by default (in the above list), so
you will have to explicitly export (in profiles) any other shell variables
you wish to be available to shell subprocesses.
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
This email may be disturbing to some readers as it contains too much
technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]
Problem reports: https://cygwin.com/problems.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin