summaryrefslogtreecommitdiff
path: root/gcc/config/host-solaris.c
diff options
context:
space:
mode:
authorandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-06 20:28:30 +0000
committerandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-06 20:28:30 +0000
commit1d5a5c71ef2a7d35f40c052d4002b76e69396e1b (patch)
tree04171d340f03dde77ce3b253c2a3774775e78b04 /gcc/config/host-solaris.c
parent9bdfd02b76f55a2cd3aaf450d90714e5f1870e26 (diff)
downloadgcc-1d5a5c71ef2a7d35f40c052d4002b76e69396e1b.tar.gz
2008-07-06 Andreas Tobler <a.tobler@schweiz.org>
* configure.ac: Check for caddr_t, define to char * if not defined. * configure: Regenerate. * ggc-common.c (mmap_gt_pch_get_address): Fix -Wc++-compat warnings. (mmap_gt_pch_use_address): Likewise. * config/host-solaris.c (sol_gt_pch_use_address): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137538 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/host-solaris.c')
-rw-r--r--gcc/config/host-solaris.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/config/host-solaris.c b/gcc/config/host-solaris.c
index 9a471b49f4c..bde01db9813 100644
--- a/gcc/config/host-solaris.c
+++ b/gcc/config/host-solaris.c
@@ -42,7 +42,7 @@ sol_gt_pch_use_address (void *base, size_t size, int fd, size_t offset)
if (size == 0)
return -1;
- addr = mmap (base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE,
+ addr = mmap ((caddr_t) base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE,
fd, offset);
/* Solaris isn't good about honoring the mmap START parameter
@@ -55,18 +55,18 @@ sol_gt_pch_use_address (void *base, size_t size, int fd, size_t offset)
size_t i;
if (addr != (void *) MAP_FAILED)
- munmap (addr, size);
+ munmap ((caddr_t) addr, size);
errno = 0;
for (i = 0; i < size; i += page_size)
- if (mincore ((char *)base + i, page_size, (void *)&one_byte) == -1
+ if (mincore ((char *)base + i, page_size, (char *) &one_byte) == -1
&& errno == ENOMEM)
continue; /* The page is not mapped. */
else
break;
if (i >= size)
- addr = mmap (base, size,
+ addr = mmap ((caddr_t) base, size,
PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED,
fd, offset);
}