diff --git a/dlls/concrt140/details.c b/dlls/concrt140/details.c
index 59345c528716a621e4190bbdd18210da20d8dbe6..72bb744744c06994a9a59ff27f9e547f36d268b8 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@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 6b54ea9597f127ad48b3ca4393c82ebcf532b975..d63a47667f95cc4aea7bd18068c700a78d22472d 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@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 0a393cd00043892124c3dd701b2616732ee3a647..6afe6e81489fcfc279e4e13819799e23a9369d04 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 2b0395d753523dcda32be1b304e279543e0417c4..2666492956c907c8c39632a6664d0ca866970eca 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 429a9e2ecdab8698f25ca530a9b41077c9db4118..049c4e0cd93d98019e1bb8eed7816d1d05dd68ab 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;