target-libpath.exp (restore_ld_library_path_env_vars): Check existence of ld library path variables before unsetting.

* lib/target-libpath.exp (restore_ld_library_path_env_vars):
	Check existence of ld library path variables before unsetting.

From-SVN: r91367
This commit is contained in:
John David Anglin 2004-11-27 05:19:33 +00:00 committed by John David Anglin
parent ed986c8e6e
commit de2fc4db61
2 changed files with 13 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2004-11-27 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* lib/target-libpath.exp (restore_ld_library_path_env_vars):
Check existence of ld library path variables before unsetting.
2004-11-26 Mark Mitchell <mark@codesourcery.com>
* g++.old-deja/g++.eh/badalloc1.C: Robustify.

View File

@ -196,42 +196,42 @@ proc restore_ld_library_path_env_vars { } {
if { $orig_ld_library_path_saved } {
setenv LD_LIBRARY_PATH "$orig_ld_library_path"
} else {
} elseif [info exists env(LD_LIBRARY_PATH)] {
unsetenv LD_LIBRARY_PATH
}
if { $orig_ld_run_path_saved } {
setenv LD_RUN_PATH "$orig_ld_run_path"
} else {
} elseif [info exists env(LD_RUN_PATH)] {
unsetenv LD_RUN_PATH
}
if { $orig_shlib_path_saved } {
setenv SHLIB_PATH "$orig_shlib_path"
} else {
} elseif [info exists env(SHLIB_PATH)] {
unsetenv SHLIB_PATH
}
if { $orig_ld_libraryn32_path_saved } {
setenv LD_LIBRARYN32_PATH "$orig_ld_libraryn32_path"
} else {
} elseif [info exists env(LD_LIBRARYN32_PATH)] {
unsetenv LD_LIBRARYN32_PATH
}
if { $orig_ld_library64_path_saved } {
setenv LD_LIBRARY64_PATH "$orig_ld_library64_path"
} else {
} elseif [info exists env(LD_LIBRARY64_PATH)] {
unsetenv LD_LIBRARY64_PATH
}
if { $orig_ld_library_path_32_saved } {
setenv LD_LIBRARY_PATH_32 "$orig_ld_library_path_32"
} else {
} elseif [info exists env(LD_LIBRARY_PATH_32)] {
unsetenv LD_LIBRARY_PATH_32
}
if { $orig_ld_library_path_64_saved } {
setenv LD_LIBRARY_PATH_64 "$orig_ld_library_path_64"
} else {
} elseif [info exists env(LD_LIBRARY_PATH_64)] {
unsetenv LD_LIBRARY_PATH_64
}
if { $orig_dyld_library_path_saved } {
setenv DYLD_LIBRARY_PATH "$orig_dyld_library_path"
} else {
} elseif [info exists env(DYLD_LIBRARY_PATH)] {
unsetenv DYLD_LIBRARY_PATH
}
}