summarylogtreecommitdiffstats
path: root/20-mingw-tchar.patch
blob: 9a46ccab68d6e1b4a578f5413ffe470bd5cadf1f (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
--- cyrus-sasl-2.1.27.orig/configure.ac	2021-05-04 00:43:26.301737400 +0530
+++ cyrus-sasl-2.1.27/configure.ac	2021-05-04 00:44:14.503209900 +0530
@@ -1121,6 +1121,8 @@
         ;;
         mingw*)
 AC_DEFINE(WIN32_LEAN_AND_MEAN, 1, [Define to 1, avoids handle_t redefinition.])
+AC_DEFINE(_UNICODE, [], [Enable unicode environment.])
+AC_DEFINE(UNICODE, [], [Enable unicode environment.])
         ;;
 esac
 AM_CONDITIONAL(MACOSX, test "$building_for_macosx" = yes)
@@ -1452,6 +1454,7 @@
 # endif
 #else /* WIN32 */
 # include <winsock2.h>
+# include <tchar.h>
 #endif /* WIN32 */
 #include <string.h>
 
@@ -1524,9 +1527,9 @@
 #endif
 
 #ifdef WIN32
-#define SASL_ROOT_KEY "SOFTWARE\\Carnegie Mellon\\Project Cyrus\\SASL Library"
-#define SASL_PLUGIN_PATH_ATTR "SearchPath"
-#define SASL_CONF_PATH_ATTR "ConfFile"
+#define SASL_ROOT_KEY _T("SOFTWARE\\Carnegie Mellon\\Project Cyrus\\SASL Library")
+#define SASL_PLUGIN_PATH_ATTR _T("SearchPath")
+#define SASL_CONF_PATH_ATTR _T("ConfFile")
 
 #include <windows.h>
 inline static unsigned int sleep(unsigned int seconds) {