* 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:
@ -241,7 +241,6 @@ static long long
|
||||
wsock_init ()
|
||||
{
|
||||
static LONG NO_COPY here = -1L;
|
||||
extern WSADATA wsadata;
|
||||
struct func_info *func = (struct func_info *) __builtin_return_address (0);
|
||||
struct dll_info *dll = func->dll;
|
||||
|
||||
@ -261,7 +260,7 @@ wsock_init ()
|
||||
Sleep (0);
|
||||
}
|
||||
|
||||
if (!wsock_started && (wsock32_handle || ws2_32_handle))
|
||||
if (!wsock_started && (winsock_active || winsock2_active))
|
||||
{
|
||||
/* Don't use autoload to load WSAStartup to eliminate recursion. */
|
||||
int (*wsastartup) (int, WSADATA *);
|
||||
@ -421,7 +420,7 @@ LoadDLLfunc (WSAAsyncSelect, 16, wsock32)
|
||||
LoadDLLfunc (WSACleanup, 0, wsock32)
|
||||
LoadDLLfunc (WSAGetLastError, 0, wsock32)
|
||||
LoadDLLfunc (WSASetLastError, 4, wsock32)
|
||||
LoadDLLfunc (WSAStartup, 8, wsock32)
|
||||
// LoadDLLfunc (WSAStartup, 8, wsock32)
|
||||
LoadDLLfunc (__WSAFDIsSet, 8, wsock32)
|
||||
LoadDLLfunc (accept, 12, wsock32)
|
||||
LoadDLLfunc (bind, 12, wsock32)
|
||||
|
Reference in New Issue
Block a user