diff options
author | Jeffrey A Law <law@cygnus.com> | 1999-10-26 06:03:19 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-10-26 00:03:19 -0600 |
commit | c2897436c3b10afd7d9c37b293ee014dbe1b3b6c (patch) | |
tree | de83ea9e77806bf2fdcf62fdd111b0bc4c866530 /gcc | |
parent | 7f6dae2a45e53587650670c2ad12fd3725c7102c (diff) | |
download | gcc-c2897436c3b10afd7d9c37b293ee014dbe1b3b6c.zip gcc-c2897436c3b10afd7d9c37b293ee014dbe1b3b6c.tar.gz gcc-c2897436c3b10afd7d9c37b293ee014dbe1b3b6c.tar.bz2 |
collect2.c (IS_DIR_SEPARATOR): Define.
* collect2.c (IS_DIR_SEPARATOR): Define.
(prefix_from_string): Use IS_DIR_SEPARATOR and DIR_SEPARATOR.
From-SVN: r30182
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/collect2.c | 15 |
2 files changed, 16 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a9763a1..d6a8cbb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -17,6 +17,9 @@ Mon Oct 25 23:10:45 1999 Andreas Schwab <schwab@suse.de> Mon Oct 25 23:03:09 1999 Jeffrey A Law (law@cygnus.com) + * collect2.c (IS_DIR_SEPARATOR): Define. + (prefix_from_string): Use IS_DIR_SEPARATOR and DIR_SEPARATOR. + * som.h (ASM_DECLARE_FUNCTION_NAME): Set PRIV_LEV for static functions too. diff --git a/gcc/collect2.c b/gcc/collect2.c index 64101bf..9138bcd 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -49,6 +49,17 @@ Boston, MA 02111-1307, USA. */ #include "obstack.h" #include "intl.h" +#ifndef DIR_SEPARATOR +# define IS_DIR_SEPARATOR(ch) ((ch) == '/') +#else /* DIR_SEPARATOR */ +# ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +# else /* DIR_SEPARATOR && DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +# endif /* DIR_SEPARATOR && DIR_SEPARATOR_2 */ +#endif /* DIR_SEPARATOR */ + /* Obstack allocation and deallocation routines. */ #define obstack_chunk_alloc xmalloc #define obstack_chunk_free free @@ -810,9 +821,9 @@ prefix_from_string (p, pprefix) { strcpy (nstore, "./"); } - else if (endp[-1] != '/') + else if (! IS_DIR_SEPARATOR (endp[-1])) { - nstore[endp-startp] = '/'; + nstore[endp-startp] = DIR_SEPARATOR; nstore[endp-startp+1] = 0; } else |