diff options
author | manfred <manfred@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-05-21 07:52:41 +0000 |
---|---|---|
committer | manfred <manfred@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-05-21 07:52:41 +0000 |
commit | a18792d6fb0769a83f733e02702e30d10f9dd72d (patch) | |
tree | 1171f46d2f27ceab4a009d3956976bac047427ec /libiberty/getpagesize.c | |
parent | 17ea1c73fddecc608a6ba2c88ee729491cc69b40 (diff) | |
download | gcc-a18792d6fb0769a83f733e02702e30d10f9dd72d.tar.gz |
0
* configure.in: Check for unistd.h as well.
* configure: Rebuild.
* config.in: Rebuild.
* getpagesize.c (GNU_OUR_PAGESIZE): Use sysconf only if _SC_PAGESIZE
is defined in unistd.h. Reformat conditional block for easier reading.
* config.table (shared): Default to no if ${enable_shared}
is unset or empty; this logic is used by the toplevel
configure scripts, too.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19924 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/getpagesize.c')
-rw-r--r-- | libiberty/getpagesize.c | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/libiberty/getpagesize.c b/libiberty/getpagesize.c index d6327a8887d..564d6c02312 100644 --- a/libiberty/getpagesize.c +++ b/libiberty/getpagesize.c @@ -35,31 +35,36 @@ BUGS #include <sys/param.h> #endif -#ifdef HAVE_SYSCONF +#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) -#else -#ifdef PAGESIZE -#define GNU_OUR_PAGESIZE PAGESIZE -#else /* no PAGESIZE */ -#ifdef EXEC_PAGESIZE -#define GNU_OUR_PAGESIZE EXEC_PAGESIZE -#else /* no EXEC_PAGESIZE */ -#ifdef NBPG -#define GNU_OUR_PAGESIZE (NBPG * CLSIZE) -#ifndef CLSIZE -#define CLSIZE 1 -#endif /* CLSIZE */ -#else /* no NBPG */ -#ifdef NBPC -#define GNU_OUR_PAGESIZE NBPC -#else /* no NBPC */ -#define GNU_OUR_PAGESIZE 4096 /* Just punt and use reasonable value */ -#endif /* NBPC */ -#endif /* NBPG */ -#endif /* EXEC_PAGESIZE */ -#endif /* PAGESIZE */ -#endif /* HAVE_SYSCONF */ +#endif +#endif + +#ifndef GNU_OUR_PAGESIZE +# ifdef PAGESIZE +# define GNU_OUR_PAGESIZE PAGESIZE +# else /* no PAGESIZE */ +# ifdef EXEC_PAGESIZE +# define GNU_OUR_PAGESIZE EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define GNU_OUR_PAGESIZE (NBPG * CLSIZE) +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define GNU_OUR_PAGESIZE NBPC +# else /* no NBPC */ +# define GNU_OUR_PAGESIZE 4096 /* Just punt and use reasonable value */ +# endif /* NBPC */ +# endif /* NBPG */ +# endif /* EXEC_PAGESIZE */ +# endif /* PAGESIZE */ +#endif /* GNU_OUR_PAGESIZE */ int getpagesize () |