Merge "Remove PAGE_SIZE from <limits.h>."

This commit is contained in:
Elliott Hughes 2015-07-29 15:18:06 +00:00 committed by Gerrit Code Review
commit 34c5f5eacd
2 changed files with 2 additions and 7 deletions

View File

@ -29,9 +29,9 @@
#include <sys/sysinfo.h>
#include <dirent.h>
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "private/ScopedReaddir.h"
@ -94,7 +94,7 @@ static int __get_meminfo_page_count(const char* pattern) {
while (fgets(buf, sizeof(buf), fp) != NULL) {
long total;
if (sscanf(buf, pattern, &total) == 1) {
page_count = static_cast<int>(total / (PAGE_SIZE / 1024));
page_count = static_cast<int>(total / (sysconf(_SC_PAGE_SIZE) / 1024));
break;
}
}

View File

@ -81,11 +81,6 @@
#define MB_LEN_MAX 4
/* New code should use sysconf(_SC_PAGE_SIZE) instead. */
#ifndef PAGE_SIZE
#define PAGE_SIZE 4096
#endif
#define SEM_VALUE_MAX 0x3fffffff
/* POSIX says these belong in <unistd.h> but BSD has some in <limits.h>. */