[PATCH 2/3] platform: provide getline and getdelim if not available
Rich Felker
dalias at aerifal.cx
Wed Jun 29 17:41:57 UTC 2011
On Wed, Jun 29, 2011 at 10:54:34AM +0200, Denys Vlasenko wrote:
> On Wednesday 29 June 2011 04:45, Rich Felker wrote:
> > On Wed, Jun 29, 2011 at 04:43:58AM +0200, Denys Vlasenko wrote:
> > > > Are you just waiting for an update on this patch to push it in?
> > > > The current code in git fails to compile on non-GNU systems because of
> > > > missing getline().
> > >
> > > Applied the fix. Please try current git.
> >
> > Wouldn't it be better to use getc_unlocked? Performance could be
> > substantially better especially when getc_unlocked is a macro.
>
> We already do. libbb.h:
>
> /* Busybox does not use threads, we can speed up stdio.
> * But don't define foo to foo_unlocked if foo_unlocked
> * is a macro (it might be defined back to foo!).
> */
The only time getc_unlocked will be noticably faster than getc is if
it's a macro that can poke directly at the FILE struct...
Rich
More information about the busybox
mailing list