Commit 6309ae8c authored by Rafaël Carré's avatar Rafaël Carré

contrib: lua: don't use localeconv()

not thread-safe, not available on android
just use '.' as decimal separator
parent e69c9040
--- lua/src/llex.c.orig 2011-12-25 23:39:35.254829002 -0500
+++ lua/src/llex.c 2011-12-25 23:39:59.662829001 -0500
@@ -176,9 +176,8 @@
static void trydecpoint (LexState *ls, SemInfo *seminfo) {
/* format error: try to update decimal point separator */
- struct lconv *cv = localeconv();
char old = ls->decpoint;
- ls->decpoint = (cv ? cv->decimal_point[0] : '.');
+ ls->decpoint = '.';
buffreplace(ls, old, ls->decpoint); /* try updated decimal separator */
if (!luaO_str2d(luaZ_buffer(ls->buff), &seminfo->r)) {
/* format error with correct decimal point: no more options */
...@@ -33,6 +33,7 @@ lua: lua-$(LUA_VERSION).tar.gz .sum-lua ...@@ -33,6 +33,7 @@ lua: lua-$(LUA_VERSION).tar.gz .sum-lua
$(UNPACK) $(UNPACK)
$(APPLY) $(SRC)/lua/lua-noreadline.patch $(APPLY) $(SRC)/lua/lua-noreadline.patch
$(APPLY) $(SRC)/lua/luac-32bits.patch $(APPLY) $(SRC)/lua/luac-32bits.patch
$(APPLY) $(SRC)/lua/no-localeconv.patch
ifdef HAVE_MACOSX ifdef HAVE_MACOSX
(cd $(UNPACK_DIR) && \ (cd $(UNPACK_DIR) && \
sed -e 's%gcc%$(CC)%' \ sed -e 's%gcc%$(CC)%' \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment