getpagesize.h vs sys/param.h

"Mark D. Baushke" <[email protected]> Fri, 22 Oct 2004 00:13:48 -0700
Newsgroups gmane.comp.lib.gnulib.bugs,gmane.comp.version-control.cvs.bugs
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Problem:

Windows hosts may not have a <sys/param.h> file to include and probably
do not have a <getpagesize.h> either, so using GNULIB functions in this
case will lead to an error message like this one:

getpagesize.h(48) : fatal error C1083: Cannot open include file: 'sys/param.h': No such file or directory

Possible solution:

The following patch is submitted for your consideration...

	Thanks,
	-- Mark
 
 Index: getpagesize.h
 ===================================================================
 RCS file: /cvsroot/gnulib/gnulib/lib/getpagesize.h,v
 retrieving revision 1.6
 diff -u -p -u -p -r1.6 getpagesize.h
 --- getpagesize.h	4 Oct 2004 04:18:46 -0000	1.6
 +++ getpagesize.h	22 Oct 2004 07:09:51 -0000
 @@ -45,7 +45,9 @@
  #endif
  
  #ifndef getpagesize
 -# include <sys/param.h>
 +# ifdef HAVE_SYS_PARAM_H
 +#   include <sys/param.h>
 +# endif
  # ifdef EXEC_PAGESIZE
  #  define getpagesize() EXEC_PAGESIZE
  # else
 @@ -62,4 +64,8 @@
  # endif
  #endif
  
 +#if !defined (getpagesize)
 +#  define getpagesize() 4096  /* Just punt and use reasonable value */
 +#endif
 +
  #endif /* not HAVE_GETPAGESIZE */
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFBeLMs3x41pRYZE/gRAkeeAJ9oKxhRSlWmiUmG8YNbor/OHCpkMgCfTzco
7WX6Ur/ycYP8yZ8/zUVwrRg=
=oeE+
-----END PGP SIGNATURE-----