This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Alternative LD_LIBRARY_PATH


On Thu, Nov 18, 2004 at 10:58:17PM -0500, John David Anglin wrote:
> Here is an alternative patch for handling LD_LIBRARY_PATH and related
> environment variables.  There are a couple of signicant improvements
> over what we do now.
> 
> 1) The code to set these variables is consolidated in one file and
>    isn't duplicated across many different files.
> 
> 2) I believe that there is an improvment in handling environment
>    variables on systems that don't use LD_LIBRARY_PATH, or use
>    multiple variables.
> 
> 3) There is a proc to restore the initial saved state.
> 
> I've tested this change on hppa-unknown-linux-gnu.
> 
> Comments?
> 

It looks good to me. I really appreciate it. Can you use arrays on
environment variables, like

libpath(LD_LIBRARY_PATH), ...
orig_libpath(LD_LIBRARY_PATH), ...

You can use a loop on an array. BTW, is orig_libpath_saved really
needed? Can we just check orig_libpath instead?

Thanks.


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]