www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/02/08/23:13:48

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D0C823858D28
Authentication-Results: sourceware.org;
dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=from:to:references:in-reply-to:subject:date:message-id:mime-version
:content-transfer-encoding:thread-index:content-language;
bh=JvPrpg+yA4z+IgPdy7rw3/9QKb44URbQdJa94NyRRDA=;
b=Be1QMYgD8N/3HszaSjSd7pWUkapjFC9jNkSxZzOb7z5e/YLGCwNIYex02tkDZZf9WT
uV/cGQXv3fR9ExjZvKECiww1B6lPGwAT3TcUwVhdvyRV6Ejv9oNpGMtQlRblWQMcj3QB
uzIUrAGV5Dw/s6ZdqFJc0kSLfwGJrQdbbedFFS9DARxH9swlxtt/YUytDz8EoLmfj/CG
c20H4w+fgHVlRNRhqovnNRtBgPY4U08oqlnO9EHlh8el0p5gyFrW80E5g1pmf+B83ck+
18xqo4rPPI2ctbcGtsmGbOQlOWHCA+3nGpG+xZtifH7opMKRlj9glQZURRRZVP9NoRVY
XuJQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:from:to:references:in-reply-to:subject:date
:message-id:mime-version:content-transfer-encoding:thread-index
:content-language;
bh=JvPrpg+yA4z+IgPdy7rw3/9QKb44URbQdJa94NyRRDA=;
b=6Pb/JxvHRFNJQvPnjJC+U/bHdBof6V8Xg6Z1mdDavCQm3Dg8w1If46DQIS/RXfhZN+
kTPKEqSQL9MmiEoNnPgvOgj1QD9eXK64zV95HRY7OyHRU6SXuPlsO3VwfQCpzURi/iti
VE9CyuFMu6lfVp6CqxR+zNpPWS9ml2/5A9Qs25QuFcRep4n1rhxC9xqPHP1xaykZinEe
HjJG+W6X5rSLGYPx0ZsdBTjoJQq/UWWCe+4gA7NOMdlIinUlT40QX5d4D49iIcDrSdbF
NFiueuG9R38BRxSl4eOwfp4c38JNAD3Fjo14rBeVcvB0ECvNvDBDjTZpa/hAYZ7M8XCN
x9Bg==
X-Gm-Message-State: AOAM533Y5mRXelVtOTWTjbeoMih+H2ZrPdCwhTbrtFlqv8IEU+ZlXQmo
ZeCgoKW9f+npcVvmIn0fiwIejJJzei0=
X-Google-Smtp-Source: ABdhPJwyU58JO0GmXCtBumbCPhD/5NrB6viXZDGMVTTRAIdfW26yoJOaiEZ2M6uaTu2g8fvCax/xdQ==
X-Received: by 2002:a65:6cce:: with SMTP id g14mr443030pgw.373.1644379986562;
Tue, 08 Feb 2022 20:13:06 -0800 (PST)
From: julie77793 AT gmail DOT com
X-Google-Original-From: <julie7779311 AT gmail DOT com>
To: <cygwin AT cygwin DOT com>
References: <337301d81d37$7afda680$70f8f380$@gmail.com>
<f2da839b-5304-2c5d-9e5b-083fadfe3768 AT SystematicSw DOT ab DOT ca>
In-Reply-To: <f2da839b-5304-2c5d-9e5b-083fadfe3768@SystematicSw.ab.ca>
Subject: RE: CygwinPaltform Identification
Date: Tue, 8 Feb 2022 21:13:03 -0700
Message-ID: <05f301d81d6b$55d8d710$018a8530$@gmail.com>
MIME-Version: 1.0
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQIWfcwEWrWpx9aEC2stQcGxjAqb/gGWxu/trAEjurA=
X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT,
FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

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.

-----Original Message-----
From: Cygwin <cygwin-bounces+cygwin=prettywhack DOT com AT cygwin DOT com> On Behalf Of
Brian Inglis
Sent: Tuesday, February 8, 2022 6:46 PM
To: cygwin AT cygwin DOT com
Subject: Re: CygwinPaltform Identification

On 2022-02-08 15:01, julie77793 AT gmail DOT 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
under Cygwin.

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
x86_64-unknown-cygwin

32 $ echo $OSTYPE $OS $HOSTTYPE $MACHTYPE cygwin Windows_NT i686
i686-pc-cygwin

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
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019