[Info-vax] This is for the folks who get comp.os.vms via the Info-VAX mailing list
Dan Cross
cross at spitfire.i.gajendra.net
Wed Dec 13 10:17:50 EST 2023
In article <6578f284$0$705$14726298 at news.sunsite.dk>,
Arne Vajhøj <arne at vajhoej.dk> wrote:
>[snip]
>>
>> 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 ==
Don't you mean to use `%u` for the format specifier for the dwords?
Those are unsigned.
https://learn.microsoft.com/en-us/windows/win32/winprog/windows-data-types
>VER_PLATFORM_WIN32_NT ? "NT" : "Unknown", osvi.dwMajorVersion,
>osvi.dwMinorVersion, osvi.dwBuildNumber);
> return 0;
>}
- Dan C.
More information about the Info-vax
mailing list