Eric Pouech : msvcr*: Use correct integral type in Interlocked* calls.

Alexandre Julliard julliard at winehq.org
Fri Feb 4 16:08:36 CST 2022


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

Author: Eric Pouech <eric.pouech at gmail.com>
Date:   Fri Feb  4 09:49:41 2022 +0100

msvcr*: Use correct integral type in Interlocked* calls.

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

---

 dlls/concrt140/details.c  | 2 +-
 dlls/msvcp90/details.c    | 2 +-
 dlls/msvcrt/concurrency.c | 4 ++--
 dlls/msvcrt/file.c        | 8 ++++----
 dlls/msvcrt/heap.c        | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/dlls/concrt140/details.c b/dlls/concrt140/details.c
index 59345c52871..72bb744744c 100644
--- a/dlls/concrt140/details.c
+++ b/dlls/concrt140/details.c
@@ -371,7 +371,7 @@ void __thiscall _Concurrent_queue_base_v4_dummy(_Concurrent_queue_base_v4 *this)
 
 DEFINE_RTTI_DATA0(_Concurrent_queue_base_v4, 0, ".?AV_Concurrent_queue_base_v4 at details@Concurrency@@")
 
-static int _Runtime_object_id;
+static LONG _Runtime_object_id;
 
 typedef struct
 {
diff --git a/dlls/msvcp90/details.c b/dlls/msvcp90/details.c
index 6b54ea9597f..d63a47667f9 100644
--- a/dlls/msvcp90/details.c
+++ b/dlls/msvcp90/details.c
@@ -385,7 +385,7 @@ void __thiscall _Concurrent_queue_base_v4_dummy(_Concurrent_queue_base_v4 *this)
 
 DEFINE_RTTI_DATA0(_Concurrent_queue_base_v4, 0, ".?AV_Concurrent_queue_base_v4 at details@Concurrency@@")
 
-static int _Runtime_object_id;
+static LONG _Runtime_object_id;
 
 typedef struct
 {
diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c
index 0a393cd0004..6afe6e81489 100644
--- a/dlls/msvcrt/concurrency.c
+++ b/dlls/msvcrt/concurrency.c
@@ -34,8 +34,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
 typedef exception cexception;
 CREATE_EXCEPTION_OBJECT(cexception)
 
-static int context_id = -1;
-static int scheduler_id = -1;
+static LONG context_id = -1;
+static LONG scheduler_id = -1;
 
 typedef enum {
     SchedulerKind,
diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index 2b0395d7535..2666492956c 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -144,8 +144,8 @@ static int MSVCRT_max_streams = 512, MSVCRT_stream_idx;
 static int MSVCRT_umask = 0;
 
 /* INTERNAL: static data for tmpnam and _wtmpname functions */
-static int tmpnam_unique;
-static int tmpnam_s_unique;
+static LONG tmpnam_unique;
+static LONG tmpnam_s_unique;
 
 static const unsigned int EXE = 'e' << 16 | 'x' << 8 | 'e';
 static const unsigned int BAT = 'b' << 16 | 'a' << 8 | 't';
@@ -4935,7 +4935,7 @@ void CDECL setbuf(FILE* file, char *buf)
   setvbuf(file, buf, buf ? _IOFBF : _IONBF, BUFSIZ);
 }
 
-static int tmpnam_helper(char *s, size_t size, int *tmpnam_unique, int tmp_max)
+static int tmpnam_helper(char *s, size_t size, LONG *tmpnam_unique, int tmp_max)
 {
     char tmpstr[8];
     char *p = s;
@@ -5006,7 +5006,7 @@ char * CDECL tmpnam(char *s)
   return tmpnam_helper(s, -1, &tmpnam_unique, TMP_MAX) ? NULL : s;
 }
 
-static int wtmpnam_helper(wchar_t *s, size_t size, int *tmpnam_unique, int tmp_max)
+static int wtmpnam_helper(wchar_t *s, size_t size, LONG *tmpnam_unique, int tmp_max)
 {
     wchar_t tmpstr[8];
     wchar_t *p = s;
diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c
index 429a9e2ecda..049c4e0cd93 100644
--- a/dlls/msvcrt/heap.c
+++ b/dlls/msvcrt/heap.c
@@ -46,7 +46,7 @@ static HANDLE heap, sb_heap;
 typedef int (CDECL *MSVCRT_new_handler_func)(size_t size);
 
 static MSVCRT_new_handler_func MSVCRT_new_handler;
-static int MSVCRT_new_mode;
+static LONG MSVCRT_new_mode;
 
 /* FIXME - According to documentation it should be 8*1024, at runtime it returns 16 */ 
 static unsigned int MSVCRT_amblksiz = 16;




More information about the wine-cvs mailing list