aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/xtrans/win32.patch
blob: dee4c79d7329da8edacbe910dd78b944a66d39af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
diff --git a/Xtrans.h b/Xtrans.h
index fbf385e01..e52e7cba2 100644
--- a/Xtrans.h
+++ b/Xtrans.h
@@ -50,6 +50,10 @@ from The Open Group.
 #ifndef _XTRANS_H_
 #define _XTRANS_H_
 
+#if defined(_WIN32) && !defined(WIN32)
+# define WIN32 _WIN32
+#endif
+
 #include <X11/Xfuncproto.h>
 #include <X11/Xos.h>
 #include <X11/Xmd.h>
diff --git a/Xtransint.h b/Xtransint.h
index 2156bd52f..735b54301 100644
--- a/Xtransint.h
+++ b/Xtransint.h
@@ -72,7 +72,7 @@ from The Open Group.
 #  define XTRANSDEBUG 1
 #endif
 
-#ifdef WIN32
+#if defined(WIN32) || defined(_WIN32)
 # define _WILLWINSOCK_
 #endif
 
diff --git a/Xtranssock.c b/Xtranssock.c
index c29390eaa..f2ef365cc 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -74,6 +74,10 @@ from the copyright holders.
 #include <X11/Xthreads.h>
 #endif
 
+#if defined(_WIN32) && !defined(WIN32)
+# define WIN32 _WIN32
+#endif
+
 #ifndef WIN32
 
 #if defined(TCPCONN) || defined(UNIXCONN)
diff --git a/Xtransutil.c b/Xtransutil.c
index f15be243c..cc67315e6 100644
--- a/Xtransutil.c
+++ b/Xtransutil.c
@@ -54,6 +54,10 @@ from The Open Group.
  * the internal implementation.
  */
 
+#if defined(_WIN32) && !defined(WIN32)
+# define WIN32 _WIN32
+#endif
+
 #ifdef XTHREADS
 #include <X11/Xthreads.h>
 #endif