Commit Graph

233 Commits

Author SHA1 Message Date
Juan Lang 85abf9cb90 - improve some parameter checking in WSAIoctl
- fix a memory leak I introduced in WSAIoctl
2003-08-30 00:16:19 +00:00
Alexandre Julliard 7df1b9e03a Start using the exported TEB structure from winternl.h where
possible.
2003-08-28 19:57:35 +00:00
Alexandre Julliard 19b6a49845 Allocate DebugInfo field for all critical sections (based on a patch
by Alex Pasadyn).
Get rid of the Wine-specific CRITICAL_SECTION_INIT macro.
2003-08-12 23:50:54 +00:00
Alexandre Julliard 1bec3726bb Make do_block use poll() rather than select() (based on a patch by
Mike Hearn).
2003-08-08 21:10:28 +00:00
Mike McCormack a3989b1a55 Add an empty hook function for WSASetBlockingHook to return. 2003-07-22 00:58:44 +00:00
Dmitry Timoshkov 4e1ef0c114 For all DLLs with defined DllMain and which do not require
DLL_THREAD_ATTACH/DLL_THREAD_DETACH notifications, call
DisableThreadLibraryCalls() in order to slightly improve performance
on thread creation/exiting.
2003-06-30 20:53:48 +00:00
Eric Pouech 9bd4f6bf15 - made async.h ready for use in ntdll: replaced all calls to kernel32
functions with ntdll equivalent
- replaced status setter/getter for wine async structures with direct
  access to a (now included) IO_STATUS_BLOCK structure
