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

commit 7c447a15a07da38c8f7780bf48e285455e1d6f96
Author: Hermès Bélusca-Maïto <[email protected]>
AuthorDate: Sun Dec 31 02:28:50 2017 +0100

    [SETUPAPI] Add __REACTOS__ guards around our own code; addendum to r68659 
and r73442, CORE-10000 and CORE-12471.
---
 dll/win32/setupapi/queue.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/dll/win32/setupapi/queue.c b/dll/win32/setupapi/queue.c
index 5f53d98a89..b556418389 100644
--- a/dll/win32/setupapi/queue.c
+++ b/dll/win32/setupapi/queue.c
@@ -987,15 +987,18 @@ static BOOL do_file_copyW( LPCWSTR source, LPCWSTR 
target, DWORD style,
 {
     BOOL rc = FALSE;
     BOOL docopy = TRUE;
-    WCHAR TempFile[MAX_PATH];
+#ifdef __REACTOS__
     INT hSource, hTemp;
     OFSTRUCT OfStruct;
     WCHAR TempPath[MAX_PATH];
+    WCHAR TempFile[MAX_PATH];
+#endif
 
     TRACE("copy %s to %s style 
0x%x\n",debugstr_w(source),debugstr_w(target),style);
 
+#ifdef __REACTOS__
     /* Get a temp file name */
-    if (!GetTempPathW(sizeof(TempPath) / sizeof(WCHAR), TempPath))
+    if (!GetTempPathW(ARRAYSIZE(TempPath), TempPath))
     {
         ERR("GetTempPathW error\n");
         return FALSE;
@@ -1033,6 +1036,7 @@ static BOOL do_file_copyW( LPCWSTR source, LPCWSTR 
target, DWORD style,
     LZCopy(hSource, hTemp);
     LZClose(hSource);
     LZClose(hTemp);
+#endif
 
     /* before copy processing */
     if (style & SP_COPY_REPLACEONLY)

Reply via email to