Ticket #2015: getpagesize.patch

File getpagesize.patch, 2.2 KB (added by mjw, 17 years ago)

patch to implement getpagesize()

  • src/system/libroot/posix/unistd/getpagesize.c

     
     1/*
     2** Copyright 2008, James Woodcock. All rights reserved.
     3** Distributed under the terms of the MIT License.
     4*/
     5
     6#include <unistd.h>
     7#include <kernel/OS.h>
     8
     9int
     10getpagesize(void)
     11{
     12    return B_PAGE_SIZE;
     13}
  • src/system/libroot/posix/unistd/Jamfile

     
    1616    fcntl.c
    1717    fork.c
    1818    getlogin.c
     19    getpagesize.c
    1920    hostname.cpp
    2021    ioctl.c
    2122    link.c
  • src/bin/gdb/libiberty/Jamfile

     
    5858    # me, but some of those should be provided by Haiku.
    5959    basename.c
    6060    clock.c
    61     getpagesize.c
    6261    index.c
    6362    insque.c
    6463    mempcpy.c
  • src/bin/diffutils/config.h

     
    3636# define DIR_TO_FD(Dir_p) -1
    3737#endif
    3838
    39 #define getpagesize() 4096
    40 
    4139/* Define if there is a member named d_ino in the struct describing directory
    4240   headers. */
    4341#define D_INO_IN_DIRENT 1
     
    422420/* #undef HAVE_GETMNTINFO */
    423421
    424422/* Define to 1 if you have the `getpagesize' function. */
    425 /* #undef HAVE_GETPAGESIZE */
     423#define HAVE_GETPAGESIZE 1
    426424
    427425/* Define to 1 if you have the `getpass' function. */
    428426/* #undef HAVE_GETPASS */
  • headers/posix/unistd.h

     
    113113
    114114extern int      mknod(const char *name, mode_t mode, dev_t dev);
    115115
     116extern int      getpagesize(void);
    116117extern int      getdtablesize(void);
    117118extern long     sysconf(int name);
    118119extern long     fpathconf(int fd, int name);