bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getpagesize.h vs sys/param.h


From: Mark D. Baushke
Subject: getpagesize.h vs sys/param.h
Date: Fri, 22 Oct 2004 00:13:48 -0700

-----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-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]