home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / t / time14.zip / time-1.4 / getpagesize.h < prev    next >
C/C++ Source or Header  |  1992-10-02  |  565b  |  35 lines

  1. #ifdef BSD
  2. #ifndef BSD4_1
  3. #define HAVE_GETPAGESIZE
  4. #endif
  5. #endif
  6.  
  7. #ifndef HAVE_GETPAGESIZE
  8.  
  9. #ifdef HAVE_UNISTD_H
  10. #include <unistd.h>
  11. #endif
  12.  
  13. #ifdef _SC_PAGESIZE
  14. #define getpagesize() sysconf(_SC_PAGESIZE)
  15. #else
  16.  
  17. #include <sys/param.h>
  18.  
  19. #ifdef EXEC_PAGESIZE
  20. #define getpagesize() EXEC_PAGESIZE
  21. #else
  22. #ifdef NBPG
  23. #define getpagesize() NBPG * CLSIZE
  24. #ifndef CLSIZE
  25. #define CLSIZE 1
  26. #endif /* no CLSIZE */
  27. #else /* no NBPG */
  28. #define getpagesize() NBPC
  29. #endif /* no NBPG */
  30. #endif /* no EXEC_PAGESIZE */
  31. #endif /* no _SC_PAGESIZE */
  32.  
  33. #endif /* not HAVE_GETPAGESIZE */
  34.  
  35.