[Info-vax] This is for the folks who get comp.os.vms via the Info-VAX mailing list

Arne Vajhøj arne at vajhoej.dk
Tue Dec 12 18:53:40 EST 2023


On 12/12/2023 8:18 AM, Simon Clubley wrote:
> On 2023-12-11, Arne Vajhøj <arne at vajhoej.dk> wrote:
>> On 12/11/2023 9:16 AM, Simon Clubley wrote:
>>>
>>> With Cygwin, slrn believes it is running under a form of Unix and, having
>>> had a quick look, it does appear there are prebuilt versions of slrn in
>>> the Cygwin repository:
>>>
>>> https://cygwin.com/packages/summary/slrn.html
>>>
>>> I have no idea if there are functionality limitations when running slrn
>>> under Cygwin, but it might be worth exploring for people interested in
>>> an option other than Thunderbird.
>>
>> Just to be clear about what Cygwin provides.
>>
>> Cygwin build tools, compilers, header files, libraries etc.
>> allow one to build *nix source code. The result is Windows
>> EXE/DLL that run on any Windows as long as the the Cygwin
>> runtime DLL is present.
>>
>> Nice tool. I have used it for more than 20 years.
>>
>> But it is not emulating Linux like WSL1 does (or Wine
>> does in the reverse direction).
> 
> Yes. Like I said above, it's emulating the various Unix APIs instead and
> providing the kinds of tools you would see under Linux. For anyone confused
> about the difference, look at the output of "uname -o" both under Cygwin
> and under Linux. Under Cygwin, "Cygwin" is output as the OS, not "Linux".

#include <stdio.h>

#include <sys/utsname.h>

#include <sysinfoapi.h>
#include <winnt.h>

int main()
{
     struct utsname un;
     uname(&un);
     printf("sysname=%s, release=%s\n", un.sysname, un.release);
     struct _OSVERSIONINFOA osvi;
     osvi.dwOSVersionInfoSize = sizeof(struct _OSVERSIONINFOA);
     GetVersionExA(&osvi);
     printf("%s major=%d minor=%d build=%d\n", osvi.dwPlatformId == 
VER_PLATFORM_WIN32_NT ? "NT" : "Unknown", osvi.dwMajorVersion, 
osvi.dwMinorVersion, osvi.dwBuildNumber);
     return 0;
}

on my PC outputs:

sysname=CYGWIN_NT-10.0-19045, release=3.4.7-1.x86_64
NT major=10 minor=0 build=19045

It knows what Windows Cygwin is hosted on.

> Think of it as a seriously beefed-up version of POSIX that even allows
> you to run X under Windows.

I think that is a very accurate description.

It is also very close to how Cygwin itself sees it.

https://www.cygwin.com/faq.html#faq.what.what

<quote>
What is it?
	

Cygwin is a distribution of popular GNU and other Open Source tools 
running on Microsoft Windows. The core part is the Cygwin library which 
provides the POSIX system calls and environment these programs expect.

The Cygwin distribution contains thousands of packages from the Open 
Source world including most GNU tools, many BSD tools, an X server and a 
full set of X applications. If you're a developer you will find tools, 
headers and libraries allowing to write Windows console or GUI 
applications that make use of significant parts of the POSIX API. Cygwin 
allows easy porting of many Unix programs without the need for extensive 
changes to the source code. This includes configuring and building most 
of the available GNU or BSD software, including the packages included 
with the Cygwin distribution themselves. They can be used from one of 
the provided Unix shells like bash, tcsh or zsh.
</quote>

Arne









More information about the Info-vax mailing list