summaryrefslogtreecommitdiff
path: root/devel/w32api/patches/patch-ah
blob: 56035fc54de6cabbab663f5db6fd1515fbd9d612 (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
$NetBSD: patch-ah,v 1.2 2002/03/18 03:25:47 kent Exp $

--- include/winnt.h.orig	Tue Dec  4 22:10:28 2001
+++ include/winnt.h
@@ -52,15 +52,19 @@
 typedef char *PSZ;
 
 #ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
-#ifndef _WCHAR_T_
-#define _WCHAR_T_
-#undef __need_wchar_t
-#ifndef __cplusplus
-typedef unsigned short wchar_t;
-#endif
-#endif
-#endif
+# define _WCHAR_T_DEFINED
+# ifndef _WCHAR_T_
+#  define _WCHAR_T_
+#  undef __need_wchar_t
+#  ifndef __cplusplus
+#   include <machine/ansi.h>
+#   ifdef _BSD_WCHAR_T_
+typedef _BSD_WCHAR_T_ wchar_t;
+#    undef _BSD_WCHAR_T_
+#   endif /* _BSD_WCHAR_T_ */
+#  endif /* !__cplusplus */
+# endif /* !_WCHAR_T_ */
+#endif /* !_WCHAR_T_DEFINED */
 
 typedef wchar_t WCHAR;
 typedef WCHAR *PWCHAR,*LPWCH,*PWCH,*NWPSTR,*LPWSTR,*PWSTR;