But I do not think other libcs define PAGE_SIZE, such as glibc or diet-libc. Is that true? Thanks On Fri, Sep 11, 2015 at 3:44 PM, Isaac Dunham wrote: > On Fri, Sep 11, 2015 at 03:28:52PM -0400, Yuxin Ren wrote: > > Hi, > > > > I found in the bits/limits.h file, musl defines PAGE_SIZE macro . > > I think this macro is always defined by operating system, not libc. > > > > Why does musl define this marco? > > It's required to be in limits.h, which has to be provided by libc for a > full implementation. > Hypothetically, we could get it from the Linux headers. > But the Linux headers can and sometimes do introduce definitions and > structs that violate the header namespaces, resulting in collisions > (ie, kernel header defines struct foo, application defines struct foo > without including any headers that *should* define it, application fails > to compile.) > > HTH, > Isaac Dunham >