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
December 2012
----- 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
2 participants
549 discussions
Start a n
N
ew thread
Piotr Caban : wininet: NULL terminate cookie data in load_persistent_cookie function.
by Alexandre Julliard
21 Dec '12
21 Dec '12
Module: wine Branch: master Commit: a62e3f64425e5f42d6e3bb6357b2a82bf49774a0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a62e3f64425e5f42d6e3bb635…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Dec 21 17:06:33 2012 +0100 wininet: NULL terminate cookie data in load_persistent_cookie function. --- dlls/wininet/cookie.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/wininet/cookie.c b/dlls/wininet/cookie.c index 42c7525..0dd93d9 100644 --- a/dlls/wininet/cookie.c +++ b/dlls/wininet/cookie.c @@ -170,11 +170,12 @@ static BOOL load_persistent_cookie(LPCWSTR domain, LPCWSTR path) if(!cookie) return FALSE; - if(!(str = heap_alloc(size)) || !ReadUrlCacheEntryStream(cookie, 0, str, &size, 0)) { + if(!(str = heap_alloc(size+1)) || !ReadUrlCacheEntryStream(cookie, 0, str, &size, 0)) { UnlockUrlCacheEntryStream(cookie, 0); heap_free(str); return FALSE; } + str[size] = 0; UnlockUrlCacheEntryStream(cookie, 0); LIST_FOR_EACH(iter, &domain_list)
1
0
0
0
Piotr Caban : wininet: Fixed CreateUrlCacheEntryW behaviour on URLs without '\' and '/' characters.
by Alexandre Julliard
21 Dec '12
21 Dec '12
Module: wine Branch: master Commit: 2f35659035db8085ceb512c340353e0e9c773983 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2f35659035db8085ceb512c34…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Dec 21 17:06:16 2012 +0100 wininet: Fixed CreateUrlCacheEntryW behaviour on URLs without '\' and '/' characters. --- dlls/wininet/urlcache.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/wininet/urlcache.c b/dlls/wininet/urlcache.c index 8fb62de..c5201b4 100644 --- a/dlls/wininet/urlcache.c +++ b/dlls/wininet/urlcache.c @@ -2901,6 +2901,9 @@ BOOL WINAPI CreateUrlCacheEntryW( break; } } + if(!bFound) + lpszUrlPart++; + if (!lstrcmpW(lpszUrlPart, szWWW)) { lpszUrlPart += lstrlenW(szWWW);
1
0
0
0
Jacek Caban : jscript: Added null and undefined values support to to_object .
by Alexandre Julliard
21 Dec '12
21 Dec '12
Module: wine Branch: master Commit: 99d1a8529beb450aa1eaa46ecdb49ccb532549c6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=99d1a8529beb450aa1eaa46ec…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Dec 21 16:21:03 2012 +0100 jscript: Added null and undefined values support to to_object. --- dlls/jscript/jsutils.c | 7 ++++--- dlls/jscript/tests/api.js | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/jscript/jsutils.c b/dlls/jscript/jsutils.c index 91e0397..5527724 100644 --- a/dlls/jscript/jsutils.c +++ b/dlls/jscript/jsutils.c @@ -820,6 +820,10 @@ HRESULT to_object(script_ctx_t *ctx, jsval_t val, IDispatch **disp) *disp = to_disp(dispex); break; + case JSV_UNDEFINED: + case JSV_NULL: + WARN("object expected\n"); + return throw_type_error(ctx, JS_E_OBJECT_EXPECTED, NULL); case JSV_VARIANT: switch(V_VT(get_variant(val))) { case VT_ARRAY|VT_VARIANT: @@ -835,9 +839,6 @@ HRESULT to_object(script_ctx_t *ctx, jsval_t val, IDispatch **disp) return E_NOTIMPL; } break; - default: - FIXME("unsupported %s\n", debugstr_jsval(val)); - return E_NOTIMPL; } return S_OK; diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index 5d45777..eb16176 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -2300,6 +2300,8 @@ testException(function() {+nullDisp.prop;}, "E_OBJECT_REQUIRED"); testException(function() {+nullDisp["prop"];}, "E_OBJECT_REQUIRED"); testException(function() {delete (new Object());}, "E_INVALID_DELETE"); testException(function() {delete false;}, "E_INVALID_DELETE"); +testException(function() {undefined.toString();}, "E_OBJECT_EXPECTED"); +testException(function() {null.toString();}, "E_OBJECT_EXPECTED"); obj = new Object(); obj.prop = 1;
1
0
0
0
Hans Leidekker : wmiutils: Implement IWbemPath::SetText and IWbemPath:: GetText.
by Alexandre Julliard
21 Dec '12
21 Dec '12
Module: wine Branch: master Commit: c092d825000bb2b9e887a621ce7bf4908b434b25 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c092d825000bb2b9e887a621c…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Dec 21 13:58:58 2012 +0100 wmiutils: Implement IWbemPath::SetText and IWbemPath::GetText. --- dlls/wmiutils/path.c | 39 +++++++++++++++++++++++++++++++++++---- include/wmiutils.idl | 18 ++++++++++++++++++ 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/dlls/wmiutils/path.c b/dlls/wmiutils/path.c index d67849b..b8c0f3e 100644 --- a/dlls/wmiutils/path.c +++ b/dlls/wmiutils/path.c @@ -24,6 +24,7 @@ #include "windef.h" #include "winbase.h" #include "ole2.h" +#include "wbemcli.h" #include "wmiutils.h" #include "wine/debug.h" @@ -36,6 +37,8 @@ struct path { IWbemPath IWbemPath_iface; LONG refs; + WCHAR *text; + int len; }; static inline struct path *impl_from_IWbemPath( IWbemPath *iface ) @@ -58,6 +61,7 @@ static ULONG WINAPI path_Release( if (!refs) { TRACE("destroying %p\n", path); + HeapFree( GetProcessHeap(), 0, path->text ); HeapFree( GetProcessHeap(), 0, path ); } return refs; @@ -91,8 +95,20 @@ static HRESULT WINAPI path_SetText( ULONG uMode, LPCWSTR pszPath) { - FIXME("%p, %u, %s\n", iface, uMode, debugstr_w(pszPath)); - return E_NOTIMPL; + struct path *path = impl_from_IWbemPath( iface ); + int len; + + TRACE("%p, %u, %s\n", iface, uMode, debugstr_w(pszPath)); + + if (uMode) FIXME("igoring mode %u\n", uMode); + + len = strlenW( pszPath ); + if (!(path->text = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) ))) + return E_OUTOFMEMORY; + + strcpyW( path->text, pszPath ); + path->len = len; + return S_OK; } static HRESULT WINAPI path_GetText( @@ -101,8 +117,23 @@ static HRESULT WINAPI path_GetText( ULONG *puBufferLength, LPWSTR pszText) { - FIXME("%p, 0x%x, %p, %p\n", iface, lFlags, puBufferLength, pszText); - return E_NOTIMPL; + struct path *path = impl_from_IWbemPath( iface ); + + TRACE("%p, 0x%x, %p, %p\n", iface, lFlags, puBufferLength, pszText); + + if (lFlags != WBEMPATH_GET_ORIGINAL) + { + FIXME("flags 0x%x not supported\n", lFlags); + return WBEM_E_INVALID_PARAMETER; + } + if (*puBufferLength < path->len + 1) + { + *puBufferLength = path->len + 1; + return S_OK; + } + if (pszText) strcpyW( pszText, path->text ); + *puBufferLength = path->len + 1; + return S_OK; } static HRESULT WINAPI path_GetInfo( diff --git a/include/wmiutils.idl b/include/wmiutils.idl index 81834ec..82f64d1 100644 --- a/include/wmiutils.idl +++ b/include/wmiutils.idl @@ -21,6 +21,24 @@ import "oaidl.idl"; interface IWbemPath; interface IWbemPathKeyList; +typedef [v1_enum] enum tag_WBEM_PATH_CREATE_FLAG +{ + WBEMPATH_CREATE_ACCEPT_RELATIVE = 0x1, + WBEMPATH_CREATE_ACCEPT_ABSOLUTE = 0x2, + WBEMPATH_CREATE_ACCEPT_ALL = 0x4, + WBEMPATH_TREAT_SINGLE_IDENT_AS_NS = 0x8 +} tag_WBEM_PATH_CREATE_FLAG; + +typedef [v1_enum] enum tag_WBEM_GET_TEXT_FLAGS +{ + WBEMPATH_COMPRESSED = 0x1, + WBEMPATH_GET_RELATIVE_ONLY = 0x2, + WBEMPATH_GET_SERVER_TOO = 0x4, + WBEMPATH_GET_SERVER_AND_NAMESPACE_ONLY = 0x8, + WBEMPATH_GET_NAMESPACE_ONLY = 0x10, + WBEMPATH_GET_ORIGINAL = 0x20 +} tag_WBEM_GET_TEXT_FLAGS; + [ local, object,
1
0
0
0
Hans Leidekker : wmiutils: Add a stub implementation of IWbemPath.
by Alexandre Julliard
21 Dec '12
21 Dec '12
Module: wine Branch: master Commit: 633a5741b54a5d1438ca57a4ac581902bc20a271 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=633a5741b54a5d1438ca57a4a…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Dec 21 13:58:09 2012 +0100 wmiutils: Add a stub implementation of IWbemPath. --- .gitignore | 1 + dlls/wmiutils/Makefile.in | 1 + dlls/wmiutils/main.c | 7 + dlls/wmiutils/path.c | 363 ++++++++++++++++++++++++++++++++++++++ dlls/wmiutils/statuscode.c | 2 - dlls/wmiutils/wmiutils_private.h | 1 + include/Makefile.in | 1 + include/wmiutils.idl | 196 ++++++++++++++++++++ 8 files changed, 570 insertions(+), 2 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=633a5741b54a5d1438ca5…
1
0
0
0
Hans Leidekker : wmiutils: Rename wmiutils.idl to wmiutils_classes.idl.
by Alexandre Julliard
21 Dec '12
21 Dec '12
Module: wine Branch: master Commit: d010497474f2419671faa93ef4b413b2a057b7b7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d010497474f2419671faa93ef…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Dec 21 13:57:07 2012 +0100 wmiutils: Rename wmiutils.idl to wmiutils_classes.idl. --- dlls/wmiutils/Makefile.in | 2 +- .../{wmiutils.idl => wmiutils_classes.idl} | 0 2 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wmiutils/Makefile.in b/dlls/wmiutils/Makefile.in index f12461f..c6ef892 100644 --- a/dlls/wmiutils/Makefile.in +++ b/dlls/wmiutils/Makefile.in @@ -5,6 +5,6 @@ C_SRCS = \ main.c \ statuscode.c -IDL_R_SRCS = wmiutils.idl +IDL_R_SRCS = wmiutils_classes.idl @MAKE_DLL_RULES@ diff --git a/dlls/wmiutils/wmiutils.idl b/dlls/wmiutils/wmiutils_classes.idl similarity index 100% rename from dlls/wmiutils/wmiutils.idl rename to dlls/wmiutils/wmiutils_classes.idl
1
0
0
0
Hans Leidekker : pdh: Accept the local machine name in counter paths.
by Alexandre Julliard
21 Dec '12
21 Dec '12
Module: wine Branch: master Commit: 4933dc78c6aeef024c6f240945968d05a51d4670 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4933dc78c6aeef024c6f24094…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Dec 21 13:56:23 2012 +0100 pdh: Accept the local machine name in counter paths. --- dlls/pdh/pdh_main.c | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/dlls/pdh/pdh_main.c b/dlls/pdh/pdh_main.c index 69f0d71..f1a34e7 100644 --- a/dlls/pdh/pdh_main.c +++ b/dlls/pdh/pdh_main.c @@ -220,14 +220,27 @@ static const struct source counter_sources[] = { 674, path_uptime, collect_uptime, TYPE_UPTIME, -3, 1000 } }; +static BOOL is_local_machine( const WCHAR *name, DWORD len ) +{ + WCHAR buf[MAX_COMPUTERNAME_LENGTH + 1]; + DWORD buflen = sizeof(buf) / sizeof(buf[0]); + + if (!GetComputerNameW( buf, &buflen )) return FALSE; + return len == buflen && !memicmpW( name, buf, buflen ); +} + static BOOL pdh_match_path( LPCWSTR fullpath, LPCWSTR path ) { const WCHAR *p; - if (strchrW( path, '\\')) p = fullpath; + if (path[0] == '\\' && path[1] == '\\' && (p = strchrW( path + 2, '\\' )) && + is_local_machine( path + 2, p - path - 2 )) + { + path += p - path; + } + if (strchrW( path, '\\' )) p = fullpath; else p = strrchrW( fullpath, '\\' ) + 1; - if (strcmpW( p, path )) return FALSE; - return TRUE; + return !strcmpW( p, path ); } /***********************************************************************
1
0
0
0
Hans Leidekker : winhttp/tests: Make sure proxy settings are restored.
by Alexandre Julliard
21 Dec '12
21 Dec '12
Module: wine Branch: master Commit: ec1ae3b6e64642e03fde382bd83e07aa1856c2ae URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ec1ae3b6e64642e03fde382bd…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Dec 21 13:55:41 2012 +0100 winhttp/tests: Make sure proxy settings are restored. --- dlls/winhttp/tests/winhttp.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index 5fcdef6..05e7804 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -1070,23 +1070,23 @@ static void test_set_default_proxy_config(void) info.lpszProxy = wideString; SetLastError(0xdeadbeef); ret = WinHttpSetDefaultProxyConfiguration(&info); - ok((!ret && GetLastError() == ERROR_INVALID_PARAMETER) || - broken(ret), /* Earlier winhttp versions on W2K/XP */ - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + if (!ret && GetLastError() == ERROR_ACCESS_DENIED) + skip("couldn't set default proxy configuration: access denied\n"); + else + ok((!ret && GetLastError() == ERROR_INVALID_PARAMETER) || + broken(ret), /* Earlier winhttp versions on W2K/XP */ + "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); info.lpszProxy = normalString; SetLastError(0xdeadbeef); ret = WinHttpSetDefaultProxyConfiguration(&info); - if (ret) - { - ok(ret, "always true\n"); - set_default_proxy_reg_value( saved_proxy_settings, len, type ); - } - else if (GetLastError() == ERROR_ACCESS_DENIED) + if (!ret && GetLastError() == ERROR_ACCESS_DENIED) skip("couldn't set default proxy configuration: access denied\n"); else ok(ret, "WinHttpSetDefaultProxyConfiguration failed: %d\n", GetLastError()); + + set_default_proxy_reg_value( saved_proxy_settings, len, type ); } static void test_Timeouts (void)
1
0
0
0
Piotr Caban : msvcr100: Added _aligned_msize implementation.
by Alexandre Julliard
21 Dec '12
21 Dec '12
Module: wine Branch: master Commit: 6e38d5beef8fe9787004c014baec6a2f78102a58 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6e38d5beef8fe9787004c014b…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Dec 21 13:38:34 2012 +0100 msvcr100: Added _aligned_msize implementation. --- dlls/msvcr100/msvcr100.c | 20 ++++++++++++++++++++ dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr100/tests/msvcr100.c | 33 +++++++++++++++++++++++++++++++++ dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- 5 files changed, 56 insertions(+), 3 deletions(-) diff --git a/dlls/msvcr100/msvcr100.c b/dlls/msvcr100/msvcr100.c index f571aee..aeab2ad 100644 --- a/dlls/msvcr100/msvcr100.c +++ b/dlls/msvcr100/msvcr100.c @@ -483,6 +483,26 @@ int CDECL _get_timezone(LONG *timezone) return 0; } +/* copied from dlls/msvcrt/heap.c */ +#define SAVED_PTR(x) ((void *)((DWORD_PTR)((char *)x - sizeof(void *)) & \ + ~(sizeof(void *) - 1))) + +/********************************************************************* + * _aligned_msize (MSVCR100.@) + */ +size_t CDECL _aligned_msize(void *p, size_t alignment, size_t offset) +{ + void **alloc_ptr; + + if(!CHECK_PMT(p)) return -1; + + if(alignment < sizeof(void*)) + alignment = sizeof(void*); + + alloc_ptr = SAVED_PTR(p); + return _msize(*alloc_ptr)-alignment-sizeof(void*); +} + /********************************************************************* * DllMain (MSVCR100.@) */ diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 38ae28a..a09b142 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -678,7 +678,7 @@ @ extern _acmdln msvcrt._acmdln @ cdecl _aligned_free(ptr) msvcrt._aligned_free @ cdecl _aligned_malloc(long long) msvcrt._aligned_malloc -@ stub _aligned_msize +@ cdecl _aligned_msize(ptr long long) @ cdecl _aligned_offset_malloc(long long long) msvcrt._aligned_offset_malloc @ cdecl _aligned_offset_realloc(ptr long long long) msvcrt._aligned_offset_realloc @ stub _aligned_offset_recalloc diff --git a/dlls/msvcr100/tests/msvcr100.c b/dlls/msvcr100/tests/msvcr100.c index 143979d..99834dd 100644 --- a/dlls/msvcr100/tests/msvcr100.c +++ b/dlls/msvcr100/tests/msvcr100.c @@ -72,6 +72,9 @@ static int (__cdecl *p_wmemmove_s)(wchar_t *dest, size_t numberOfElements, const static FILE* (__cdecl *p_fopen)(const char*,const char*); static int (__cdecl *p_fclose)(FILE*); static size_t (__cdecl *p_fread_s)(void*,size_t,size_t,size_t,FILE*); +static void* (__cdecl *p__aligned_offset_malloc)(size_t, size_t, size_t); +static void (__cdecl *p__aligned_free)(void*); +static size_t (__cdecl *p__aligned_msize)(void*, size_t, size_t); /* make sure we use the correct errno */ #undef errno @@ -98,6 +101,9 @@ static BOOL init(void) SET(p_fopen, "fopen"); SET(p_fclose, "fclose"); SET(p_fread_s, "fread_s"); + SET(p__aligned_offset_malloc, "_aligned_offset_malloc"); + SET(p__aligned_free, "_aligned_free"); + SET(p__aligned_msize, "_aligned_msize"); return TRUE; } @@ -326,6 +332,32 @@ static void test_fread_s(void) unlink(test_file); } +static void test__aligned_msize(void) +{ + void *mem; + int ret; + + mem = p__aligned_offset_malloc(23, 16, 7); + ret = p__aligned_msize(mem, 16, 7); + ok(ret == 23, "_aligned_msize returned %d\n", ret); + ret = p__aligned_msize(mem, 15, 7); + ok(ret == 24, "_aligned_msize returned %d\n", ret); + ret = p__aligned_msize(mem, 11, 7); + ok(ret == 28, "_aligned_msize returned %d\n", ret); + ret = p__aligned_msize(mem, 1, 7); + ok(ret == 39-sizeof(void*), "_aligned_msize returned %d\n", ret); + ret = p__aligned_msize(mem, 8, 0); + todo_wine ok(ret == 32, "_aligned_msize returned %d\n", ret); + p__aligned_free(mem); + + mem = p__aligned_offset_malloc(3, 16, 0); + ret = p__aligned_msize(mem, 16, 0); + ok(ret == 3, "_aligned_msize returned %d\n", ret); + ret = p__aligned_msize(mem, 11, 0); + ok(ret == 8, "_aligned_msize returned %d\n", ret); + p__aligned_free(mem); +} + START_TEST(msvcr100) { if (!init()) @@ -334,4 +366,5 @@ START_TEST(msvcr100) test_wmemcpy_s(); test_wmemmove_s(); test_fread_s(); + test__aligned_msize(); } diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index c9469e7..4457c2c 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -334,7 +334,7 @@ @ extern _aexit_rtn msvcrt._aexit_rtn @ cdecl _aligned_free(ptr) msvcrt._aligned_free @ cdecl _aligned_malloc(long long) msvcrt._aligned_malloc -@ stub _aligned_msize +@ cdecl _aligned_msize(ptr long long) msvcr100._aligned_msize @ cdecl _aligned_offset_malloc(long long long) msvcrt._aligned_offset_malloc @ cdecl _aligned_offset_realloc(ptr long long long) msvcrt._aligned_offset_realloc @ stub _aligned_offset_recalloc diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index bf54f0a..c20c5fd 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -326,7 +326,7 @@ @ extern _aexit_rtn msvcrt._aexit_rtn @ cdecl _aligned_free(ptr) msvcrt._aligned_free @ cdecl _aligned_malloc(long long) msvcrt._aligned_malloc -@ stub _aligned_msize +@ cdecl _aligned_msize(ptr long long) msvcr100._aligned_msize @ cdecl _aligned_offset_malloc(long long long) msvcrt._aligned_offset_malloc @ cdecl _aligned_offset_realloc(ptr long long long) msvcrt._aligned_offset_realloc @ stub _aligned_offset_recalloc
1
0
0
0
Piotr Caban : msvcrt: Added _set_fmode and _get_fmode implementation.
by Alexandre Julliard
21 Dec '12
21 Dec '12
Module: wine Branch: master Commit: dfca87db71dcade741ef95dededce37c53479578 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dfca87db71dcade741ef95ded…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Dec 21 13:37:47 2012 +0100 msvcrt: Added _set_fmode and _get_fmode implementation. --- dlls/msvcr100/msvcr100.spec | 4 ++-- dlls/msvcr80/msvcr80.spec | 4 ++-- dlls/msvcr90/msvcr90.spec | 4 ++-- dlls/msvcrt/data.c | 25 +++++++++++++++++++++++++ dlls/msvcrt/msvcrt.spec | 4 ++-- 5 files changed, 33 insertions(+), 8 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 8f0ecdb..38ae28a 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -868,7 +868,7 @@ @ cdecl _get_doserrno(ptr) msvcrt._get_doserrno @ stub _get_dstbias @ cdecl _get_errno(ptr) msvcrt._get_errno -@ stub _get_fmode +@ cdecl _get_fmode(ptr) msvcrt._get_fmode @ cdecl _get_heap_handle() msvcrt._get_heap_handle @ cdecl _get_invalid_parameter_handler() msvcrt._get_invalid_parameter_handler @ cdecl _get_osfhandle(long) msvcrt._get_osfhandle @@ -1266,7 +1266,7 @@ @ cdecl _set_doserrno(long) msvcrt._set_doserrno @ cdecl _set_errno(long) msvcrt._set_errno @ cdecl _set_error_mode(long) msvcrt._set_error_mode -@ stub _set_fmode +@ cdecl _set_fmode(long) msvcrt._set_fmode @ cdecl _set_invalid_parameter_handler(ptr) msvcrt._set_invalid_parameter_handler @ stub _set_malloc_crt_max_wait @ stub _set_output_format diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index b4eaf7b..c9469e7 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -523,7 +523,7 @@ @ cdecl _get_doserrno(ptr) msvcrt._get_doserrno @ stub _get_dstbias @ cdecl _get_errno(ptr) msvcrt._get_errno -@ stub _get_fmode +@ cdecl _get_fmode(ptr) msvcrt._get_fmode @ cdecl _get_heap_handle() msvcrt._get_heap_handle @ cdecl _get_invalid_parameter_handler() msvcrt._get_invalid_parameter_handler @ cdecl _get_osfhandle(long) msvcrt._get_osfhandle @@ -928,7 +928,7 @@ @ cdecl _set_doserrno(long) msvcrt._set_doserrno @ cdecl _set_errno(long) msvcrt._set_errno @ cdecl _set_error_mode(long) msvcrt._set_error_mode -@ stub _set_fmode +@ cdecl _set_fmode(long) msvcrt._set_fmode @ cdecl _set_invalid_parameter_handler(ptr) msvcrt._set_invalid_parameter_handler @ stub _set_malloc_crt_max_wait @ stub _set_output_format diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 90b4b04..bf54f0a 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -518,7 +518,7 @@ @ cdecl _get_doserrno(ptr) msvcrt._get_doserrno @ stub _get_dstbias @ cdecl _get_errno(ptr) msvcrt._get_errno -@ stub _get_fmode +@ cdecl _get_fmode(ptr) msvcrt._get_fmode @ cdecl _get_heap_handle() msvcrt._get_heap_handle @ cdecl _get_invalid_parameter_handler() msvcrt._get_invalid_parameter_handler @ cdecl _get_osfhandle(long) msvcrt._get_osfhandle @@ -921,7 +921,7 @@ @ cdecl _set_doserrno(long) msvcrt._set_doserrno @ cdecl _set_errno(long) msvcrt._set_errno @ cdecl _set_error_mode(long) msvcrt._set_error_mode -@ stub _set_fmode +@ cdecl _set_fmode(long) msvcrt._set_fmode @ cdecl _set_invalid_parameter_handler(ptr) msvcrt._set_invalid_parameter_handler @ stub _set_malloc_crt_max_wait @ stub _set_output_format diff --git a/dlls/msvcrt/data.c b/dlls/msvcrt/data.c index 94254ab..a9505ed 100644 --- a/dlls/msvcrt/data.c +++ b/dlls/msvcrt/data.c @@ -186,6 +186,31 @@ int CDECL _get_wpgmptr(WCHAR** p) unsigned int* CDECL __p__fmode(void) { return &MSVCRT__fmode; } /*********************************************************************** + * _set_fmode (MSVCRT.@) + */ +int CDECL _set_fmode(int mode) +{ + /* TODO: support _O_WTEXT */ + if(!MSVCRT_CHECK_PMT(mode==MSVCRT__O_TEXT || mode==MSVCRT__O_BINARY)) + return MSVCRT_EINVAL; + + MSVCRT__fmode = mode; + return 0; +} + +/*********************************************************************** + * _get_fmode (MSVCRT.@) + */ +int CDECL _get_fmode(int *mode) +{ + if(!MSVCRT_CHECK_PMT(mode)) + return MSVCRT_EINVAL; + + *mode = MSVCRT__fmode; + return 0; +} + +/*********************************************************************** * __p__osver (MSVCRT.@) */ unsigned int* CDECL __p__osver(void) { return &MSVCRT__osver; } diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 79f6511..6802104 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -474,7 +474,7 @@ # stub _get_environ(ptr) @ cdecl _get_errno(ptr) # stub _get_fileinfo(ptr) -# stub _get_fmode(ptr) +@ cdecl _get_fmode(ptr) @ cdecl _get_heap_handle() @ cdecl _get_osfhandle(long) MSVCRT__get_osfhandle @ cdecl _get_osplatform(ptr) MSVCRT__get_osplatform @@ -867,7 +867,7 @@ @ cdecl _set_errno(long) @ cdecl _set_error_mode(long) # stub _set_fileinfo(long) -# stub _set_fmode(long) +@ cdecl _set_fmode(long) # stub _set_output_format(long) @ cdecl _set_sbh_threshold(long) @ cdecl _seterrormode(long)
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
55
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
Results per page:
10
25
50
100
200