* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
+#include <config.h>
#include <stdio.h>
#include <glib.h>
#include <unicode-data.h>
#include <errno.h>
-#ifdef _MSC_VER
-/* FIXME */
-#define CODESET 1
-#include <Windows.h>
-typedef int iconv_t;
+#if defined(_MSC_VER) || defined(G_OS_WIN32)
+/* FIXME */
+# define CODESET 1
+# include <windows.h>
+# ifdef _MSC_VER
+ typedef int iconv_t;
+# endif
#else
-#include <langinfo.h>
-#include <iconv.h>
+# ifdef HAVE_LANGINFO_H
+# include <langinfo.h>
+# endif
+# ifdef HAVE_ICONV_H
+# include <iconv.h>
+# endif
#endif
static char *my_charset;
{
char *result = NULL;
#ifdef G_OS_WIN32
-#else
+#elif HAVE_ICONV_H
iconv_t convertor;
char *buffer, *output;
const char *strptr = (const char *) str;
is_utf8 = FALSE;
#else
if (my_charset == NULL){
+#if HAVE_LANGINFO_H
my_charset = g_strdup (nl_langinfo (CODESET));
+#else
+ my_charset = g_strdup ("UTF-8");
+#endif
is_utf8 = strcmp (my_charset, "UTF-8") == 0;
}