🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #394

Buglet in load.c for Convex

#394
From: Skip Montanaro
Date: Fri, 01 Sep 1989 04:03
40 lines
1744 bytes
Convex defines the nlist struct somewhat differently than Sun or Stellar
(I'm not familiar with other Unix dialects):

struct nlist {
	union {
		char	*n_name;	/* for use when in core */
		long	n_strx;		/* index into string table */
	} n_un;				/* union for name and string index */

	unsigned char	n_type;		/* type flag, see below */
	char		n_other;	/* unused */
	short		n_desc;		/* see <stab.h> */
	unsigned long	n_value;	/* value of symbol (or sdb offset) */
};

The compiler complains about the use of n_name when compiling load.c, so I
changed load.c to reflect this for the Convex. If this is a feature of more
than just Convex's environment a more general test is in order.

*** load.c~	Fri Jul 14 14:21:55 1989
--- load.c	Thu Aug 31 23:42:23 1989
***************
*** 151,154 ****
--- 151,155 ----
        struct nlist nl[2];
  
+ #if !defined(convex)
  #ifdef	NLIST_NAME_ARRAY
        strcpy (nl[0].n_name, LDAV_SYMBOL);
***************
*** 158,161 ****
--- 159,166 ----
        nl[1].n_name = 0;
  #endif	/* NLIST_NAME_ARRAY.  */
+ #else /* convex */
+       nl[0].n_un.n_name = LDAV_SYMBOL;
+       nl[1].n_un.n_name = 0;
+ #endif /* convex */
  
        if (nlist (KERNEL_FILE, nl) < 0 || nl[0].n_type == 0)
Technical Details
Message-ID: <8909010403.AA14283@sprite.crd.Ge.Com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!usc!brutus.cs.uiuc.edu!tut.cis.ohio-state.edu!sprite.crd.ge.com!montnaro

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!usc!brutus.cs.uiuc.edu!tut.cis.ohio-state.edu!sprite.crd.ge.com!montnaro
From: montnaro@sprite.crd.ge.com (Skip Montanaro)
Newsgroups: gnu.utils.bug
Subject: Buglet in load.c for Convex
Message-ID: <8909010403.AA14283@sprite.crd.Ge.Com>
Date: 1 Sep 89 04:03:02 GMT
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: <montanaro@sprite.crd.ge.com> (Skip Montanaro)
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 40