* collect2.c (main): Use strcmp when testing for "-shared".
authorJohn David Anglin <dave@hiauly1.hia.nrc.ca>
Thu, 3 Jan 2002 19:34:16 +0000 (19:34 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Thu, 3 Jan 2002 19:34:16 +0000 (19:34 +0000)
From-SVN: r48520

gcc/ChangeLog
gcc/collect2.c

index f19a346fa85bf8768d50455dbf342bd3df5858cf..29302fe6f9ce20136e846ed0ce3a9ae03e9380d8 100644 (file)
@@ -1,3 +1,7 @@
+2002-01-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+       * collect2.c (main): Use strcmp when testing for "-shared".
+
 2002-01-03  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * cppmacro.c: Don't include intl.h.  Update comments.
index 96370e1aca75ec1f837b32e734668c2c23ecf7af..23e4606a1fddcf0757d0e485b1bfcf146ab5e380 100644 (file)
@@ -1,7 +1,7 @@
 /* Collect static initialization info into data structures that can be
    traversed by C++ initialization and finalization routines.
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by Chris Smith (csmith@convex.com).
    Heavily modified by Michael Meissner (meissner@cygnus.com),
    Per Bothner (bothner@cygnus.com), and John Gilmore (gnu@cygnus.com).
@@ -1080,7 +1080,7 @@ main (argc, argv)
        *c_ptr++ = obstack_copy0 (&permanent_obstack, q, strlen (q));
       if (strcmp (q, "-EL") == 0 || strcmp (q, "-EB") == 0)
        *c_ptr++ = obstack_copy0 (&permanent_obstack, q, strlen (q));
-      if (strncmp (q, "-shared", sizeof ("-shared") - 1) == 0)
+      if (strcmp (q, "-shared") == 0)
        shared_obj = 1;
       if (*q == '-' && q[1] == 'B')
        {