From: John Darrington Date: Mon, 1 Dec 2008 12:50:16 +0000 (+0900) Subject: Merge branch 'master' of ssh://jmd@git.sv.gnu.org/srv/git/pspp X-Git-Tag: v0.7.1~50^2~8 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45a1201de864c76f5a8c78166dc4ff2ea4151e5d;hp=8ea97bfb8e21cac5964212c175782c48159764b7;p=pspp-builds.git Merge branch 'master' of ssh://jmd@git.sv.gnu.org/srv/git/pspp --- diff --git a/configure.ac b/configure.ac index b00a75b1..1abc8043 100644 --- a/configure.ac +++ b/configure.ac @@ -15,6 +15,7 @@ AC_LIBTOOL_WIN32_DLL AC_LIBTOOL_DLOPEN AC_PROG_LIBTOOL PKG_PROG_PKG_CONFIG +m4_pattern_forbid([PKG_CHECK_MODULES]) AC_ARG_ENABLE( anachronistic-dependencies, diff --git a/src/libpspp/i18n.c b/src/libpspp/i18n.c index bda2676c..db851217 100644 --- a/src/libpspp/i18n.c +++ b/src/libpspp/i18n.c @@ -225,24 +225,24 @@ i18n_done (void) char get_system_decimal (void) { - char *radix_char = NULL; + char radix_char; char *ol = setlocale (LC_NUMERIC, NULL); setlocale (LC_NUMERIC, ""); #if HAVE_NL_LANGINFO - radix_char = nl_langinfo (RADIXCHAR); + radix_char = nl_langinfo (RADIXCHAR)[0]; #else { - char *buf = xmalloc (10); - snprintf (buf, 10, "%f", 2.5); - radix_char = &buf[1]; + char buf[10]; + snprintf (buf, sizeof buf, "%f", 2.5); + radix_char = buf[1]; } #endif /* We MUST leave LC_NUMERIC untouched, since it would otherwise interfere with data_{in,out} */ setlocale (LC_NUMERIC, ol); - return *radix_char; + return radix_char; }