On Mon, May 30, 2011 at 11:14:35PM -0700, Dan Fandrich wrote: > On Mon, May 30, 2011 at 07:48:05PM -0400, Rich Felker wrote: > > Plain ttyname could be used, I think. The only reason ttyname_r is > > used is to avoid enlarging bss for the nasty static buffer; it's not > > for reentrancy. This could also be done via HAVE_TTYNAME_R in > > platform.h rather than #ifndef ANDROID (see below)... > > Ok, if reentrancy isn't an issue, I'll do that.
Sadly it looks like ttyname might also be missing. It's easily implemented via readlink on /proc/self/fd/%d though, or some ioctl or fstat to get the device/tty number. > > > /* Try to pull in PAGE_SIZE */ > > > #ifdef __linux__ > > > -# include <sys/user.h> > > > +# ifdef ANDROID > > > +# include <sys/mman.h> > > > +# else > > > +# include <sys/user.h> > > > +# endif > > > > Why not get it from the correct place, limits.h? In case broken libs > > (glibc?) are missing it, you could do something like: > > Is PAGE_SIZE mandated somewhere to be defined in limits.h? I tried > glibc, uclibc, libc5 and OpenWatcom (all on Linux) and none of them > defines it in limits.h. If it's a constant, it's supposed to be defined there. If not, it should not be defined anywhere. Unfortunately some bloatware fans are into this whole "large pages" movement and want it considered variable... > The conditional in networking/interface.c isn't as obvious. I tried removing > the UCLIBC clause altogether and it still compiled fine in uClibc 0.6.29, > so perhaps it dates from an earlier version and could just be removed now. I suspect so. That would be nice... Rich _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
