$UNIXROOT is a drive on which a root of FHS is. * gettext-runtime/intl/bindtextdom.c (BINDTEXTDOMAIN): Prepend $UNIXROOT to dirname if it is started '/' or it is an empty string. --- gettext-runtime/intl/bindtextdom.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
diff --git a/gettext-runtime/intl/bindtextdom.c b/gettext-runtime/intl/bindtextdom.c index 887393c..0d530be 100644 --- a/gettext-runtime/intl/bindtextdom.c +++ b/gettext-runtime/intl/bindtextdom.c @@ -317,7 +317,32 @@ set_binding_values (const char *domainname, char * BINDTEXTDOMAIN (const char *domainname, const char *dirname) { +#ifdef __EMX__ + const char *saved_dirname = dirname; + char dirname_with_drive[_MAX_PATH]; + + if (dirname && (dirname[0] == '/' || dirname[0] == '\\' )) + { + const char *unixroot = getenv ("UNIXROOT"); + size_t len = strlen (dirname) + 1; + + if (unixroot + && unixroot[0] != '\0' + && unixroot[1] == ':' + && unixroot[2] == '\0' + && 2 + len <= _MAX_PATH) + { + memcpy (dirname_with_drive, unixroot, 2); + memcpy (dirname_with_drive + 2, dirname, len); + + dirname = dirname_with_drive; + } + } +#endif set_binding_values (domainname, &dirname, NULL); +#ifdef __EMX__ + dirname = saved_dirname; +#endif return (char *) dirname; } -- 2.6.0