summaryrefslogtreecommitdiff
path: root/comms/synce-libsynce/patches/patch-aa
diff options
context:
space:
mode:
Diffstat (limited to 'comms/synce-libsynce/patches/patch-aa')
-rw-r--r--comms/synce-libsynce/patches/patch-aa39
1 files changed, 39 insertions, 0 deletions
diff --git a/comms/synce-libsynce/patches/patch-aa b/comms/synce-libsynce/patches/patch-aa
new file mode 100644
index 00000000000..87b58c21735
--- /dev/null
+++ b/comms/synce-libsynce/patches/patch-aa
@@ -0,0 +1,39 @@
+$NetBSD: patch-aa,v 1.1.1.1 2005/10/13 15:00:13 wiz Exp $
+
+--- lib/wstr.c.orig 2004-01-12 10:33:34.000000000 +0100
++++ lib/wstr.c
+@@ -5,6 +5,7 @@
+ #include "synce_config.h"
+ #include <stdlib.h>
+ #include <string.h>
++#include <errno.h>
+
+ #if HAVE_LOCALE_H
+ #include <locale.h>
+@@ -35,7 +36,7 @@
+ #endif
+
+
+-#define wstr_WIDE "UNICODELITTLE"
++#define wstr_WIDE "ucs-2le"
+ #define wstr_ASCII "ISO_8859-1"
+ #define wstr_UTF8 "UTF-8"
+
+@@ -79,7 +80,7 @@ static char* wstr_to_x(LPCWSTR inbuf, co
+ cd = iconv_open(code, wstr_WIDE);
+ if (INVALID_ICONV_HANDLE == cd)
+ {
+- wstr_error("iconv_open failed");
++ wstr_error("iconv_open(%s, %s) failed: %s", code, wstr_WIDE, strerror(errno));
+ return NULL;
+ }
+
+@@ -147,7 +148,7 @@ static LPWSTR wstr_from_x(const char* in
+ cd = iconv_open(wstr_WIDE, code);
+ if (INVALID_ICONV_HANDLE == cd)
+ {
+- wstr_error("iconv_open failed");
++ wstr_error("iconv_open(%s, %s) failed: %s", code, wstr_WIDE, strerror(errno));
+ return NULL;
+ }
+