UNIXROOT is used to specify a drive of a root of FHS. So if a path is started with '/', then it should be translated to "$UNIXROOT/".
* lib/relocatable.c (relocate): Prepend $UNIXROOT to pathname if it is started with '/' on EMX. --- lib/relocatable.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/relocatable.c b/lib/relocatable.c index 6c6ea1c..1d6fdd5 100644 --- a/lib/relocatable.c +++ b/lib/relocatable.c @@ -537,6 +537,27 @@ relocate (const char *pathname) } } } + +#ifdef __EMX__ + if (pathname && ISSLASH (pathname[0])) + { + const char *unixroot = getenv ("UNIXROOT"); + + if (unixroot && HAS_DEVICE (unixroot) && !unixroot[2]) + { + char *result = (char *) xmalloc (2 + strlen (pathname) + 1); +#ifdef NO_XMALLOC + if (result != NULL) +#endif + { + strcpy (result, unixroot); + strcpy (result + 2, pathname); + return result; + } + } + } +#endif + /* Nothing to relocate. */ return pathname; } -- 1.8.5.2