Re: [PATCH v0 0/4] Remove obsolete Cygwin support from git-gui

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 6/25/23 07:26, Mark Levedahl wrote:

On 6/24/23 19:30, Junio C Hamano wrote: git-gui has three independent functions (is_Cygwin, is_Windows, and is_MaxOSX), each determine if running on that platform, and "generic Unix/Linux" can be considered the result if all three functions return false. In Pratyush's tree, those three functions essentially are:

is_Cygwin: $::tcl_platform(os) startswith("CYGWIN")

is_MaxOSX: [tk windowingsystem] == "AQUA"

is_Windows: $::tcl_platform(platform) == "Windows"

It turns out, only one of the . is ever true, and none are true on Linux. So, the if/else tree above is not confused by Windows / Cygwin.

But, different Tcl/Tk signatures as platforms evolve could cause problems. A better design might be to just have a $HOSTTYPE variable set once, perhaps in startup, perhaps even by the makefile, to assure exactly one hosttype is ever active and make this clear to others. Normal configuration checking in the makefile could have uncovered this whole problem in 2012. But, this is a possible cleanup topic for another day.

So, the code under the is_Windows and is_Cygwin branches of the if/else trees are now completely independent, and the is_Windows branch is never entered on Cygwin.


Thank you,

Mark

A follow up - I have Cygwin in a Windows VM on my laptop, no G4W, no Mac ...


Cygwin gives:   $::tcl_platform(os) = CYGWIN_NT-10.0-22621
                $::tcl_platform(platform) = unix
                tk windowingsystem = x11

Linux gives     $::tcl_platform(os) = Linux
                $::tcl_platform(platform) = unix
                tk windowingsystem = x11

So, neither Cygwin nor Linux trigger the checks for is_Windows or is_MacOSX





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux