From: M Farkas-Dyck <strake888@gmail.com>
To: musl@lists.openwall.com
Subject: Re: Re: [PATCH] linedit, deluser: use POSIX getpwent instead of getpwent_r
Date: Mon, 9 Feb 2015 13:05:07 -0500 [thread overview]
Message-ID: <CAL3m8eAp71GzVg_1Y8ypHkzyC1EQB=rqi2nD1VBYja0T2Xt+Wg@mail.gmail.com> (raw)
In-Reply-To: <20150207165219.GB23507@brightrain.aerifal.cx>
On 07/02/2015, Rich Felker <dalias@libc.org> 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 <dalias@libc.org> 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.
next prev parent reply other threads:[~2015-02-09 18:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1398411394-19971-1-git-send-email-ncopa@alpinelinux.org>
[not found] ` <CAK1hOcMceBFFmQjxV9J6FUBrr_2+uz8y6cT-N6fzhOjWNvxiOA@mail.gmail.com>
[not found] ` <20150205184601.GK23507@brightrain.aerifal.cx>
[not found] ` <CAK1hOcMBqpz_eT0hU3Rx8aj7rP8wWf5kMpYh-G2qStWEyJi-YQ@mail.gmail.com>
[not found] ` <20150205205224.GN23507@brightrain.aerifal.cx>
[not found] ` <CAK1hOcPr1ZeaLc8pp=BX=f21xUkX4potRA8UtxDw2khdE+zz_A@mail.gmail.com>
[not found] ` <20150207013229.GT23507@brightrain.aerifal.cx>
[not found] ` <CAK1hOcNrEf5MAVqai5P3HjdMMi1pi2LPcABUgDeXWh-ZYscrjg@mail.gmail.com>
2015-02-07 16:52 ` Rich Felker
2015-02-09 18:05 ` M Farkas-Dyck [this message]
2015-02-09 18:20 ` Rich Felker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAL3m8eAp71GzVg_1Y8ypHkzyC1EQB=rqi2nD1VBYja0T2Xt+Wg@mail.gmail.com' \
--to=strake888@gmail.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).