<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:akira@tagoh.org" title="Akira TAGOH <akira@tagoh.org>"> <span class="fn">Akira TAGOH</span></a>
</span> changed
<a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - Build fails on Android due to broken lconv struct"
href="https://bugs.freedesktop.org/show_bug.cgi?id=95481">bug 95481</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Assignee</td>
<td>fontconfig-bugs@lists.freedesktop.org
</td>
<td>akira@tagoh.org
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>akira@tagoh.org, fontconfig-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>ASSIGNED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - Build fails on Android due to broken lconv struct"
href="https://bugs.freedesktop.org/show_bug.cgi?id=95481#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - Build fails on Android due to broken lconv struct"
href="https://bugs.freedesktop.org/show_bug.cgi?id=95481">bug 95481</a>
from <span class="vcard"><a class="email" href="mailto:akira@tagoh.org" title="Akira TAGOH <akira@tagoh.org>"> <span class="fn">Akira TAGOH</span></a>
</span></b>
<pre>Taking a look at the original code based on FcStrtod(), i.e. glib's code and I
see they do ifdef with __BIONIC__ which was introduced to fix an issue on
Android. does this patch work?
diff --git a/src/fcxml.c b/src/fcxml.c
index cd8fff1..f9b5975 100644
--- a/src/fcxml.c
+++ b/src/fcxml.c
@@ -1352,7 +1352,11 @@ FcParseInt (FcConfigParse *parse)
static double
FcStrtod (char *s, char **end)
{
+#ifndef __BIONIC__
struct lconv *locale_data;
+#endif
+ const char *decimal_point;
+ int dlen;
char *dot;
double v;
@@ -1360,14 +1364,21 @@ FcStrtod (char *s, char **end)
* Have to swap the decimal point to match the current locale
* if that locale doesn't use 0x2e
*/
+#ifndef __BIONIC__
+ locale_data = localeconv ();
+ decimal_point = locale_data->decimal_point;
+ dlen = strlen (decimal_point);
+#else
+ decimal_point = ".";
+ dlen = 1;
+#endif
+
if ((dot = strchr (s, 0x2e)) &&
- (locale_data = localeconv ()) &&
- (locale_data->decimal_point[0] != 0x2e ||
- locale_data->decimal_point[1] != 0))
+ (decimal_point[0] != 0x2e ||
+ decimal_point[1] != 0))
{
char buf[128];
int slen = strlen (s);
- int dlen = strlen (locale_data->decimal_point);
if (slen + dlen > (int) sizeof (buf))
{</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>