#include "defs.h"
#include "gdb_obstack.h"
#include "splay-tree.h"
+#include "filenames.h"
#include "symtab.h"
#include "symfile.h"
#include "objfiles.h"
struct macro_table *table;
/* The name of the macro. This is in the table's bcache, if it has
- one. */
+ one. */
const char *name;
/* The source file and line number where the definition's scope
First, squawk. */
complaint (&symfile_complaints,
- _("both `%s' and `%s' allegedly #included at %s:%d"), included,
- (*link)->filename, source->filename, line);
+ _("both `%s' and `%s' allegedly #included at %s:%d"),
+ included, (*link)->filename, source->filename, line);
/* Now, choose a new, unoccupied line number for this
#inclusion, after the alleged #inclusion line. */
macro_lookup_inclusion (struct macro_source_file *source, const char *name)
{
/* Is SOURCE itself named NAME? */
- if (strcmp (name, source->filename) == 0)
+ if (filename_cmp (name, source->filename) == 0)
return source;
/* The filename in the source structure is probably a full path, but
int src_name_len = strlen (source->filename);
/* We do mean < here, and not <=; if the lengths are the same,
- then the strcmp above should have triggered, and we need to
+ then the filename_cmp above should have triggered, and we need to
check for a slash here. */
if (name_len < src_name_len
- && source->filename[src_name_len - name_len - 1] == '/'
- && strcmp (name, source->filename + src_name_len - name_len) == 0)
+ && IS_DIR_SEPARATOR (source->filename[src_name_len - name_len - 1])
+ && filename_cmp (name,
+ source->filename + src_name_len - name_len) == 0)
return source;
}
if (! same)
{
complaint (&symfile_complaints,
- _("macro `%s' redefined at %s:%d; original definition at %s:%d"),
+ _("macro `%s' redefined at %s:%d; "
+ "original definition at %s:%d"),
name, source->filename, line,
found_key->start_file->filename, found_key->start_line);
}