diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-06-24 22:19:46 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-06-24 22:19:46 +0000 |
commit | ba21f3637807e5bd0a3b95dae74965dbf27a44a6 (patch) | |
tree | 54cd174eb88776cf56627e658166b74a482d9de0 /gcc | |
parent | 7b03df733453a664ec5d06580c22078d47940e4e (diff) | |
download | gcc-ba21f3637807e5bd0a3b95dae74965dbf27a44a6.tar.gz |
* collect2.c (resolve_lib_name): Move '/' check to more rational place.
* ginclude/stddef.h (NULL): define for non-gnu C++ parsers as 0.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34687 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/collect2.c | 12 | ||||
-rw-r--r-- | gcc/ginclude/stddef.h | 6 |
3 files changed, 19 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0994def1b3c..f8e1532aa25 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2000-06-24 Marc Espie <espie@cvs.openbsd.org> + + * collect2.c (resolve_lib_name): Move '/' check to more rational place. + +2000-06-24 Dirk Duellmann <Dirk.Duellmann@cern.ch> + + * ginclude/stddef.h (NULL): define for non-gnu C++ parsers as 0. + 2000-06-24 Jakub Jelinek <jakub@redhat.com> * stmt.c (expand_decl_cleanup): Emit a dummy insn after diff --git a/gcc/collect2.c b/gcc/collect2.c index 0313f465a71..d8905844330 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); diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h index 41f8f033a0d..a964410bfb7 100644 --- a/gcc/ginclude/stddef.h +++ b/gcc/ginclude/stddef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1989, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of GNU CC. @@ -356,7 +356,11 @@ typedef __WINT_TYPE__ wint_t; #ifdef __GNUG__ #define NULL __null #else /* G++ */ +#ifndef __cplusplus #define NULL ((void *)0) +#else /* C++ */ +#define NULL 0 +#endif /* C++ */ #endif /* G++ */ #endif /* NULL not defined and <stddef.h> or need NULL. */ #undef __need_NULL |