aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/w32proc.c')
-rw-r--r--src/w32proc.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/w32proc.c b/src/w32proc.c
index 26cfa2996d0..74731db2426 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -3077,13 +3077,18 @@ yield nil. */)
3077 (Lisp_Object cp) 3077 (Lisp_Object cp)
3078{ 3078{
3079 CHARSETINFO info; 3079 CHARSETINFO info;
3080 DWORD dwcp;
3080 3081
3081 CHECK_NUMBER (cp); 3082 CHECK_NUMBER (cp);
3082 3083
3083 if (!IsValidCodePage (XINT (cp))) 3084 if (!IsValidCodePage (XINT (cp)))
3084 return Qnil; 3085 return Qnil;
3085 3086
3086 if (TranslateCharsetInfo ((DWORD *) XINT (cp), &info, TCI_SRCCODEPAGE)) 3087 /* Going through a temporary DWORD variable avoids compiler warning
3088 about cast to pointer from integer of different size, when
3089 building --with-wide-int. */
3090 dwcp = XINT (cp);
3091 if (TranslateCharsetInfo ((DWORD *) dwcp, &info, TCI_SRCCODEPAGE))
3087 return make_number (info.ciCharset); 3092 return make_number (info.ciCharset);
3088 3093
3089 return Qnil; 3094 return Qnil;
@@ -3142,8 +3147,8 @@ If successful, the new layout id is returned, otherwise nil. */)
3142 CHECK_NUMBER_CAR (layout); 3147 CHECK_NUMBER_CAR (layout);
3143 CHECK_NUMBER_CDR (layout); 3148 CHECK_NUMBER_CDR (layout);
3144 3149
3145 kl = (HKL) ((XINT (XCAR (layout)) & 0xffff) 3150 kl = (HKL) (UINT_PTR) ((XINT (XCAR (layout)) & 0xffff)
3146 | (XINT (XCDR (layout)) << 16)); 3151 | (XINT (XCDR (layout)) << 16));
3147 3152
3148 /* Synchronize layout with input thread. */ 3153 /* Synchronize layout with input thread. */
3149 if (dwWindowsThreadId) 3154 if (dwWindowsThreadId)