summaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog13
-rw-r--r--gas/depend.c3
-rw-r--r--gas/dwarf2dbg.c14
-rw-r--r--gas/ecoff.c6
-rw-r--r--gas/input-scrub.c3
-rw-r--r--gas/listing.c5
-rw-r--r--gas/remap.c3
-rw-r--r--gas/stabs.c7
8 files changed, 36 insertions, 18 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 29f36845d09..8fcce3e0f46 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,16 @@
+2011-02-28 Kai Tietz <kai.tietz@onevision.com>
+
+ * depend.c (register_dependency): Use filename_(n)cmp.
+ * dwarf2dbg.c (get_filenum): Likewise.
+ * ecoff.c (add_file): Likewise.
+ (ecoff_generate_asm_lineno): Likewise.
+ * input-scrub.c (new_logical_line_flags): Likewise.
+ * listing.c (file_info): Likewise.
+ (listing_newline): Likewise.
+ * remap.c (remap_debug_filename): Likewise.
+ * stabs.c (generate_asm_file): Likewise.
+ (stabs_generate_asm_lineno): Likewise.
+
2011-02-28 Maciej W. Rozycki <macro@codesourcery.com>
* config/tc-mips.c (append_insn): Disable branch relaxation for
diff --git a/gas/depend.c b/gas/depend.c
index afa512e5145..7a3c54c4e11 100644
--- a/gas/depend.c
+++ b/gas/depend.c
@@ -20,6 +20,7 @@
02110-1301, USA. */
#include "as.h"
+#include "filenames.h"
/* The file to write to, or NULL if no dependencies being kept. */
static char * dep_file = NULL;
@@ -63,7 +64,7 @@ register_dependency (char *filename)
for (dep = dep_chain; dep != NULL; dep = dep->next)
{
- if (!strcmp (filename, dep->file))
+ if (!filename_cmp (filename, dep->file))
return;
}
diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c
index 85c1f30e898..587920f7d3b 100644
--- a/gas/dwarf2dbg.c
+++ b/gas/dwarf2dbg.c
@@ -431,14 +431,14 @@ get_filenum (const char *filename, unsigned int num)
if (num == 0 && last_used)
{
if (! files[last_used].dir
- && strcmp (filename, files[last_used].filename) == 0)
+ && filename_cmp (filename, files[last_used].filename) == 0)
return last_used;
if (files[last_used].dir
- && strncmp (filename, dirs[files[last_used].dir],
- last_used_dir_len) == 0
+ && filename_ncmp (filename, dirs[files[last_used].dir],
+ last_used_dir_len) == 0
&& IS_DIR_SEPARATOR (filename [last_used_dir_len])
- && strcmp (filename + last_used_dir_len + 1,
- files[last_used].filename) == 0)
+ && filename_cmp (filename + last_used_dir_len + 1,
+ files[last_used].filename) == 0)
return last_used;
}
@@ -460,7 +460,7 @@ get_filenum (const char *filename, unsigned int num)
--dir_len;
#endif
for (dir = 1; dir < dirs_in_use; ++dir)
- if (strncmp (filename, dirs[dir], dir_len) == 0
+ if (filename_ncmp (filename, dirs[dir], dir_len) == 0
&& dirs[dir][dir_len] == '\0')
break;
@@ -485,7 +485,7 @@ get_filenum (const char *filename, unsigned int num)
for (i = 1; i < files_in_use; ++i)
if (files[i].dir == dir
&& files[i].filename
- && strcmp (file, files[i].filename) == 0)
+ && filename_cmp (file, files[i].filename) == 0)
{
last_used = i;
last_used_dir_len = dir_len;
diff --git a/gas/ecoff.c b/gas/ecoff.c
index d623ba9ca91..27e48e5f0b6 100644
--- a/gas/ecoff.c
+++ b/gas/ecoff.c
@@ -2257,7 +2257,7 @@ add_file (const char *file_name, int indx ATTRIBUTE_UNUSED, int fake)
fil_ptr = fil_ptr->next_file)
{
if (first_ch == fil_ptr->name[0]
- && strcmp (file_name, fil_ptr->name) == 0
+ && filename_cmp (file_name, fil_ptr->name) == 0
&& fil_ptr->fdr.fMerge)
{
cur_file_ptr = fil_ptr;
@@ -2325,7 +2325,7 @@ add_file (const char *file_name, int indx ATTRIBUTE_UNUSED, int fake)
void
ecoff_new_file (const char *name, int appfile ATTRIBUTE_UNUSED)
{
- if (cur_file_ptr != NULL && strcmp (cur_file_ptr->name, name) == 0)
+ if (cur_file_ptr != NULL && filename_cmp (cur_file_ptr->name, name) == 0)
return;
add_file (name, 0, 0);
@@ -5200,7 +5200,7 @@ ecoff_generate_asm_lineno (void)
as_where (&filename, &lineno);
if (current_stabs_filename == (char *) NULL
- || strcmp (current_stabs_filename, filename))
+ || filename_cmp (current_stabs_filename, filename))
add_file (filename, 0, 1);
list = allocate_lineno_list ();
diff --git a/gas/input-scrub.c b/gas/input-scrub.c
index e1ff5cc0a50..d616f632ec9 100644
--- a/gas/input-scrub.c
+++ b/gas/input-scrub.c
@@ -21,6 +21,7 @@
02110-1301, USA. */
#include "as.h"
+#include "filenames.h"
#include "input-file.h"
#include "sb.h"
#include "listing.h"
@@ -474,7 +475,7 @@ new_logical_line_flags (char *fname, /* DON'T destroy it! We point to it! */
if (fname
&& (logical_input_file == NULL
- || strcmp (logical_input_file, fname)))
+ || filename_cmp (logical_input_file, fname)))
{
logical_input_file = fname;
return 1;
diff --git a/gas/listing.c b/gas/listing.c
index bc6af712a0e..6d28f316c32 100644
--- a/gas/listing.c
+++ b/gas/listing.c
@@ -90,6 +90,7 @@
on a line. */
#include "as.h"
+#include "filenames.h"
#include "obstack.h"
#include "safe-ctype.h"
#include "input-file.h"
@@ -257,7 +258,7 @@ file_info (const char *file_name)
while (p != (file_info_type *) NULL)
{
- if (strcmp (p->filename, file_name) == 0)
+ if (filename_cmp (p->filename, file_name) == 0)
return p;
p = p->next;
}
@@ -318,7 +319,7 @@ listing_newline (char *ps)
if (ps == NULL)
{
if (line == last_line
- && !(last_file && file && strcmp (file, last_file)))
+ && !(last_file && file && filename_cmp (file, last_file)))
return;
new_i = (list_info_type *) xmalloc (sizeof (list_info_type));
diff --git a/gas/remap.c b/gas/remap.c
index b334b2c6e2d..0c863fb10d0 100644
--- a/gas/remap.c
+++ b/gas/remap.c
@@ -19,6 +19,7 @@
02110-1301, USA. */
#include "as.h"
+#include "filenames.h"
/* Structure recording the mapping from source file and directory
names at compile time to those to be embedded in debug
@@ -76,7 +77,7 @@ remap_debug_filename (const char *filename)
size_t name_len;
for (map = debug_prefix_maps; map; map = map->next)
- if (strncmp (filename, map->old_prefix, map->old_len) == 0)
+ if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
break;
if (!map)
return filename;
diff --git a/gas/stabs.c b/gas/stabs.c
index d19bf2b9c29..f197ebdac73 100644
--- a/gas/stabs.c
+++ b/gas/stabs.c
@@ -20,6 +20,7 @@
02110-1301, USA. */
#include "as.h"
+#include "filenames.h"
#include "obstack.h"
#include "subsegs.h"
#include "ecoff.h"
@@ -521,7 +522,7 @@ generate_asm_file (int type, char *file)
char *bufp;
if (last_file != NULL
- && strcmp (last_file, file) == 0)
+ && filename_cmp (last_file, file) == 0)
return;
/* Rather than try to do this in some efficient fashion, we just
@@ -605,7 +606,7 @@ stabs_generate_asm_lineno (void)
prev_lineno = lineno;
}
else if (lineno == prev_lineno
- && strcmp (file, prev_file) == 0)
+ && filename_cmp (file, prev_file) == 0)
{
/* Same file/line as last time. */
return;
@@ -614,7 +615,7 @@ stabs_generate_asm_lineno (void)
{
/* Remember file/line for next time. */
prev_lineno = lineno;
- if (strcmp (file, prev_file) != 0)
+ if (filename_cmp (file, prev_file) != 0)
{
free (prev_file);
prev_file = xstrdup (file);