summaryrefslogtreecommitdiff
path: root/mail/courier-mta/patches/patch-an
blob: 1dab76af2f7e8c297cfb124ea9e63448a6727cd8 (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
$NetBSD: patch-an,v 1.3 2007/10/15 15:37:15 jlam Exp $

--- courier/webmlmd.C.orig	Thu Jul  5 01:47:38 2007
+++ courier/webmlmd.C
@@ -22,6 +22,7 @@
 #include	<string.h>
 #include	<signal.h>
 
+#include	<sys/param.h>
 #include	<sys/types.h>
 #include	<sys/stat.h>
 #include        <sys/socket.h>
@@ -40,6 +41,39 @@
 #include	<fstream>
 #include	<sstream>
 #include	<map>
+
+#if defined(__FreeBSD_version) && (__FreeBSD_version < 500029)
+#include	<cwchar>
+namespace std {
+	typedef basic_string <wchar_t> wstring;
+
+	template<>
+	struct char_traits<wchar_t>
+	{
+		typedef wchar_t	char_type;
+
+		static void assign(wchar_t &c1, const wchar_t &c2)
+		{
+			c1 = c2;
+		}
+
+		static wchar_t *assign(wchar_t *s, size_t n, wchar_t c)
+		{
+			return wmemset(s, c, n);
+		}
+
+		static wchar_t *copy(wchar_t *s1, const wchar_t *s2, unsigned n)
+		{
+			return wmemcpy(s1, s2, n);
+		}
+
+		static wchar_t *move(wchar_t *s1, const wchar_t *s2, unsigned n)
+		{
+			return wmemmove(s1, s2, n);
+		}
+	};
+}
+#endif
 
 #include	"cmlm.h"
 #include	"cmlmcmdmisc.h"