From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25376 invoked from network); 3 Nov 1999 18:41:02 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Nov 1999 18:41:02 -0000 Received: (qmail 27901 invoked by alias); 3 Nov 1999 18:39:10 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8528 Received: (qmail 27894 invoked from network); 3 Nov 1999 18:39:10 -0000 Date: Wed, 3 Nov 1999 13:39:04 -0500 From: Clint Adams To: Bart Schaefer Cc: zsh-workers@sunsite.auc.dk Subject: Re: Bad configure test for getpwent() ? Message-ID: <19991103133904.A6549@dman.com> References: <991103103452.ZM19665@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0pre4i In-Reply-To: <991103103452.ZM19665@candle.brasslantern.com>; from schaefer@candle.brasslantern.com on Wed, Nov 03, 1999 at 10:34:52AM +0000 > 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 ...