From cf191ebbf7028ac19f844fb79157dc299c7caffe Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 22 Oct 2004 22:28:36 +0000 Subject: [PATCH] getpagesize module shouldn't assume sys/param.h exists. --- lib/ChangeLog | 4 ++++ lib/getpagesize.h | 4 ++-- m4/ChangeLog | 4 ++++ m4/getpagesize.m4 | 6 +++--- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index ab2d93828..ea8139e4b 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,5 +1,9 @@ 2004-10-22 Paul Eggert + * getpagesize.c (getpagesize): Don't assume exists. + It's now the caller's responsibility to handle the case where + !HAVE_GETPAGESIZE && !defined getpagesize. + * mktime.c (leapyear): Arg is long int, not int. 2004-10-18 Paul Eggert diff --git a/lib/getpagesize.h b/lib/getpagesize.h index 80d9eb3be..e63c1c708 100644 --- a/lib/getpagesize.h +++ b/lib/getpagesize.h @@ -1,5 +1,5 @@ /* Emulate getpagesize on systems that lack it. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ # endif #endif -#ifndef getpagesize +#if !defined getpagesize && HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE diff --git a/m4/ChangeLog b/m4/ChangeLog index c7bef8b01..99ec992d1 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,7 @@ +2004-10-22 Paul Eggert + + * getpagesize.m4 (gl_GETPAGESIZE): Check for . + 2004-10-15 Paul Eggert * getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD diff --git a/m4/getpagesize.m4 b/m4/getpagesize.m4 index f1f4c42d4..a2f818b62 100644 --- a/m4/getpagesize.m4 +++ b/m4/getpagesize.m4 @@ -1,5 +1,5 @@ -# getpagesize.m4 serial 1 -dnl Copyright (C) 2002 Free Software Foundation, Inc. +# getpagesize.m4 serial 2 +dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program @@ -9,7 +9,7 @@ dnl the same distribution terms as the rest of that program. AC_DEFUN([gl_GETPAGESIZE], [ dnl Prerequisites of lib/getpagesize.h. - AC_CHECK_HEADERS_ONCE(unistd.h) + AC_CHECK_HEADERS_ONCE(sys/param.h unistd.h) AC_CHECK_HEADERS(OS.h) AC_CHECK_FUNCS(getpagesize) ]) -- 2.11.0