mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
This follows Bruno Haible's suggestion at <http://lists.gnu.org/archive/html/guile-devel/2011-11/msg00055.html>. * m4/gnulib-cache.m4: Add `gl_LOCAL_DIR'; use `localcharset'. * Makefile.am (EXTRA_DIST): Add gnulib-local/lib/localcharset.[ch].diff. (TESTS_ENVIRONMENT): New variable. * gnulib-local/lib/localcharset.c.diff, gnulib-local/lib/localcharset.h.diff: New files. * test-suite/Makefile.am (TESTS_ENVIRONMENT): Add @LOCALCHARSET_TESTS_ENVIRONMENT@. * test-suite/standalone/Makefile.am (TESTS_ENVIRONMENT): Likewise.
22 lines
725 B
Diff
22 lines
725 B
Diff
Add a variant of `locale_charset' that returns its result based solely on
|
|
information from the environment. See
|
|
http://lists.gnu.org/archive/html/guile-devel/2011-11/msg00040.html for the
|
|
rationale.
|
|
|
|
diff --git a/lib/localcharset.h b/lib/localcharset.h
|
|
index 8907ccd..43e976f 100644
|
|
--- a/lib/localcharset.h
|
|
+++ b/lib/localcharset.h
|
|
@@ -32,6 +32,12 @@ extern "C" {
|
|
name. */
|
|
extern const char * locale_charset (void);
|
|
|
|
+/* Same as above, but only look at environment variables, avoiding calls to
|
|
+ `setlocale', `nl_langinfo', etc. See
|
|
+ <http://lists.gnu.org/archive/html/guile-devel/2011-11/msg00040.html> for
|
|
+ the rationale. */
|
|
+extern const char * environ_locale_charset (void);
|
|
+
|
|
|
|
#ifdef __cplusplus
|
|
}
|