summaryrefslogtreecommitdiff
path: root/lisp/lisp.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-09-09 20:26:15 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-09-09 20:26:15 -0700
commit4c63319d249cb796b735ec56904c088c56a5171f (patch)
treef00f62f8eedca10ef7071f5601a0ead8f2d43745 /lisp/lisp.c
parent9f0f4a2c5495eec2d81a4381fb962fad93b2ddde (diff)
Check for pagesize options via autoconf instead of per-platform #ifdefs
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'lisp/lisp.c')
-rw-r--r--lisp/lisp.c29
1 files changed, 6 insertions, 23 deletions
diff --git a/lisp/lisp.c b/lisp/lisp.c
index b999b8a..a533beb 100644
--- a/lisp/lisp.c
+++ b/lisp/lisp.c
@@ -29,6 +29,10 @@
/* $XFree86: xc/programs/xedit/lisp/lisp.c,v 1.87tsi Exp $ */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdlib.h>
#include <string.h>
#ifdef sun
@@ -45,27 +49,6 @@
#include <unistd.h> /* for sysconf(), and getpagesize() */
#endif
-#if defined(linux)
-#define HAS_GETPAGESIZE
-#define HAS_SC_PAGESIZE /* _SC_PAGESIZE may be an enum for Linux */
-#endif
-
-#if defined(CSRG_BASED)
-#define HAS_GETPAGESIZE
-#endif
-
-#if defined(sun)
-#define HAS_GETPAGESIZE
-#endif
-
-#if defined(QNX4)
-#define HAS_GETPAGESIZE
-#endif
-
-#if defined(__QNXNTO__)
-#define HAS_SC_PAGESIZE
-#endif
-
#include "lisp/bytecode.h"
#include "lisp/read.h"
@@ -636,7 +619,7 @@ LispGetPageSize(void)
/* Try each supported method in the preferred order */
-#if defined(_SC_PAGESIZE) || defined(HAS_SC_PAGESIZE)
+#if defined(_SC_PAGESIZE) || defined(HAVE_DECL__SC_PAGESIZE)
pagesize = sysconf(_SC_PAGESIZE);
#endif
@@ -645,7 +628,7 @@ LispGetPageSize(void)
pagesize = sysconf(_SC_PAGE_SIZE);
#endif
-#ifdef HAS_GETPAGESIZE
+#ifdef HAVE_GETPAGESIZE
if (pagesize == -1)
pagesize = getpagesize();
#endif