what is going on here ??? - (nf)
    Henry Spencer 
    henry at utzoo.UUCP
       
    Tue Jun 25 03:26:52 AEST 1985
    
    
  
> The last element of a struct nlist array as handed to nlist() should
> be {0} (i.e., a null pointer in the name field), not {""} (which
> is a null string in the name field, which will make nlist() do
> crazy things).
We have here a problem that dates back to the vague and obscure wording
of the V7 nlist(3) manual page.  V7 really *does* want an empty string for
that initializer, because the array element is "char[8]", not "char *".
Later Unixes and non-Unixes have done things differently; some of them
may not have realized this, because the manual page is so vague.
Fortuitously, "{0}" is legal and correct under either interpretation,
and hence should be preferred.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry
    
    
More information about the Comp.unix
mailing list