aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2024-03-14 10:22:52 +0200
committerEli Zaretskii2024-03-14 10:22:52 +0200
commit7971537d3cdab62f7ce1924cbb2effde73b59b1e (patch)
tree93f6164efd07ddba2605a040ad75fd0d9f5ebe5b
parente7b1743b798cab338e0fa7b98dfb20c0ba7204b1 (diff)
downloademacs-7971537d3cdab62f7ce1924cbb2effde73b59b1e.tar.gz
emacs-7971537d3cdab62f7ce1924cbb2effde73b59b1e.zip
; Fix last change to compile with mingw.org's MinGW
* src/w32xfns.c: * src/w32fns.c (WTS_VIRTUAL_CLASS) [!MINGW_W64]: Declare. * src/w32xfns.c: Include wtsapi32.h.
-rw-r--r--src/w32fns.c7
-rw-r--r--src/w32xfns.c11
2 files changed, 18 insertions, 0 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index 3e4a8c475b7..7d288ce7bd5 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -47,6 +47,13 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
47#include "w32inevt.h" 47#include "w32inevt.h"
48 48
49#ifdef WINDOWSNT 49#ifdef WINDOWSNT
50/* mingw.org's MinGW headers mistakenly omit this enumeration: */
51# ifndef MINGW_W64
52typedef enum _WTS_VIRTUAL_CLASS {
53 WTSVirtualClientData,
54 WTSVirtualFileHandle
55} WTS_VIRTUAL_CLASS;
56# endif
50#include <mbstring.h> 57#include <mbstring.h>
51#include <mbctype.h> /* for _getmbcp */ 58#include <mbctype.h> /* for _getmbcp */
52#include <wtsapi32.h> /* for WTS(Un)RegisterSessionNotification */ 59#include <wtsapi32.h> /* for WTS(Un)RegisterSessionNotification */
diff --git a/src/w32xfns.c b/src/w32xfns.c
index 3d7a1514f72..853c8368118 100644
--- a/src/w32xfns.c
+++ b/src/w32xfns.c
@@ -22,6 +22,17 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
22#include <stdio.h> 22#include <stdio.h>
23#include <windows.h> 23#include <windows.h>
24#include <windowsx.h> 24#include <windowsx.h>
25/* Override API version to get the required functionality. */
26#undef _WIN32_WINNT
27#define _WIN32_WINNT 0x0501
28/* mingw.org's MinGW headers mistakenly omit this enumeration: */
29# ifndef MINGW_W64
30typedef enum _WTS_VIRTUAL_CLASS {
31 WTSVirtualClientData,
32 WTSVirtualFileHandle
33} WTS_VIRTUAL_CLASS;
34# endif
35#include <wtsapi32.h> /* for WM_WTSSESSION_CHANGE, WTS_SESSION_LOCK */
25 36
26#include "lisp.h" 37#include "lisp.h"
27#include "frame.h" 38#include "frame.h"