Skip to contentSkip to conversation

lib/strutils: circumvent missing localeconv()

PATCH Applied maximilian attems 2 participants 2 messages May 31, 2012 – Jun 5, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/strutils: circumvent missing localeconv()

Add stub too nls.h, include it instead of locale.h. Code in strutils handles already returned NULL.

---
 include/nls.h  |    6 ++++++
 lib/strutils.c |    2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
include/nls.h +6 -0
index 9a9311b..3eabfe6 100644
@@ -12,6 +12,12 @@ int main(int argc, char *argv[]);
 #else
 # undef setlocale
 # define setlocale(Category, Locale) /* empty */
+struct lconv
+{
+	char *decimal_point;
+};
+# undef localeconv
+# define localeconv() NULL
 #endif
 
 #ifdef ENABLE_NLS
lib/strutils.c +1 -1
index 6bdc01d..036ae06 100644
@@ -9,10 +9,10 @@
 #include <ctype.h>
 #include <errno.h>
 #include <sys/stat.h>
-#include <locale.h>
 #include <string.h>
 
 #include "c.h"
+#include "nls.h"
 #include "strutils.h"
 #include "bitops.h"
 
Signature · 1 line
1.7.10
maintainer Applied
#1 lore raw
Quoted 3 lines · maximilian attems
 include/nls.h  |    6 ++++++
 lib/strutils.c |    2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

Applied, thanks.

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com