Index: lang/objective-cplusplus/i3/trunk/src/os-windows/msvc/libintl.h
===================================================================
--- lang/objective-cplusplus/i3/trunk/src/os-windows/msvc/libintl.h (revision 25302)
+++ lang/objective-cplusplus/i3/trunk/src/os-windows/msvc/libintl.h (revision 34702)
@@ -410,4 +410,22 @@
 				      const char *curr_prefix);
 
+/* MS Windows wide character support.  */
+#if (defined(WIN32) || defined(_WIN32) || defined(_WIN64) || defined(_WIN32_WCE)) \
+    && !defined(__CYGWIN__) && (defined(UNICODE) || defined(_UNICODE))
+
+#define ENABLE_WINDOWS_WCHAR_SUPPORT
+
+#ifdef _INTL_REDIRECT_INLINE
+extern wchar_t *libintl_wbindtextdomain (const char *__domainname,
+				     const wchar_t *__dirname);
+static inline wchar_t *wbindtextdomain (const char *__domainname,
+				    const wchar_t *__dirname)
+{
+  return libintl_wbindtextdomain (__domainname, __dirname);
+}
+#elif defined _INTL_REDIRECT_MACROS
+# define wbindtextdomain libintl_wbindtextdomain
+#endif
+#endif
 
 #ifdef __cplusplus
Index: lang/objective-cplusplus/i3/trunk/src/os-windows/wlibintl.h
===================================================================
--- lang/objective-cplusplus/i3/trunk/src/os-windows/wlibintl.h (revision 26337)
+++ lang/objective-cplusplus/i3/trunk/src/os-windows/wlibintl.h (revision 34702)
@@ -26,67 +26,97 @@
 /* wchar_t support */
 #ifdef _INTL_REDIRECT_INLINE
-#define WCHAR_LIBINTL_STATIC_INLINE static inline
+#define WLIBINTL_H_FUNCTION_LINKAGE static inline
 #elif defined(_MSC_VER)
-#define WCHAR_LIBINTL_STATIC_INLINE static _inline
+#define WLIBINTL_H_FUNCTION_LINKAGE static _inline
 #else
-#define WCHAR_LIBINTL_STATIC_INLINE static
+#define WLIBINTL_H_FUNCTION_LINKAGE static
 #endif
 
-#define wgettext(msgid) wgettext_(msgid, L##msgid)
-#define dwgettext(domainname, msgid) dwgettext_(domainname, msgid, L##msgid)
-#define dcwgettext(domainname, msgid, category) dwgettext_(domainname, msgid, category, L##msgid)
-#define nwgettext(msgid1, msgid2, n) nwgettext_(msgid1, msgid2, n, L##msgid1,  L##msgid2)
-#define dnwgettext(domainname, msgid1, msgid2, n) dnwgettext_(domainname, msgid1, msgid2, n, L##msgid1,  L##msgid2)
-#define dcnwgettext(domainname, msgid1, msgid2, n, category) dnwgettext_(domainname, msgid1, msgid2, n, L##msgid1,  L##msgid2)
+#define wgettext(msgid) wgettext_selecter(msgid, L##msgid)
+#define dwgettext(domainname, msgid) dwgettext_selecter(domainname, msgid, L##msgid)
+#define dcwgettext(domainname, msgid, category) dwgettext_selecter(domainname, msgid, category, L##msgid)
+#define nwgettext(msgid1, msgid2, n) nwgettext_selecter(msgid1, msgid2, n, L##msgid1,  L##msgid2)
+#define dnwgettext(domainname, msgid1, msgid2, n) dnwgettext_selecter(domainname, msgid1, msgid2, n, L##msgid1,  L##msgid2)
+#define dcnwgettext(domainname, msgid1, msgid2, n, category) dnwgettext_selecter(domainname, msgid1, msgid2, n, L##msgid1,  L##msgid2)
 
-WCHAR_LIBINTL_STATIC_INLINE 
-const wchar_t *wgettext_ (const char *msgid, const wchar_t *wmsgid)
+WLIBINTL_H_FUNCTION_LINKAGE 
+wchar_t *wgettext_selecter (const char *msgid, const wchar_t *wmsgid)
 {
-  const char *translated = gettext (msgid);
-  return translated != msgid ? (const wchar_t *)translated : wmsgid;
+  char *translated = gettext (msgid);
+  if (strcmp(msgid, translated) == 0)
+    {
+      return (wchar_t *)wmsgid;
+    }
+  return (wchar_t *)translated;
 }
 
-WCHAR_LIBINTL_STATIC_INLINE 
-const wchar_t *dwgettext_ (const char *domainname, const char *msgid, const wchar_t *wmsgid)
+WLIBINTL_H_FUNCTION_LINKAGE 
+wchar_t *dwgettext_selecter (const char *domainname, const char *msgid, const wchar_t *wmsgid)
 {
-  const char *translated = dgettext (domainname, msgid);
-  return translated != msgid ? (const wchar_t *)translated : wmsgid;
+  char *translated = dgettext (domainname, msgid);
+  if (strcmp(msgid, translated) == 0)
+    {
+      return (wchar_t *)wmsgid;
+    }
+  return (wchar_t *)translated;
 }
 
