NBPG -> getpagesize()

This commit is contained in:
Poul-Henning Kamp 1996-05-02 09:09:04 +00:00
parent 0e51b8b85d
commit a8b878b7d1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=15530
3 changed files with 4 additions and 4 deletions

View File

@ -165,7 +165,7 @@ main(ac, av)
for (sym = 0; sym <= N_TABLAST; sym++) {
if (verbose)
printf("\nTable: %s\n", nl[sym].n_name);
pos = nl[sym].n_value + NBPG - entry;
pos = nl[sym].n_value + getpagesize() - entry;
pos1 = nlk[0].n_value;

View File

@ -377,7 +377,7 @@ err1: syslog(LOG_WARNING, "%s: %s", path, strerror(errno));
Lseek(ifd, (off_t)dumplo, L_SET);
/* Copy the core file. */
dumpsize *= NBPG;
dumpsize *= getpagesize();
syslog(LOG_NOTICE, "writing %score to %s",
compress ? "compressed " : "", path);
for (; dumpsize > 0; dumpsize -= nr) {

View File

@ -95,8 +95,8 @@ main(argc, argv)
/* don't handicap db/hash by using the defaults... */
memset(&hdefault,0,sizeof hdefault);
hdefault.bsize = NBPG;
hdefault.cachesize = 50*NBPG;
hdefault.bsize = getpagesize();
hdefault.cachesize = 50*getpagesize();
hdefault.nelem = 1000;
db = dbopen(dbtemp, O_CREAT | O_EXLOCK | O_TRUNC | O_RDWR,