From 479fdad8abe830991506f923485ce94a8f6b56fc Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Mon, 31 Oct 2011 07:19:36 +0000 Subject: [PATCH] E17: fix locale listing on OpenBSD OpenBSD has very little support for locale. For the wizard and config_intl modules, listing /usr/share/locale should be sufficient. Other BSD OS might have better locale support, so this patch is for OpenBSD only (for now) Patch by Laurent Fanis via Jonathan Armani SVN revision: 64546 --- src/modules/conf_intl/e_int_config_intl.c | 4 ++++ src/modules/wizard/page_010.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/modules/conf_intl/e_int_config_intl.c b/src/modules/conf_intl/e_int_config_intl.c index 8aa1a08..68c4e6b 100644 --- a/src/modules/conf_intl/e_int_config_intl.c +++ b/src/modules/conf_intl/e_int_config_intl.c @@ -614,7 +614,11 @@ _fill_data(E_Config_Dialog_Data *cfdata) e_lang_list = e_intl_language_list(); /* Get list of all locales and start making map */ +#ifdef __OpenBSD__ + output = popen("ls /usr/share/locale", "r"); +#else output = popen("locale -a", "r"); +#endif if ( output ) { char line[32]; diff --git a/src/modules/wizard/page_010.c b/src/modules/wizard/page_010.c index 8e29582..7bb98da 100644 --- a/src/modules/wizard/page_010.c +++ b/src/modules/wizard/page_010.c @@ -73,7 +73,11 @@ wizard_page_init(E_Wizard_Page *pg __UNUSED__) { FILE *output; +#ifdef __OpenBSD__ + output = popen("ls /usr/share/locale", "r"); +#else output = popen("locale -a", "r"); +#endif if (output) { char line[32]; -- 2.7.4