[PATCH 2/2] Added support for compiling against Android bionic

walter harms wharms at bfs.de
Tue May 31 07:27:56 UTC 2011



Am 31.05.2011 08:14, schrieb Dan Fandrich:
> 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.
> 
>>>  /* 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.
> 


does android support:  long sysconf(_SC_PAGESIZE) ?

see also:
man getpagesize


re,
 wh


More information about the busybox mailing list