#include <gdk/gdk.h>
#include <string.h>
+#include <stdlib.h>
#include "hack.h"
len = strlen (text);
wide_text = g_new (GdkWChar, len + 1);
- enc_status = gdk_mbstowcs (wide_text, text, len);
+ enc_status = mbstowcs ((wchar_t *)wide_text, (char *)text, len);
if (enc_status < 0) {
g_free (wide_text);
return NULL;
len = strlen (text);
wide_text = g_new (GdkWChar, len + 1);
- enc_status = gdk_mbstowcs (wide_text, text, len);
+ enc_status = mbstowcs ((wchar_t *)wide_text, (char *)text, len);
if (enc_status < 0) {
g_free (wide_text);
return 0.0;