summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/mmap.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-12-07 22:37:12 +0000
committerChristopher Faylor <me@cgf.cx>2003-12-07 22:37:12 +0000
commit2e008fb91f34b5a257305a1e9e42f60fb0aef81d (patch)
treef6c5fd9e3d77b40fbe13f5ae6d6dbc2ebf88324c /winsup/cygwin/mmap.cc
parent2e3ff06d3c0424e2862afba051c4928d268a21c7 (diff)
downloadcygnal-2e008fb91f34b5a257305a1e9e42f60fb0aef81d.tar.gz
cygnal-2e008fb91f34b5a257305a1e9e42f60fb0aef81d.tar.bz2
cygnal-2e008fb91f34b5a257305a1e9e42f60fb0aef81d.zip
Change use of BOOL, TRUE, FALSE to bool, true, false, as appropriate,
throughout. * tty.cc (tty::common_init): Remove call to SetKernelObjectSecurity and edit some comments. * cygheap.h (init_cygheap::ctty): Add new element. * devices.in (device::parse): Remove special handling for /dev/tty. * devices.cc: Regenerate. * dtable.cc (build_fh_pc): Don't reset /dev/tty device. Let the device opener do that. * fhandler_termios.cc (tty_min::set_ctty): Redefine to _pinfo class. * fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Avoid setting noninherit flag for ctty. * tty.h: Move BOOLs to bools. (tty_min::set_ctty): Redeclare to _pinfo class. * pinfo.cc (_pinfo::set_ctty): Define new function based on tty_min::set_ctty. Change first argument from tty number to tty_min class. * pinfo.h (_pinfo::set_ctty): Declare. * fhandler_console.cc (fhandler_console::get_tty_stuff): Reflect move of set_ctty to _pinfo class. * fhandler_tty.cc (fhandler_tty_slave::open): Treat FH_TTY specially. Use saved cygheap value if it exists. Otherwise convert to real device and save on first time open. (fhandler_tty_common::dup): Potentially set controlling tty if duping a slave tty. * syscalls.cc (setsid): Close controlling tty in cygheap. * tty.cc: Change some BOOLs to bools.
Diffstat (limited to 'winsup/cygwin/mmap.cc')
-rw-r--r--winsup/cygwin/mmap.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index 035b99f46..7042048f3 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -92,7 +92,7 @@ class mmap_record
DWORD find_unused_pages (DWORD pages);
_off64_t map_pages (_off64_t off, DWORD len);
- BOOL unmap_pages (caddr_t addr, DWORD len);
+ bool unmap_pages (caddr_t addr, DWORD len);
int access (caddr_t address);
fhandler_base *alloc_fh ();
@@ -230,7 +230,7 @@ mmap_record::map_pages (_off64_t off, DWORD len)
return off * getpagesize ();
}
-BOOL
+bool
mmap_record::unmap_pages (caddr_t addr, DWORD len)
{
DWORD old_prot;
@@ -248,8 +248,8 @@ mmap_record::unmap_pages (caddr_t addr, DWORD len)
the whole chunk. */
for (len = MAPSIZE (PAGE_CNT (size_to_map_)); len > 0; )
if (page_map_[--len])
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
void
@@ -860,7 +860,7 @@ fhandler_base::msync (HANDLE h, caddr_t addr, size_t len, int flags)
return -1;
}
-BOOL
+bool
fhandler_base::fixup_mmap_after_fork (HANDLE h, DWORD access, DWORD offset,
DWORD size, void *address)
{
@@ -969,7 +969,7 @@ fhandler_disk_file::msync (HANDLE h, caddr_t addr, size_t len, int flags)
return 0;
}
-BOOL
+bool
fhandler_disk_file::fixup_mmap_after_fork (HANDLE h, DWORD access, DWORD offset,
DWORD size, void *address)
{
@@ -1021,7 +1021,7 @@ fixup_mmaps_after_fork (HANDLE parent)
rec->get_offset (), rec->get_size (), rec->get_address ());
fhandler_base *fh = rec->alloc_fh ();
- BOOL ret = fh->fixup_mmap_after_fork (rec->get_handle (),
+ bool ret = fh->fixup_mmap_after_fork (rec->get_handle (),
rec->get_access (),
rec->get_offset (),
rec->get_size (),