diff options
author | Eli Zaretskii <eliz@gnu.org> | 2021-05-09 10:59:08 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2021-05-09 10:59:08 +0300 |
commit | 4c3abb3dd105e075bf1cf55e3fe8b5ec2ac8e6cc (patch) | |
tree | c531859e29220e5976f5127fb712fbcec21ae917 /src/w32fns.c | |
parent | 127f1f330b67228217fdcc0a552d37a33dc67bb9 (diff) | |
download | emacs-4c3abb3dd105e075bf1cf55e3fe8b5ec2ac8e6cc.tar.gz emacs-4c3abb3dd105e075bf1cf55e3fe8b5ec2ac8e6cc.tar.bz2 emacs-4c3abb3dd105e075bf1cf55e3fe8b5ec2ac8e6cc.zip |
Fix compilation errors with latest w32 API headers
* src/w32common.h: Rename OS_* to OS_SUBTYPE__*, as w32 API
headers started defining OS_NT, which breaks the use of the
enumeration. All users changed. (Bug#48303)
Diffstat (limited to 'src/w32fns.c')
-rw-r--r-- | src/w32fns.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index fcee1934ba9..00e7a3698bc 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -8087,7 +8087,7 @@ DEFUN ("system-move-file-to-trash", Fsystem_move_file_to_trash, /* The Unicode version of SHFileOperation is not supported on Windows 9X. */ - if (w32_unicode_filenames && os_subtype != OS_9X) + if (w32_unicode_filenames && os_subtype != OS_SUBTYPE_9X) { SHFILEOPSTRUCTW file_op_w; /* We need one more element beyond MAX_PATH because this is @@ -9216,7 +9216,7 @@ The coordinates X and Y are interpreted in pixels relative to a position /* When "mouse trails" are in effect, moving the mouse cursor sometimes leaves behind an annoying "ghost" of the pointer. Avoid that by momentarily switching off mouse trails. */ - if (os_subtype == OS_NT + if (os_subtype == OS_SUBTYPE_NT && w32_major_version + w32_minor_version >= 6) ret = SystemParametersInfo (SPI_GETMOUSETRAILS, 0, &trail_num, 0); SetCursorPos (XFIXNUM (x), XFIXNUM (y)); @@ -9391,7 +9391,7 @@ DEFUN ("default-printer-name", Fdefault_printer_name, Sdefault_printer_name, if (!OpenPrinter (pname_buf, &hPrn, NULL)) return Qnil; /* GetPrinterW is not supported by unicows.dll. */ - if (w32_unicode_filenames && os_subtype != OS_9X) + if (w32_unicode_filenames && os_subtype != OS_SUBTYPE_9X) GetPrinterW (hPrn, 2, NULL, 0, &dwNeeded); else GetPrinterA (hPrn, 2, NULL, 0, &dwNeeded); @@ -9401,7 +9401,7 @@ DEFUN ("default-printer-name", Fdefault_printer_name, Sdefault_printer_name, return Qnil; } /* Call GetPrinter again with big enough memory block. */ - if (w32_unicode_filenames && os_subtype != OS_9X) + if (w32_unicode_filenames && os_subtype != OS_SUBTYPE_9X) { /* Allocate memory for the PRINTER_INFO_2 struct. */ ppi2w = xmalloc (dwNeeded); @@ -9537,9 +9537,9 @@ cache_system_info (void) w32_minor_version = version.info.minor; if (version.info.platform & 0x8000) - os_subtype = OS_9X; + os_subtype = OS_SUBTYPE_9X; else - os_subtype = OS_NT; + os_subtype = OS_SUBTYPE_NT; /* Cache page size, allocation unit, processor type, etc. */ GetSystemInfo (&sysinfo_cache); @@ -9550,7 +9550,7 @@ cache_system_info (void) GetVersionEx (&osinfo_cache); w32_build_number = osinfo_cache.dwBuildNumber; - if (os_subtype == OS_9X) + if (os_subtype == OS_SUBTYPE_9X) w32_build_number &= 0xffff; w32_num_mouse_buttons = GetSystemMetrics (SM_CMOUSEBUTTONS); @@ -9717,7 +9717,7 @@ w32_kbd_patch_key (KEY_EVENT_RECORD *event, int cpId) /* On NT, call ToUnicode instead and then convert to the current console input codepage. */ - if (os_subtype == OS_NT) + if (os_subtype == OS_SUBTYPE_NT) { WCHAR buf[128]; @@ -11078,7 +11078,7 @@ see `w32-ansi-code-page'. */); w32_multibyte_code_page = _getmbcp (); #endif - if (os_subtype == OS_NT) + if (os_subtype == OS_SUBTYPE_NT) w32_unicode_gui = 1; else w32_unicode_gui = 0; |