On Wednesday 29 June 2011 19:41, Rich Felker wrote: > 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...
Ok, I tested this: #define B A #define A B A and at least gcc doesn't enter infinite loop, so let's risk having similar gets -> get_unlocked -> getc loop... -- vda _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
