getpagesize module shouldn't assume sys/param.h exists.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 22 Oct 2004 22:28:36 +0000 (22:28 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 22 Oct 2004 22:28:36 +0000 (22:28 +0000)
lib/ChangeLog
lib/getpagesize.h
m4/ChangeLog
m4/getpagesize.m4

index ab2d938..ea8139e 100644 (file)
@@ -1,5 +1,9 @@
 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * getpagesize.c (getpagesize): Don't assume <sys/param.h> 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  <eggert@cs.ucla.edu>
index 80d9eb3..e63c1c7 100644 (file)
@@ -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 <sys/param.h>
 # ifdef EXEC_PAGESIZE
 #  define getpagesize() EXEC_PAGESIZE
index c7bef8b..99ec992 100644 (file)
@@ -1,3 +1,7 @@
+2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
+
 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
 
        * getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
index f1f4c42..a2f818b 100644 (file)
@@ -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)
 ])