Alexandre Julliard : powrprof: Build with msvcrt.
Alexandre Julliard
julliard at winehq.org
Tue Jun 18 17:21:47 CDT 2019
Module: wine
Branch: master
Commit: 15eb79cca300ea5d9e8b36bf3167337590eee090
URL: https://source.winehq.org/git/wine.git/?a=commit;h=15eb79cca300ea5d9e8b36bf3167337590eee090
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Jun 18 09:06:01 2019 +0200
powrprof: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/powrprof/Makefile.in | 2 ++
dlls/powrprof/powrprof.c | 6 +++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/powrprof/Makefile.in b/dlls/powrprof/Makefile.in
index e51fc62..a410e9b 100644
--- a/dlls/powrprof/Makefile.in
+++ b/dlls/powrprof/Makefile.in
@@ -2,4 +2,6 @@ MODULE = powrprof.dll
IMPORTLIB = powrprof
IMPORTS = advapi32
+EXTRADLLFLAGS = -mno-cygwin
+
C_SRCS = powrprof.c
diff --git a/dlls/powrprof/powrprof.c b/dlls/powrprof/powrprof.c
index d870fe2..92bab03 100644
--- a/dlls/powrprof/powrprof.c
+++ b/dlls/powrprof/powrprof.c
@@ -18,6 +18,7 @@
#include <stdarg.h>
+#include <stdlib.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
@@ -28,7 +29,6 @@
#include "winternl.h"
#include "powrprof.h"
#include "wine/debug.h"
-#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(powrprof);
@@ -178,7 +178,7 @@ BOOLEAN WINAPI GetPwrDiskSpindownRange(PUINT RangeMax, PUINT RangeMin)
TRACE("Using default: 3600\n");
*RangeMax = 3600;
} else {
- *RangeMax = atoiW((LPCWSTR)lpValue);
+ *RangeMax = wcstol((LPCWSTR)lpValue, NULL, 10);
}
cbValue = sizeof(lpValue);
@@ -189,7 +189,7 @@ BOOLEAN WINAPI GetPwrDiskSpindownRange(PUINT RangeMax, PUINT RangeMin)
TRACE("Using default: 3\n");
*RangeMin = 3;
} else {
- *RangeMin = atoiW((LPCWSTR)lpValue);
+ *RangeMin = wcstol((LPCWSTR)lpValue, NULL, 10);
}
RegCloseKey(hKey);
More information about the wine-cvs
mailing list