Module: wine Branch: master Commit: d4509765a69a34a47fafa5178d4b5eb2cbf0415a URL: https://source.winehq.org/git/wine.git/?a=commit;h=d4509765a69a34a47fafa5178...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Jul 5 12:18:29 2021 +0200
ntdll: Get rid of the almost empty nt.c.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/Makefile.in | 1 - dlls/ntdll/nt.c | 76 -------------------------------------------------- dlls/ntdll/rtl.c | 8 ++++++ dlls/ntdll/version.c | 18 ++++++++++++ 4 files changed, 26 insertions(+), 77 deletions(-)
diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in index 6dfe2eb12f9..b0607952431 100644 --- a/dlls/ntdll/Makefile.in +++ b/dlls/ntdll/Makefile.in @@ -22,7 +22,6 @@ C_SRCS = \ loader.c \ locale.c \ misc.c \ - nt.c \ path.c \ printf.c \ process.c \ diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c deleted file mode 100644 index b9f747570f4..00000000000 --- a/dlls/ntdll/nt.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - * NT basis DLL - * - * This file contains the Nt* API functions of NTDLL.DLL. - * In the original ntdll.dll they all seem to just call int 0x2e (down to the NTOSKRNL) - * - * Copyright 1996-1998 Marcus Meissner - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include <string.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> - -#define NONAMELESSUNION -#include "ntstatus.h" -#define WIN32_NO_STATUS -#include "wine/debug.h" -#include "windef.h" -#include "winternl.h" -#include "ntdll_misc.h" -#include "ddk/wdm.h" - - -/*********************************************************************** - * RtlIsProcessorFeaturePresent [NTDLL.@] - */ -BOOLEAN WINAPI RtlIsProcessorFeaturePresent( UINT feature ) -{ - return feature < PROCESSOR_FEATURE_MAX && user_shared_data->ProcessorFeatures[feature]; -} - -/****************************************************************************** - * VerSetConditionMask (NTDLL.@) - */ -ULONGLONG WINAPI VerSetConditionMask( ULONGLONG dwlConditionMask, DWORD dwTypeBitMask, - BYTE dwConditionMask) -{ - if(dwTypeBitMask == 0) - return dwlConditionMask; - dwConditionMask &= 0x07; - if(dwConditionMask == 0) - return dwlConditionMask; - - if(dwTypeBitMask & VER_PRODUCT_TYPE) - dwlConditionMask |= dwConditionMask << 7*3; - else if (dwTypeBitMask & VER_SUITENAME) - dwlConditionMask |= dwConditionMask << 6*3; - else if (dwTypeBitMask & VER_SERVICEPACKMAJOR) - dwlConditionMask |= dwConditionMask << 5*3; - else if (dwTypeBitMask & VER_SERVICEPACKMINOR) - dwlConditionMask |= dwConditionMask << 4*3; - else if (dwTypeBitMask & VER_PLATFORMID) - dwlConditionMask |= dwConditionMask << 3*3; - else if (dwTypeBitMask & VER_BUILDNUMBER) - dwlConditionMask |= dwConditionMask << 2*3; - else if (dwTypeBitMask & VER_MAJORVERSION) - dwlConditionMask |= dwConditionMask << 1*3; - else if (dwTypeBitMask & VER_MINORVERSION) - dwlConditionMask |= dwConditionMask << 0*3; - return dwlConditionMask; -} diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c index d7740a7a044..bb005d60807 100644 --- a/dlls/ntdll/rtl.c +++ b/dlls/ntdll/rtl.c @@ -2140,6 +2140,14 @@ void WINAPI RtlGetCurrentProcessorNumberEx(PROCESSOR_NUMBER *processor) processor->Reserved = 0; }
+/*********************************************************************** + * RtlIsProcessorFeaturePresent [NTDLL.@] + */ +BOOLEAN WINAPI RtlIsProcessorFeaturePresent( UINT feature ) +{ + return feature < PROCESSOR_FEATURE_MAX && user_shared_data->ProcessorFeatures[feature]; +} + /*********************************************************************** * RtlInitializeGenericTableAvl (NTDLL.@) */ diff --git a/dlls/ntdll/version.c b/dlls/ntdll/version.c index cde340cca1d..5f956d9d2e6 100644 --- a/dlls/ntdll/version.c +++ b/dlls/ntdll/version.c @@ -759,3 +759,21 @@ NTSTATUS WINAPI RtlVerifyVersionInfo( const RTL_OSVERSIONINFOEXW *info,
return STATUS_SUCCESS; } + + +/****************************************************************************** + * VerSetConditionMask (NTDLL.@) + */ +ULONGLONG WINAPI VerSetConditionMask( ULONGLONG condition_mask, DWORD type_mask, BYTE condition ) +{ + condition &= 0x07; + if (type_mask & VER_PRODUCT_TYPE) condition_mask |= condition << 7*3; + else if (type_mask & VER_SUITENAME) condition_mask |= condition << 6*3; + else if (type_mask & VER_SERVICEPACKMAJOR) condition_mask |= condition << 5*3; + else if (type_mask & VER_SERVICEPACKMINOR) condition_mask |= condition << 4*3; + else if (type_mask & VER_PLATFORMID) condition_mask |= condition << 3*3; + else if (type_mask & VER_BUILDNUMBER) condition_mask |= condition << 2*3; + else if (type_mask & VER_MAJORVERSION) condition_mask |= condition << 1*3; + else if (type_mask & VER_MINORVERSION) condition_mask |= condition << 0*3; + return condition_mask; +}