* fhandler_dsp.cc (fhandler_dsp::ioctl): Return 0 for successful

SNDCTL_DSP_GETBLKSIZE operation.  Remove obsolete 'name' arg from fhandler_*
constructors throughout.
* winsup.h (winsock_active): New macro.
(winsock2_active): Ditto.
* autoload.cc (wsock_init): Use new macros to decide if winsock or winsock2 is
loaded.
(nonexist_wsock32): Dummy function to force winsock load.
(nonexist_ws2_32): Dummy function to force winsock2 load.
* fhandler.h (fhandler_socket::fstat): Declare new method.  Currently unused.
* fhandler_socket.cc (fhandler_socket::fixup_before_fork_exec): Check that
winsock2 is active before trying WSADuplicateSocketA.
(fhandler_socket::fixup_after_fork): Add extra check for winsock2_active.
Otherwise use iffy procedures for Windows 95.
(fhandler_socket::fixup_after_exec): Add debugging.
(fhandler_socket::dup): Add debugging.
(fhandler_socket::fstat): New method.
(fhandler_socket::set_close_on_exec): Attempt to perform iffy stuff on Windows
95.
* errno.cc (_sys_nerr): Work around compiler strangeness.
* pinfo.cc (winpids::add): Add extra element at end of allocated array for
setting to NULL.
(winpids::enumNT): Ditto.
(winpids::init): Don't modify pidlist if it hasn't been allocated
(possibly due to malloc problem).
This commit is contained in:
Christopher Faylor
2001-10-13 17:23:35 +00:00
parent 5dec13e179
commit 0476bae576
25 changed files with 190 additions and 137 deletions

View File

@@ -35,8 +35,8 @@ static DWORD WINAPI process_input (void *); // Input queue thread
static DWORD WINAPI process_output (void *); // Output queue thread
static DWORD WINAPI process_ioctl (void *); // Ioctl requests thread
fhandler_tty_master::fhandler_tty_master (const char *name, int unit) :
fhandler_pty_master (name, FH_TTYM, unit)
fhandler_tty_master::fhandler_tty_master (int unit) :
fhandler_pty_master (FH_TTYM, unit)
{
set_cb (sizeof *this);
console = NULL;
@@ -437,8 +437,8 @@ process_ioctl (void *)
/**********************************************************************/
/* Tty slave stuff */
fhandler_tty_slave::fhandler_tty_slave (int num, const char *name) :
fhandler_tty_common (FH_TTYS, name, num)
fhandler_tty_slave::fhandler_tty_slave (int num)
: fhandler_tty_common (FH_TTYS, num)
{
set_cb (sizeof *this);
ttynum = num;
@@ -446,8 +446,8 @@ fhandler_tty_slave::fhandler_tty_slave (int num, const char *name) :
inuse = NULL;
}
fhandler_tty_slave::fhandler_tty_slave (const char *name) :
fhandler_tty_common (FH_TTYS, name, 0)
fhandler_tty_slave::fhandler_tty_slave ()
: fhandler_tty_common (FH_TTYS, 0)
{
set_cb (sizeof *this);
inuse = NULL;
@@ -950,8 +950,8 @@ out:
/*******************************************************
fhandler_pty_master
*/
fhandler_pty_master::fhandler_pty_master (const char *name, DWORD devtype, int unit) :
fhandler_tty_common (devtype, name, unit)
fhandler_pty_master::fhandler_pty_master (DWORD devtype, int unit)
: fhandler_tty_common (devtype, unit)
{
set_cb (sizeof *this);
ioctl_request_event = NULL;