diff options
| author | Eli Zaretskii | 2013-12-10 19:33:01 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2013-12-10 19:33:01 +0200 |
| commit | a5c9bbb3413d8eea89cb832040a0ef6cd704dcfe (patch) | |
| tree | 9c04ba0e012ad09b5ea15eb34ae3dd9863489787 | |
| parent | 51caf50203be08ba6f15e0d72b777f036d6bee72 (diff) | |
| download | emacs-a5c9bbb3413d8eea89cb832040a0ef6cd704dcfe.tar.gz emacs-a5c9bbb3413d8eea89cb832040a0ef6cd704dcfe.zip | |
Fixed problems in Cygwin build reported by Ken Brown.
| -rw-r--r-- | src/w32fns.c | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index b3e6d29b973..d6c6b7d5320 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -6578,7 +6578,7 @@ Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 6578 | file_details_w->lpstrFilter = filter_w; | 6578 | file_details_w->lpstrFilter = filter_w; |
| 6579 | #ifdef NTGUI_UNICODE | 6579 | #ifdef NTGUI_UNICODE |
| 6580 | file_details_w->lpstrInitialDir = (wchar_t*) SDATA (dir); | 6580 | file_details_w->lpstrInitialDir = (wchar_t*) SDATA (dir); |
| 6581 | file_details->lpstrTitle = (guichar_t*) SDATA (prompt); | 6581 | file_details_w->lpstrTitle = (guichar_t*) SDATA (prompt); |
| 6582 | #else | 6582 | #else |
| 6583 | file_details_w->lpstrInitialDir = dir_w; | 6583 | file_details_w->lpstrInitialDir = dir_w; |
| 6584 | file_details_w->lpstrTitle = prompt_w; | 6584 | file_details_w->lpstrTitle = prompt_w; |
| @@ -6595,6 +6595,7 @@ Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 6595 | file_details_w->Flags |= OFN_FILEMUSTEXIST; | 6595 | file_details_w->Flags |= OFN_FILEMUSTEXIST; |
| 6596 | } | 6596 | } |
| 6597 | } | 6597 | } |
| 6598 | #ifndef NTGUI_UNICODE | ||
| 6598 | else | 6599 | else |
| 6599 | { | 6600 | { |
| 6600 | memset (&new_file_details_a, 0, sizeof (new_file_details_a)); | 6601 | memset (&new_file_details_a, 0, sizeof (new_file_details_a)); |
| @@ -6621,6 +6622,7 @@ Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 6621 | file_details_a->Flags |= OFN_FILEMUSTEXIST; | 6622 | file_details_a->Flags |= OFN_FILEMUSTEXIST; |
| 6622 | } | 6623 | } |
| 6623 | } | 6624 | } |
| 6625 | #endif /* !NTGUI_UNICODE */ | ||
| 6624 | 6626 | ||
| 6625 | { | 6627 | { |
| 6626 | int count = SPECPDL_INDEX (); | 6628 | int count = SPECPDL_INDEX (); |
| @@ -6863,7 +6865,7 @@ an integer representing a ShowWindow flag: | |||
| 6863 | char *errstr; | 6865 | char *errstr; |
| 6864 | Lisp_Object current_dir = BVAR (current_buffer, directory);; | 6866 | Lisp_Object current_dir = BVAR (current_buffer, directory);; |
| 6865 | wchar_t *doc_w = NULL, *params_w = NULL, *ops_w = NULL; | 6867 | wchar_t *doc_w = NULL, *params_w = NULL, *ops_w = NULL; |
| 6866 | int result; | 6868 | intptr_t result; |
| 6867 | #ifndef CYGWIN | 6869 | #ifndef CYGWIN |
| 6868 | int use_unicode = w32_unicode_filenames; | 6870 | int use_unicode = w32_unicode_filenames; |
| 6869 | char *doc_a = NULL, *params_a = NULL, *ops_a = NULL; | 6871 | char *doc_a = NULL, *params_a = NULL, *ops_a = NULL; |
| @@ -6893,10 +6895,10 @@ an integer representing a ShowWindow flag: | |||
| 6893 | operation = GUI_ENCODE_SYSTEM (operation); | 6895 | operation = GUI_ENCODE_SYSTEM (operation); |
| 6894 | ops_w = GUI_SDATA (operation); | 6896 | ops_w = GUI_SDATA (operation); |
| 6895 | } | 6897 | } |
| 6896 | result = (int) ShellExecuteW (NULL, ops_w, doc_w, params_w, | 6898 | result = (intptr_t) ShellExecuteW (NULL, ops_w, doc_w, params_w, |
| 6897 | GUI_SDATA (current_dir), | 6899 | GUI_SDATA (current_dir), |
| 6898 | (INTEGERP (show_flag) | 6900 | (INTEGERP (show_flag) |
| 6899 | ? XINT (show_flag) : SW_SHOWDEFAULT)); | 6901 | ? XINT (show_flag) : SW_SHOWDEFAULT)); |
| 6900 | #else /* !CYGWIN */ | 6902 | #else /* !CYGWIN */ |
| 6901 | if (use_unicode) | 6903 | if (use_unicode) |
| 6902 | { | 6904 | { |
| @@ -6939,10 +6941,10 @@ an integer representing a ShowWindow flag: | |||
| 6939 | *d++ = *s++; | 6941 | *d++ = *s++; |
| 6940 | *d = 0; | 6942 | *d = 0; |
| 6941 | } | 6943 | } |
| 6942 | result = (int) ShellExecuteW (NULL, ops_w, doc_w, params_w, | 6944 | result = (intptr_t) ShellExecuteW (NULL, ops_w, doc_w, params_w, |
| 6943 | current_dir_w, | 6945 | current_dir_w, |
| 6944 | (INTEGERP (show_flag) | 6946 | (INTEGERP (show_flag) |
| 6945 | ? XINT (show_flag) : SW_SHOWDEFAULT)); | 6947 | ? XINT (show_flag) : SW_SHOWDEFAULT)); |
| 6946 | } | 6948 | } |
| 6947 | else | 6949 | else |
| 6948 | { | 6950 | { |
| @@ -6968,10 +6970,10 @@ an integer representing a ShowWindow flag: | |||
| 6968 | /* Assume OPERATION is pure ASCII. */ | 6970 | /* Assume OPERATION is pure ASCII. */ |
| 6969 | ops_a = SSDATA (operation); | 6971 | ops_a = SSDATA (operation); |
| 6970 | } | 6972 | } |
| 6971 | result = (int) ShellExecuteA (NULL, ops_a, doc_a, params_a, | 6973 | result = (intptr_t) ShellExecuteA (NULL, ops_a, doc_a, params_a, |
| 6972 | current_dir_a, | 6974 | current_dir_a, |
| 6973 | (INTEGERP (show_flag) | 6975 | (INTEGERP (show_flag) |
| 6974 | ? XINT (show_flag) : SW_SHOWDEFAULT)); | 6976 | ? XINT (show_flag) : SW_SHOWDEFAULT)); |
| 6975 | } | 6977 | } |
| 6976 | #endif /* !CYGWIN */ | 6978 | #endif /* !CYGWIN */ |
| 6977 | 6979 | ||
| @@ -7529,6 +7531,7 @@ If the underlying system call fails, value is nil. */) | |||
| 7529 | #endif /* WINDOWSNT */ | 7531 | #endif /* WINDOWSNT */ |
| 7530 | 7532 | ||
| 7531 | 7533 | ||
| 7534 | #ifdef WINDOWSNT | ||
| 7532 | DEFUN ("default-printer-name", Fdefault_printer_name, Sdefault_printer_name, | 7535 | DEFUN ("default-printer-name", Fdefault_printer_name, Sdefault_printer_name, |
| 7533 | 0, 0, 0, doc: /* Return the name of Windows default printer device. */) | 7536 | 0, 0, 0, doc: /* Return the name of Windows default printer device. */) |
| 7534 | (void) | 7537 | (void) |
| @@ -7634,6 +7637,7 @@ DEFUN ("default-printer-name", Fdefault_printer_name, Sdefault_printer_name, | |||
| 7634 | 7637 | ||
| 7635 | return DECODE_FILE (build_unibyte_string (pname_buf)); | 7638 | return DECODE_FILE (build_unibyte_string (pname_buf)); |
| 7636 | } | 7639 | } |
| 7640 | #endif /* WINDOWSNT */ | ||
| 7637 | 7641 | ||
| 7638 | 7642 | ||
| 7639 | /* Equivalent of strerror for W32 error codes. */ | 7643 | /* Equivalent of strerror for W32 error codes. */ |
| @@ -8304,9 +8308,9 @@ only be necessary if the default setting causes problems. */); | |||
| 8304 | 8308 | ||
| 8305 | #ifdef WINDOWSNT | 8309 | #ifdef WINDOWSNT |
| 8306 | defsubr (&Sfile_system_info); | 8310 | defsubr (&Sfile_system_info); |
| 8311 | defsubr (&Sdefault_printer_name); | ||
| 8307 | #endif | 8312 | #endif |
| 8308 | 8313 | ||
| 8309 | defsubr (&Sdefault_printer_name); | ||
| 8310 | defsubr (&Sset_message_beep); | 8314 | defsubr (&Sset_message_beep); |
| 8311 | 8315 | ||
| 8312 | hourglass_hwnd = NULL; | 8316 | hourglass_hwnd = NULL; |