- since we now have a IO_STATUS_BLOCK in async_private, we no longer
  need in most of the user (derivated) structures a field for
  LPOVERLAPPED (it's stored as the IO_STATUS_BLOCK)
- rewrote the async.h users accordingly
- implemented ntdll.Nt{Read|Write}File and let
  kernel32.{Read|Write}File(Ex)? use those new ntdll functions
- rewrote smb read/write interfaces to be more ntdll stylish (no
  overlapped yet)
2003-06-26 02:08:17 +00:00
Francois Gouget 9591836ffb 'sizeof type' is best avoided as it won't always compile (e.g. 'int
main() {return sizeof int;}'). Use 'sizeof(type)' instead.
2003-06-18 19:45:22 +00:00
Kester Maddock cb98365c75 Check for a null pointer in WS_setsockopt. 2003-06-07 00:34:18 +00:00
Antonio Larrosa Jiménez f6a838cad8 Added WSASetEvent forward. 2003-06-04 20:23:58 +00:00
Francois Gouget fe0bae39e0 Added version information. 2003-05-13 22:26:09 +00:00
Juan Lang 090f5974b8 Use iphlpapi to implement SIO_GET_INTERFACE_LIST in WSAIoctl, and
corrects iiFlags entry in the returned interface list.
2003-05-13 04:43:44 +00:00
Vitaliy Margolen 7ea1033d50 Add and fix a few stubs to return correct error. 2003-04-09 23:33:35 +00:00
Alexandre Julliard 7b007b47ae Cleaned up the option mapping code a bit. 2003-04-04 22:29:52 +00:00
Mike Hearn ceb86a90f8 - Map winsock sockopts to the POSIX equivalents for IP multicast.
- Remap winsock1 constant values to winsock2 using a forwarder
  function.
- Change a FIXME to a TRACE, it appeared to be simply reporting
  progress.
2003-04-04 22:04:47 +00:00
Alexandre Julliard 9ee2413700 Handle htonl() and friends like select(), this will hopefully avoid
conflicts with Unix headers.
2003-04-02 01:38:42 +00:00
Alexandre Julliard 5537dbbf40 Replaced WINE_CHECK_STRUCT_MEMBER autoconf macro by the standard
AC_CHECK_MEMBERS. Added check for si_fd in siginfo_t.
2003-03-28 00:36:12 +00:00
Alexandre Julliard e048adab83 List 16-bit spec files explicitly to avoid problems with some versions
of make.
2003-03-23 20:00:02 +00:00
Alexandre Julliard 114a31a2a8 Take advantage of new winebuild syntax to remove redundant function
names in spec files.
2003-03-20 03:53:12 +00:00
Paul Rupe 42a9ca5765 Treat blank protocol the same as NULL in getservbyname &
getservbyport.
2003-03-17 04:42:11 +00:00
Alexandre Julliard a9c51cb60b Replaced forwards by normal function declarations. 2003-03-17 00:17:00 +00:00
Michael Stefaniuc 745a78f490 Remove some unreachable code. 2003-02-24 20:48:45 +00:00
Gerald Pfeifer cfda84ef53 Properly #define sipx_node for FreeBSD. 2003-01-28 01:07:09 +00:00
Martin Wilck c422dae189 Do not clear FD_WINE_CONNECTED on shutdown(). FD_WINE_CONNECTED
(currently unused) can thus be used to determine if a stream socket
was ever connected.
2003-01-28 00:24:04 +00:00
Gerald Pfeifer 701ab7dd61 Improve portability wrt. struct sockaddr_ipx. 2003-01-23 21:20:36 +00:00
Francois Gouget 9b0b1e078a Remove (POINTER)NULL casts. 2003-01-14 23:43:41 +00:00
Alexandre Julliard dbf8b78acd Added .spec.def files. 2002-12-12 22:04:04 +00:00
Alexandre Julliard 72e1c64345 Added list of symbols to ignore by default in winebuild.
Made the -i option support removing ignored symbols too.
Removed the -noimport flag in spec files.
2002-12-12 02:20:47 +00:00
Christoph Frick 983088a03b Force (WS_)SO_REUSEADDR before binding to a socket; ignore
(WS_)SO_DONTROUTE; Network games in Grand Prix Legends and Nascar 2002
are possible now.
2002-12-06 23:19:21 +00:00
Martin Wilck 4577875c4e Correct 2 bugs connected to asynchronous shutdown():
- Cannot call WSAGetOverlappedResult() because completion function
  destroys the overlapped structure.
- ws2_async_cleanup() called twice in case of failure.
2002-12-05 19:02:55 +00:00
Martin Wilck b5fc589f44 Set the socket to overlapped mode. 2002-12-05 19:02:20 +00:00
Martin Wilck 2a5f290ce1 Fixed test to run fine (0 errors) on Win NT. 2002-12-03 21:36:58 +00:00
Mike McCormack 947a74f40d Add stubs and declarations for WSAInstallServiceClassA/W. 2002-11-13 19:42:23 +00:00
Patrik Stridvall 9cec0a57b0 Fixed some issues found by winapi_check. 2002-11-11 19:55:33 +00:00
Alexandre Julliard 1e1313d54c Made the dll entry point default to DllMain and removed most of the
'init' spec file declarations.
2002-11-04 23:53:41 +00:00
Martin Wilck 9fc8b115c2 - Define SOCKET as UINT_PTR for Win64 (thanks to P. Stridvall).
- Make winsock compile without WINE_NO_STRICT.
2002-10-30 20:26:32 +00:00
Hagen Heiduck 97db7b45e4 Added WSASendDisconnect. 2002-10-29 21:27:20 +00:00
Alexandre Julliard 23bb3715f7 Added support for building certain dlls with -DSTRICT.
Added -DWINE_NO_STRICT flag to dlls that don't support STRICT yet.
2002-10-18 23:46:28 +00:00
Alexandre Julliard 0ca051e555 Fixed wownt32.h to make it usable from inside Wine, and use it to
avoid some duplication of the handle conversion macros.
2002-10-17 16:43:42 +00:00
Greg Turner e6d8fdb081 - fixed up some semantic misunderstandings using the helpful advice of
Rein Klazes
- added SO_SNDTIMEO support
- added ifdef's for consistency with rest of socket.c
2002-09-26 03:21:54 +00:00
Greg Turner 96e3e928a2 Accept time_t argument in WS_setsockopt/WS_SO_RCVTIMEO; translate to
struct timeval for edification of setsockopt.
2002-09-25 00:15:43 +00:00
Francois Gouget 71f8fc27e5 IDI_APPLICATIONW does not exist on Windows. Use IDI_APPLICATION
instead and cast to LPWSTR.
Fixed type cast warnings.
2002-09-17 00:05:34 +00:00
Martin Wilck 2b54cf91fc Fix the behavior of GetOverlappedResult() and WSAGetOverlappedResult()
with non-manual-reset (auto-reset) events in the OVERLAPPED structures.
2002-09-12 17:56:30 +00:00
Dimitrie O. Paun f476a0fbdc Make all spec files grep-able. 2002-09-12 00:52:39 +00:00
Michael Stefaniuc e149b37f3a Finish the conversion of HWND to a void*. 2002-09-06 20:40:42 +00:00
Martin Wilck 9dccb29447 WS2_register_async_shutdown(): Try immediate completion, in case an
app never waits for anything.
WS_accept(): Avoid crash if addr parameter is NULL.
2002-09-06 19:35:45 +00:00
Martin Wilck c01cb754c3 Fixed typo in check_buffer_se(). 2002-09-06 18:35:04 +00:00
Rein Klazes 3ad35f8a66 In WSAStartup() don't touch the lpVendorInfo field of the WSADATA
structure.
2002-08-29 01:48:55 +00:00
Patrik Stridvall d016f819f1 Added include protection for unistd.h and sys/time.h. 2002-08-17 00:43:16 +00:00
Alexandre Julliard edeee89c3e Create separate makefiles for tests for more flexibility. 2002-08-09 01:22:40 +00:00
Alexandre Julliard cd6b50e732 Moved the #ifdefs for the getnetby* etc. functions directly into the
winsock implementation to avoid having to redefine the data structures
in port.h.
2002-07-31 23:20:47 +00:00
Gregg Mattinson bac71315d2 Removed non-static structure initializers. 2002-07-03 21:06:58 +00:00
Alexandre Julliard 75de8fe16c Added printf format checking to the ok() and trace() macros, and fixed
the resulting warnings.
2002-06-22 00:08:10 +00:00
Alexandre Julliard 77afd6c47e Made some more spec file entries optional or unnecessary.
Fixed a few DLLName/DLLFileName mismatches.
2002-06-21 19:15:45 +00:00
Alexandre Julliard 083bf18019 Authors: Peter Hunnisett <peter@transgaming.com>, Ove Kaaven <ovek@transgaming.com>
- check for sockaddr being NULL.
- hackish implementation of WSADuplicateSocket.
2002-06-13 19:09:55 +00:00
Alexandre Julliard 7cae558bdc Removed some more trailing whitespace. 2002-06-01 02:55:48 +00:00
Vincent Béron 9a62491660 Removed trailing whitespace. 2002-05-31 23:06:46 +00:00
Francois Gouget 4c314000b9 Make the tests compile with Visual C++. 2002-05-23 02:40:07 +00:00
Patrik Stridvall 5e6943f421 Fixed some issues found by winapi_check. 2002-05-22 01:55:18 +00:00
Francois Gouget ac70c40fb6 Add mswsock.h, move relevant definitions to this header. 2002-05-22 01:51:41 +00:00
Alexandre Julliard cc2ee7636d Renamed Winelib apps to .exe.so to follow the dll naming convention. 2002-05-21 19:42:29 +00:00
Alexandre Julliard d8d313d110 Fixed struct msghdr access for platforms that have msg_accrights
(reported by Warren Baird).
2002-05-16 23:12:03 +00:00
Alexandre Julliard ad53383f9b Added winebuild support for generating a .dbg.c file containing the
debug channels definitions.
Made win32 the default type for spec files.
Ignore C compiler in winebuild so we can simply pass it $(DEFS).
Removed type win32 and debug_channels from spec files.
Fixed winebuild to always generate correct C identifiers (reported by
Vincent Béron).
2002-05-14 20:54:58 +00:00
Alexandre Julliard 67371bcc8d Added -res option to specify resources on winebuild command-line.
Added -exe mode to generate a .spec.c for an exe without having to
provide a .spec.
Removed some no longer needed spec files.
Removed .dll extension in makefiles import specifications.
2002-05-11 23:06:32 +00:00
Alexandre Julliard 32459912dc Moved imports specification from the .spec into the Makefile so that
it can be used on platforms that don't build a .spec.c file.
2002-05-09 00:05:48 +00:00
Martin Wilck b28f933b60 Added unit test for winsock. 2002-04-27 01:27:34 +00:00
Martin Wilck cf518bcd6d SO_OPENTYPE has to be a per-thread setting. 2002-04-27 01:05:35 +00:00
Martin Wilck ff1f320ac8 Fixed some bugs in my recently submitted patch series. 2002-04-26 18:31:19 +00:00
Martin Wilck af16c98f71 Implemented overlapped WSARecvFrom(), WSASendTo(), and
WSAGetOverlappedResult().
Fixed shutdown() to work correctly for overlapped sockets (do not
actually do a shutdown() system call as long as there are pending
overlapped requests).
Also added correct error reporting when trying to read or write on a
shut down connection, also for ReadFile()/WriteFile() calls.
2002-04-25 21:34:24 +00:00
Martin Wilck d15bf1c0fe Fixed handling of deferred connections in WSAAccept(). 2002-04-23 22:03:42 +00:00
Martin Wilck aba594712b _get_sock_fd_type: New function, retrieve fd type and flags like
FILE_GetUnixHandleType().
WSASendTo/WSARecvFrom: Use  _get_sock_fd_type().
2002-04-17 16:46:49 +00:00
Stefan Leichter f25efa0660 Compile fixes for gcc 2.7.2.3. 2002-04-11 17:34:46 +00:00
Gerald Pfeifer 37e87f7408 Also #include <sys/uio.h>. 2002-04-08 20:14:58 +00:00
Martin Wilck 58854430fa Make the recv() and send() family of functions use WSARecvFrom() and
WSASendTo().
2002-04-05 21:22:55 +00:00
Mike McCormack ee77955a6c Add stub for WSAEnumProtocols(A/W) functions. 2002-04-03 20:04:50 +00:00
Francois Gouget 9e881be5bb Fix for the unistd.h vs. winsock.h problem in Winelib applications.
Refine the WS_DEFINE_HTONL definition.
2002-04-01 21:01:13 +00:00
Marcus Meissner 5a82fa1902 Added missing header. 2002-03-25 20:51:48 +00:00
Alexandre Julliard 81f2a7307b Send message for WSAAsyncSelect sockets directly from the server,
instead of using the service thread. Finished separation of ws2_32.
2002-03-23 20:43:52 +00:00
Alexandre Julliard c1bfca04e1 Changed builtin dlls file names to make it clear they are not normal
Unix libraries, and install them in $libdir/wine instead of $libdir to
avoid name conflicts in /usr/lib.
2002-03-20 22:19:06 +00:00
Alexandre Julliard 0799c1a780 Added LGPL standard comment, and copyright notices where necessary.
Global replacement of debugtools.h by wine/debug.h.
2002-03-09 23:29:33 +00:00
Lawson Whitney f6a3a52180 Protect against NULL wsaddrlen in ws_sockaddr_alloc. 2002-02-14 19:20:12 +00:00
Rein Klazes e2a55be486 Correct optlen when WS_setsockopt is called with SO_LINGER. 2002-01-29 17:06:11 +00:00
Patrik Stridvall 74e4d21ebe Avoid wildcards in .cvsignore. 2002-01-29 03:05:12 +00:00
Francois Gouget f885024344 Rename s_addr to src_addr to avoid a conflict on Solaris.
Rename d_addr to dst_addr for symmetry.
2002-01-29 02:55:24 +00:00
Francois Gouget e6ebf42c2b Fix a couple of warnings and a typo. 2002-01-21 17:59:38 +00:00
Patrik Stridvall 9ff202e65c Fixed some issues found by winapi_check. 2002-01-18 18:57:43 +00:00
Michael C. Maggio f3b01aa790 Code used AF_IPX in some places where it should have used WS_AF_IPX. 2002-01-15 20:26:28 +00:00
Daniel Walker 40491ecc62 Implemented WSAAccept(). 2002-01-14 18:33:44 +00:00
Francois Gouget 8549821b7f Fix previous patch: the ws_sockaddr_u2ws return value was wrong.
Make ws_sockaddr_{ws2u,u2ws} static.
2002-01-10 18:18:43 +00:00
Martin Wilck 65b7e64c1f Moved the functionality of WS_socket() to WSASocketA().
Made WSASocketA() account for WSA_FLAG_OVERLAPPED.
2002-01-09 21:17:16 +00:00
Paul Rupe 06ffc1aba3 Return length of WS_sockaddr structure in ws_sockaddr_u2ws. 2002-01-09 20:29:17 +00:00
Alexandre Julliard 851297919b Use MapLS/UnMapLS instead of SEGPTR_* macros. 2001-12-24 20:30:24 +00:00
Paul Rupe 99ed342df0 Very simple support for SO_OPENTYPE in getsockopt and setsockopt. 2001-12-14 22:48:38 +00:00
Paul Rupe 8111f043ff Fixed WS_getpeername parameter in WS_accept.
Changed order of event processing in WINSOCK_DoAsyncEvent.
2001-11-30 23:12:13 +00:00
Alexandre Julliard 9caa71eef4 Redesign of the server communication protocol to allow arbitrary sized
data to be exchanged.
Split request and reply structures to make backwards compatibility
easier.
Moved many console functions to dlls/kernel, added code page support,
changed a few requests to behave properly with the new protocol.
2001-11-30 18:46:42 +00:00
Francois Gouget 272023190e Make winsock.h and winsock2.h independent from the Unix headers.
Make them compatible with both the Unix C headers and the MSVCRT
headers.
Ensure compatibility with the Unix headers via the USE_WS_PREFIX
macro.
Add WINE_NOWINSOCK: prevents winsock.h from being included from
windows.h when defined.
Add ws2tcpip.h, move definitions to the right header.
2001-11-14 21:26:23 +00:00
François Gouget 1425941e29 Fix the #include order for config.h.
Add #include "config.h" directives where needed.
2001-11-06 20:57:11 +00:00
Gerard Patel 033137412b Test for ws_timeout=NULL in winsock select(). 2001-11-05 23:53:16 +00:00
Francois Gouget 386cf6e342 When including 'wine/port.h', include it first.
Remove redundant 'config.h' includes.
2001-10-14 16:25:47 +00:00
Patrik Stridvall e668a9dbbf Added new include file ws2spi.h for adding needed types. 2001-10-09 21:48:22 +00:00