Mail Archives: djgpp/1997/12/24/03:25:18
On Tue, 23 Dec 1997, Robert Hoehne wrote:
> void
> _init_win_check()
> {
> win_version = _get_win_version();
> _get_dos_version(1);
> nt_detected = (win_version == 0) && (_osmajor == 0x05) && (_osminor ==
> 0x32)
> w95_detected = win_version >= 0x0400;
> }
Did this ever work on NT? I think it won't, because
`_get_dos_version' doesn't set `_osmajor' and `_osminor' to the true
version it computes when called with a non-zero argument (this is
specifically explained in the docs), it only returns that version
number to the caller.
So the test for NT should be rewritten like so:
nt_detected = _get_dos_version(1) == 0x0532;
- Raw text -