[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 96e6723: Fix minor compilation problems on MS-Windo
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 96e6723: Fix minor compilation problems on MS-Windows |
Date: |
Tue, 6 Aug 2019 10:53:56 -0400 (EDT) |
branch: master
commit 96e672364cbd6f1a865511d78f3a218c0570345e
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
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.
---
src/image.c | 12 ++++++------
src/w32fns.c | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/image.c b/src/image.c
index 8cab860..81d8cb4 100644
--- a/src/image.c
+++ b/src/image.c
@@ -9290,13 +9290,13 @@ svg_image_p (Lisp_Object object)
# ifdef WINDOWSNT
/* Restore the original definition of __MINGW_MAJOR_VERSION. */
-# ifdef W32_SAVE_MINGW_VERSION
-# undef __MINGW_MAJOR_VERSION
-# define __MINGW_MAJOR_VERSION W32_SAVE_MINGW_VERSION
-# ifdef __MINGW_MAJOR_VERSION
-# undef W32_SAVE_MINGW_VERSION
+# if defined W32_SAVE_MINGW_VERSION && defined __MINGW_MAJOR_VERSION
+# undef __MINGW_MAJOR_VERSION
+# define __MINGW_MAJOR_VERSION W32_SAVE_MINGW_VERSION
+# ifdef __MINGW_MAJOR_VERSION
+# undef W32_SAVE_MINGW_VERSION
+# endif
# endif
-# endif
/* SVG library functions. */
# if LIBRSVG_CHECK_VERSION (2, 32, 0)
diff --git a/src/w32fns.c b/src/w32fns.c
index a2a88b2..fc80e01 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -9230,7 +9230,7 @@ DEFUN ("default-printer-name", Fdefault_printer_name,
Sdefault_printer_name,
0, 0, 0, doc: /* Return the name of Windows default printer device. */)
(void)
{
- static char pname_buf[256];
+ static char pname_buf[2 * MAX_UTF8_PATH + 3 - 1];
int err;
HANDLE hPrn;
PRINTER_INFO_2W *ppi2w = NULL;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 96e6723: Fix minor compilation problems on MS-Windows,
Eli Zaretskii <=