diff options
author | Christopher Faylor <me@cgf.cx> | 2003-12-07 22:37:12 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-12-07 22:37:12 +0000 |
commit | 2e008fb91f34b5a257305a1e9e42f60fb0aef81d (patch) | |
tree | f6c5fd9e3d77b40fbe13f5ae6d6dbc2ebf88324c /winsup/cygwin/fhandler_socket.cc | |
parent | 2e3ff06d3c0424e2862afba051c4928d268a21c7 (diff) | |
download | cygnal-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/fhandler_socket.cc')
-rw-r--r-- | winsup/cygwin/fhandler_socket.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index 626818a10..8d8f9cbb2 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -487,8 +487,8 @@ int fhandler_socket::connect (const struct sockaddr *name, int namelen) { int res = -1; - BOOL secret_check_failed = FALSE; - BOOL in_progress = FALSE; + bool secret_check_failed = false; + bool in_progress = false; sockaddr_in sin; int secret [4]; DWORD err; @@ -506,7 +506,7 @@ fhandler_socket::connect (const struct sockaddr *name, int namelen) { err = WSAGetLastError (); if (err == WSAEWOULDBLOCK || err == WSAEALREADY) - in_progress = TRUE; + in_progress = true; if (err == WSAEWOULDBLOCK) WSASetLastError (WSAEINPROGRESS); @@ -521,7 +521,7 @@ fhandler_socket::connect (const struct sockaddr *name, int namelen) { if (!create_secret_event (secret)) { - secret_check_failed = TRUE; + secret_check_failed = true; } else if (in_progress) signal_secret_event (); @@ -532,7 +532,7 @@ fhandler_socket::connect (const struct sockaddr *name, int namelen) if (!check_peer_secret_event (&sin, secret)) { debug_printf ("accept from unauthorized server"); - secret_check_failed = TRUE; + secret_check_failed = true; } } @@ -570,8 +570,8 @@ int fhandler_socket::accept (struct sockaddr *peer, int *len) { int res = -1; - BOOL secret_check_failed = FALSE; - BOOL in_progress = FALSE; + bool secret_check_failed = false; + bool in_progress = false; /* Allows NULL peer and len parameters. */ struct sockaddr_in peer_dummy; @@ -594,14 +594,14 @@ fhandler_socket::accept (struct sockaddr *peer, int *len) res = ::accept (get_socket (), peer, len); if ((SOCKET) res == INVALID_SOCKET && WSAGetLastError () == WSAEWOULDBLOCK) - in_progress = TRUE; + in_progress = true; if (get_addr_family () == AF_LOCAL && get_socket_type () == SOCK_STREAM) { if ((SOCKET) res != INVALID_SOCKET || in_progress) { if (!create_secret_event ()) - secret_check_failed = TRUE; + secret_check_failed = true; else if (in_progress) signal_secret_event (); } @@ -612,7 +612,7 @@ fhandler_socket::accept (struct sockaddr *peer, int *len) if (!check_peer_secret_event ((struct sockaddr_in*) peer)) { debug_printf ("connect from unauthorized client"); - secret_check_failed = TRUE; + secret_check_failed = true; } } |