view src/getpagesize.h @ 9403:9f797989b817

* buffer.c: #include region-cache.h. (Fget_buffer_create): Initialize new members of struct buffer. (Fkill_buffer): Free memory occupied by caches. (init_buffer_once): Set default value for cache_long_line_scans in buffer_defaults, and give it a bit in buffer_local_flags. (syms_of_buffer): Add DEFVAR_PER_BUFFER for cache_long_line_scans.
author Jim Blandy <jimb@redhat.com>
date Sat, 08 Oct 1994 22:12:12 +0000
parents 3f0d5006a2c4
children 44ebc50db2c5
line wrap: on
line source

/* Emulate getpagesize on systems that lack it.  */

#ifndef HAVE_GETPAGESIZE

#ifdef VMS
#define getpagesize() 512
#endif

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifdef _SC_PAGESIZE
#define getpagesize() sysconf(_SC_PAGESIZE)
#else

#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 */
#ifdef NBPC
#define getpagesize() NBPC
#endif /* NBPC */
#endif /* no NBPG */
#endif /* no EXEC_PAGESIZE */
#endif /* no _SC_PAGESIZE */

#endif /* not HAVE_GETPAGESIZE */