diff --git a/headers/posix/limits.h b/headers/posix/limits.h index d2699a1498..dfd707bb83 100644 --- a/headers/posix/limits.h +++ b/headers/posix/limits.h @@ -38,12 +38,11 @@ #define NAME_MAX (256) #define NGROUPS_MAX (32) #define OPEN_MAX (128) -#define PAGE_SIZE (4096) #define PAGESIZE (4096) #define PATH_MAX (1024) #define PIPE_MAX (512) #define PTHREAD_KEYS_MAX 256 -#define PTHREAD_STACK_MIN (2 * PAGE_SIZE) +#define PTHREAD_STACK_MIN (2 * PAGESIZE) #define SSIZE_MAX __HAIKU_SADDR_MAX #define TTY_NAME_MAX (256) #define TZNAME_MAX (32) @@ -76,6 +75,13 @@ #define _POSIX2_LINE_MAX (2048) +/* The XSI name for PAGESIZE, with extra underscore included. Only define if + * _XOPEN_SOURCE was requested, otherwise it could conflict with the application. + */ +#ifdef _XOPEN_SOURCE +#define PAGE_SIZE PAGESIZE +#endif + /* _GCC_LIMITS_H_ is defined by GCC's internal limits.h to avoid * collisions with any defines in this file. */