diff options
Diffstat (limited to 'gdb/getpagesize.h')
-rw-r--r-- | gdb/getpagesize.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gdb/getpagesize.h b/gdb/getpagesize.h new file mode 100644 index 0000000..32adae6 --- /dev/null +++ b/gdb/getpagesize.h @@ -0,0 +1,25 @@ +#ifdef BSD +#ifndef BSD4_1 +#define HAVE_GETPAGESIZE +#endif +#endif + +#ifndef HAVE_GETPAGESIZE + +#include <sys/param.h> + +#ifdef EXEC_PAGESIZE +#define getpagesize() EXEC_PAGESIZE +#else +#ifdef NBPG +#define getpagesize() NBPG * CLSIZE +#ifndef CLSIZE +#define CLSIZE 1 +#endif /* no CLSIZE */ +#else /* no NBPG */ +#define getpagesize() NBPC +#endif /* no NBPG */ +#endif /* no EXEC_PAGESIZE */ + +#endif /* not HAVE_GETPAGESIZE */ + |