aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/w32.c')
-rw-r--r--src/w32.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/w32.c b/src/w32.c
index 9b1d94de786..4770718f5e3 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -1,6 +1,6 @@
1/* Utility and Unix shadow routines for GNU Emacs on the Microsoft Windows API. 1/* Utility and Unix shadow routines for GNU Emacs on the Microsoft Windows API.
2 2
3Copyright (C) 1994-1995, 2000-2015 Free Software Foundation, Inc. 3Copyright (C) 1994-1995, 2000-2016 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -1513,7 +1513,7 @@ codepage_for_filenames (CPINFO *cp_info)
1513 1513
1514 if (NILP (current_encoding)) 1514 if (NILP (current_encoding))
1515 { 1515 {
1516 char *cpname = SDATA (SYMBOL_NAME (current_encoding)); 1516 char *cpname = SSDATA (SYMBOL_NAME (current_encoding));
1517 char *cp = NULL, *end; 1517 char *cp = NULL, *end;
1518 int cpnum; 1518 int cpnum;
1519 1519
@@ -2165,11 +2165,11 @@ unixtodos_filename (register char *p)
2165 (From msdos.c...probably should figure out a way to share it, 2165 (From msdos.c...probably should figure out a way to share it,
2166 although this code isn't going to ever change.) */ 2166 although this code isn't going to ever change.) */
2167static int 2167static int
2168crlf_to_lf (register int n, register unsigned char *buf) 2168crlf_to_lf (register int n, register char *buf)
2169{ 2169{
2170 unsigned char *np = buf; 2170 unsigned char *np = (unsigned char *)buf;
2171 unsigned char *startp = buf; 2171 unsigned char *startp = np;
2172 unsigned char *endp = buf + n; 2172 char *endp = buf + n;
2173 2173
2174 if (n == 0) 2174 if (n == 0)
2175 return n; 2175 return n;
@@ -2386,7 +2386,7 @@ ansi_encode_filename (Lisp_Object filename)
2386 { 2386 {
2387 char shortname[MAX_PATH]; 2387 char shortname[MAX_PATH];
2388 2388
2389 if (w32_get_short_filename (SDATA (filename), shortname, MAX_PATH)) 2389 if (w32_get_short_filename (SSDATA (filename), shortname, MAX_PATH))
2390 { 2390 {
2391 dostounix_filename (shortname); 2391 dostounix_filename (shortname);
2392 encoded_filename = build_string (shortname); 2392 encoded_filename = build_string (shortname);
@@ -3210,7 +3210,8 @@ map_w32_filename (const char * name, const char ** pPath)
3210 return shortname; 3210 return shortname;
3211 } 3211 }
3212 3212
3213 if (is_fat_volume (name, (const char **)&path)) /* truncate to 8.3 */ 3213 if (!fatal_error_in_progress /* disable fancy processing during crash */
3214 && is_fat_volume (name, (const char **)&path)) /* truncate to 8.3 */
3214 { 3215 {
3215 register int left = 8; /* maximum number of chars in part */ 3216 register int left = 8; /* maximum number of chars in part */
3216 register int extn = 0; /* extension added? */ 3217 register int extn = 0; /* extension added? */
@@ -7495,7 +7496,7 @@ socket_to_fd (SOCKET s)
7495 though the socket wasn't really a kernel handle, 7496 though the socket wasn't really a kernel handle,
7496 because a real handle has the same value. So 7497 because a real handle has the same value. So
7497 test whether the new handle really is a socket. */ 7498 test whether the new handle really is a socket. */
7498 long nonblocking = 0; 7499 unsigned long nonblocking = 0;
7499 if (pfn_ioctlsocket ((SOCKET) new_s, FIONBIO, &nonblocking) == 0) 7500 if (pfn_ioctlsocket ((SOCKET) new_s, FIONBIO, &nonblocking) == 0)
7500 { 7501 {
7501 pfn_closesocket (s); 7502 pfn_closesocket (s);
@@ -8520,7 +8521,7 @@ sys_write (int fd, const void * buffer, unsigned int count)
8520 int nbytes = count; 8521 int nbytes = count;
8521 8522
8522 SAFE_NALLOCA (tmpbuf, 2, count); 8523 SAFE_NALLOCA (tmpbuf, 2, count);
8523 dst = tmpbuf; 8524 dst = (unsigned char *)tmpbuf;
8524 8525
8525 while (1) 8526 while (1)
8526 { 8527 {
@@ -9062,8 +9063,8 @@ check_windows_init_file (void)
9062 if (fd < 0) 9063 if (fd < 0)
9063 { 9064 {
9064 Lisp_Object load_path_print = Fprin1_to_string (Vload_path, Qnil); 9065 Lisp_Object load_path_print = Fprin1_to_string (Vload_path, Qnil);
9065 char *init_file_name = SDATA (init_file); 9066 char *init_file_name = SSDATA (init_file);
9066 char *load_path = SDATA (load_path_print); 9067 char *load_path = SSDATA (load_path_print);
9067 char *buffer = alloca (1024 9068 char *buffer = alloca (1024
9068 + strlen (init_file_name) 9069 + strlen (init_file_name)
9069 + strlen (load_path)); 9070 + strlen (load_path));