Sha256: d9d9546728ee78923ba7ea1c16c000d44450ca80f8c0c3268bf58fa9966ba38f

Contents?: true

Size: 1.25 KB

Versions: 99

Compression:

Stored size: 1.25 KB

Contents

/*
 * Copyright (C) the libgit2 contributors. All rights reserved.
 *
 * This file is part of libgit2, distributed under the GNU GPL v2 with
 * a Linking Exception. For full terms see the included COPYING file.
 */
#ifndef INCLUDE_win32_version_h__
#define INCLUDE_win32_version_h__

#include <windows.h>

GIT_INLINE(int) git_has_win32_version(int major, int minor, int service_pack)
{
	OSVERSIONINFOEX version_test = {0};
	DWORD version_test_mask;
	DWORDLONG version_condition_mask = 0;
	
	version_test.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
	version_test.dwMajorVersion = major;
	version_test.dwMinorVersion = minor;
	version_test.wServicePackMajor = (WORD)service_pack;
	version_test.wServicePackMinor = 0;

	version_test_mask = (VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR);

	VER_SET_CONDITION(version_condition_mask, VER_MAJORVERSION, VER_GREATER_EQUAL);
	VER_SET_CONDITION(version_condition_mask, VER_MINORVERSION, VER_GREATER_EQUAL);
	VER_SET_CONDITION(version_condition_mask, VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL);
	VER_SET_CONDITION(version_condition_mask, VER_SERVICEPACKMINOR, VER_GREATER_EQUAL);

	if (!VerifyVersionInfo(&version_test, version_test_mask, version_condition_mask))
		return 0;

	return 1;
}

#endif

Version data entries

99 entries across 99 versions & 1 rubygems

Version Path
rugged-0.27.0 vendor/libgit2/src/win32/version.h
rugged-0.26.3 vendor/libgit2/src/win32/version.h
rugged-0.26.0 vendor/libgit2/src/win32/version.h
rugged-0.26.0b5 vendor/libgit2/src/win32/version.h
rugged-0.26.0b4 vendor/libgit2/src/win32/version.h
rugged-0.26.0b3 vendor/libgit2/src/win32/version.h
rugged-0.26.0b2 vendor/libgit2/src/win32/version.h
rugged-0.26.0b1 vendor/libgit2/src/win32/version.h
rugged-0.25.1.1 vendor/libgit2/src/win32/version.h
rugged-0.24.6.1 vendor/libgit2/src/win32/version.h
rugged-0.25.1 vendor/libgit2/src/win32/version.h
rugged-0.24.5 vendor/libgit2/src/win32/version.h
rugged-0.25.0 vendor/libgit2/src/win32/version.h
rugged-0.25.0b10 vendor/libgit2/src/win32/version.h
rugged-0.25.0b9 vendor/libgit2/src/win32/version.h
rugged-0.25.0b8 vendor/libgit2/src/win32/version.h
rugged-0.25.0b7 vendor/libgit2/src/win32/version.h
rugged-0.25.0b6 vendor/libgit2/src/win32/version.h
rugged-0.25.0b5 vendor/libgit2/src/win32/version.h
rugged-0.25.0b4 vendor/libgit2/src/win32/version.h