summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>2000-09-05 22:26:16 +0000
committerkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>2000-09-05 22:26:16 +0000
commitc9d2e60da23036b0cab01e76b67af14cc4830555 (patch)
treec647973572a7d782894487316bfcc5d252caebf1 /gcc
parentb343402f9a793bafd110ac6e74ad2cd8e51a9cf6 (diff)
downloadgcc-c9d2e60da23036b0cab01e76b67af14cc4830555.tar.gz
PAGESIZE is not portable
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36166 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog1
-rw-r--r--gcc/fixinc/fixincl.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 552efaa1598..7047b0c8389 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -2,6 +2,7 @@
* gcc/fixinc/fixincl.c(load_file): always read header files
with sizes that are a multiple of the page size.
+ & use libiberty's getpagesize for determining that.
2000-09-05 Alexandre Oliva <aoliva@redhat.com>
diff --git a/gcc/fixinc/fixincl.c b/gcc/fixinc/fixincl.c
index ad5d23ac432..bd8e7afecd1 100644
--- a/gcc/fixinc/fixincl.c
+++ b/gcc/fixinc/fixincl.c
@@ -359,7 +359,7 @@ load_file ( fname )
/* IF the file size is a multiple of the page size,
THEN sometimes you will seg fault trying to access a trailing byte */
- if ((stbf.st_size & (PAGESIZE-1)) == 0)
+ if ((stbf.st_size & (getpagesize()-1)) == 0)
res = (char*)BAD_ADDR;
else
res = (char*)mmap ((void*)NULL, data_map_size, PROT_READ,