diff options
| author | Eli Zaretskii | 2019-08-06 17:53:03 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2019-08-06 17:53:03 +0300 |
| commit | 96e672364cbd6f1a865511d78f3a218c0570345e (patch) | |
| tree | 0678bcdc4923bcca364df5b284065114e3642c83 /src | |
| parent | 4ce9c6d0b58bd77bc811d6c1c5caf955a5a0be2f (diff) | |
| download | emacs-96e672364cbd6f1a865511d78f3a218c0570345e.tar.gz emacs-96e672364cbd6f1a865511d78f3a218c0570345e.zip | |
Fix minor compilation problems on MS-Windows
* src/w32fns.c (Fdefault_printer_name): Fix size of local
buffer.
* src/image.c [WINDOWSNT]: Test __MINGW_MAJOR_VERSION as well
to shut up compiler warnings.
Diffstat (limited to 'src')
| -rw-r--r-- | src/image.c | 12 | ||||
| -rw-r--r-- | src/w32fns.c | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/image.c b/src/image.c index 8cab860085f..81d8cb4e2b2 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -9290,13 +9290,13 @@ svg_image_p (Lisp_Object object) | |||
| 9290 | # ifdef WINDOWSNT | 9290 | # ifdef WINDOWSNT |
| 9291 | 9291 | ||
| 9292 | /* Restore the original definition of __MINGW_MAJOR_VERSION. */ | 9292 | /* Restore the original definition of __MINGW_MAJOR_VERSION. */ |
| 9293 | # ifdef W32_SAVE_MINGW_VERSION | 9293 | # if defined W32_SAVE_MINGW_VERSION && defined __MINGW_MAJOR_VERSION |
| 9294 | # undef __MINGW_MAJOR_VERSION | 9294 | # undef __MINGW_MAJOR_VERSION |
| 9295 | # define __MINGW_MAJOR_VERSION W32_SAVE_MINGW_VERSION | 9295 | # define __MINGW_MAJOR_VERSION W32_SAVE_MINGW_VERSION |
| 9296 | # ifdef __MINGW_MAJOR_VERSION | 9296 | # ifdef __MINGW_MAJOR_VERSION |
| 9297 | # undef W32_SAVE_MINGW_VERSION | 9297 | # undef W32_SAVE_MINGW_VERSION |
| 9298 | # endif | ||
| 9298 | # endif | 9299 | # endif |
| 9299 | # endif | ||
| 9300 | 9300 | ||
| 9301 | /* SVG library functions. */ | 9301 | /* SVG library functions. */ |
| 9302 | # if LIBRSVG_CHECK_VERSION (2, 32, 0) | 9302 | # if LIBRSVG_CHECK_VERSION (2, 32, 0) |
diff --git a/src/w32fns.c b/src/w32fns.c index a2a88b25881..fc80e018834 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -9230,7 +9230,7 @@ DEFUN ("default-printer-name", Fdefault_printer_name, Sdefault_printer_name, | |||
| 9230 | 0, 0, 0, doc: /* Return the name of Windows default printer device. */) | 9230 | 0, 0, 0, doc: /* Return the name of Windows default printer device. */) |
| 9231 | (void) | 9231 | (void) |
| 9232 | { | 9232 | { |
| 9233 | static char pname_buf[256]; | 9233 | static char pname_buf[2 * MAX_UTF8_PATH + 3 - 1]; |
| 9234 | int err; | 9234 | int err; |
| 9235 | HANDLE hPrn; | 9235 | HANDLE hPrn; |
| 9236 | PRINTER_INFO_2W *ppi2w = NULL; | 9236 | PRINTER_INFO_2W *ppi2w = NULL; |