$NetBSD: patch-an,v 1.6 2012/06/09 11:45:38 adam Exp $ --- courier/webmlmd.C.orig Thu Jul 5 01:47:38 2007 +++ courier/webmlmd.C @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -40,6 +41,39 @@ #include #include +#if defined(__FreeBSD_version) && (__FreeBSD_version < 500029) +#include +namespace std { + typedef basic_string wstring; + + template<> + struct char_traits + { + 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" #include "webmlmd.H"