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 mknod(const char *name, mode_t mode, dev_t dev);
|
||||||
|
|
||||||
|
extern int getpagesize(void);
|
||||||
extern int getdtablesize(void);
|
extern int getdtablesize(void);
|
||||||
extern long sysconf(int name);
|
extern long sysconf(int name);
|
||||||
extern long fpathconf(int fd, int name);
|
extern long fpathconf(int fd, int name);
|
||||||
|
|||||||
@@ -36,8 +36,6 @@
|
|||||||
# define DIR_TO_FD(Dir_p) -1
|
# define DIR_TO_FD(Dir_p) -1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define getpagesize() 4096
|
|
||||||
|
|
||||||
/* Define if there is a member named d_ino in the struct describing directory
|
/* Define if there is a member named d_ino in the struct describing directory
|
||||||
headers. */
|
headers. */
|
||||||
#define D_INO_IN_DIRENT 1
|
#define D_INO_IN_DIRENT 1
|
||||||
@@ -422,7 +420,7 @@
|
|||||||
/* #undef HAVE_GETMNTINFO */
|
/* #undef HAVE_GETMNTINFO */
|
||||||
|
|
||||||
/* Define to 1 if you have the `getpagesize' function. */
|
/* 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. */
|
/* Define to 1 if you have the `getpass' function. */
|
||||||
/* #undef HAVE_GETPASS */
|
/* #undef HAVE_GETPASS */
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ StaticLibrary <gdb>libiberty.a :
|
|||||||
# me, but some of those should be provided by Haiku.
|
# me, but some of those should be provided by Haiku.
|
||||||
basename.c
|
basename.c
|
||||||
clock.c
|
clock.c
|
||||||
getpagesize.c
|
|
||||||
index.c
|
index.c
|
||||||
insque.c
|
insque.c
|
||||||
mempcpy.c
|
mempcpy.c
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ MergeObject posix_unistd.o :
|
|||||||
fcntl.c
|
fcntl.c
|
||||||
fork.c
|
fork.c
|
||||||
getlogin.c
|
getlogin.c
|
||||||
|
getpagesize.c
|
||||||
hostname.cpp
|
hostname.cpp
|
||||||
ioctl.c
|
ioctl.c
|
||||||
link.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