Declare __page_shift and __page_size with C linkage.
__page_shift and __page_size were accidentally declared in unistd.h with C linkage - their implementation needs to use the same linkage. Going forward, though, let's stop the inlining madness and let's kill the non-standard __getpageshift(). This patch takes getpagesize(3) out of line and removes __getpageshift but fixes __page_shift and __page_size for backwards binary compatibility. Change-Id: I35ed66a08989ced1db422eb03e4d154a5d6b5bda Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
This commit is contained in:
committed by
Elliott Hughes
parent
a259472ca0
commit
9ae59c02ca
@@ -170,14 +170,7 @@ extern int ttyname_r(int, char*, size_t);
|
||||
|
||||
extern int acct(const char* filepath);
|
||||
|
||||
static __inline__ int getpagesize(void) {
|
||||
extern unsigned int __page_size;
|
||||
return __page_size;
|
||||
}
|
||||
static __inline__ int __getpageshift(void) {
|
||||
extern unsigned int __page_shift;
|
||||
return __page_shift;
|
||||
}
|
||||
int getpagesize(void);
|
||||
|
||||
extern int sysconf(int name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user