aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/sunos.em
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
commit0112cd268b205d8176b8b4d00988a334822956cf (patch)
tree67d11340ff93c7dbc29c8917bc03d9d24555f43d /ld/emultempl/sunos.em
parent4fa3602bd53183badf1d259128a5f951f32db8cb (diff)
downloadfsf-binutils-gdb-0112cd268b205d8176b8b4d00988a334822956cf.zip
fsf-binutils-gdb-0112cd268b205d8176b8b4d00988a334822956cf.tar.gz
fsf-binutils-gdb-0112cd268b205d8176b8b4d00988a334822956cf.tar.bz2
* 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 'ld/emultempl/sunos.em')
-rw-r--r--ld/emultempl/sunos.em14
1 files changed, 7 insertions, 7 deletions
diff --git a/ld/emultempl/sunos.em b/ld/emultempl/sunos.em
index a480558..4fbe108 100644
--- a/ld/emultempl/sunos.em
+++ b/ld/emultempl/sunos.em
@@ -10,7 +10,7 @@ cat >e${EMULATION_NAME}.c <<EOF
/* SunOS emulation code for ${EMULATION_NAME}
Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
SunOS shared library support by Ian Lance Taylor <ian@cygnus.com>
@@ -160,7 +160,7 @@ gld${EMULATION_NAME}_find_so (lang_input_statement_type *inp)
|| ! inp->dynamic)
return;
- ASSERT (strncmp (inp->local_sym_name, "-l", 2) == 0);
+ ASSERT (CONST_STRNEQ (inp->local_sym_name, "-l"));
for (search = search_head; search != NULL; search = search->next)
{
@@ -273,7 +273,7 @@ gld${EMULATION_NAME}_search_dir
const char *s;
int found_maj, found_min;
- if (strncmp (entry->d_name, "lib", 3) != 0
+ if (! CONST_STRNEQ (entry->d_name, "lib")
|| strncmp (entry->d_name + 3, filename, len) != 0)
continue;
@@ -288,7 +288,7 @@ gld${EMULATION_NAME}_search_dir
native linker does not. This is more convenient for packages
which just generate .so files for shared libraries, as on ELF
systems. */
- if (strncmp (entry->d_name + 3 + len, ".so", 3) != 0)
+ if (! CONST_STRNEQ (entry->d_name + 3 + len, ".so"))
continue;
if (entry->d_name[6 + len] == '\0')
;
@@ -400,7 +400,7 @@ gld${EMULATION_NAME}_after_open (void)
if (global_found)
continue;
- if (strncmp (lname, "-l", 2) != 0)
+ if (! CONST_STRNEQ (lname, "-l"))
{
bfd *abfd;
@@ -586,7 +586,7 @@ gld${EMULATION_NAME}_check_needed (lang_input_statement_type *s)
{
if (s->filename == NULL)
return;
- if (strncmp (global_needed->name, "-l", 2) != 0)
+ if (! CONST_STRNEQ (global_needed->name, "-l"))
{
if (strcmp (s->filename, global_needed->name) == 0)
global_found = TRUE;
@@ -605,7 +605,7 @@ gld${EMULATION_NAME}_check_needed (lang_input_statement_type *s)
else
++sname;
- if (strncmp (sname, "lib", 3) != 0)
+ if (! CONST_STRNEQ (sname, "lib"))
return;
sname += 3;