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.
#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
{
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