#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "filenames.h"
/* TARGET_64BIT may be defined to use driver specific functionality. */
#undef TARGET_64BIT
int frames = (frame_tables.number > 0);
/* Figure out name of output_file, stripping off .so version. */
- p = strrchr (output_file, '/');
- if (p == 0)
- p = output_file;
- else
- p++;
- q = p;
+ q = p = lbasename (output_file);
+
while (q)
{
q = strchr (q,'.');
}
else
{
- if (strncmp (q, SHLIB_SUFFIX, strlen (SHLIB_SUFFIX)) == 0)
+ if (filename_ncmp (q, SHLIB_SUFFIX, strlen (SHLIB_SUFFIX)) == 0)
{
q += strlen (SHLIB_SUFFIX);
break;
for (; list; list = list->next)
{
/* The following lines are needed because path_prefix list
- may contain directories both with trailing '/' and
+ may contain directories both with trailing DIR_SEPARATOR and
without it. */
const char *p = "";
- if (list->prefix[strlen(list->prefix)-1] != '/')
+ if (!IS_DIR_SEPARATOR (list->prefix[strlen(list->prefix)-1]))
p = "/";
for (j = 0; j < 2; j++)
{