From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6959 Path: news.gmane.org!not-for-mail From: M Farkas-Dyck Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: [PATCH] linedit, deluser: use POSIX getpwent instead of getpwent_r Date: Mon, 9 Feb 2015 13:05:07 -0500 Message-ID: References: <1398411394-19971-1-git-send-email-ncopa@alpinelinux.org> <20150205184601.GK23507@brightrain.aerifal.cx> <20150205205224.GN23507@brightrain.aerifal.cx> <20150207013229.GT23507@brightrain.aerifal.cx> <20150207165219.GB23507@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1423505122 2840 80.91.229.3 (9 Feb 2015 18:05:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Feb 2015 18:05:22 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6972-gllmg-musl=m.gmane.org@lists.openwall.com Mon Feb 09 19:05:22 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YKsi1-0006n7-JY for gllmg-musl@m.gmane.org; Mon, 09 Feb 2015 19:05:21 +0100 Original-Received: (qmail 19980 invoked by uid 550); 9 Feb 2015 18:05:19 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 19972 invoked from network); 9 Feb 2015 18:05:18 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Ncv4LRu7Z4c0UumGHmat7y8Qa4FsTKdr+Tz9/Ov9da0=; b=BndK8PnkBdJLUSCpKGkaoMNxAWhTqkidFH2yNdebMi1hPOPYZeBVlULnvN9DcBiX1m eOqk9LC6jMgS9LtHoqJiA5d67ZDNjpFOAA9QpTF5/q/VTXuYeftEdrWe9VdFy5ZH8vkk E8ovW7AmXHkE6JCExVD7991zF9fncpIE5ySL4HK6LoRHH5fOb5eHyTVM16XhF+B9JKRP sH+ZegH4WUlDm80R46u/IYyjwnE4xmWXtS4eeJcNciKvXylOQG+9M1V941sWEtK6KNNF vK0Szkk0AD3zzrD3xDBZPsWHzgjGKQaGmI83Li8jzWTbfGTWwqiNJZPnQOdhYPyNS3dL 5DdQ== X-Received: by 10.112.217.68 with SMTP id ow4mr18737694lbc.97.1423505107558; Mon, 09 Feb 2015 10:05:07 -0800 (PST) In-Reply-To: <20150207165219.GB23507@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:6959 Archived-At: On 07/02/2015, Rich Felker wrote: > On Sat, Feb 07, 2015 at 03:14:10PM +0100, Denys Vlasenko wrote: >> On Sat, Feb 7, 2015 at 2:32 AM, Rich Felker wrote: >> >> > the _r functions are for thread-safe >> >> > versions of their corresponding legacy functions, but getpwent_r has >> >> > inherent global state -- the iterator. Whoever made it just wasn't >> >> > thinking. To make a correct interface like this the caller would >> >> > need >> >> > to have an iterator object to pass to the function, but I can't see >> >> > much merit in inventing a new interface for this. buf may contain arbitrary data, yes? If so we could store the iterator there.