https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bc00ea2464e9b682672f740aaa49535303b264ca

commit bc00ea2464e9b682672f740aaa49535303b264ca
Author:     Hermès Bélusca-Maïto <hermes.belusca-ma...@reactos.org>
AuthorDate: Sun Dec 16 17:20:37 2018 +0100
Commit:     Hermès Bélusca-Maïto <hermes.belusca-ma...@reactos.org>
CommitDate: Sun Dec 16 17:20:37 2018 +0100

    [SHELLBTRFS] Fix MSVC build.
---
 dll/shellext/shellbtrfs/shellext.h | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/dll/shellext/shellbtrfs/shellext.h 
b/dll/shellext/shellbtrfs/shellext.h
index 6b16911c62..cb9e605ac5 100644
--- a/dll/shellext/shellbtrfs/shellext.h
+++ b/dll/shellext/shellbtrfs/shellext.h
@@ -17,6 +17,13 @@
 
 #pragma once
 
+/* C++ backwards-compatibility */
+#ifdef __REACTOS__
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
+#define noexcept
+#endif
+#endif
+
 #define ISOLATION_AWARE_ENABLED 1
 #define STRSAFE_NO_DEPRECATE
 
@@ -195,6 +202,9 @@ typedef struct _FSCTL_SET_INTEGRITY_INFORMATION_BUFFER {
 class win_handle {
 public:
     win_handle() {
+#ifdef __REACTOS__
+        h = INVALID_HANDLE_VALUE;
+#endif
     }
 
     win_handle(HANDLE nh) {
@@ -224,12 +234,19 @@ public:
     }
 
 private:
+#ifndef __REACTOS__
     HANDLE h = INVALID_HANDLE_VALUE;
+#else
+    HANDLE h;
+#endif
 };
 
 class fff_handle {
 public:
     fff_handle() {
+#ifdef __REACTOS__
+        h = INVALID_HANDLE_VALUE;
+#endif
     }
 
     fff_handle(HANDLE nh) {
@@ -259,12 +276,19 @@ public:
     }
 
 private:
+#ifndef __REACTOS__
     HANDLE h = INVALID_HANDLE_VALUE;
+#else
+    HANDLE h;
+#endif
 };
 
 class nt_handle {
 public:
     nt_handle() {
+#ifdef __REACTOS__
+        h = INVALID_HANDLE_VALUE;
+#endif
     }
 
     nt_handle(HANDLE nh) {
@@ -294,7 +318,11 @@ public:
     }
 
 private:
+#ifndef __REACTOS__
     HANDLE h = INVALID_HANDLE_VALUE;
+#else
+    HANDLE h;
+#endif
 };
 
 class string_error : public exception {

Reply via email to