winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2006
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
792 discussions
Start a n
N
ew thread
Damjan Jovanovic : dinput: Changed select to poll.
by Alexandre Julliard
06 Nov '06
06 Nov '06
Module: wine Branch: master Commit: b56953f49d11436598fde1d663fd4afcfcc10997 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b56953f49d11436598fde1d66…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Mon Nov 6 08:28:29 2006 +0200 dinput: Changed select to poll. --- dlls/dinput/joystick_linux.c | 12 +++++++----- dlls/dinput/joystick_linuxinput.c | 13 +++++++------ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c index 9ffab1f..c43bfa9 100644 --- a/dlls/dinput/joystick_linux.c +++ b/dlls/dinput/joystick_linux.c @@ -53,6 +53,9 @@ #endif #ifdef HAVE_LINUX_JOYSTICK_H # include <linux/joystick.h> #endif +#ifdef HAVE_SYS_POLL_H +# include <sys/poll.h> +#endif #include "wine/debug.h" #include "wine/unicode.h" @@ -897,8 +900,7 @@ static LONG calculate_pov(JoystickImpl * } static void joy_polldev(JoystickImpl *This) { - struct timeval tv; - fd_set readfds; + struct pollfd plfd; struct js_event jse; TRACE("(%p)\n", This); @@ -907,9 +909,9 @@ static void joy_polldev(JoystickImpl *Th return; } while (1) { - memset(&tv,0,sizeof(tv)); - FD_ZERO(&readfds);FD_SET(This->joyfd,&readfds); - if (1>select(This->joyfd+1,&readfds,NULL,NULL,&tv)) + plfd.fd = This->joyfd; + plfd.events = POLLIN; + if (poll(&plfd,1,0) != 1) return; /* we have one event, so we can read */ if (sizeof(jse)!=read(This->joyfd,&jse,sizeof(jse))) { diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index 85d1fdf..d7d4139 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -48,6 +48,9 @@ # if defined(EVIOCGBIT) && defined(EV_AB # define HAVE_CORRECT_LINUXINPUT_H # endif #endif +#ifdef HAVE_SYS_POLL_H +# include <sys/poll.h> +#endif #include "wine/debug.h" #include "wine/unicode.h" @@ -860,8 +863,7 @@ static void calculate_ids(LPDIDATAFORMAT } static void joy_polldev(JoystickImpl *This) { - struct timeval tv; - fd_set readfds; + struct pollfd plfd; struct input_event ie; int btn, offset; @@ -869,11 +871,10 @@ static void joy_polldev(JoystickImpl *Th return; while (1) { - memset(&tv,0,sizeof(tv)); - FD_ZERO(&readfds); - FD_SET(This->joyfd,&readfds); + plfd.fd = This->joyfd; + plfd.events = POLLIN; - if (1>select(This->joyfd+1,&readfds,NULL,NULL,&tv)) + if (poll(&plfd,1,0) != 1) return; /* we have one event, so we can read */
1
0
0
0
Alexandre Julliard : ws2_32: Convert WS_select to use poll() instead of select(). Also fixes an fd leak.
by Alexandre Julliard
06 Nov '06
06 Nov '06
Module: wine Branch: master Commit: 0082973d938cffe541b24ce11218698a940de9dd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0082973d938cffe541b24ce11…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 6 12:28:53 2006 +0100 ws2_32: Convert WS_select to use poll() instead of select(). Also fixes an fd leak. --- dlls/ws2_32/socket.c | 216 +++++++++++++++++++++++++------------------------- 1 files changed, 109 insertions(+), 107 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index b773092..5166d93 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -589,31 +589,6 @@ static char *strdup_lower(const char *st return ret; } -static fd_set* fd_set_import( fd_set* fds, const WS_fd_set* wsfds, int access, int* highfd, int lfd[] ) -{ - /* translate Winsock fd set into local fd set */ - if( wsfds ) - { - unsigned int i; - - FD_ZERO(fds); - for( i = 0; i < wsfds->fd_count; i++ ) - { - int s = wsfds->fd_array[i]; - int fd = get_sock_fd( s, access, NULL ); - if (fd != -1) - { - lfd[ i ] = fd; - if( fd > *highfd ) *highfd = fd; - FD_SET(fd, fds); - } - else lfd[ i ] = -1; - } - return fds; - } - return NULL; -} - inline static int sock_error_p(int s) { unsigned int optval, optlen; @@ -624,50 +599,6 @@ inline static int sock_error_p(int s) return optval != 0; } -static int fd_set_export( const fd_set* fds, fd_set* exceptfds, WS_fd_set* wsfds, int lfd[] ) -{ - int num_err = 0; - - /* translate local fd set into Winsock fd set, adding - * errors to exceptfds (only if app requested it) */ - - if( wsfds ) - { - int i, j, count = wsfds->fd_count; - - for( i = 0, j = 0; i < count; i++ ) - { - int fd = lfd[i]; - SOCKET s = wsfds->fd_array[i]; - if (fd == -1) continue; - if( FD_ISSET(fd, fds) ) - { - if ( exceptfds && sock_error_p(fd) ) - { - FD_SET(fd, exceptfds); - num_err++; - } - else wsfds->fd_array[j++] = s; - } - release_sock_fd( s, fd ); - } - wsfds->fd_count = j; - } - return num_err; -} - -static void fd_set_unimport( WS_fd_set* wsfds, int lfd[] ) -{ - if ( wsfds ) - { - unsigned int i; - - for ( i = 0; i < wsfds->fd_count; i++ ) - if ( lfd[i] >= 0 ) release_sock_fd( wsfds->fd_array[i], lfd[i] ); - wsfds->fd_count = 0; - } -} - /* Utility: get the SO_RCVTIMEO or SO_SNDTIMEO socket option * from an fd and return the value converted to milli seconds * or -1 if there is an infinite time out */ @@ -2437,6 +2368,103 @@ int WINAPI WS_recvfrom(SOCKET s, char *b return n; } +/* allocate a poll array for the corresponding fd sets */ +static struct pollfd *fd_sets_to_poll( const WS_fd_set *readfds, const WS_fd_set *writefds, + const WS_fd_set *exceptfds, int *count_ptr ) +{ + int i, j = 0, count = 0; + struct pollfd *fds; + + if (readfds) count += readfds->fd_count; + if (writefds) count += writefds->fd_count; + if (exceptfds) count += exceptfds->fd_count; + *count_ptr = count; + if (!count) return NULL; + if (!(fds = HeapAlloc( GetProcessHeap(), 0, count * sizeof(fds[0])))) return NULL; + if (readfds) + for (i = 0; i < readfds->fd_count; i++, j++) + { + fds[j].fd = get_sock_fd( readfds->fd_array[i], FILE_READ_DATA, NULL ); + fds[j].events = POLLIN; + fds[j].revents = 0; + } + if (writefds) + for (i = 0; i < writefds->fd_count; i++, j++) + { + fds[j].fd = get_sock_fd( writefds->fd_array[i], FILE_WRITE_DATA, NULL ); + fds[j].events = POLLOUT; + fds[j].revents = 0; + } + if (exceptfds) + for (i = 0; i < exceptfds->fd_count; i++, j++) + { + fds[j].fd = get_sock_fd( exceptfds->fd_array[i], 0, NULL ); + fds[j].events = POLLHUP; + fds[j].revents = 0; + } + return fds; +} + +/* release the file descriptor obtained in fd_sets_to_poll */ +/* must be called with the original fd_set arrays, before calling get_poll_results */ +static void release_poll_fds( const WS_fd_set *readfds, const WS_fd_set *writefds, + const WS_fd_set *exceptfds, struct pollfd *fds ) +{ + int i, j = 0; + + if (readfds) + { + for (i = 0; i < readfds->fd_count; i++, j++) + if (fds[j].fd != -1) release_sock_fd( readfds->fd_array[i], fds[j].fd ); + } + if (writefds) + { + for (i = 0; i < writefds->fd_count; i++, j++) + if (fds[j].fd != -1) release_sock_fd( writefds->fd_array[i], fds[j].fd ); + } + if (exceptfds) + { + for (i = 0; i < exceptfds->fd_count; i++, j++) + if (fds[j].fd != -1) + { + /* make sure we have a real error before releasing the fd */ + if (!sock_error_p( fds[j].fd )) fds[j].revents = 0; + release_sock_fd( exceptfds->fd_array[i], fds[j].fd ); + } + } +} + +/* map the poll results back into the Windows fd sets */ +static int get_poll_results( WS_fd_set *readfds, WS_fd_set *writefds, WS_fd_set *exceptfds, + const struct pollfd *fds ) +{ + int i, j = 0, k, total = 0; + + if (readfds) + { + for (i = k = 0; i < readfds->fd_count; i++, j++) + if (fds[j].revents) readfds->fd_array[k++] = readfds->fd_array[i]; + readfds->fd_count = k; + total += k; + } + if (writefds) + { + for (i = k = 0; i < writefds->fd_count; i++, j++) + if (fds[j].revents) writefds->fd_array[k++] = writefds->fd_array[i]; + writefds->fd_count = k; + total += k; + } + if (exceptfds) + { + for (i = k = 0; i < exceptfds->fd_count; i++, j++) + if (fds[j].revents) exceptfds->fd_array[k++] = exceptfds->fd_array[i]; + exceptfds->fd_count = k; + total += k; + } + return total; +} + + /*********************************************************************** * select (WS2_32.18) */ @@ -2444,53 +2472,27 @@ int WINAPI WS_select(int nfds, WS_fd_set WS_fd_set *ws_writefds, WS_fd_set *ws_exceptfds, const struct WS_timeval* ws_timeout) { - int highfd = 0; - fd_set readfds, writefds, exceptfds; - fd_set *p_read, *p_write, *p_except; - int readfd[FD_SETSIZE], writefd[FD_SETSIZE], exceptfd[FD_SETSIZE]; - struct timeval timeout, *timeoutaddr = NULL; + struct pollfd *pollfds; + int count, ret, timeout = -1; TRACE("read %p, write %p, excp %p timeout %p\n", ws_readfds, ws_writefds, ws_exceptfds, ws_timeout); - p_read = fd_set_import(&readfds, ws_readfds, FILE_READ_DATA, &highfd, readfd); - p_write = fd_set_import(&writefds, ws_writefds, FILE_WRITE_DATA, &highfd, writefd); - p_except = fd_set_import(&exceptfds, ws_exceptfds, 0, &highfd, exceptfd); - if (ws_timeout) + if (!(pollfds = fd_sets_to_poll( ws_readfds, ws_writefds, ws_exceptfds, &count )) && count) { - timeoutaddr = &timeout; - timeout.tv_sec=ws_timeout->tv_sec; - timeout.tv_usec=ws_timeout->tv_usec; + SetLastError( ERROR_NOT_ENOUGH_MEMORY ); + return -1; } - if( (highfd = select(highfd + 1, p_read, p_write, p_except, timeoutaddr)) > 0 ) - { - fd_set_export(&readfds, p_except, ws_readfds, readfd); - fd_set_export(&writefds, p_except, ws_writefds, writefd); + if (ws_timeout) timeout = (ws_timeout->tv_sec * 1000) + (ws_timeout->tv_usec + 999) / 1000; - if (p_except && ws_exceptfds) - { - unsigned int i, j; + ret = poll( pollfds, count, timeout ); + release_poll_fds( ws_readfds, ws_writefds, ws_exceptfds, pollfds ); - for (i = j = 0; i < ws_exceptfds->fd_count; i++) - { - int fd = exceptfd[i]; - SOCKET s = ws_exceptfds->fd_array[i]; - if (fd == -1) continue; - if (FD_ISSET(fd, &exceptfds)) ws_exceptfds->fd_array[j++] = s; - release_sock_fd( s, fd ); - } - ws_exceptfds->fd_count = j; - } - return highfd; - } - fd_set_unimport(ws_readfds, readfd); - fd_set_unimport(ws_writefds, writefd); - fd_set_unimport(ws_exceptfds, exceptfd); - - if( highfd == 0 ) return 0; - SetLastError(wsaErrno()); - return SOCKET_ERROR; + if (ret == -1) SetLastError(wsaErrno()); + else ret = get_poll_results( ws_readfds, ws_writefds, ws_exceptfds, pollfds ); + HeapFree( GetProcessHeap(), 0, pollfds ); + return ret; }
1
0
0
0
Phil Krylov : explorer: Build on Darwin versions prior to 8.0.
by Alexandre Julliard
06 Nov '06
06 Nov '06
Module: wine Branch: master Commit: f0ca586f169cb88148a1b966956eddaf36031784 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f0ca586f169cb88148a1b9669…
Author: Phil Krylov <phil.krylov(a)gmail.com> Date: Sun Nov 5 23:03:46 2006 +0300 explorer: Build on Darwin versions prior to 8.0. --- configure | 523 +++++++++++++++++++------------------------ configure.ac | 6 +- programs/explorer/diskarb.c | 8 +- 3 files changed, 243 insertions(+), 294 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=f0ca586f169cb88148a1b…
1
0
0
0
Phil Krylov : ntdll: Fix building on Darwin versions prior to 8.0.
by Alexandre Julliard
06 Nov '06
06 Nov '06
Module: wine Branch: master Commit: b81b44f615c88fd9fbfe3502129115aafddc08ff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b81b44f615c88fd9fbfe35021…
Author: Phil Krylov <phil(a)newstar.rinet.ru> Date: Mon Nov 6 00:53:54 2006 +0300 ntdll: Fix building on Darwin versions prior to 8.0. --- dlls/ntdll/tape.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/tape.c b/dlls/ntdll/tape.c index 8ce68f3..c8e3cd0 100644 --- a/dlls/ntdll/tape.c +++ b/dlls/ntdll/tape.c @@ -43,6 +43,11 @@ #ifndef MT_ST_BLKSIZE_MASK #define MT_ST_BLKSIZE_MASK 0xffffff #endif +/* Darwin 7.9.0 has MTSETBSIZ instead of MTSETBLK */ +#if !defined(MTSETBLK) && defined(MTSETBSIZ) +#define MTSETBLK MTSETBSIZ +#endif + #define NONAMELESSUNION #define NONAMELESSSTRUCT #include "ntstatus.h"
1
0
0
0
Rob Shearman : rpcrt4: Remove unnecessary quotes in traces, as debugstr_a and debugstr_w add them instead.
by Alexandre Julliard
06 Nov '06
06 Nov '06
Module: wine Branch: master Commit: 3acc624219f2e36b835c3b2f2d5f034dd645ba26 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3acc624219f2e36b835c3b2f2…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Sun Nov 5 19:01:42 2006 +0000 rpcrt4: Remove unnecessary quotes in traces, as debugstr_a and debugstr_w add them instead. --- dlls/rpcrt4/rpc_binding.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/rpcrt4/rpc_binding.c b/dlls/rpcrt4/rpc_binding.c index b09e6d6..eda2322 100644 --- a/dlls/rpcrt4/rpc_binding.c +++ b/dlls/rpcrt4/rpc_binding.c @@ -138,7 +138,7 @@ RPC_STATUS RPCRT4_CreateBindingW(RpcBind RPC_STATUS RPCRT4_CompleteBindingA(RpcBinding* Binding, LPSTR NetworkAddr, LPSTR Endpoint, LPSTR NetworkOptions) { - TRACE("(RpcBinding == ^%p, NetworkAddr == \"%s\", EndPoint == \"%s\", NetworkOptions == \"%s\")\n", Binding, + TRACE("(RpcBinding == ^%p, NetworkAddr == %s, EndPoint == %s, NetworkOptions == %s)\n", Binding, debugstr_a(NetworkAddr), debugstr_a(Endpoint), debugstr_a(NetworkOptions)); RPCRT4_strfree(Binding->NetworkAddr); @@ -156,7 +156,7 @@ RPC_STATUS RPCRT4_CompleteBindingA(RpcBi RPC_STATUS RPCRT4_CompleteBindingW(RpcBinding* Binding, LPWSTR NetworkAddr, LPWSTR Endpoint, LPWSTR NetworkOptions) { - TRACE("(RpcBinding == ^%p, NetworkAddr == \"%s\", EndPoint == \"%s\", NetworkOptions == \"%s\")\n", Binding, + TRACE("(RpcBinding == ^%p, NetworkAddr == %s, EndPoint == %s, NetworkOptions == %s)\n", Binding, debugstr_w(NetworkAddr), debugstr_w(Endpoint), debugstr_w(NetworkOptions)); RPCRT4_strfree(Binding->NetworkAddr);
1
0
0
0
Rob Shearman : winedump: Fix printf warning in the generated code.
by Alexandre Julliard
06 Nov '06
06 Nov '06
Module: wine Branch: master Commit: 5daafc73f90cbf8220b8d3e06d35c508ecc2abe3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5daafc73f90cbf8220b8d3e06…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Sun Nov 5 19:01:36 2006 +0000 winedump: Fix printf warning in the generated code. --- tools/winedump/output.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/winedump/output.c b/tools/winedump/output.c index 8690c20..dff22be 100644 --- a/tools/winedump/output.c +++ b/tools/winedump/output.c @@ -229,7 +229,7 @@ void output_c_preamble (void) fprintf (cfile, "BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID " - "lpvReserved)\n{\n\tTRACE(\"(0x%%p, %%ld, %%p)\\n\",hinstDLL," + "lpvReserved)\n{\n\tTRACE(\"(0x%%p, %%d, %%p)\\n\",hinstDLL," "fdwReason,lpvReserved);\n\n\t" "if (fdwReason == DLL_WINE_PREATTACH) return FALSE;\t" "/* prefer native version */\n\n\t"
1
0
0
0
Gerald Pfeifer : server: Compilation fix.
by Alexandre Julliard
06 Nov '06
06 Nov '06
Module: wine Branch: master Commit: 35f0a416298f170978b2442ed25093050c584241 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=35f0a416298f170978b2442ed…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Sun Nov 5 06:50:45 2006 +0100 server: Compilation fix. --- server/fd.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/server/fd.c b/server/fd.c index 4fbecbe..3848d10 100644 --- a/server/fd.c +++ b/server/fd.c @@ -46,6 +46,9 @@ #endif #ifdef HAVE_SYS_VFS_H #include <sys/vfs.h> #endif +#ifdef HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif #ifdef HAVE_SYS_MOUNT_H #include <sys/mount.h> #endif
1
0
0
0
Eric Pouech : dbghelp: Fixed memory leak in source string handling.
by Alexandre Julliard
06 Nov '06
06 Nov '06
Module: wine Branch: master Commit: 76e8b504c11790ecf2873644f8eb04e6f637ab27 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=76e8b504c11790ecf2873644f…
Author: Eric Pouech <eric.pouech(a)wanadoo.fr> Date: Sun Nov 5 17:51:35 2006 +0100 dbghelp: Fixed memory leak in source string handling. --- dlls/dbghelp/source.c | 33 ++++++++++++++++----------------- 1 files changed, 16 insertions(+), 17 deletions(-) diff --git a/dlls/dbghelp/source.c b/dlls/dbghelp/source.c index 5842a3f..d9fb076 100644 --- a/dlls/dbghelp/source.c +++ b/dlls/dbghelp/source.c @@ -56,7 +56,6 @@ static unsigned source_find(const struct */ unsigned source_new(struct module* module, const char* base, const char* name) { - int len; unsigned ret; const char* full; char* tmp = NULL; @@ -75,24 +74,24 @@ unsigned source_new(struct module* modul if (tmp[bsz - 1] != '/') tmp[bsz++] = '/'; strcpy(&tmp[bsz], name); } - if (module->sources && (ret = source_find(module, full)) != (unsigned)-1) - return ret; - - len = strlen(full) + 1; - if (module->sources_used + len + 1 > module->sources_alloc) + if (!module->sources || (ret = source_find(module, full)) == (unsigned)-1) { - /* Alloc by block of 256 bytes */ - module->sources_alloc = (module->sources_used + len + 1 + 255) & ~255; - if (!module->sources) - module->sources = HeapAlloc(GetProcessHeap(), 0, module->sources_alloc); - else - module->sources = HeapReAlloc(GetProcessHeap(), 0, module->sources, - module->sources_alloc); + int len = strlen(full) + 1; + if (module->sources_used + len + 1 > module->sources_alloc) + { + /* Alloc by block of 256 bytes */ + module->sources_alloc = (module->sources_used + len + 1 + 255) & ~255; + if (!module->sources) + module->sources = HeapAlloc(GetProcessHeap(), 0, module->sources_alloc); + else + module->sources = HeapReAlloc(GetProcessHeap(), 0, module->sources, + module->sources_alloc); + } + ret = module->sources_used; + memcpy(module->sources + module->sources_used, full, len); + module->sources_used += len; + module->sources[module->sources_used] = '\0'; } - ret = module->sources_used; - strcpy(module->sources + module->sources_used, full); - module->sources_used += len; - module->sources[module->sources_used] = '\0'; HeapFree(GetProcessHeap(), 0, tmp); return ret; }
1
0
0
0
Jacek Caban : shdocvw: Added more tests.
by Alexandre Julliard
06 Nov '06
06 Nov '06
Module: wine Branch: master Commit: a519d104a8962f1931af50d91ff513a227452110 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a519d104a8962f1931af50d91…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Nov 5 17:48:45 2006 +0100 shdocvw: Added more tests. --- dlls/shdocvw/tests/webbrowser.c | 188 +++++++++++++++++++++++++++++++++++++-- 1 files changed, 180 insertions(+), 8 deletions(-) diff --git a/dlls/shdocvw/tests/webbrowser.c b/dlls/shdocvw/tests/webbrowser.c index 84bc608..ac70c80 100644 --- a/dlls/shdocvw/tests/webbrowser.c +++ b/dlls/shdocvw/tests/webbrowser.c @@ -28,6 +28,7 @@ #include "ole2.h" #include "exdisp.h" #include "htiframe.h" #include "mshtmhst.h" +#include "idispids.h" #define DEFINE_EXPECT(func) \ static BOOL expect_ ## func = FALSE, called_ ## func = FALSE @@ -65,6 +66,8 @@ DEFINE_EXPECT(Frame_GetWindow); DEFINE_EXPECT(Frame_SetActiveObject); DEFINE_EXPECT(UIWindow_SetActiveObject); DEFINE_EXPECT(SetMenu); +DEFINE_EXPECT(Invoke_AMBIENT_SILENT); +DEFINE_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); static const WCHAR wszItem[] = {'i','t','e','m',0}; @@ -124,6 +127,86 @@ static const IOleContainerVtbl OleContai static IOleContainer OleContainer = { &OleContainerVtbl }; +static HRESULT WINAPI Dispatch_QueryInterface(IDispatch *iface, REFIID riid, void **ppv) +{ + return QueryInterface(riid, ppv); +} + +static ULONG WINAPI Dispatch_AddRef(IDispatch *iface) +{ + return 2; +} + +static ULONG WINAPI Dispatch_Release(IDispatch *iface) +{ + return 1; +} + +static HRESULT WINAPI Dispatch_GetTypeInfoCount(IDispatch *iface, UINT *pctinfo) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI Dispatch_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID lcid, + ITypeInfo **ppTInfo) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI Dispatch_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, + UINT cNames, LCID lcid, DISPID *rgDispId) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REFIID riid, + LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, + EXCEPINFO *pExcepInfo, UINT *puArgErr) +{ + ok(IsEqualGUID(&IID_NULL, riid), "riid != IID_NULL\n"); + ok(pDispParams != NULL, "pDispParams == NULL\n"); + ok(pExcepInfo == NULL, "pExcepInfo=%p, expected NULL\n", pExcepInfo); + ok(puArgErr == NULL, "puArgErr=%p\n", puArgErr); + ok(V_VT(pVarResult) == VT_EMPTY, "V_VT(pVarResult)=%d\n", V_VT(pVarResult)); + ok(wFlags == DISPATCH_PROPERTYGET, "wFlags=%08x, expected DISPATCH_PROPERTYGET\n", wFlags); + ok(pDispParams->rgvarg == NULL, "pDispParams->rgvarg = %p\n", pDispParams->rgvarg); + ok(pDispParams->rgdispidNamedArgs == NULL, + "pDispParams->rgdispidNamedArgs = %p\n", pDispParams->rgdispidNamedArgs); + ok(pDispParams->cArgs == 0, "pDispParams->cArgs = %d\n", pDispParams->cArgs); + ok(pDispParams->cNamedArgs == 0, "pDispParams->cNamedArgs = %d\n", pDispParams->cNamedArgs); + + switch(dispIdMember) { + case DISPID_AMBIENT_OFFLINEIFNOTCONNECTED: + CHECK_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); + V_VT(pVarResult) = VT_BOOL; + V_BOOL(pVarResult) = VARIANT_FALSE; + return S_OK; + case DISPID_AMBIENT_SILENT: + CHECK_EXPECT(Invoke_AMBIENT_SILENT); + V_VT(pVarResult) = VT_BOOL; + V_BOOL(pVarResult) = VARIANT_FALSE; + return S_OK; + } + + ok(0, "unexpected dispIdMember %d\n", dispIdMember); + return E_NOTIMPL; +} + +static IDispatchVtbl DispatchVtbl = { + Dispatch_QueryInterface, + Dispatch_AddRef, + Dispatch_Release, + Dispatch_GetTypeInfoCount, + Dispatch_GetTypeInfo, + Dispatch_GetIDsOfNames, + Dispatch_Invoke +}; + +static IDispatch Dispatch = { &DispatchVtbl }; + static HRESULT WINAPI ClientSite_QueryInterface(IOleClientSite *iface, REFIID riid, void **ppv) { return QueryInterface(riid, ppv); @@ -670,6 +753,8 @@ static HRESULT QueryInterface(REFIID rii else if(IsEqualGUID(&IID_IDocHostUIHandler, riid) || IsEqualGUID(&IID_IDocHostUIHandler2, riid)) *ppv = &DocHostUIHandler; + else if(IsEqualGUID(&IID_IDispatch, riid)) + *ppv = &Dispatch; if(*ppv) return S_OK; @@ -791,6 +876,8 @@ static void test_ClientSite(IUnknown *un if(client) { SET_EXPECT(GetContainer); SET_EXPECT(Site_GetWindow); + SET_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); + SET_EXPECT(Invoke_AMBIENT_SILENT); } hres = IOleObject_SetClientSite(oleobj, client); @@ -799,6 +886,8 @@ static void test_ClientSite(IUnknown *un if(client) { CHECK_CALLED(GetContainer); CHECK_CALLED(Site_GetWindow); + CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); + CHECK_CALLED(Invoke_AMBIENT_SILENT); } hres = IOleInPlaceObject_GetWindow(inplace, &hwnd); @@ -959,17 +1048,11 @@ static void test_ie_funcs(IUnknown *unk) IWebBrowser2_Release(wb); } -static void test_Silent(IUnknown *unk) +static void test_Silent(IWebBrowser2 *wb, IOleControl *control, BOOL is_clientsite) { - IWebBrowser2 *wb; VARIANT_BOOL b; HRESULT hres; - hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&wb); - ok(hres == S_OK, "Could not get IWebBrowser2 interface: %08x\n", hres); - if(FAILED(hres)) - return; - b = 100; hres = IWebBrowser2_get_Silent(wb, &b); ok(hres == S_OK, "get_Silent failed: %08x\n", hres); @@ -999,7 +1082,95 @@ static void test_Silent(IUnknown *unk) ok(hres == S_OK, "get_Silent failed: %08x\n", hres); ok(b == VARIANT_FALSE, "b=%x\n", b); + if(is_clientsite) { + hres = IWebBrowser2_put_Silent(wb, VARIANT_TRUE); + ok(hres == S_OK, "set_Silent failed: %08x\n", hres); + + SET_EXPECT(Invoke_AMBIENT_SILENT); + } + + hres = IOleControl_OnAmbientPropertyChange(control, DISPID_AMBIENT_SILENT); + ok(hres == S_OK, "OnAmbientPropertyChange failed %08x\n", hres); + + if(is_clientsite) + CHECK_CALLED(Invoke_AMBIENT_SILENT); + + b = 100; + hres = IWebBrowser2_get_Silent(wb, &b); + ok(hres == S_OK, "get_Silent failed: %08x\n", hres); + ok(b == VARIANT_FALSE, "b=%x\n", b); +} + +static void test_Offline(IWebBrowser2 *wb, IOleControl *control, BOOL is_clientsite) +{ + VARIANT_BOOL b; + HRESULT hres; + + b = 100; + hres = IWebBrowser2_get_Offline(wb, &b); + ok(hres == S_OK, "get_Offline failed: %08x\n", hres); + ok(b == VARIANT_FALSE, "b=%x\n", b); + + hres = IWebBrowser2_put_Offline(wb, VARIANT_TRUE); + ok(hres == S_OK, "set_Offline failed: %08x\n", hres); + + b = 100; + hres = IWebBrowser2_get_Offline(wb, &b); + ok(hres == S_OK, "get_Offline failed: %08x\n", hres); + ok(b == VARIANT_TRUE, "b=%x\n", b); + + hres = IWebBrowser2_put_Offline(wb, 100); + ok(hres == S_OK, "set_Offline failed: %08x\n", hres); + + b = 100; + hres = IWebBrowser2_get_Offline(wb, &b); + ok(hres == S_OK, "get_Offline failed: %08x\n", hres); + ok(b == VARIANT_TRUE, "b=%x\n", b); + + hres = IWebBrowser2_put_Offline(wb, VARIANT_FALSE); + ok(hres == S_OK, "set_Offline failed: %08x\n", hres); + + b = 100; + hres = IWebBrowser2_get_Offline(wb, &b); + ok(hres == S_OK, "get_Offline failed: %08x\n", hres); + ok(b == VARIANT_FALSE, "b=%x\n", b); + + if(is_clientsite) { + hres = IWebBrowser2_put_Offline(wb, VARIANT_TRUE); + ok(hres == S_OK, "set_Offline failed: %08x\n", hres); + + SET_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); + } + + hres = IOleControl_OnAmbientPropertyChange(control, DISPID_AMBIENT_OFFLINEIFNOTCONNECTED); + ok(hres == S_OK, "OnAmbientPropertyChange failed %08x\n", hres); + + if(is_clientsite) + CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); + + b = 100; + hres = IWebBrowser2_get_Offline(wb, &b); + ok(hres == S_OK, "get_Offline failed: %08x\n", hres); + ok(b == VARIANT_FALSE, "b=%x\n", b); +} + +static void test_wb_funcs(IUnknown *unk, BOOL is_clientsite) +{ + IWebBrowser2 *wb; + IOleControl *control; + HRESULT hres; + + hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&wb); + ok(hres == S_OK, "Could not get IWebBrowser2 interface: %08x\n", hres); + + hres = IUnknown_QueryInterface(unk, &IID_IOleControl, (void**)&control); + ok(hres == S_OK, "Could not get IOleControl interface: %08x\n", hres); + + test_Silent(wb, control, is_clientsite); + test_Offline(wb, control, is_clientsite); + IWebBrowser_Release(wb); + IOleControl_Release(control); } static void test_GetControlInfo(IUnknown *unk) @@ -1116,11 +1287,12 @@ static void test_WebBrowser(void) test_ClassInfo(unk); test_ClientSite(unk, &ClientSite); test_Extent(unk); + test_wb_funcs(unk, TRUE); test_DoVerb(unk); test_ClientSite(unk, NULL); test_ie_funcs(unk); test_GetControlInfo(unk); - test_Silent(unk); + test_wb_funcs(unk, FALSE); ref = IUnknown_Release(unk); ok(ref == 0, "ref=%d, expected 0\n", ref);
1
0
0
0
Jacek Caban : shdocvw: Cal on_offlineconnected_change and on_silent_change in SetClientSite.
by Alexandre Julliard
06 Nov '06
06 Nov '06
Module: wine Branch: master Commit: 7858c208a172d104f137b7a89d0afb66b7a55cd5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7858c208a172d104f137b7a89…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Nov 5 17:47:52 2006 +0100 shdocvw: Cal on_offlineconnected_change and on_silent_change in SetClientSite. --- dlls/shdocvw/oleobject.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/shdocvw/oleobject.c b/dlls/shdocvw/oleobject.c index 488b06c..dc795f8 100644 --- a/dlls/shdocvw/oleobject.c +++ b/dlls/shdocvw/oleobject.c @@ -325,6 +325,9 @@ static HRESULT WINAPI OleObject_SetClien create_shell_embedding_hwnd(This); + on_offlineconnected_change(This); + on_silent_change(This); + return S_OK; }
1
0
0
0
← Newer
1
...
66
67
68
69
70
71
72
...
80
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Results per page:
10
25
50
100
200