diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-11-20 20:10:12 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-11-21 09:26:45 -0800 |
commit | 55fc7aa22197350d9cd1039e0398132a63d3589f (patch) | |
tree | 8980603a8122a5a8aa9df4c7d51f51cefd687d09 | |
parent | b2e86875d03e349a4c85135e4cf41b26b99b083e (diff) | |
download | xorg-lib-libXaw-55fc7aa22197350d9cd1039e0398132a63d3589f.tar.gz |
Check for getpagesize() with autoconf instead of #ifdef osname
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Tested-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/OS.c | 11 |
2 files changed, 2 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac index 83b20b2..d8069cb 100644 --- a/configure.ac +++ b/configure.ac @@ -93,7 +93,7 @@ AC_HEADER_STDC AC_CHECK_HEADERS([wctype.h wchar.h widec.h]) # Checks for functions -AC_CHECK_FUNCS([iswalnum]) +AC_CHECK_FUNCS([iswalnum getpagesize]) AC_OUTPUT([Makefile include/Makefile @@ -14,18 +14,9 @@ #if defined(linux) /* kernel header doesn't work with -ansi */ /* #include <asm/page.h> *//* for PAGE_SIZE */ -#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 - int _XawGetPageSize(void) { @@ -45,7 +36,7 @@ _XawGetPageSize(void) pagesize = sysconf(_SC_PAGE_SIZE); #endif -#ifdef HAS_GETPAGESIZE +#ifdef HAVE_GETPAGESIZE if (pagesize == -1) pagesize = getpagesize(); #endif |