Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/win32/version.h')
-rw-r--r--src/win32/version.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/win32/version.h b/src/win32/version.h
new file mode 100644
index 000000000..483962b57
--- /dev/null
+++ b/src/win32/version.h
@@ -0,0 +1,20 @@
+/*
+ * 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)
+{
+ WORD wVersion = LOWORD(GetVersion());
+
+ return LOBYTE(wVersion) > major ||
+ (LOBYTE(wVersion) == major && HIBYTE(wVersion) >= minor);
+}
+
+#endif