aboutsummaryrefslogtreecommitdiff
path: root/gcc/collect2.c
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2000-06-24 18:19:46 -0400
committerJason Merrill <jason@gcc.gnu.org>2000-06-24 18:19:46 -0400
commitbe78ffb2267dfe051d8e5bf9d92fcdda8ad323d1 (patch)
tree54cd174eb88776cf56627e658166b74a482d9de0 /gcc/collect2.c
parent40f1e34222f69708080b45b2b93a3b8551bf4ab1 (diff)
downloadgcc-be78ffb2267dfe051d8e5bf9d92fcdda8ad323d1.zip
gcc-be78ffb2267dfe051d8e5bf9d92fcdda8ad323d1.tar.gz
gcc-be78ffb2267dfe051d8e5bf9d92fcdda8ad323d1.tar.bz2
collect2.c (resolve_lib_name): Move '/' check to more rational place.
* collect2.c (resolve_lib_name): Move '/' check to more rational place. * ginclude/stddef.h (NULL): define for non-gnu C++ parsers as 0. From-SVN: r34687
Diffstat (limited to 'gcc/collect2.c')
-rw-r--r--gcc/collect2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/collect2.c b/gcc/collect2.c
index 0313f46..d890584 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -2993,14 +2993,14 @@ resolve_lib_name (name)
struct prefix_list *list = libpaths[i]->plist;
for (; list; list = list->next)
{
+ /* The following lines are needed because path_prefix list
+ may contain directories both with trailing '/' and
+ without it. */
+ const char *p = "";
+ if (list->prefix[strlen(list->prefix)-1] != '/')
+ p = "/";
for (j = 0; libexts[j]; j++)
{
- /* The following lines are needed because path_prefix list
- may contain directories both with trailing '/' and
- without it. */
- const char *p = "";
- if (list->prefix[strlen(list->prefix)-1] != '/')
- p = "/";
sprintf (lib_buf, "%s%slib%s.%s",
list->prefix, p, name, libexts[j]);
if (debug) fprintf (stderr, "searching for: %s\n", lib_buf);