From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id D0C823858D28 for ; Wed, 9 Feb 2022 04:13:07 +0000 (GMT) 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 Received: by mail-pf1-x42f.google.com with SMTP id y5so2118615pfe.4 for ; Tue, 08 Feb 2022 20:13:07 -0800 (PST) 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) Received: from Blaze ([166.70.17.99]) by smtp.gmail.com with ESMTPSA id u37sm12696662pga.2.2022.02.08.20.13.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Feb 2022 20:13:06 -0800 (PST) From: julie77793@gmail.com X-Google-Original-From: To: References: <337301d81d37$7afda680$70f8f380$@gmail.com> In-Reply-To: Subject: RE: CygwinPaltform Identification Date: Tue, 8 Feb 2022 21:13:03 -0700 Message-ID: <05f301d81d6b$55d8d710$018a8530$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQIWfcwEWrWpx9aEC2stQcGxjAqb/gGWxu/trAEjurA= Content-Language: en-us 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@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Feb 2022 04:13:12 -0000 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 On Behalf Of Brian Inglis Sent: Tuesday, February 8, 2022 6:46 PM To: cygwin@cygwin.com Subject: Re: CygwinPaltform Identification On 2022-02-08 15:01, julie77793@gmail.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