diff --git a/reactos/lib/ntdll/makefile b/reactos/lib/ntdll/makefile index 7f4c60de026..3dc166712ac 100644 --- a/reactos/lib/ntdll/makefile +++ b/reactos/lib/ntdll/makefile @@ -1,4 +1,4 @@ -# $Id: makefile,v 1.90 2003/07/24 14:25:32 royce Exp $ +# $Id: makefile,v 1.91 2003/07/24 19:53:11 hbirr Exp $ PATH_TO_TOP = ../.. @@ -16,7 +16,7 @@ TARGET_LFLAGS = -Wl,--file-alignment,0x1000 \ -Wl,--section-alignment,0x1000 \ -nostartfiles -nostdlib -TARGET_SDKLIBS = string.a rosrtl.a kernel32.a +TARGET_SDKLIBS = string.a rosrtl.a TARGET_GCCLIBS = gcc diff --git a/reactos/lib/ntdll/rtl/misc.c b/reactos/lib/ntdll/rtl/misc.c index 1835cccc5f3..9b173eea653 100644 --- a/reactos/lib/ntdll/rtl/misc.c +++ b/reactos/lib/ntdll/rtl/misc.c @@ -1,4 +1,4 @@ -/* $Id: misc.c,v 1.7 2003/07/24 14:25:33 royce Exp $ +/* $Id: misc.c,v 1.8 2003/07/24 19:53:11 hbirr Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -101,9 +101,7 @@ RtlGetNtProductType(PNT_PRODUCT_TYPE ProductType) void STDCALL RtlGetNtVersionNumbers(LPDWORD major, LPDWORD minor, LPDWORD build) { - OSVERSIONINFOEXW versionInfo; - versionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW); - GetVersionExW((OSVERSIONINFOW*)&versionInfo); + PPEB pPeb = NtCurrentPeb(); if (major) { @@ -111,18 +109,18 @@ RtlGetNtVersionNumbers(LPDWORD major, LPDWORD minor, LPDWORD build) * major version is not 5. So, we should never set a version < 5 ... * This makes sense since this call didn't exist before XP anyway. */ - *major = versionInfo.dwMajorVersion < 5 ? 5 : versionInfo.dwMajorVersion; + *major = pPeb->OSMajorVersion < 5 ? 5 : pPeb->OSMajorVersion; } if (minor) { - *minor = versionInfo.dwMinorVersion; + *minor = pPeb->OSMinorVersion; } if (build) { /* FIXME: Does anybody know the real formula? */ - *build = (0xF0000000 | versionInfo.dwBuildNumber); + *build = (0xF0000000 | pPeb->OSBuildNumber); } }