Applied patch by James Woodcock:
* Implemented POSIX getpagesize() function in libroot. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24763 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -115,6 +115,7 @@ extern int lchown(const char *path, uid_t owner, gid_t group);
|
||||
|
||||
extern int mknod(const char *name, mode_t mode, dev_t dev);
|
||||
|
||||
extern int getpagesize(void);
|
||||
extern int getdtablesize(void);
|
||||
extern long sysconf(int name);
|
||||
extern long fpathconf(int fd, int name);
|
||||
|
||||
@@ -36,8 +36,6 @@
|
||||
# define DIR_TO_FD(Dir_p) -1
|
||||
#endif
|
||||
|
||||
#define getpagesize() 4096
|
||||
|
||||
/* Define if there is a member named d_ino in the struct describing directory
|
||||
headers. */
|
||||
#define D_INO_IN_DIRENT 1
|
||||
@@ -422,7 +420,7 @@
|
||||
/* #undef HAVE_GETMNTINFO */
|
||||
|
||||
/* Define to 1 if you have the `getpagesize' function. */
|
||||
/* #undef HAVE_GETPAGESIZE */
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
|
||||
/* Define to 1 if you have the `getpass' function. */
|
||||
/* #undef HAVE_GETPASS */
|
||||
|
||||
@@ -58,7 +58,6 @@ StaticLibrary <gdb>libiberty.a :
|
||||
# me, but some of those should be provided by Haiku.
|
||||
basename.c
|
||||
clock.c
|
||||
getpagesize.c
|
||||
index.c
|
||||
insque.c
|
||||
mempcpy.c
|
||||
|
||||
@@ -16,6 +16,7 @@ MergeObject posix_unistd.o :
|
||||
fcntl.c
|
||||
fork.c
|
||||
getlogin.c
|
||||
getpagesize.c
|
||||
hostname.cpp
|
||||
ioctl.c
|
||||
link.c
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
** Copyright 2008, James Woodcock. All rights reserved.
|
||||
** Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <kernel/OS.h>
|
||||
|
||||
int
|
||||
getpagesize(void)
|
||||
{
|
||||
return B_PAGE_SIZE;
|
||||
}
|
||||
Reference in New Issue
Block a user