From f62412f235c387d46e192244db43ce62d9a9e7be Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 17 Jul 2006 19:30:30 +0000 Subject: GCC 4.1 fixes. * cygheap.h (cygheap_user): Remove unneeded class names from function declaration. * fhandler.h (fhandler_base): Ditto. (fhandler_dev_floppy): Ditto. (fhandler_console): Ditto. * wininfo.h (wininfo): Ditto. * exceptions.cc (sigpacket::process): Avoid compiler errors about gotos and initialization. * fhandler_fifo.cc (fhandler_fifo::open): Ditto. * fhandler_floppy.cc (fhandler_dev_floppy::ioctl): Ditto. * fhandler_tty.cc (fhandler_tty_slave::ioctl): Ditto. * mmap.cc (mmap64): Ditto. * pipe.cc (fhandler_pipe::open): Ditto. * spawn.cc (spawn_guts): Ditto. * sec_helper.cc: Fix some comments. (get_null_sd): Move file-scope static to only function where it is used. --- winsup/cygwin/mmap.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/mmap.cc') diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index 85718eec7..5ace55c0a 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -977,6 +977,7 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, _off64_t off) caddr_t base = NULL; DWORD pagesize = getpagesize (); + DWORD checkpagesize; fh_anonymous.set_io_handle (INVALID_HANDLE_VALUE); fh_anonymous.set_access (GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE); @@ -1006,8 +1007,8 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, _off64_t off) at least most of the time is, allow 4K aligned addresses in 98, to enable remapping of formerly mapped pages. If no matching free pages exist, check addr again, this time for the real alignment. */ - DWORD checkpagesize = wincap.has_mmap_alignment_bug () ? - getsystempagesize () : pagesize; + checkpagesize = wincap.has_mmap_alignment_bug () ? + getsystempagesize () : pagesize; if (fixed (flags) && ((uintptr_t) addr % checkpagesize)) { set_errno (EINVAL); -- cgit v1.2.3