msvcrt: Fixed vector destructors implementation on 64-bit systems.
diff --git a/dlls/msvcp100/exception.c b/dlls/msvcp100/exception.c
index 89fec61..a81fb54 100644
--- a/dlls/msvcp100/exception.c
+++ b/dlls/msvcp100/exception.c
@@ -83,7 +83,7 @@
     if (flags & 2)
     {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)_this - 1;
+        INT_PTR i, *ptr = (INT_PTR *)_this - 1;
 
         for (i = *ptr - 1; i >= 0; i--) MSVCP_type_info_dtor(_this + i);
         MSVCRT_operator_delete(ptr);
@@ -146,7 +146,7 @@
     TRACE("%p %x\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             MSVCP_exception_dtor(this+i);
@@ -220,7 +220,7 @@
     TRACE("%p %x\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             MSVCP_bad_alloc_dtor(this+i);
@@ -311,7 +311,7 @@
     TRACE("%p %x\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             MSVCP_logic_error_dtor(this+i);
@@ -549,7 +549,7 @@
     TRACE("%p %x\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             MSVCP_runtime_error_dtor(this+i);
diff --git a/dlls/msvcp100/ios.c b/dlls/msvcp100/ios.c
index 4969c7b..b79c8a1 100644
--- a/dlls/msvcp100/ios.c
+++ b/dlls/msvcp100/ios.c
@@ -937,7 +937,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_streambuf_char_dtor(this+i);
@@ -1657,7 +1657,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_streambuf_wchar_dtor(this+i);
@@ -2497,7 +2497,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_filebuf_char_dtor(this+i);
@@ -3104,7 +3104,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_filebuf_wchar_dtor(this+i);
@@ -3674,7 +3674,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *) this - 1;
+        INT_PTR i, *ptr = (INT_PTR *) this - 1;
 
         for (i = *ptr - 1; i >= 0; i--)
             basic_stringbuf_char_dtor(this+i);
@@ -4076,7 +4076,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *) this - 1;
+        INT_PTR i, *ptr = (INT_PTR *) this - 1;
 
         for (i = *ptr - 1; i >= 0; i--)
             basic_stringbuf_wchar_dtor(this+i);
@@ -4407,7 +4407,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             ios_base_dtor(this+i);
@@ -4426,7 +4426,7 @@
 {
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
-        int *ptr = (int *)this-1;
+        INT_PTR *ptr = (INT_PTR *)this-1;
         MSVCRT_operator_delete(ptr);
     } else {
         if(flags & 1)
@@ -4950,7 +4950,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ios_char_dtor(this+i);
@@ -5197,7 +5197,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ios_wchar_dtor(this+i);
@@ -5485,7 +5485,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ostream_char_vbase_dtor(this+i);
@@ -6273,7 +6273,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ostream_wchar_vbase_dtor(this+i);
@@ -7212,7 +7212,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_istream_char_vbase_dtor(this+i);
@@ -8414,7 +8414,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_istream_wchar_vbase_dtor(this+i);
@@ -9794,7 +9794,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_iostream_char_vbase_dtor(this+i);
@@ -9890,7 +9890,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_iostream_wchar_vbase_dtor(this+i);
@@ -10030,7 +10030,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ofstream_char_vbase_dtor(this+i);
@@ -10300,7 +10300,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ofstream_wchar_vbase_dtor(this+i);
@@ -10539,7 +10539,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ifstream_char_vbase_dtor(this+i);
@@ -10809,7 +10809,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ifstream_wchar_vbase_dtor(this+i);
@@ -11050,7 +11050,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_fstream_char_vbase_dtor(this+i);
@@ -11322,7 +11322,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_fstream_wchar_vbase_dtor(this+i);
@@ -11535,7 +11535,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ostringstream_char_vbase_dtor(this+i);
@@ -11711,7 +11711,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ostringstream_wchar_vbase_dtor(this+i);
@@ -11858,7 +11858,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_istringstream_char_vbase_dtor(this+i);
@@ -12034,7 +12034,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_istringstream_wchar_vbase_dtor(this+i);
@@ -12184,7 +12184,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_stringstream_char_vbase_dtor(this+i);
@@ -12364,7 +12364,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_stringstream_wchar_vbase_dtor(this+i);
@@ -12544,7 +12544,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             strstreambuf_dtor(this+i);
diff --git a/dlls/msvcp100/locale.c b/dlls/msvcp100/locale.c
index 51211d9..ccc48ab 100644
--- a/dlls/msvcp100/locale.c
+++ b/dlls/msvcp100/locale.c
@@ -186,7 +186,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             locale_facet_dtor(this+i);
@@ -790,7 +790,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             collate_char_dtor(this+i);
@@ -1023,7 +1023,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             collate_wchar_dtor(this+i);
@@ -1223,7 +1223,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             ctype_base_dtor(this+i);
@@ -1349,7 +1349,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             ctype_char_dtor(this+i);
@@ -1923,7 +1923,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             ctype_wchar_dtor(this+i);
@@ -2606,7 +2606,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             codecvt_base_dtor(this+i);
@@ -2736,7 +2736,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             codecvt_char_dtor(this+i);
@@ -3030,7 +3030,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             codecvt_wchar_dtor(this+i);
@@ -3499,7 +3499,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             numpunct_char_dtor(this+i);
@@ -3852,7 +3852,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             numpunct_wchar_dtor(this+i);
@@ -4289,7 +4289,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             num_get_wchar_dtor(this+i);
@@ -5438,7 +5438,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             num_get_char_dtor(this+i);
@@ -6299,7 +6299,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             num_put_char_dtor(this+i);
@@ -6946,7 +6946,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             num_put_wchar_dtor(this+i);
@@ -7844,7 +7844,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             locale__Locimp_dtor(this+i);
@@ -8345,7 +8345,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             locale_dtor(this+i);
diff --git a/dlls/msvcp60/exception.c b/dlls/msvcp60/exception.c
index ec8dfcd..6d72e47 100644
--- a/dlls/msvcp60/exception.c
+++ b/dlls/msvcp60/exception.c
@@ -87,7 +87,7 @@
     if (flags & 2)
     {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)_this - 1;
+        INT_PTR i, *ptr = (INT_PTR *)_this - 1;
 
         for (i = *ptr - 1; i >= 0; i--) MSVCP_type_info_dtor(_this + i);
         MSVCRT_operator_delete(ptr);
@@ -150,7 +150,7 @@
     TRACE("%p %x\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             MSVCP_exception_dtor(this+i);
@@ -261,7 +261,7 @@
     TRACE("%p %x\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             MSVCP_bad_alloc_dtor(this+i);
@@ -373,7 +373,7 @@
     TRACE("%p %x\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             MSVCP_logic_error_dtor(this+i);
diff --git a/dlls/msvcp90/exception.c b/dlls/msvcp90/exception.c
index 6d81e2d..7da6cbe 100644
--- a/dlls/msvcp90/exception.c
+++ b/dlls/msvcp90/exception.c
@@ -83,7 +83,7 @@
     if (flags & 2)
     {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)_this - 1;
+        INT_PTR i, *ptr = (INT_PTR *)_this - 1;
 
         for (i = *ptr - 1; i >= 0; i--) MSVCP_type_info_dtor(_this + i);
         MSVCRT_operator_delete(ptr);
@@ -146,7 +146,7 @@
     TRACE("%p %x\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             MSVCP_exception_dtor(this+i);
@@ -220,7 +220,7 @@
     TRACE("%p %x\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             MSVCP_bad_alloc_dtor(this+i);
@@ -311,7 +311,7 @@
     TRACE("%p %x\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             MSVCP_logic_error_dtor(this+i);
@@ -549,7 +549,7 @@
     TRACE("%p %x\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             MSVCP_runtime_error_dtor(this+i);
diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c
index fd2f6a7..f7f6fa9 100644
--- a/dlls/msvcp90/ios.c
+++ b/dlls/msvcp90/ios.c
@@ -927,7 +927,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_streambuf_char_dtor(this+i);
@@ -1643,7 +1643,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_streambuf_wchar_dtor(this+i);
@@ -2483,7 +2483,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_filebuf_char_dtor(this+i);
@@ -3090,7 +3090,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_filebuf_wchar_dtor(this+i);
@@ -3660,7 +3660,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *) this - 1;
+        INT_PTR i, *ptr = (INT_PTR *) this - 1;
 
         for (i = *ptr - 1; i >= 0; i--)
             basic_stringbuf_char_dtor(this+i);
@@ -4062,7 +4062,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *) this - 1;
+        INT_PTR i, *ptr = (INT_PTR *) this - 1;
 
         for (i = *ptr - 1; i >= 0; i--)
             basic_stringbuf_wchar_dtor(this+i);
@@ -4393,7 +4393,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             ios_base_dtor(this+i);
@@ -4412,7 +4412,7 @@
 {
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
-        int *ptr = (int *)this-1;
+        INT_PTR *ptr = (INT_PTR *)this-1;
         MSVCRT_operator_delete(ptr);
     } else {
         if(flags & 1)
@@ -4936,7 +4936,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ios_char_dtor(this+i);
@@ -5183,7 +5183,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ios_wchar_dtor(this+i);
@@ -5471,7 +5471,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ostream_char_vbase_dtor(this+i);
@@ -6259,7 +6259,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ostream_wchar_vbase_dtor(this+i);
@@ -7198,7 +7198,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_istream_char_vbase_dtor(this+i);
@@ -8400,7 +8400,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_istream_wchar_vbase_dtor(this+i);
@@ -9780,7 +9780,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_iostream_char_vbase_dtor(this+i);
@@ -9876,7 +9876,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_iostream_wchar_vbase_dtor(this+i);
@@ -10016,7 +10016,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ofstream_char_vbase_dtor(this+i);
@@ -10286,7 +10286,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ofstream_wchar_vbase_dtor(this+i);
@@ -10525,7 +10525,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ifstream_char_vbase_dtor(this+i);
@@ -10795,7 +10795,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ifstream_wchar_vbase_dtor(this+i);
@@ -11036,7 +11036,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_fstream_char_vbase_dtor(this+i);
@@ -11308,7 +11308,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_fstream_wchar_vbase_dtor(this+i);
@@ -11521,7 +11521,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ostringstream_char_vbase_dtor(this+i);
@@ -11697,7 +11697,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_ostringstream_wchar_vbase_dtor(this+i);
@@ -11844,7 +11844,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_istringstream_char_vbase_dtor(this+i);
@@ -12020,7 +12020,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_istringstream_wchar_vbase_dtor(this+i);
@@ -12170,7 +12170,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_stringstream_char_vbase_dtor(this+i);
@@ -12350,7 +12350,7 @@
 
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             basic_stringstream_wchar_vbase_dtor(this+i);
@@ -12530,7 +12530,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             strstreambuf_dtor(this+i);
diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c
index dc00168..31b5b70 100644
--- a/dlls/msvcp90/locale.c
+++ b/dlls/msvcp90/locale.c
@@ -186,7 +186,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             locale_facet_dtor(this+i);
@@ -790,7 +790,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             collate_char_dtor(this+i);
@@ -1023,7 +1023,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             collate_wchar_dtor(this+i);
@@ -1223,7 +1223,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             ctype_base_dtor(this+i);
@@ -1349,7 +1349,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             ctype_char_dtor(this+i);
@@ -1923,7 +1923,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             ctype_wchar_dtor(this+i);
@@ -2606,7 +2606,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             codecvt_base_dtor(this+i);
@@ -2736,7 +2736,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             codecvt_char_dtor(this+i);
@@ -3030,7 +3030,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             codecvt_wchar_dtor(this+i);
@@ -3499,7 +3499,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             numpunct_char_dtor(this+i);
@@ -3852,7 +3852,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             numpunct_wchar_dtor(this+i);
@@ -4289,7 +4289,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             num_get_wchar_dtor(this+i);
@@ -5438,7 +5438,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             num_get_char_dtor(this+i);
@@ -6299,7 +6299,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             num_put_char_dtor(this+i);
@@ -6946,7 +6946,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             num_put_wchar_dtor(this+i);
@@ -7844,7 +7844,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             locale__Locimp_dtor(this+i);
@@ -8345,7 +8345,7 @@
     TRACE("(%p %x)\n", this, flags);
     if(flags & 2) {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)this-1;
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
 
         for(i=*ptr-1; i>=0; i--)
             locale_dtor(this+i);
diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c
index baf20b2..12bf9cc 100644
--- a/dlls/msvcrt/cpp.c
+++ b/dlls/msvcrt/cpp.c
@@ -244,7 +244,7 @@
     if (flags & 2)
     {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)_this - 1;
+        INT_PTR i, *ptr = (INT_PTR *)_this - 1;
 
         for (i = *ptr - 1; i >= 0; i--) MSVCRT_exception_dtor(_this + i);
         MSVCRT_operator_delete(ptr);
@@ -343,7 +343,7 @@
     if (flags & 2)
     {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)_this - 1;
+        INT_PTR i, *ptr = (INT_PTR *)_this - 1;
 
         for (i = *ptr - 1; i >= 0; i--) MSVCRT_bad_typeid_dtor(_this + i);
         MSVCRT_operator_delete(ptr);
@@ -426,7 +426,7 @@
     if (flags & 2)
     {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)_this - 1;
+        INT_PTR i, *ptr = (INT_PTR *)_this - 1;
 
         for (i = *ptr - 1; i >= 0; i--) MSVCRT___non_rtti_object_dtor(_this + i);
         MSVCRT_operator_delete(ptr);
@@ -528,7 +528,7 @@
     if (flags & 2)
     {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)_this - 1;
+        INT_PTR i, *ptr = (INT_PTR *)_this - 1;
 
         for (i = *ptr - 1; i >= 0; i--) MSVCRT_bad_cast_dtor(_this + i);
         MSVCRT_operator_delete(ptr);
@@ -648,7 +648,7 @@
     if (flags & 2)
     {
         /* we have an array, with the number of elements stored before the first object */
-        int i, *ptr = (int *)_this - 1;
+        INT_PTR i, *ptr = (INT_PTR *)_this - 1;
 
         for (i = *ptr - 1; i >= 0; i--) MSVCRT_type_info_dtor(_this + i);
         MSVCRT_operator_delete(ptr);