On Tue, Nov 27, 2007 at 02:05:06PM +0100, Bruno Haible wrote: > > - Provide a getpagesize function (not a macro) if the system does not > > have one. > > What is the point of doing that? A function that in most cases just returns > a fixed number can well be inlined. And since 'inline' is a bit tricky to > use portably, we chose to implement it as a macro. What drawbacks do you see > with that?
I just found it a little bit easier to keep things separate when using a function. If a macro is used instead, should its definition go into lib/unistd.h.in directly, or should it stay in a separate lib/getpagesize.h, which is then included in lib/unistd.h.in? I also was not sure if it's okay to include additional system headers like <OS.h> in the middle of gnulibs unistd.h. Martin