From 625bfde66084a35c76984479eea4debb219d384d Mon Sep 17 00:00:00 2001 From: danglin Date: Thu, 3 Jan 2002 19:34:16 +0000 Subject: [PATCH] * collect2.c (main): Use strcmp when testing for "-shared". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48520 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/collect2.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f19a346fa85..29302fe6f9c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2002-01-03 John David Anglin + + * collect2.c (main): Use strcmp when testing for "-shared". + 2002-01-03 Neil Booth * cppmacro.c: Don't include intl.h. Update comments. diff --git a/gcc/collect2.c b/gcc/collect2.c index 96370e1aca7..23e4606a1fd 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -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') { -- 2.11.0