🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #289

bug in ar.c

#289
From: Piet van Oostrum
Date: Wed, 12 Jul 1989 15:01
40 lines
1678 bytes
I found why GNU ``ar'' doesn't work properly when replacing members. It
just didn't delete the old members from __SYMDEF.

Patch: (I tested this on an older version of ar, I have no reason to
believe that it shouldn't work in the current version)

*** ar.c.orig	Mon Mar  6 00:53:47 1989
--- ar.c	Wed Jul 12 15:51:06 1989
***************
*** 788,794 ****
      {
        if (symdef_exists)
  	{
! #if 0
  	  /* This is turned off because there seems to be a bug
  	     in deleting the symdefs for members that are deleted.
  	     The easiest way to fix it
--- 788,794 ----
      {
        if (symdef_exists)
  	{
! #if 1	/* This should work now -- PvO -- 6 July 1989 */
  	  /* This is turned off because there seems to be a bug
  	     in deleting the symdefs for members that are deleted.
  	     The easiest way to fix it
***************
*** 1354,1359 ****
--- 1354,1361 ----
    char *strings;
    int i;
    int offset;
+ 
+   if (! name) return;		/* deleted member */
  
    if (mapelt->info.data_offset)
      {
-- 
Piet van Oostrum, Dept of Computer Science, University of Utrecht
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands
Telephone: +31-30-531806. piet@cs.ruu.nl (mcvax!hp4nl!ruuinf!piet)
Technical Details
Message-ID: <1447@ruuinf.cs.ruu.nl>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!mcvax!hp4nl!ruuinf!piet

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!mcvax!hp4nl!ruuinf!piet
From: piet@cs.ruu.nl (Piet van Oostrum)
Newsgroups: gnu.utils.bug
Subject: bug in ar.c
Message-ID: <1447@ruuinf.cs.ruu.nl>
Date: 12 Jul 89 15:01:59 GMT
Sender: news@ruuinf.cs.ruu.nl
Reply-To: piet@cs.ruu.nl (Piet van Oostrum)
Organization: Dept of Computer Science, University of Utrecht, Holland
Lines: 40