summaryrefslogtreecommitdiff
path: root/bfd/elf32-sh-symbian.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2006-09-16 18:12:17 +0000
committerNick Clifton <nickc@redhat.com>2006-09-16 18:12:17 +0000
commit4c6283c5e98332498466ab8b68835b32790df8cf (patch)
tree73c4fdad2e78770f29390fcaa1a12ff201a0ec31 /bfd/elf32-sh-symbian.c
parentc59aa9025c5f1b6431e6e97664e965b74e690371 (diff)
downloadgdb-4c6283c5e98332498466ab8b68835b32790df8cf.tar.gz
* bfd-in.h (STRING_AND_COMMA): New macro. Takes one constant string as its
argument and emits the string followed by a comma and then the length of the string. (CONST_STRNEQ): New macro. Checks to see if a variable string has a constant string as its initial characters. (CONST_STRNCPY): New macro. Copies a constant string to the start of a variable string. * bfd-in2.h: Regenerate. * <remainign files>: Make use of the new macros.
Diffstat (limited to 'bfd/elf32-sh-symbian.c')
-rw-r--r--bfd/elf32-sh-symbian.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bfd/elf32-sh-symbian.c b/bfd/elf32-sh-symbian.c
index 9ca0564c36c..7ea9207009f 100644
--- a/bfd/elf32-sh-symbian.c
+++ b/bfd/elf32-sh-symbian.c
@@ -1,5 +1,5 @@
/* Renesas / SuperH specific support for Symbian 32-bit ELF files
- Copyright 2004, 2005
+ Copyright 2004, 2005, 2006
Free Software Foundation, Inc.
Contributed by Red Hat
@@ -225,7 +225,7 @@ sh_symbian_process_embedded_commands (struct bfd_link_info *info, bfd * abfd,
break;
case 'I':
- if (strncmp (s, DIRECTIVE_IMPORT, strlen (DIRECTIVE_IMPORT)))
+ if (! CONST_STRNEQ (s, DIRECTIVE_IMPORT))
result = FALSE;
else
{
@@ -261,9 +261,9 @@ sh_symbian_process_embedded_commands (struct bfd_link_info *info, bfd * abfd,
name_end_char = * new_name_end;
* new_name_end = 0;
- /* Check to see if 'AS '... is present. If se we have an IMPORT AS
- directive, otherwise we have an IMPORT directive. */
- if (strncmp (s, DIRECTIVE_AS, strlen (DIRECTIVE_AS)))
+ /* Check to see if 'AS '... is present. If so we have an
+ IMPORT AS directive, otherwise we have an IMPORT directive. */
+ if (! CONST_STRNEQ (s, DIRECTIVE_AS))
{
/* Skip the new-line at the end of the name. */
if (SYMBIAN_DEBUG && name_end_char != '\n')
@@ -327,7 +327,7 @@ sh_symbian_process_embedded_commands (struct bfd_link_info *info, bfd * abfd,
break;
case 'E':
- if (strncmp (s, DIRECTIVE_EXPORT, strlen (DIRECTIVE_EXPORT)))
+ if (! CONST_STRNEQ (s, DIRECTIVE_EXPORT))
result = FALSE;
else
{