Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bad configure test for getpwent() ?
- X-seq: zsh-workers 8528
 
- From: Clint Adams <schizo@xxxxxxxxxx>
 
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
 
- Subject: Re: Bad configure test for getpwent() ?
 
- Date: Wed, 3 Nov 1999 13:39:04 -0500
 
- Cc: zsh-workers@xxxxxxxxxxxxxx
 
- In-reply-to: <991103103452.ZM19665@xxxxxxxxxxxxxxxxxxxxxxx>; from schaefer@xxxxxxxxxxxxxxxxxxxxxxx on Wed, Nov 03, 1999 at 10:34:52AM +0000
 
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
 
- References: <991103103452.ZM19665@xxxxxxxxxxxxxxxxxxxxxxx>
 
>     pw1=getpwnam(buf);
>     sprintf(buf, "%d:%d", rand(), getpid());
>     pw2=getpwnam(buf);
>     exit(pw1!=0 && pw2!=0 && !strcmp(pw1->pw_name, pw2->pw_name));
It's not comparing the pointers; it's comparing the names.
> I don't think getpwent() is required to return a unique pointer each time;
> that is, I think it's allowed to re-use an internal static buffer for each
> entry that it returns.  That would mean that this test always succeeds ...
Messages sorted by:
Reverse Date,
Date,
Thread,
Author