[Freeciv-Dev] Re: (PR#4225) mingw32 & libiconv problem
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients:; |
Subject: |
[Freeciv-Dev] Re: (PR#4225) mingw32 & libiconv problem |
From: |
"Per I. Mathisen" <per@xxxxxxxxxxx> |
Date: |
Tue, 13 May 2003 14:20:55 -0700 |
Reply-to: |
rt@xxxxxxxxxxxxxx |
On Mon, 12 May 2003, Jason Short wrote:
> > I undefined HAVE_ICONV, and now I can compile the win32 client, but I get
> > this:
>
> The other (probably better) way to look at this bug: configure is
> detecting iconv to be present, even though it isn't.
But it is. ./configure is correct.
> It's the same as the ESD bug in mingw32 - it detects the linux
> installation not the mingw32 one.
I'm not running it from linux, I'm running this all in Win XP.
> There's not much to do about this except get a new iconv.m4.
Done. Still doesn't work. But guess what? It only doesn't work when you
use --disable-nls... When I compile with NLS, it works. So something is
not included in the linking process when we try without NLS that should be
there. I guess the culprit is gtk and the error is upstream.
> (in which case we we should probably fix it).
I'll see if I get the inspiration one day to track it down. For now, I'm
satisfied that I do not actually need --disable-nls.
> > 1: last message repeated 2048 times (total 4096 repeats)
> Just add a static variable to the appropriate function, I believe in
> common/shared.c.I didn't do it before since it didn't seem like a big
> deal (it's not like it gets printed out all 4096 times :-).
Yah, yah. Since this bug is in our product, I took the effort to fix this.
The attached patch will be committed.
- Per
Index: common/shared.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/shared.c,v
retrieving revision 1.92.2.2
diff -u -r1.92.2.2 shared.c
--- common/shared.c 4 Feb 2003 18:15:48 -0000 1.92.2.2
+++ common/shared.c 13 May 2003 21:15:25 -0000
@@ -1331,11 +1331,20 @@
return convert_string_malloc(text, data_encoding, local_encoding);
#else
- freelog(LOG_ERROR,
- _("You are running Freeciv without using iconv. Unless\n"
- "you are using the latin1 character set, some characters\n"
- "may not be displayed properly. You can download iconv\n"
- "at http://gnu.org/."));
+/* Don't expect that win32 users install iconv on their own, especially
+ * not from http://gnu.org/ in source form... */
+#ifndef WIN32_NATIVE
+ static bool only_give_this_damn_warning_once = FALSE;
+
+ if (!only_give_this_damn_warning_once) {
+ only_give_this_damn_warning_once = TRUE;
+
+ freelog(LOG_ERROR,
+ _("You are running Freeciv without using iconv. Unless\n"
+ "you are using the latin1 character set, some characters\n"
+ "may not be displayed properly. You can download iconv\n"
+ "at http://gnu.org/."));
+#endif
return mystrdup(text);
#endif
}
[Freeciv-Dev] Re: (PR#4225) mingw32 & libiconv problem, Per I. Mathisen, 2003/05/13
|
|