summaryrefslogtreecommitdiff
path: root/libguile
diff options
context:
space:
mode:
authorMike Gran <spk121@yahoo.com>2017-03-20 20:29:21 -0700
committerMike Gran <spk121@yahoo.com>2017-03-20 20:29:21 -0700
commitdc9d1474aa03e73a093f3c9447006549d6576c2f (patch)
tree4df7a3c2a5152439b27546f8e48ea0c41a76cc22 /libguile
parentc81868425280fd3e4a6718aa9d1aa71eeae57dbb (diff)
i18n: locale-positive-separated-by-space? should return bool, not string
* libguile/i18n.c (scm_nl_langinfo): unpack INT_P_SEP_BY_SPACE as bool * test-suite/tests/i18n.test (nl-langinfo et al.): new tests
Diffstat (limited to 'libguile')
-rw-r--r--libguile/i18n.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/libguile/i18n.c b/libguile/i18n.c
index 6f75966a1..47179d178 100644
--- a/libguile/i18n.c
+++ b/libguile/i18n.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2014 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2014, 2017 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -1567,7 +1567,8 @@ SCM_DEFINE (scm_nl_langinfo, "nl-langinfo", 1, 1, 0,
#if defined P_CS_PRECEDES || defined N_CS_PRECEDES || \
defined INT_P_CS_PRECEDES || defined INT_N_CS_PRECEDES || \
- defined P_SEP_BY_SPACE || defined N_SEP_BY_SPACE
+ defined P_SEP_BY_SPACE || defined N_SEP_BY_SPACE || \
+ defined INT_P_SEP_BY_SPACE || defined INT_N_SEP_BY_SPACE
#ifdef P_CS_PRECEDES
case P_CS_PRECEDES:
case N_CS_PRECEDES:
@@ -1580,8 +1581,12 @@ SCM_DEFINE (scm_nl_langinfo, "nl-langinfo", 1, 1, 0,
case P_SEP_BY_SPACE:
case N_SEP_BY_SPACE:
#endif
- /* This is to be interpreted as a boolean. */
- result = scm_from_bool (*c_result);
+#ifdef INT_P_SEP_BY_SPACE
+ case INT_P_SEP_BY_SPACE:
+ case INT_N_SEP_BY_SPACE:
+#endif
+ /* This is to be interpreted as a boolean. */
+ result = scm_from_bool (*c_result);
free (c_result);
break;