home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / hp / 13083 < prev    next >
Encoding:
Text File  |  1992-11-18  |  785 b   |  30 lines

  1. Path: sparky!uunet!ogicse!psgrain!neon!pail!servio!chrisp
  2. From: chrisp@slc.com (Chris Pinkham)
  3. Newsgroups: comp.sys.hp
  4. Subject: Re: getpagesize - Is there one?
  5. Keywords: system page size get
  6. Message-ID: <1992Nov18.205156.27477@slc.com>
  7. Date: 18 Nov 92 20:51:56 GMT
  8. Article-I.D.: slc.1992Nov18.205156.27477
  9. References: <1eb3ctINNgi8@loon.graphics.cornell.edu>
  10. Organization: Servio Corp, Beaverton Oregon, US
  11. Lines: 17
  12.  
  13. > Is there an hp-ux s700 8.07 equvalent of Ultrix getpagesize() ?
  14.  
  15. I can't find it. How about this:
  16.  
  17. #include <stdio.h>
  18. #include <sys/pstat.h>
  19.  
  20. int getpagesize() {
  21.    struct pst_static pstatic;
  22.    union pstun pst;
  23.  
  24.    pst.pst_static = &pstatic;
  25.    if ((pstat(PSTAT_STATIC, pst, sizeof(pstatic), 0, 0)) == -1) {
  26.       return(-1);
  27.    }
  28.    return (pstatic.page_size);
  29. }
  30.