#ifndef VMS
#include "config.h"
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#undef GNU_OUR_PAGESIZE
#if defined (HAVE_SYSCONF) && defined (HAVE_UNISTD_H)
#include <unistd.h>
#ifdef _SC_PAGESIZE
#define GNU_OUR_PAGESIZE sysconf(_SC_PAGESIZE)
#endif
#endif
#ifndef GNU_OUR_PAGESIZE
# ifdef PAGESIZE
# define GNU_OUR_PAGESIZE PAGESIZE
# else
# ifdef EXEC_PAGESIZE
# define GNU_OUR_PAGESIZE EXEC_PAGESIZE
# else
# ifdef NBPG
# define GNU_OUR_PAGESIZE (NBPG * CLSIZE)
# ifndef CLSIZE
# define CLSIZE 1
# endif
# else
# ifdef NBPC
# define GNU_OUR_PAGESIZE NBPC
# else
# define GNU_OUR_PAGESIZE 4096
# endif
# endif
# endif
# endif
#endif
int
getpagesize ()
{
return (GNU_OUR_PAGESIZE);
}
#else
#if 0
#include <syidef.h>
#endif
#ifndef SYI$_PAGE_SIZE
#define SYI$_PAGE_SIZE 4452
#endif
extern unsigned long lib$getsyi(const unsigned short *,...);
int getpagesize ()
{
long pagsiz = 0L;
unsigned short itmcod = SYI$_PAGE_SIZE;
(void) lib$getsyi (&itmcod, (void *) &pagsiz);
if (pagsiz == 0L)
pagsiz = 512L;
return (int) pagsiz;
}
#endif