diff libpurple/util.h @ 21862:ae58ffd5e929

Create a purple_gai_strerror() function similar to g_str_error() which calls gai_strerror() then tries to convert the result into UTF-8. I believe this fixes #3003
author Mark Doliner <mark@kingant.net>
date Tue, 18 Dec 2007 08:42:41 +0000
parents 5915ad785ee7
children 39b078ac8a81
line wrap: on
line diff
--- a/libpurple/util.h	Tue Dec 18 07:39:57 2007 +0000
+++ b/libpurple/util.h	Tue Dec 18 08:42:41 2007 +0000
@@ -1110,6 +1110,17 @@
 gchar *purple_utf8_salvage(const char *str);
 
 /**
+ * Return the UTF-8 version of gai_strerror().  It calls gai_strerror()
+ * then converts the result to UTF-8.  This function is analogous to
+ * g_strerror().
+ *
+ * @param errnum The error code.
+ *
+ * @return The UTF-8 error message.
+ */
+G_CONST_RETURN gchar *purple_gai_strerror(gint errnum);
+
+/**
  * Compares two UTF-8 strings case-insensitively.  This string is
  * more expensive than a simple g_utf8_collate() comparison because
  * it calls g_utf8_casefold() on each string, which allocates new