summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAssaf Gordon <assafgordon@gmail.com>2017-07-08 06:09:36 (GMT)
committerAssaf Gordon <assafgordon@gmail.com>2017-07-12 02:02:10 (GMT)
commitcaa03bb77ffb7e6fe6807fa2c4d8ade5dd0358d2 (patch)
tree402c49a4842eb39600206a61c7104dbd85e1346f
parent19a8670cee0bf998554ae5dccdf33f488d8e4bbd (diff)
downloadtime-caa03bb77ffb7e6fe6807fa2c4d8ade5dd0358d2.zip
time-caa03bb77ffb7e6fe6807fa2c4d8ade5dd0358d2.tar.gz
time-caa03bb77ffb7e6fe6807fa2c4d8ade5dd0358d2.tar.bz2
maint: remove getpagesize.h
gnulib's unistd module ensures there is a valid getpagesize definition.
-rw-r--r--Makefile.am1
-rw-r--r--configure.ac9
-rw-r--r--lib2/getpagesize.h39
-rw-r--r--src/time.c2
4 files changed, 0 insertions, 51 deletions
diff --git a/Makefile.am b/Makefile.am
index 4f0308a..b84cee9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,7 +35,6 @@ lib_libtime_a_DEPENDENCIES += $(LIBOBJS)
bin_PROGRAMS = time
time_SOURCES = \
- lib2/getpagesize.h \
lib2/wait.h \
src/time.c \
src/resuse.c src/resuse.h
diff --git a/configure.ac b/configure.ac
index c3a0a30..3f57c7e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,15 +75,6 @@ AC_FUNC_VPRINTF
AC_FUNC_WAIT3
AC_CHECK_FUNCS(strerror)
-AC_MSG_CHECKING(for getpagesize)
-AC_TRY_LINK([#include <sys/param.h>],
-[getpagesize();], have_gp=yes, have_gp=no)
-AC_MSG_RESULT($have_gp)
-
-if test $have_gp = yes ; then
- AC_DEFINE([HAVE_GETPAGESIZE], [1], [Have GETPAGESIZE])
-fi
-
# This is needed when building outside the source dir
# with --disable-dependency-tracking.
# Inspired by sed's https://bugs.gnu.org/25371
diff --git a/lib2/getpagesize.h b/lib2/getpagesize.h
deleted file mode 100644
index ef7e45d..0000000
--- a/lib2/getpagesize.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* 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
-#else /* no NBPC */
-#ifdef PAGESIZE
-#define getpagesize() PAGESIZE
-#endif
-#endif /* NBPC */
-#endif /* no NBPG */
-#endif /* no EXEC_PAGESIZE */
-#endif /* no _SC_PAGESIZE */
-
-#endif /* not HAVE_GETPAGESIZE */
diff --git a/src/time.c b/src/time.c
index d721361..8cd4851 100644
--- a/src/time.c
+++ b/src/time.c
@@ -25,7 +25,6 @@
#include "wait.h"
#include <stdio.h>
-#include <sys/param.h> /* For getpagesize, maybe. */
#include <signal.h>
#include <getopt.h>
#include <errno.h>
@@ -36,7 +35,6 @@
#include "error.h"
#include "resuse.h"
-#include "getpagesize.h"