[PATCH 2/3] platform: provide getline and getdelim if not available
Denys Vlasenko
vda.linux at googlemail.com
Wed Jun 29 08:54:34 UTC 2011
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!).
*/
#ifndef getc_unlocked
# undef getc
# define getc(stream) getc_unlocked(stream)
#endif
#ifndef getchar_unlocked
# undef getchar
# define getchar() getchar_unlocked()
#endif
...
--
vda
More information about the busybox
mailing list