[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#8068) MDB library patch: Using IsWindowsVersionOrGreater() instead of obsolete GetVersion()
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#8068) MDB library patch: Using IsWindowsVersionOrGreater() instead of obsolete GetVersion()
- From: hyc@symas.com
- Date: Wed, 19 Aug 2015 16:09:04 +0000
- Auto-submitted: auto-generated (OpenLDAP-ITS)
pmedvedev@gmail.com wrote:
> Full_Name: Pavel Medvedev
> Version:
> OS: Windows 7
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (217.25.225.40)
I'm unable to compile with this patch. The API appears to be missing from
older versions of the Windows SDK. MSDN says it's from the Windows 8.1 SDK.
Closing this ITS.
>
>
> ---
> libraries/liblmdb/mdb.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c
> index 65293f4..a54ce83 100644
> --- a/libraries/liblmdb/mdb.c
> +++ b/libraries/liblmdb/mdb.c
> @@ -239,6 +239,7 @@ union semun {
> #endif
>
> #ifdef _WIN32
> +#include <VersionHelpers.h>
> #define MDB_USE_HASH 1
> #define MDB_PIDLOCK 0
> #define THREAD_RET DWORD
> @@ -3998,8 +3999,7 @@ mdb_env_open2(MDB_env *env)
>
> #ifdef _WIN32
> /* See if we should use QueryLimited */
> - rc = GetVersion();
> - if ((rc & 0xff) > 5)
> + if (IsWindowsVersionOrGreater(6, 0, 0))
> env->me_pidquery = MDB_PROCESS_QUERY_LIMITED_INFORMATION;
> else
> env->me_pidquery = PROCESS_QUERY_INFORMATION;
>
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/