bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patches for OS/2 (2)


From: Eli Zaretskii
Subject: Re: Patches for OS/2 (2)
Date: Fri, 15 Nov 2002 18:56:14 +0300

> Date: Thu, 14 Nov 2002 23:01:05 +0100
> From: Andreas Buening <address@hidden>
> > 
> >  1) Make libintl look for its files in some directory relative to the
> >     place where the executable program is installed.  For example,
> >     if foo.exe is in f:/usr/local/bin, make it so libintl looks for its
> >     files in ../share/ relative to where foo.exe lives.  This could be
> >     implemented by making foo.exe push into environment some variable
> >     that libintl would look at, and making f:/usr/local/share the value
> >     of that variable. (foo.exe knows where it lives by looking at its
> >     argv[0].)
> 
> This is much more complicated because
> a) If libintl has to look for an environment variable, why not UNIXROOT?

Because the way I suggested it, the solution could be
platform-independent.  You could then try to convince Bruno to include
it as a feature for all the supported systems, instead of using the
ugly system-dependent #ifdef's.

> b) The source code of every executable that uses libintl would have to
>    be modified.

You could define an OS/2-specific code that runs at startup (e.g., via
the static constructors supported by GCC) that do this for every
program, and supply that module as part of libintl.

ALternatively, if libintl has some initialization function, this
could be done in that function.

> c) I'm not sure about this but is it guaranteed that argv[0] contains
>    a real path and not just "foo"?

I think on OS/2 it is guaranteed, but I'm not an OS/2 expert.

> >  2) Is there some environment variable used by EMX to point to the root
> >     of its installation?  If so, you could use that place as the
> >     replacement for /usr/local, and configure libintl look in its `share'
> >     subdirectory.  In other words, assuming that, say, $EMX_PREFIX points
> >     to the root of the EMX installation, make libintl look for its files
> >     in $EMX_PREFIX/share/.  That is, configure libintl with
> >     --prefix='$EMX_PREFIX'.
> 
> Not, there is no such variable.

Really?  Don't you have to set some environment variable when you
install EMX?

Anyway, if such a variable doesn't exist, it's too bad.

> And there is another problem. If the
> user compiles a package with --prefix=x:/this/is/my/prefix then it
> must be guaranteed that this is not overridden. The user must have
> the last word.

This will happen automatically: if the default prefix is the EMX
installation root, whenever the user compiles with another prefix,
that prefix will override the default one.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]