Eric Pouech : winetest: Enable compilation with long types.

Alexandre Julliard julliard at winehq.org
Mon Feb 7 15:56:04 CST 2022


Module: wine
Branch: master
Commit: d34b3021b324cc5f8ffbcee63679bda33f576ab6
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d34b3021b324cc5f8ffbcee63679bda33f576ab6

Author: Eric Pouech <eric.pouech at gmail.com>
Date:   Mon Feb  7 08:41:13 2022 +0100

winetest: Enable compilation with long types.

Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/winetest/Makefile.in | 1 -
 programs/winetest/main.c      | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/programs/winetest/Makefile.in b/programs/winetest/Makefile.in
index 3f823f46946..c4d505e4545 100644
--- a/programs/winetest/Makefile.in
+++ b/programs/winetest/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
 MODULE    = winetest.exe
 IMPORTS   = uuid comctl32 version user32 gdi32 advapi32 wsock32 msvcrt
 DELAYIMPORTS = ole32
diff --git a/programs/winetest/main.c b/programs/winetest/main.c
index 3ffb0185052..b5c3cc54487 100644
--- a/programs/winetest/main.c
+++ b/programs/winetest/main.c
@@ -124,7 +124,7 @@ static char * get_file_version(char * file_name)
                 VS_FIXEDFILEINFO *pFixedVersionInfo;
                 UINT len;
                 if (VerQueryValueA(data, backslash, (LPVOID *)&pFixedVersionInfo, &len)) {
-                    sprintf(version, "%d.%d.%d.%d",
+                    sprintf(version, "%ld.%ld.%ld.%ld",
                             pFixedVersionInfo->dwFileVersionMS >> 16,
                             pFixedVersionInfo->dwFileVersionMS & 0xffff,
                             pFixedVersionInfo->dwFileVersionLS >> 16,
@@ -132,14 +132,14 @@ static char * get_file_version(char * file_name)
                 } else
                     sprintf(version, "version not found");
             } else
-                sprintf(version, "version error %u", GetLastError());
+                sprintf(version, "version error %lu", GetLastError());
             heap_free(data);
         } else
             sprintf(version, "version error %u", ERROR_OUTOFMEMORY);
     } else if (GetLastError() == ERROR_FILE_NOT_FOUND)
         sprintf(version, "dll is missing");
     else
-        sprintf(version, "version not present %u", GetLastError());
+        sprintf(version, "version not present %lu", GetLastError());
 
     return version;
 }




More information about the wine-cvs mailing list