2c2
< Copyright (C) 2003 Free Software Foundation, Inc.
---
> Copyright (C) 2003, 2004 Free Software Foundation, Inc.
140,142d139
< static void * darwin_rs6000_gt_pch_get_address (size_t);
< static bool darwin_rs6000_gt_pch_use_address (void *, size_t);
<
148d144
<
155c151
< darwin_rs6000_gt_pch_get_address (size_t sz)
---
> darwin_rs6000_gt_pch_get_address (size_t sz, int fd ATTRIBUTE_UNUSED)
166,167c162,163
< static bool
< darwin_rs6000_gt_pch_use_address (void *addr, size_t sz)
---
> static int
> darwin_rs6000_gt_pch_use_address (void *addr, size_t sz, int fd, size_t off)
170c166,167
< bool result;
---
> void *mmap_result;
> int ret;
176,177c173,174
< result = (addr == pch_address_space && sz <= sizeof (pch_address_space));
< if (! result)
---
> ret = (addr == pch_address_space && sz <= sizeof (pch_address_space));
> if (! ret)
186c183,197
< return result;
---
> if (ret)
> {
> mmap_result = mmap (addr, sz,
> PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED,
> fd, off);
>
> /* The file might not be mmap-able. */
> ret = mmap_result != (void *) MAP_FAILED;
>
> /* Sanity check for broken MAP_FIXED. */
> if (ret && mmap_result != addr)
> abort ();
> }
>
> return ret;
187a199
>
< Copyright (C) 2003 Free Software Foundation, Inc.
---
> Copyright (C) 2003, 2004 Free Software Foundation, Inc.
140,142d139
< static void * darwin_rs6000_gt_pch_get_address (size_t);
< static bool darwin_rs6000_gt_pch_use_address (void *, size_t);
<
148d144
<
155c151
< darwin_rs6000_gt_pch_get_address (size_t sz)
---
> darwin_rs6000_gt_pch_get_address (size_t sz, int fd ATTRIBUTE_UNUSED)
166,167c162,163
< static bool
< darwin_rs6000_gt_pch_use_address (void *addr, size_t sz)
---
> static int
> darwin_rs6000_gt_pch_use_address (void *addr, size_t sz, int fd, size_t off)
170c166,167
< bool result;
---
> void *mmap_result;
> int ret;
176,177c173,174
< result = (addr == pch_address_space && sz <= sizeof (pch_address_space));
< if (! result)
---
> ret = (addr == pch_address_space && sz <= sizeof (pch_address_space));
> if (! ret)
186c183,197
< return result;
---
> if (ret)
> {
> mmap_result = mmap (addr, sz,
> PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED,
> fd, off);
>
> /* The file might not be mmap-able. */
> ret = mmap_result != (void *) MAP_FAILED;
>
> /* Sanity check for broken MAP_FIXED. */
> if (ret && mmap_result != addr)
> abort ();
> }
>
> return ret;
187a199
>