-WCHAR_LIBINTL_STATIC_INLINE 
-const wchar_t *dcwgettext_ (const char *domainname, const char *msgid, int category,  const wchar_t *wmsgid)
+WLIBINTL_H_FUNCTION_LINKAGE 
+wchar_t *dcwgettext_selecter (const char *domainname, const char *msgid, int category,  const wchar_t *wmsgid)
 {
-  const char *translated = dcgettext (domainname, msgid, category);
-  return translated != msgid ? (const wchar_t *)translated : wmsgid;
+  char *translated = dcgettext (domainname, msgid, category);
+  if (strcmp(msgid, translated) == 0)
+    {
+      return (wchar_t *)wmsgid;
+    }
+  return (wchar_t *)translated;
 }
 
-WCHAR_LIBINTL_STATIC_INLINE 
-const wchar_t *nwgettext_ (const char *msgid1, const char *msgid2, unsigned long n, const wchar_t *wmsgid1, const wchar_t *wmsgid2)
+WLIBINTL_H_FUNCTION_LINKAGE 
+wchar_t *nwgettext_selecter (const char *msgid1, const char *msgid2, unsigned long n, const wchar_t *wmsgid1, const wchar_t *wmsgid2)
 {
-  const char *translated = ngettext (msgid1, msgid2, n);
-  return translated == msgid1 ? wmsgid1 : (translated == msgid2 ? wmsgid2 : (const wchar_t *)translated);
+  char *translated = ngettext (msgid1, msgid2, n);
+  if (strcmp(msgid1, translated) == 0)
+    {
+      return (wchar_t *)wmsgid1;
+    }
+  else if (strcmp(msgid2, translated) == 0)
+    {
+      return (wchar_t *)wmsgid2;
+    }
+  return (wchar_t *)translated;
 }
 
-WCHAR_LIBINTL_STATIC_INLINE 
-const wchar_t *dnwgettext_ (const char *domainname, const char *msgid1, const char *msgid2, unsigned long n, const wchar_t *wmsgid1, const wchar_t *wmsgid2)
+WLIBINTL_H_FUNCTION_LINKAGE 
+wchar_t *dnwgettext_selecter (const char *domainname, const char *msgid1, const char *msgid2, unsigned long n, const wchar_t *wmsgid1, const wchar_t *wmsgid2)
 {
-  const char *translated = dngettext (domainname, msgid1, msgid2, n);
-  return translated == msgid1 ? wmsgid1 : (translated == msgid2 ? wmsgid2 : (const wchar_t *)translated);
+  char *translated = dngettext (domainname, msgid1, msgid2, n);
+  if (strcmp(msgid1, translated) == 0)
+    {
+      return (wchar_t *)wmsgid1;
+    }
+  else if (strcmp(msgid2, translated) == 0)
+    {
+      return (wchar_t *)wmsgid2;
+    }
+  return (wchar_t *)translated;
 }
 
-WCHAR_LIBINTL_STATIC_INLINE 
-const wchar_t *dcnwgettext_ (const char *domainname, const char *msgid1, const char *msgid2, unsigned long n, const wchar_t *wmsgid1, const wchar_t *wmsgid2, int category)
+WLIBINTL_H_FUNCTION_LINKAGE 
+wchar_t *dcnwgettext_selecter (const char *domainname, const char *msgid1, const char *msgid2, unsigned long n, const wchar_t *wmsgid1, const wchar_t *wmsgid2, int category)
 {
-  const char *translated = dcngettext (domainname, msgid1, msgid2, n, category);
-  return translated == msgid1 ? wmsgid1 : (translated == msgid2 ? wmsgid2 : (const wchar_t *)translated);
+  char *translated = dcngettext (domainname, msgid1, msgid2, n, category);
+  if (strcmp(msgid1, translated) == 0)
+    {
+      return (wchar_t *)wmsgid1;
+    }
+  else if (strcmp(msgid2, translated) == 0)
+    {
+      return (wchar_t *)wmsgid2;
+    }
+  return (wchar_t *)translated;
 }
 
-/* MS Windows Wide character support.  */
-#if (defined(WIN32) || defined(_WIN32) || defined(_WIN64) || defined(_WIN32_WCE)) \
-    && !defined(__CYGWIN__) && (defined(UNICODE) || defined(_UNICODE))
-extern const wchar_t *wbindtextdomain (const char *domainname, const wchar_t *dirname16);
-#endif
-
-#undef WCHAR_LIBINTL_STATIC_INLINE 
+#undef WLIBINTL_H_FUNCTION_LINKAGE 
 
 #ifdef __cplusplus
