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
January 2010
----- 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
615 discussions
Start a n
N
ew thread
Mike Kaplinskiy : msxml: getElementsByTagName does not respect namespaces.
by Alexandre Julliard
18 Jan '10
18 Jan '10
Module: wine Branch: master Commit: 90cf2f1ac3a46a3321ee1ad9b00b5efdf2248e9f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=90cf2f1ac3a46a3321ee1ad9b…
Author: Mike Kaplinskiy <mike.kaplinskiy(a)gmail.com> Date: Sat Jan 16 16:17:36 2010 -0500 msxml: getElementsByTagName does not respect namespaces. We can't just use //tagname; we have to do //*[local-name()='tagname']. --- dlls/msxml3/domdoc.c | 17 ++++++++++++++--- dlls/msxml3/element.c | 19 +++++++++++++++---- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index be19e56..e75537f 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -1279,14 +1279,25 @@ static HRESULT WINAPI domdoc_getElementsByTagName( BSTR tagName, IXMLDOMNodeList** resultList ) { + static const WCHAR xpathformat[] = + { '/','/','*','[','l','o','c','a','l','-','n','a','m','e','(',')','=','\'','%','s','\'',']',0 }; domdoc *This = impl_from_IXMLDOMDocument2( iface ); LPWSTR szPattern; HRESULT hr; TRACE("(%p)->(%s, %p)\n", This, debugstr_w(tagName), resultList); - szPattern = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*(2+lstrlenW(tagName)+1)); - szPattern[0] = szPattern[1] = '/'; - lstrcpyW(szPattern + 2, tagName); + if (tagName[0] == '*' && tagName[1] == 0) + { + szPattern = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*4); + szPattern[0] = szPattern[1] = '/'; + szPattern[2] = '*'; + szPattern[3] = 0; + } + else + { + szPattern = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*(20+lstrlenW(tagName)+1)); + wsprintfW(szPattern, xpathformat, tagName); + } hr = queryresult_create((xmlNodePtr)get_doc(This), szPattern, resultList); HeapFree(GetProcessHeap(), 0, szPattern); diff --git a/dlls/msxml3/element.c b/dlls/msxml3/element.c index 63bf7af..b698042 100644 --- a/dlls/msxml3/element.c +++ b/dlls/msxml3/element.c @@ -666,6 +666,8 @@ static HRESULT WINAPI domelem_getElementsByTagName( IXMLDOMElement *iface, BSTR bstrName, IXMLDOMNodeList** resultList) { + static const WCHAR xpathformat[] = + { '.','/','/','*','[','l','o','c','a','l','-','n','a','m','e','(',')','=','\'','%','s','\'',']',0 }; domelem *This = impl_from_IXMLDOMElement( iface ); LPWSTR szPattern; xmlNodePtr element; @@ -673,10 +675,19 @@ static HRESULT WINAPI domelem_getElementsByTagName( TRACE("(%p)->(%s,%p)\n", This, debugstr_w(bstrName), resultList); - szPattern = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*(3+lstrlenW(bstrName)+1)); - szPattern[0] = '.'; - szPattern[1] = szPattern[2] = '/'; - lstrcpyW(szPattern+3, bstrName); + if (bstrName[0] == '*' && bstrName[1] == 0) + { + szPattern = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*5); + szPattern[0] = '.'; + szPattern[1] = szPattern[2] = '/'; + szPattern[3] = '*'; + szPattern[4] = 0; + } + else + { + szPattern = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*(21+lstrlenW(bstrName)+1)); + wsprintfW(szPattern, xpathformat, bstrName); + } TRACE("%s\n", debugstr_w(szPattern)); element = get_element(This);
1
0
0
0
André Hentschel : msvcrt/tests: Add some demangle tests.
by Alexandre Julliard
18 Jan '10
18 Jan '10
Module: wine Branch: master Commit: 152c0d4b9307e8ce52df1bbf95a85031f864d9fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=152c0d4b9307e8ce52df1bbf9…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Sat Jan 16 14:45:12 2010 +0100 msvcrt/tests: Add some demangle tests. --- dlls/msvcrt/tests/cpp.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dlls/msvcrt/tests/cpp.c b/dlls/msvcrt/tests/cpp.c index 106ef73..40e11e1 100644 --- a/dlls/msvcrt/tests/cpp.c +++ b/dlls/msvcrt/tests/cpp.c @@ -1034,6 +1034,10 @@ static void test_demangle(void) /* 113 */ {"?f@T@@QAEHQAY1BE@BO@$$CBD@Z", "public: int __thiscall T::f(char const (* const)[20][30])"}, /* 114 */ {"??0?$Foo@U?$vector_c@H$00$01$0?1$0A@$0A@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@@mpl@boost@@@@QAE@XZ", "public: __thiscall Foo<struct boost::mpl::vector_c<int,1,2,-2,0,0,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647> >::Foo<struct boost::mpl::vector_c<int,1,2,-2,0,0,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647> >(void)"}, +/* 115 */ {"?swprintf@@YAHPAGIPBGZZ", "int __cdecl swprintf(unsigned short *,unsigned int,unsigned short const *,...)"}, +/* 116 */ {"?vswprintf@@YAHPAGIPBGPAD@Z", "int __cdecl vswprintf(unsigned short *,unsigned int,unsigned short const *,char *)"}, +/* 117 */ {"?vswprintf@@YAHPA_WIPB_WPAD@Z", "int __cdecl vswprintf(wchar_t *,unsigned int,wchar_t const *,char *)"}, +/* 118 */ {"?swprintf@@YAHPA_WIPB_WZZ", "int __cdecl swprintf(wchar_t *,unsigned int,wchar_t const *,...)"}, }; int i, num_test = (sizeof(test)/sizeof(test[0]));
1
0
0
0
Andrew Nguyen : ntdll/tests: Report appropriate skips for information tests .
by Alexandre Julliard
18 Jan '10
18 Jan '10
Module: wine Branch: master Commit: 1cdf1cc07e73c53f1a78e11a2c80074f7e5b0af1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1cdf1cc07e73c53f1a78e11a2…
Author: Andrew Nguyen <arethusa26(a)gmail.com> Date: Fri Jan 15 11:46:56 2010 -0600 ntdll/tests: Report appropriate skips for information tests. --- dlls/ntdll/tests/info.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index 1914564..6414cac 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -47,7 +47,7 @@ static BOOL InitFunctionPtrs(void) HMODULE hntdll = GetModuleHandle("ntdll"); if (!hntdll) { - skip("Not running on NT\n"); + win_skip("Not running on NT\n"); return FALSE; } @@ -290,7 +290,7 @@ static void test_query_process(void) is_nt = ( spi->NextEntryOffset - (sbi.NumberOfProcessors * sizeof(SYSTEM_THREAD_INFORMATION)) == 136); - if (is_nt) skip("Windows version is NT, we will skip thread tests\n"); + if (is_nt) win_skip("Windows version is NT, we will skip thread tests\n"); /* Check if we have some return values * @@ -666,7 +666,7 @@ static void test_query_process_io(void) status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessIoCounters, &pii, sizeof(pii), &ReturnLength); if (status == STATUS_NOT_SUPPORTED) { - skip("ProcessIoCounters information class is not supported\n"); + win_skip("ProcessIoCounters information class is not supported\n"); return; } @@ -809,7 +809,7 @@ static void test_query_process_image_file_name(void) status = pNtQueryInformationProcess(NULL, ProcessImageFileName, &image_file_name, sizeof(image_file_name), NULL); if (status == STATUS_INVALID_INFO_CLASS) { - skip("ProcessImageFileName is not supported\n"); + win_skip("ProcessImageFileName is not supported\n"); return; } ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08x\n", status);
1
0
0
0
Andrew Nguyen : ntdll/tests: Re-enable a commented virtual memory test.
by Alexandre Julliard
18 Jan '10
18 Jan '10
Module: wine Branch: master Commit: ab23f87bcca07cf2673a1448249e2efb301d637c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ab23f87bcca07cf2673a14482…
Author: Andrew Nguyen <arethusa26(a)gmail.com> Date: Fri Jan 15 11:46:50 2010 -0600 ntdll/tests: Re-enable a commented virtual memory test. --- dlls/ntdll/tests/info.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index dc5de94..1914564 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -878,14 +878,10 @@ static void test_readvirtualmemory(void) ok( readcount == 12, "Expected to read 12 bytes, got %ld\n",readcount); ok( strcmp(teststring, buffer) == 0, "Expected read memory to be the same as original memory\n"); - /* this test currently crashes wine with "wine client error:<process id>: read: Bad address" - * because the reply from wine server is directly read into the buffer and that fails with EFAULT - */ /* illegal local address */ - /*status = pNtReadVirtualMemory(process, teststring, (void *)0x1234, 12, &readcount); - ok( status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got %08lx\n", status); + status = pNtReadVirtualMemory(process, teststring, (void *)0x1234, 12, &readcount); + ok( status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got %08x\n", status); ok( readcount == 0, "Expected to read 0 bytes, got %ld\n",readcount); - */ CloseHandle(process); }
1
0
0
0
Andrew Nguyen : ntdll/tests: Report skip when time conversion functions are not available.
by Alexandre Julliard
18 Jan '10
18 Jan '10
Module: wine Branch: master Commit: bffdda5ab20ce96e59ec5fae54592f097eca4bd5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bffdda5ab20ce96e59ec5fae5…
Author: Andrew Nguyen <arethusa26(a)gmail.com> Date: Fri Jan 15 11:46:44 2010 -0600 ntdll/tests: Report skip when time conversion functions are not available. --- dlls/ntdll/tests/time.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/tests/time.c b/dlls/ntdll/tests/time.c index cecf4a2..16530c4 100644 --- a/dlls/ntdll/tests/time.c +++ b/dlls/ntdll/tests/time.c @@ -101,4 +101,6 @@ START_TEST(time) pRtlTimeFieldsToTime = (void *)GetProcAddress(mod,"RtlTimeFieldsToTime"); if (pRtlTimeToTimeFields && pRtlTimeFieldsToTime) test_pRtlTimeToTimeFields(); + else + win_skip("Required time conversion functions are not available\n"); }
1
0
0
0
Andrew Nguyen : ntdll/tests: Remove useless ifdef statements.
by Alexandre Julliard
18 Jan '10
18 Jan '10
Module: wine Branch: master Commit: 83dbc3d46a86b1f93db3d924ade72bb1c6537b20 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=83dbc3d46a86b1f93db3d924a…
Author: Andrew Nguyen <arethusa26(a)gmail.com> Date: Fri Jan 15 11:46:39 2010 -0600 ntdll/tests: Remove useless ifdef statements. --- dlls/ntdll/tests/time.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/dlls/ntdll/tests/time.c b/dlls/ntdll/tests/time.c index 2e9adbc..cecf4a2 100644 --- a/dlls/ntdll/tests/time.c +++ b/dlls/ntdll/tests/time.c @@ -20,8 +20,6 @@ #include "ntdll_test.h" -#ifdef __WINE_WINTERNL_H - #define TICKSPERSEC 10000000 #define TICKSPERMSEC 10000 #define SECSPERDAY 86400 @@ -95,15 +93,12 @@ static void test_pRtlTimeToTimeFields(void) litime.QuadPart += (LONGLONG) tftest.Day * TICKSPERSEC * SECSPERDAY; } } -#endif START_TEST(time) { -#ifdef __WINE_WINTERNL_H HMODULE mod = GetModuleHandleA("ntdll.dll"); pRtlTimeToTimeFields = (void *)GetProcAddress(mod,"RtlTimeToTimeFields"); pRtlTimeFieldsToTime = (void *)GetProcAddress(mod,"RtlTimeFieldsToTime"); if (pRtlTimeToTimeFields && pRtlTimeFieldsToTime) test_pRtlTimeToTimeFields(); -#endif }
1
0
0
0
Andrew Nguyen : ntdll/tests: Remove obsolete commented code.
by Alexandre Julliard
18 Jan '10
18 Jan '10
Module: wine Branch: master Commit: 063da0a1834ef29e1c03525029cd6c2e3f24d0b3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=063da0a1834ef29e1c0352502…
Author: Andrew Nguyen <arethusa26(a)gmail.com> Date: Fri Jan 15 11:46:31 2010 -0600 ntdll/tests: Remove obsolete commented code. --- dlls/ntdll/tests/error.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/tests/error.c b/dlls/ntdll/tests/error.c index b65d7d0..ee8b9b2 100644 --- a/dlls/ntdll/tests/error.c +++ b/dlls/ntdll/tests/error.c @@ -892,12 +892,6 @@ static void run_error_tests(void) cmp2(STATUS_CTX_SHADOW_ENDED_BY_MODE_CHANGE, ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE); cmp2(STATUS_CTX_SHADOW_NOT_RUNNING, ERROR_CTX_SHADOW_NOT_RUNNING); cmp2(STATUS_LICENSE_VIOLATION, ERROR_CTX_LICENSE_NOT_AVAILABLE); -#if 0 - /* FIXME - unknown STATUS values, see bug 1001 */ - cmp(STATUS_ENDPOINT_CLOSED, ERROR_DEV_NOT_EXIST); - cmp(STATUS_DISCONNECTED, ERROR_DEV_NOT_EXIST); - cmp(STATUS_NONEXISTENT_NET_NAME, ERROR_DEV_NOT_EXIST); -#endif cmp2(STATUS_NETWORK_SESSION_EXPIRED, ERROR_NO_USER_SESSION_KEY); cmp2(STATUS_FILES_OPEN, ERROR_OPEN_FILES); cmp2(STATUS_SXS_SECTION_NOT_FOUND, ERROR_SXS_SECTION_NOT_FOUND);
1
0
0
0
Andrew Nguyen : msvcrt: Implement and test rand_s.
by Alexandre Julliard
18 Jan '10
18 Jan '10
Module: wine Branch: master Commit: 841fc1805e4032af79acacfda6ccb010884c5a94 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=841fc1805e4032af79acacfda…
Author: Andrew Nguyen <arethusa26(a)gmail.com> Date: Fri Jan 15 11:02:56 2010 -0600 msvcrt: Implement and test rand_s. --- dlls/msvcrt/Makefile.in | 2 +- dlls/msvcrt/misc.c | 14 ++++++++++ dlls/msvcrt/msvcrt.spec | 1 + dlls/msvcrt/tests/Makefile.in | 1 + dlls/msvcrt/tests/misc.c | 58 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 75 insertions(+), 1 deletions(-) diff --git a/dlls/msvcrt/Makefile.in b/dlls/msvcrt/Makefile.in index 7c2b25e..e5f6910 100644 --- a/dlls/msvcrt/Makefile.in +++ b/dlls/msvcrt/Makefile.in @@ -6,7 +6,7 @@ VPATH = @srcdir@ MODULE = msvcrt.dll IMPORTLIB = msvcrt IMPORTS = kernel32 ntdll -DELAYIMPORTS = user32 +DELAYIMPORTS = advapi32 user32 C_SRCS = \ console.c \ diff --git a/dlls/msvcrt/misc.c b/dlls/msvcrt/misc.c index 082c38b..c345589 100644 --- a/dlls/msvcrt/misc.c +++ b/dlls/msvcrt/misc.c @@ -25,6 +25,7 @@ #include "msvcrt.h" #include "wine/debug.h" +#include "ntsecapi.h" WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); @@ -61,6 +62,19 @@ int CDECL MSVCRT_rand(void) } /********************************************************************* + * rand_s (MSVCRT.@) + */ +int CDECL MSVCRT_rand_s(unsigned int *pval) +{ + if (!pval || !RtlGenRandom(pval, sizeof(*pval))) + { + *MSVCRT__errno() = MSVCRT_EINVAL; + return MSVCRT_EINVAL; + } + return 0; +} + +/********************************************************************* * _sleep (MSVCRT.@) */ void CDECL MSVCRT__sleep(MSVCRT_ulong timeout) diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index ff7d971..2b3d22c 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -736,6 +736,7 @@ @ cdecl qsort(ptr long long ptr) ntdll.qsort @ cdecl raise(long) MSVCRT_raise @ cdecl rand() MSVCRT_rand +@ cdecl rand_s(ptr) MSVCRT_rand_s @ cdecl realloc(ptr long) MSVCRT_realloc @ cdecl remove(str) MSVCRT_remove @ cdecl rename(str str) MSVCRT_rename diff --git a/dlls/msvcrt/tests/Makefile.in b/dlls/msvcrt/tests/Makefile.in index d0486d1..c964427 100644 --- a/dlls/msvcrt/tests/Makefile.in +++ b/dlls/msvcrt/tests/Makefile.in @@ -16,6 +16,7 @@ CTESTS = \ file.c \ headers.c \ heap.c \ + misc.c \ printf.c \ scanf.c \ signal.c \ diff --git a/dlls/msvcrt/tests/misc.c b/dlls/msvcrt/tests/misc.c new file mode 100644 index 0000000..1f069fa --- /dev/null +++ b/dlls/msvcrt/tests/misc.c @@ -0,0 +1,58 @@ +/* + * Unit tests for miscellaneous msvcrt functions + * + * Copyright 2010 Andrew Nguyen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "wine/test.h" +#include <errno.h> + +static int (__cdecl *prand_s)(unsigned int *); + +static void init(void) +{ + HMODULE hmod = GetModuleHandleA("msvcrt.dll"); + + prand_s = (void *)GetProcAddress(hmod, "rand_s"); +} + +static void test_rand_s(void) +{ + int ret; + unsigned int rand; + + if (!prand_s) + { + win_skip("rand_s is not available\n"); + return; + } + + errno = EBADF; + ret = prand_s(NULL); + ok(ret == EINVAL, "Expected rand_s to return EINVAL, got %d\n", ret); + ok(errno == EINVAL, "Expected errno to return EINVAL, got %d\n", errno); + + ret = prand_s(&rand); + ok(ret == 0, "Expected rand_s to return 0, got %d\n", ret); +} + +START_TEST(misc) +{ + init(); + + test_rand_s(); +}
1
0
0
0
Andrew Nguyen : advapi32/tests: Test SystemFunction036.
by Alexandre Julliard
18 Jan '10
18 Jan '10
Module: wine Branch: master Commit: 3822f9d2e1cdfe1c77c5f026ba6eb686974a3702 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3822f9d2e1cdfe1c77c5f026b…
Author: Andrew Nguyen <arethusa26(a)gmail.com> Date: Fri Jan 15 11:02:47 2010 -0600 advapi32/tests: Test SystemFunction036. --- dlls/advapi32/tests/crypt.c | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/dlls/advapi32/tests/crypt.c b/dlls/advapi32/tests/crypt.c index f317237..2a5993c 100644 --- a/dlls/advapi32/tests/crypt.c +++ b/dlls/advapi32/tests/crypt.c @@ -64,6 +64,7 @@ static BOOL (WINAPI *pCryptSetHashParam)(HCRYPTKEY, DWORD, BYTE*, DWORD); static BOOL (WINAPI *pCryptSetKeyParam)(HCRYPTKEY, DWORD, BYTE*, DWORD); static BOOL (WINAPI *pCryptSetProvParam)(HCRYPTPROV, DWORD, BYTE*, DWORD); static BOOL (WINAPI *pCryptVerifySignatureW)(HCRYPTHASH, BYTE*, DWORD, HCRYPTKEY, LPCWSTR, DWORD); +static BOOL (WINAPI *pSystemFunction036)(PVOID, ULONG); static void init_function_pointers(void) { @@ -99,6 +100,7 @@ static void init_function_pointers(void) pCryptSetKeyParam = (void*)GetProcAddress(hadvapi32, "CryptSetKeyParam"); pCryptSetProvParam = (void*)GetProcAddress(hadvapi32, "CryptSetProvParam"); pCryptVerifySignatureW = (void*)GetProcAddress(hadvapi32, "CryptVerifySignatureW"); + pSystemFunction036 = (void*)GetProcAddress(hadvapi32, "SystemFunction036"); } static void init_environment(void) @@ -1073,6 +1075,35 @@ static void test_rc2_keylen(void) } } +static void test_SystemFunction036(void) +{ + BOOL ret; + int test; + + if (!pSystemFunction036) + { + win_skip("SystemFunction036 is not available\n"); + return; + } + + ret = pSystemFunction036(NULL, 0); + ok(ret == TRUE, "Expected SystemFunction036 to return TRUE, got %d\n", ret); + + /* Test crashes on Windows. */ + if (0) + { + SetLastError(0xdeadbeef); + ret = pSystemFunction036(NULL, 5); + trace("ret = %d, GetLastError() = %d\n", ret, GetLastError()); + } + + ret = pSystemFunction036(&test, 0); + ok(ret == TRUE, "Expected SystemFunction036 to return TRUE, got %d\n", ret); + + ret = pSystemFunction036(&test, sizeof(int)); + ok(ret == TRUE, "Expected SystemFunction036 to return TRUE, got %d\n", ret); +} + START_TEST(crypt) { init_function_pointers(); @@ -1091,4 +1122,5 @@ START_TEST(crypt) test_enum_provider_types(); test_get_default_provider(); test_set_provider_ex(); + test_SystemFunction036(); }
1
0
0
0
Jason Edmeades : kernel32: Return error on second attempt to free a module.
by Alexandre Julliard
18 Jan '10
18 Jan '10
Module: wine Branch: master Commit: 99a0376a4fb259332def88438aa5c122da6efaa1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=99a0376a4fb259332def88438…
Author: Jason Edmeades <jason.edmeades(a)googlemail.com> Date: Fri Jan 15 08:50:42 2010 -0800 kernel32: Return error on second attempt to free a module. --- dlls/kernel32/module.c | 3 +-- dlls/kernel32/tests/module.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c index ff3c3a5..96a240e 100644 --- a/dlls/kernel32/module.c +++ b/dlls/kernel32/module.c @@ -1003,8 +1003,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH FreeLibrary(HINSTANCE hLibModule) { /* this is a LOAD_LIBRARY_AS_DATAFILE module */ char *ptr = (char *)hLibModule - 1; - UnmapViewOfFile( ptr ); - return TRUE; + return UnmapViewOfFile( ptr ); } if ((nts = LdrUnloadDll( hLibModule )) == STATUS_SUCCESS) retv = TRUE; diff --git a/dlls/kernel32/tests/module.c b/dlls/kernel32/tests/module.c index 4cb30a8..906646e 100644 --- a/dlls/kernel32/tests/module.c +++ b/dlls/kernel32/tests/module.c @@ -359,6 +359,24 @@ static void testLoadLibraryEx(void) ok(GetLastError() == ERROR_FILE_NOT_FOUND || broken(GetLastError() == ERROR_INVALID_HANDLE), /* nt4 */ "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + + /* Free the loaded dll when its the first time this dll is loaded + in process - First time should pass, second fail */ + SetLastError(0xdeadbeef); + hmodule = LoadLibraryExA("comctl32.dll", NULL, LOAD_LIBRARY_AS_DATAFILE); + ok(hmodule != 0, "Expected valid module handle\n"); + + SetLastError(0xdeadbeef); + ok(FreeLibrary(hmodule), + "Expected to be able to free the module, failed with %d\n", + GetLastError()); + SetLastError(0xdeadbeef); + ok(!FreeLibrary(hmodule), + "Unexpected ability to free the module, failed with %d\n", + GetLastError()); + + CloseHandle(hmodule); + } START_TEST(module)
1
0
0
0
← Newer
1
...
33
34
35
36
37
38
39
...
62
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
Results per page:
10
25
50
100
200