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
July
June
May
April
March
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
May 2018
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
716 discussions
Start a n
N
ew thread
Jacek Caban : jscript: Added Object.getOwnPropertyDescriptor implementation.
by Alexandre Julliard
10 May '18
10 May '18
Module: wine Branch: master Commit: 551e5a77e24d7b93808b127d16a97d65288e2864 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=551e5a77e24d7b93808b127d…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu May 10 19:19:56 2018 +0200 jscript: Added Object.getOwnPropertyDescriptor implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/dispex.c | 32 +++++++++++++++ dlls/jscript/jscript.h | 7 ++++ dlls/jscript/object.c | 83 ++++++++++++++++++++++++++++++++++++++- dlls/mshtml/tests/documentmode.js | 4 ++ dlls/mshtml/tests/es5.js | 43 +++++++++++++++++--- 5 files changed, 163 insertions(+), 6 deletions(-) diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index d3f345a..5ba5b70 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -1614,3 +1614,35 @@ HRESULT jsdisp_is_enumerable(jsdisp_t *obj, const WCHAR *name, BOOL *ret) *ret = prop && (prop->flags & PROPF_ENUMERABLE) && prop->type != PROP_PROTREF; return S_OK; } + +HRESULT jsdisp_get_own_property(jsdisp_t *obj, const WCHAR *name, BOOL flags_only, + property_desc_t *desc) +{ + dispex_prop_t *prop; + HRESULT hres; + + hres = find_prop_name(obj, string_hash(name), name, &prop); + if(FAILED(hres)) + return hres; + + if(!prop) + return DISP_E_UNKNOWNNAME; + + memset(desc, 0, sizeof(*desc)); + + switch(prop->type) { + case PROP_BUILTIN: + case PROP_JSVAL: + if(!flags_only) { + hres = prop_get(obj, prop, &desc->value); + if(FAILED(hres)) + return hres; + } + break; + default: + return DISP_E_UNKNOWNNAME; + } + + desc->flags = prop->flags & (PROPF_ENUMERABLE | PROPF_WRITABLE | PROPF_CONFIGURABLE); + return S_OK; +} diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 9c28da0..ab7d634 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -50,6 +50,7 @@ typedef struct _jsval_t jsval_t; typedef struct _jsstr_t jsstr_t; typedef struct _script_ctx_t script_ctx_t; typedef struct _dispex_prop_t dispex_prop_t; +typedef struct _property_desc_t property_desc_t; typedef struct { void **blocks; @@ -292,6 +293,7 @@ HRESULT jsdisp_get_id(jsdisp_t*,const WCHAR*,DWORD,DISPID*) DECLSPEC_HIDDEN; HRESULT disp_delete(IDispatch*,DISPID,BOOL*) DECLSPEC_HIDDEN; HRESULT disp_delete_name(script_ctx_t*,IDispatch*,jsstr_t*,BOOL*) DECLSPEC_HIDDEN; HRESULT jsdisp_delete_idx(jsdisp_t*,DWORD) DECLSPEC_HIDDEN; +HRESULT jsdisp_get_own_property(jsdisp_t*,const WCHAR*,BOOL,property_desc_t*) DECLSPEC_HIDDEN; HRESULT jsdisp_is_own_prop(jsdisp_t*,const WCHAR*,BOOL*) DECLSPEC_HIDDEN; HRESULT jsdisp_is_enumerable(jsdisp_t*,const WCHAR*,BOOL*) DECLSPEC_HIDDEN; @@ -376,6 +378,11 @@ typedef struct { #include "jsval.h" +struct _property_desc_t { + unsigned flags; + jsval_t value; +}; + typedef struct { EXCEPINFO ei; jsval_t val; diff --git a/dlls/jscript/object.c b/dlls/jscript/object.c index de09060..72365c7 100644 --- a/dlls/jscript/object.c +++ b/dlls/jscript/object.c @@ -32,8 +32,16 @@ static const WCHAR propertyIsEnumerableW[] = {'p','r','o','p','e','r','t','y','I','s','E','n','u','m','e','r','a','b','l','e',0}; static const WCHAR isPrototypeOfW[] = {'i','s','P','r','o','t','o','t','y','p','e','O','f',0}; +static const WCHAR getOwnPropertyDescriptorW[] = + {'g','e','t','O','w','n','P','r','o','p','e','r','t','y','D','e','s','c','r','i','p','t','o','r',0}; + static const WCHAR default_valueW[] = {'[','o','b','j','e','c','t',' ','O','b','j','e','c','t',']',0}; +static const WCHAR configurableW[] = {'c','o','n','f','i','g','u','r','a','b','l','e',0}; +static const WCHAR enumerableW[] = {'e','n','u','m','e','r','a','b','l','e',0}; +static const WCHAR valueW[] = {'v','a','l','u','e',0}; +static const WCHAR writableW[] = {'w','r','i','t','a','b','l','e',0}; + static HRESULT Object_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) { @@ -252,6 +260,79 @@ static const builtin_info_t ObjectInst_info = { NULL }; +static void release_property_descriptor(property_desc_t *desc) +{ + jsval_release(desc->value); +} + +static HRESULT Object_getOwnPropertyDescriptor(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, + unsigned argc, jsval_t *argv, jsval_t *r) +{ + property_desc_t prop_desc; + jsdisp_t *obj, *desc_obj; + const WCHAR *name; + jsstr_t *name_str; + HRESULT hres; + + TRACE("\n"); + + if(argc < 1 || !is_object_instance(argv[0])) + return throw_type_error(ctx, JS_E_OBJECT_EXPECTED, NULL); + obj = to_jsdisp(get_object(argv[0])); + if(!obj) { + FIXME("not implemented non-JS object\n"); + return E_NOTIMPL; + } + + hres = to_flat_string(ctx, argc >= 2 ? argv[1] : jsval_undefined(), &name_str, &name); + if(FAILED(hres)) + return hres; + + hres = jsdisp_get_own_property(obj, name, FALSE, &prop_desc); + jsstr_release(name_str); + if(hres == DISP_E_UNKNOWNNAME) { + if(r) *r = jsval_undefined(); + return S_OK; + } + if(FAILED(hres)) + return hres; + + hres = create_object(ctx, NULL, &desc_obj); + if(FAILED(hres)) + return hres; + + hres = jsdisp_propput_name(desc_obj, valueW, prop_desc.value); + if(SUCCEEDED(hres)) + hres = jsdisp_propput_name(desc_obj, writableW, + jsval_bool(!!(prop_desc.flags & PROPF_WRITABLE))); + if(SUCCEEDED(hres)) + hres = jsdisp_propput_name(desc_obj, enumerableW, + jsval_bool(!!(prop_desc.flags & PROPF_ENUMERABLE))); + if(SUCCEEDED(hres)) + hres = jsdisp_propput_name(desc_obj, configurableW, + jsval_bool(!!(prop_desc.flags & PROPF_CONFIGURABLE))); + + release_property_descriptor(&prop_desc); + if(SUCCEEDED(hres) && r) + *r = jsval_obj(desc_obj); + else + jsdisp_release(desc_obj); + return hres; +} + +static const builtin_prop_t ObjectConstr_props[] = { + {getOwnPropertyDescriptorW, Object_getOwnPropertyDescriptor, PROPF_ES5|PROPF_METHOD|2} +}; + +static const builtin_info_t ObjectConstr_info = { + JSCLASS_FUNCTION, + DEFAULT_FUNCTION_VALUE, + sizeof(ObjectConstr_props)/sizeof(*ObjectConstr_props), + ObjectConstr_props, + NULL, + NULL +}; + static HRESULT ObjectConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) { @@ -303,7 +384,7 @@ HRESULT create_object_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdi { static const WCHAR ObjectW[] = {'O','b','j','e','c','t',0}; - return create_builtin_constructor(ctx, ObjectConstr_value, ObjectW, NULL, PROPF_CONSTR, + return create_builtin_constructor(ctx, ObjectConstr_value, ObjectW, &ObjectConstr_info, PROPF_CONSTR, object_prototype, ret); } diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 3fbb2fb..1525b09 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -140,6 +140,10 @@ function test_javascript() { test_exposed("toISOString", Date.prototype, v >= 9); test_exposed("isArray", Array, v >= 9); test_exposed("indexOf", Array.prototype, v >= 9); + /* FIXME: IE8 implements weird semi-functional property descriptors. */ + if(v != 8) { + test_exposed("getOwnPropertyDescriptor", Object, v >= 8); + } test_parses("if(false) { o.default; }", v >= 9); test_parses("if(false) { o.with; }", v >= 9); diff --git a/dlls/mshtml/tests/es5.js b/dlls/mshtml/tests/es5.js index d539557..efdfb0a 100644 --- a/dlls/mshtml/tests/es5.js +++ b/dlls/mshtml/tests/es5.js @@ -28,8 +28,6 @@ function test_date_now() { } function test_toISOString() { - var s; - function expect(date, expected) { var s = date.toISOString(); ok(s === expected, "toISOString returned " + s + " expected " + expected); @@ -53,8 +51,6 @@ function test_toISOString() { expect(new Date(-6216721920000100), "-195031-12-03T23:59:59.900Z"); expect(new Date(1092830912830100), "+036600-06-07T22:27:10.100Z"); - trace("" + 0xdeadbeef); - expect_exception(function() { new Date(NaN).toISOString(); }); expect_exception(function() { new Date(31494784780800001).toISOString(); }); @@ -147,10 +143,47 @@ function test_identifier_keywords() { next_test(); } +function test_own_data_prop_desc(obj, prop, expected_writable, expected_enumerable, + expected_configurable) { + var desc = Object.getOwnPropertyDescriptor(obj, prop); + ok("value" in desc, "value is not in desc"); + ok(desc.value === obj[prop], "desc.value = " + desc.value + " expected " + obj[prop]); + ok(desc.writable === expected_writable, "desc(" + prop + ").writable = " + desc.writable + + " expected " + expected_writable); + ok(desc.enumerable === expected_enumerable, "desc.enumerable = " + desc.enumerable + + " expected " + expected_enumerable); + ok(desc.configurable === expected_configurable, "desc.configurable = " + desc.configurable + + " expected " + expected_configurable); +} + +function test_getOwnPropertyDescriptor() { + var obj; + + obj = { test: 1 }; + test_own_data_prop_desc(obj, "test", true, true, true); + + test_own_data_prop_desc(Object, "getOwnPropertyDescriptor", true, false, true); + test_own_data_prop_desc(Math, "PI", false, false, false); + + var obj = new String(); + ok(Object.getOwnPropertyDescriptor(obj, "slice") === undefined, + "getOwnPropertyDescriptor(slice) did not return undefined"); + test_own_data_prop_desc(String.prototype, "slice", true, false, true); + + obj = new Array(); + test_own_data_prop_desc(obj, "length", true, false, false); + + obj = /test/; + test_own_data_prop_desc(obj, "lastIndex", true, false, false); + + next_test(); +} + var tests = [ test_date_now, test_toISOString, test_indexOf, test_isArray, - test_identifier_keywords + test_identifier_keywords, + test_getOwnPropertyDescriptor ];
1
0
0
0
Daniel Lehman : advapi32/tests: Free subkey.
by Alexandre Julliard
10 May '18
10 May '18
Module: wine Branch: master Commit: 54bcff15ef66fc02ec44f567674da7ada0a031df URL:
https://source.winehq.org/git/wine.git/?a=commit;h=54bcff15ef66fc02ec44f567…
Author: Daniel Lehman <dlehman(a)esri.com> Date: Thu May 3 11:59:34 2018 -0700 advapi32/tests: Free subkey. Signed-off-by: Daniel Lehman <dlehman(a)esri.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/tests/registry.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index d600163..17b83cb 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -3567,6 +3567,7 @@ static void test_RegNotifyChangeKeyValue(void) ok(dwret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", dwret); RegDeleteKeyA(key, "SubKey"); + RegCloseKey(subkey); RegCloseKey(key); /* test different thread without REG_NOTIFY_THREAD_AGNOSTIC */ @@ -3608,6 +3609,7 @@ static void test_RegNotifyChangeKeyValue(void) RegDeleteKeyA(key, "SubKey"); RegDeleteKeyA(key, ""); + RegCloseKey(subkey); RegCloseKey(key); CloseHandle(event); }
1
0
0
0
Hans Leidekker : hnetcfg/tests: Ignore case when comparing filenames.
by Alexandre Julliard
10 May '18
10 May '18
Module: wine Branch: master Commit: 8e29f491c4ff92d18c60715f7013ae698c802e29 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8e29f491c4ff92d18c60715f…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu May 10 14:56:00 2018 +0200 hnetcfg/tests: Ignore case when comparing filenames. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/hnetcfg/tests/policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/hnetcfg/tests/policy.c b/dlls/hnetcfg/tests/policy.c index 4d70818..4ee19d8 100644 --- a/dlls/hnetcfg/tests/policy.c +++ b/dlls/hnetcfg/tests/policy.c @@ -141,7 +141,7 @@ static void test_NetFwAuthorizedApplication(void) hr = INetFwAuthorizedApplication_get_ProcessImageFileName(app, &bstr); ok(hr == S_OK, "got: %08x\n", hr); - ok(!lstrcmpW(bstr,image), "got: %s\n", wine_dbgstr_w(bstr)); + ok(!lstrcmpiW(bstr,image), "got: %s\n", wine_dbgstr_w(bstr)); SysFreeString( bstr ); SysFreeString( image );
1
0
0
0
Owen Rudge : wsdapi/tests: Add initial test for receiving probe messages.
by Alexandre Julliard
10 May '18
10 May '18
Module: wine Branch: master Commit: a055b68fcfa866b33d5f9689fefceaf7731fddad URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a055b68fcfa866b33d5f9689…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Wed May 9 23:35:53 2018 +0100 wsdapi/tests: Add initial test for receiving probe messages. Signed-off-by: Owen Rudge <orudge(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wsdapi/tests/discovery.c | 99 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/dlls/wsdapi/tests/discovery.c b/dlls/wsdapi/tests/discovery.c index 7440cfd..ae2fa39 100644 --- a/dlls/wsdapi/tests/discovery.c +++ b/dlls/wsdapi/tests/discovery.c @@ -41,6 +41,17 @@ static const char *publisherId = "urn:uuid:3AE5617D-790F-408A-9374-359A77F924A3"; static const char *sequenceId = "urn:uuid:b14de351-72fc-4453-96f9-e58b0c9faf38"; +static const char testProbeMessage[] = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + "<soap:Envelope xmlns:soap=\"
http://www.w3.org/2003/05/soap-envelope\
" " + "xmlns:wsa=\"
http://schemas.xmlsoap.org/ws/2004/08/addressing\
" " + "xmlns:wsd=\"
http://schemas.xmlsoap.org/ws/2005/04/discovery\
" " + "xmlns:grog=\"
http://more.tests/\
"><soap:Header><wsa:To>urn:schemas-xmlsoap-org:ws:2005:04:discovery</wsa:To>" + "<wsa:Action>
http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe
</wsa:Action>" + "<wsa:MessageID>urn:uuid:aa3eb169-9440-4eb7-9090-88402664cc6a</wsa:MessageID></soap:Header>" + "<soap:Body><wsd:Probe><wsd:Types>grog:Cider</wsd:Types></wsd:Probe></soap:Body></soap:Envelope>"; + +static HANDLE probe_event = NULL; + #define MAX_CACHED_MESSAGES 5 #define MAX_LISTENING_THREADS 20 @@ -313,6 +324,71 @@ cleanup: return ret; } +static BOOL send_udp_multicast_of_type(const char *data, int length, ULONG family) +{ + IP_ADAPTER_ADDRESSES *adapter_addresses = NULL, *adapter_addr; + static const struct in6_addr i_addr_zero; + struct addrinfo *multi_address; + ULONG bufferSize = 0; + LPSOCKADDR sockaddr; + BOOL ret = FALSE; + const char ttl = 8; + ULONG retval; + SOCKET s; + + /* Resolve the multicast address */ + if (family == AF_INET6) + multi_address = resolve_address(SEND_ADDRESS_IPV6, SEND_PORT, AF_INET6, SOCK_DGRAM, IPPROTO_UDP); + else + multi_address = resolve_address(SEND_ADDRESS_IPV4, SEND_PORT, AF_INET, SOCK_DGRAM, IPPROTO_UDP); + + if (multi_address == NULL) + return FALSE; + + /* Get size of buffer for adapters */ + retval = GetAdaptersAddresses(family, 0, NULL, NULL, &bufferSize); + if (retval != ERROR_BUFFER_OVERFLOW) goto cleanup; + + adapter_addresses = (IP_ADAPTER_ADDRESSES *) heap_alloc(bufferSize); + if (adapter_addresses == NULL) goto cleanup; + + /* Get list of adapters */ + retval = GetAdaptersAddresses(family, 0, NULL, adapter_addresses, &bufferSize); + if (retval != ERROR_SUCCESS) goto cleanup; + + for (adapter_addr = adapter_addresses; adapter_addr != NULL; adapter_addr = adapter_addr->Next) + { + if (adapter_addr->FirstUnicastAddress == NULL) continue; + + sockaddr = adapter_addr->FirstUnicastAddress->Address.lpSockaddr; + + /* Create a socket and bind to the adapter address */ + s = socket(family, SOCK_DGRAM, IPPROTO_UDP); + if (s == INVALID_SOCKET) continue; + + if (bind(s, sockaddr, adapter_addr->FirstUnicastAddress->Address.iSockaddrLength) == SOCKET_ERROR) + { + closesocket(s); + continue; + } + + /* Set the multicast interface and TTL value */ + setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, (char *) &i_addr_zero, + (family == AF_INET6) ? sizeof(struct in6_addr) : sizeof(struct in_addr)); + setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl)); + + sendto(s, data, length, 0, (SOCKADDR *) multi_address->ai_addr, multi_address->ai_addrlen); + closesocket(s); + } + + ret = TRUE; + +cleanup: + freeaddrinfo(multi_address); + heap_free(adapter_addresses); + return ret; +} + typedef struct IWSDiscoveryPublisherNotifyImpl { IWSDiscoveryPublisherNotify IWSDiscoveryPublisherNotify_iface; LONG ref; @@ -375,6 +451,23 @@ static ULONG WINAPI IWSDiscoveryPublisherNotifyImpl_Release(IWSDiscoveryPublishe static HRESULT WINAPI IWSDiscoveryPublisherNotifyImpl_ProbeHandler(IWSDiscoveryPublisherNotify *This, const WSD_SOAP_MESSAGE *pSoap, IWSDMessageParameters *pMessageParameters) { trace("IWSDiscoveryPublisherNotifyImpl_ProbeHandler called (%p, %p, %p)\n", This, pSoap, pMessageParameters); + + if (probe_event == NULL) + { + /* We may have received an unrelated probe on the network */ + return S_OK; + } + + ok(pSoap != NULL, "pSoap == NULL\n"); + ok(pMessageParameters != NULL, "pMessageParameters == NULL\n"); + + if (pSoap != NULL) + { + ok(pSoap->Body != NULL, "pSoap->Body == NULL\n"); + ok(pSoap->Header.To != NULL, "pSoap->Header.To == NULL\n"); + } + + SetEvent(probe_event); return S_OK; } @@ -723,6 +816,12 @@ after_publish_test: heap_free(publisherIdW); heap_free(sequenceIdW); + /* Test the receiving of a probe message */ + probe_event = CreateEventW(NULL, TRUE, FALSE, NULL); + ok(send_udp_multicast_of_type(testProbeMessage, sizeof(testProbeMessage) - 1, AF_INET) == TRUE, "Sending Probe message failed\n"); + todo_wine ok(WaitForSingleObject(probe_event, 2000) == WAIT_OBJECT_0, "Probe message not received\n"); + CloseHandle(probe_event); + ref = IWSDiscoveryPublisher_Release(publisher); ok(ref == 0, "IWSDiscoveryPublisher_Release() has %d references, should have 0\n", ref);
1
0
0
0
Owen Rudge : include: Add WSD_PROBE structure to wsdtypes.h.
by Alexandre Julliard
10 May '18
10 May '18
Module: wine Branch: master Commit: 267af935df4f224ecdedd98d833d4c53c90bdc7c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=267af935df4f224ecdedd98d…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Wed May 9 23:31:41 2018 +0100 include: Add WSD_PROBE structure to wsdtypes.h. Signed-off-by: Owen Rudge <orudge(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/wsdtypes.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/wsdtypes.h b/include/wsdtypes.h index 387b6c3..f2a91c3 100644 --- a/include/wsdtypes.h +++ b/include/wsdtypes.h @@ -30,6 +30,8 @@ typedef struct _WSD_REFERENCE_PARAMETERS WSD_REFERENCE_PARAMETERS; typedef struct _WSD_REFERENCE_PROPERTIES WSD_REFERENCE_PROPERTIES; typedef struct _WSD_ENDPOINT_REFERENCE WSD_ENDPOINT_REFERENCE; typedef struct _WSD_URI_LIST WSD_URI_LIST; +typedef struct _WSD_PROBE WSD_PROBE; +typedef struct _WSD_SCOPES WSD_SCOPES; struct _WSD_APP_SEQUENCE { @@ -96,4 +98,17 @@ struct _WSD_SOAP_MESSAGE WSDXML_TYPE *BodyType; }; +struct _WSD_PROBE +{ + WSD_NAME_LIST *Types; + WSD_SCOPES *Scopes; + WSDXML_ELEMENT *Any; +}; + +struct _WSD_SCOPES +{ + const WCHAR *MatchBy; + WSD_URI_LIST *Scopes; +}; + #endif
1
0
0
0
Alexandre Julliard : ws2_32: Add fallback data for getprotobyname/number.
by Alexandre Julliard
10 May '18
10 May '18
Module: wine Branch: master Commit: 5dd1bad730da4a50a6706e31053e02137a64250d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5dd1bad730da4a50a6706e31…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 10 10:02:19 2018 +0200 ws2_32: Add fallback data for getprotobyname/number. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ws2_32/socket.c | 128 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 97 insertions(+), 31 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 25ec72a..387ec54 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -635,7 +635,7 @@ static FARPROC blocking_hook = (FARPROC)WSA_DefaultBlockingHook; /* function prototypes */ static struct WS_hostent *WS_create_he(char *name, int aliases, int aliases_size, int addresses, int address_length); static struct WS_hostent *WS_dup_he(const struct hostent* p_he); -static struct WS_protoent *WS_dup_pe(const struct protoent* p_pe); +static struct WS_protoent *WS_create_pe( const char *name, char **aliases, int prot ); static struct WS_servent *WS_dup_se(const struct servent* p_se); static int ws_protocol_info(SOCKET s, int unicode, WSAPROTOCOL_INFOW *buffer, int *size); @@ -6406,6 +6406,62 @@ struct WS_hostent* WINAPI WS_gethostbyname(const char* name) } +static const struct { int prot; const char *names[3]; } protocols[] = +{ + { 0, { "ip", "IP" }}, + { 1, { "icmp", "ICMP" }}, + { 2, { "igmp", "IGMP" }}, + { 3, { "ggp", "GGP" }}, + { 6, { "tcp", "TCP" }}, + { 8, { "egp", "EGP" }}, + { 9, { "igp", "IGP" }}, + { 12, { "pup", "PUP" }}, + { 17, { "udp", "UDP" }}, + { 20, { "hmp", "HMP" }}, + { 22, { "xns-idp", "XNS-IDP" }}, + { 27, { "rdp", "RDP" }}, + { 29, { "iso-tp4", "ISO-TP4" }}, + { 33, { "dccp", "DCCP" }}, + { 36, { "xtp", "XTP" }}, + { 37, { "ddp", "DDP" }}, + { 38, { "idpr-cmtp", "IDPR-CMTP" }}, + { 41, { "ipv6", "IPv6" }}, + { 43, { "ipv6-route", "IPv6-Route" }}, + { 44, { "ipv6-frag", "IPv6-Frag" }}, + { 45, { "idrp", "IDRP" }}, + { 46, { "rsvp", "RSVP" }}, + { 47, { "gre", "GRE" }}, + { 50, { "esp", "ESP" }}, + { 51, { "ah", "AH" }}, + { 57, { "skip", "SKIP" }}, + { 58, { "ipv6-icmp", "IPv6-ICMP" }}, + { 59, { "ipv6-nonxt", "IPv6-NoNxt" }}, + { 60, { "ipv6-opts", "IPv6-Opts" }}, + { 66, { "rvd", "RVD" }}, + { 73, { "rspf", "RSPF" }}, + { 81, { "vmtp", "VMTP" }}, + { 88, { "eigrp", "EIGRP" }}, + { 89, { "ospf", "OSPFIGP" }}, + { 93, { "ax.25", "AX.25" }}, + { 94, { "ipip", "IPIP" }}, + { 97, { "etherip", "ETHERIP" }}, + { 98, { "encap", "ENCAP" }}, + { 103, { "pim", "PIM" }}, + { 108, { "ipcomp", "IPCOMP" }}, + { 112, { "vrrp", "VRRP" }}, + { 115, { "l2tp", "L2TP" }}, + { 124, { "isis", "ISIS" }}, + { 132, { "sctp", "SCTP" }}, + { 133, { "fc", "FC" }}, + { 135, { "mobility-header", "Mobility-Header" }}, + { 136, { "udplite", "UDPLite" }}, + { 137, { "mpls-in-ip", "MPLS-in-IP" }}, + { 139, { "hip", "HIP" }}, + { 140, { "shim6", "Shim6" }}, + { 141, { "wesp", "WESP" }}, + { 142, { "rohc", "ROHC" }}, +}; + /*********************************************************************** * getprotobyname (WS2_32.53) */ @@ -6416,16 +6472,25 @@ struct WS_protoent* WINAPI WS_getprotobyname(const char* name) struct protoent* proto; EnterCriticalSection( &csWSgetXXXbyYYY ); if( (proto = getprotobyname(name)) != NULL ) + retval = WS_create_pe( proto->p_name, proto->p_aliases, proto->p_proto ); + LeaveCriticalSection( &csWSgetXXXbyYYY ); +#endif + if (!retval) { - retval = WS_dup_pe(proto); + unsigned int i; + for (i = 0; i < sizeof(protocols) / sizeof(protocols[0]); i++) + { + if (strcasecmp( protocols[i].names[0], name )) continue; + retval = WS_create_pe( protocols[i].names[0], (char **)protocols[i].names + 1, + protocols[i].prot ); + break; + } } - else { - MESSAGE("protocol %s not found; You might want to add " - "this to /etc/protocols\n", debugstr_a(name) ); + if (!retval) + { + WARN( "protocol %s not found\n", debugstr_a(name) ); SetLastError(WSANO_DATA); } - LeaveCriticalSection( &csWSgetXXXbyYYY ); -#endif TRACE( "%s ret %p\n", debugstr_a(name), retval ); return retval; } @@ -6441,16 +6506,25 @@ struct WS_protoent* WINAPI WS_getprotobynumber(int number) struct protoent* proto; EnterCriticalSection( &csWSgetXXXbyYYY ); if( (proto = getprotobynumber(number)) != NULL ) + retval = WS_create_pe( proto->p_name, proto->p_aliases, proto->p_proto ); + LeaveCriticalSection( &csWSgetXXXbyYYY ); +#endif + if (!retval) { - retval = WS_dup_pe(proto); + unsigned int i; + for (i = 0; i < sizeof(protocols) / sizeof(protocols[0]); i++) + { + if (protocols[i].prot != number) continue; + retval = WS_create_pe( protocols[i].names[0], (char **)protocols[i].names + 1, + protocols[i].prot ); + break; + } } - else { - MESSAGE("protocol number %d not found; You might want to add " - "this to /etc/protocols\n", number ); + if (!retval) + { + WARN( "protocol %d not found\n", number ); SetLastError(WSANO_DATA); } - LeaveCriticalSection( &csWSgetXXXbyYYY ); -#endif TRACE("%i ret %p\n", number, retval); return retval; } @@ -7793,26 +7867,18 @@ static struct WS_hostent *WS_dup_he(const struct hostent* p_he) /* ----- protoent */ -static struct WS_protoent *WS_dup_pe(const struct protoent* p_pe) +static struct WS_protoent *WS_create_pe( const char *name, char **aliases, int prot ) { - char *p; - struct WS_protoent *p_to; + struct WS_protoent *ret; + unsigned int size = sizeof(*ret) + strlen(name) + sizeof(char *) + list_size(aliases, 0); - int size = (sizeof(*p_pe) + - strlen(p_pe->p_name) + 1 + - list_size(p_pe->p_aliases, 0)); - - if (!(p_to = check_buffer_pe(size))) return NULL; - p_to->p_proto = p_pe->p_proto; - - p = (char *)(p_to + 1); - p_to->p_name = p; - strcpy(p, p_pe->p_name); - p += strlen(p) + 1; - - p_to->p_aliases = (char **)p; - list_dup(p_pe->p_aliases, p_to->p_aliases, 0); - return p_to; + if (!(ret = check_buffer_pe( size ))) return NULL; + ret->p_proto = prot; + ret->p_name = (char *)(ret + 1); + strcpy( ret->p_name, name ); + ret->p_aliases = (char **)ret->p_name + strlen(name) / sizeof(char *) + 1; + list_dup( aliases, ret->p_aliases, 0 ); + return ret; } /* ----- servent */
1
0
0
0
Michael Müller : ext-ms-win-uxtheme-themes-l1-1-0: Add dll.
by Alexandre Julliard
10 May '18
10 May '18
Module: wine Branch: master Commit: 855ec1429632b4fce4417237d77acdfb72310dca URL:
https://source.winehq.org/git/wine.git/?a=commit;h=855ec1429632b4fce4417237…
Author: Michael Müller <michael(a)fds-team.de> Date: Thu May 10 02:05:43 2018 +0000 ext-ms-win-uxtheme-themes-l1-1-0: Add dll. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 2 ++ configure.ac | 1 + dlls/ext-ms-win-uxtheme-themes-l1-1-0/Makefile.in | 1 + .../ext-ms-win-uxtheme-themes-l1-1-0.spec | 24 ++++++++++++++++++++++ tools/make_specfiles | 4 ++++ 5 files changed, 32 insertions(+) diff --git a/configure b/configure index 9e38228..ed45350 100755 --- a/configure +++ b/configure @@ -1283,6 +1283,7 @@ enable_ext_ms_win_rtcore_ntuser_syscolors_l1_1_0 enable_ext_ms_win_rtcore_ntuser_sysparams_l1_1_0 enable_ext_ms_win_security_credui_l1_1_0 enable_ext_ms_win_security_cryptui_l1_1_0 +enable_ext_ms_win_uxtheme_themes_l1_1_0 enable_faultrep enable_fltlib enable_fltmgr_sys @@ -18690,6 +18691,7 @@ wine_fn_config_makefile dlls/ext-ms-win-rtcore-ntuser-syscolors-l1-1-0 enable_ex wine_fn_config_makefile dlls/ext-ms-win-rtcore-ntuser-sysparams-l1-1-0 enable_ext_ms_win_rtcore_ntuser_sysparams_l1_1_0 wine_fn_config_makefile dlls/ext-ms-win-security-credui-l1-1-0 enable_ext_ms_win_security_credui_l1_1_0 wine_fn_config_makefile dlls/ext-ms-win-security-cryptui-l1-1-0 enable_ext_ms_win_security_cryptui_l1_1_0 +wine_fn_config_makefile dlls/ext-ms-win-uxtheme-themes-l1-1-0 enable_ext_ms_win_uxtheme_themes_l1_1_0 wine_fn_config_makefile dlls/faultrep enable_faultrep wine_fn_config_makefile dlls/faultrep/tests enable_tests wine_fn_config_makefile dlls/fltlib enable_fltlib diff --git a/configure.ac b/configure.ac index 4ea26b3..f306078 100644 --- a/configure.ac +++ b/configure.ac @@ -3288,6 +3288,7 @@ WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-rtcore-ntuser-syscolors-l1-1-0) WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-rtcore-ntuser-sysparams-l1-1-0) WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-security-credui-l1-1-0) WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-security-cryptui-l1-1-0) +WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-uxtheme-themes-l1-1-0) WINE_CONFIG_MAKEFILE(dlls/faultrep) WINE_CONFIG_MAKEFILE(dlls/faultrep/tests) WINE_CONFIG_MAKEFILE(dlls/fltlib) diff --git a/dlls/ext-ms-win-uxtheme-themes-l1-1-0/Makefile.in b/dlls/ext-ms-win-uxtheme-themes-l1-1-0/Makefile.in new file mode 100644 index 0000000..576b6f6 --- /dev/null +++ b/dlls/ext-ms-win-uxtheme-themes-l1-1-0/Makefile.in @@ -0,0 +1 @@ +MODULE = ext-ms-win-uxtheme-themes-l1-1-0.dll diff --git a/dlls/ext-ms-win-uxtheme-themes-l1-1-0/ext-ms-win-uxtheme-themes-l1-1-0.spec b/dlls/ext-ms-win-uxtheme-themes-l1-1-0/ext-ms-win-uxtheme-themes-l1-1-0.spec new file mode 100644 index 0000000..0a96983 --- /dev/null +++ b/dlls/ext-ms-win-uxtheme-themes-l1-1-0/ext-ms-win-uxtheme-themes-l1-1-0.spec @@ -0,0 +1,24 @@ +@ stdcall CloseThemeData(ptr) uxtheme.CloseThemeData +@ stdcall DrawThemeBackground(ptr ptr long long ptr ptr) uxtheme.DrawThemeBackground +@ stub GetColorFromPreference +@ stub GetImmersiveColorFromColorSetEx +@ stub GetImmersiveUserColorSetPreference +@ stub GetThemeAnimationProperty +@ stub GetThemeAnimationTransform +@ stdcall GetThemeBackgroundExtent(ptr ptr long long ptr ptr) uxtheme.GetThemeBackgroundExtent +@ stub GetThemeBitmap +@ stdcall GetThemeColor(ptr long long long ptr) uxtheme.GetThemeColor +@ stdcall GetThemeEnumValue(ptr long long long ptr) uxtheme.GetThemeEnumValue +@ stdcall GetThemeFont(ptr ptr long long long ptr) uxtheme.GetThemeFont +@ stdcall GetThemeInt(ptr long long long ptr) uxtheme.GetThemeInt +@ stdcall GetThemeMargins(ptr ptr long long long ptr ptr) uxtheme.GetThemeMargins +@ stdcall GetThemePartSize(ptr ptr long long ptr long ptr) uxtheme.GetThemePartSize +@ stdcall GetThemePosition(ptr long long long ptr) uxtheme.GetThemePosition +@ stub GetThemeTimingFunction +@ stub GetUserColorPreference +@ stdcall IsAppThemed() uxtheme.IsAppThemed +@ stdcall IsThemeActive() uxtheme.IsThemeActive +@ stdcall IsThemePartDefined(ptr long long) uxtheme.IsThemePartDefined +@ stdcall OpenThemeData(ptr wstr) uxtheme.OpenThemeData +@ stdcall OpenThemeDataEx(ptr wstr long) uxtheme.OpenThemeDataEx +@ stdcall SetWindowTheme(ptr wstr wstr) uxtheme.SetWindowTheme diff --git a/tools/make_specfiles b/tools/make_specfiles index 6fe79f6..4faf665 100755 --- a/tools/make_specfiles +++ b/tools/make_specfiles @@ -443,6 +443,10 @@ my @dll_groups = "api-ms-win-core-winrt-string-l1-1-0", ], [ + "uxtheme", + "ext-ms-win-uxtheme-themes-l1-1-0", + ], + [ "bthprops.cpl", "irprops.cpl", ],
1
0
0
0
Nikolay Sivov : po: Update Russian translation.
by Alexandre Julliard
10 May '18
10 May '18
Module: wine Branch: master Commit: 9dadf13c4a9487037c7fbecca0a4071ea49fc397 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9dadf13c4a9487037c7fbecc…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu May 10 08:14:20 2018 +0300 po: Update Russian translation. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- po/ru.po | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/po/ru.po b/po/ru.po index ac652df..146b8dd 100644 --- a/po/ru.po +++ b/po/ru.po @@ -5,14 +5,14 @@ msgstr "" "Project-Id-Version: Wine\n" "Report-Msgid-Bugs-To:
https://bugs.winehq.org\n
" "POT-Creation-Date: N/A\n" -"PO-Revision-Date: 2018-04-10 10:53+0300\n" +"PO-Revision-Date: 2018-05-10 08:12+0300\n" "Last-Translator: Nikolay Sivov <nsivov(a)codeweavers.com>\n" "Language-Team: Russian\n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.6\n" +"X-Generator: Poedit 2.0.7\n" #: appwiz.rc:58 msgid "Install/Uninstall" @@ -8498,10 +8498,8 @@ msgid "&Browse..." msgstr "&Обзор..." #: shell32.rc:355 shell32.rc:384 -#, fuzzy -#| msgid "File type" msgid "File type:" -msgstr "Тип файла" +msgstr "Тип файла:" #: shell32.rc:359 shell32.rc:392 urlmon.rc:37 explorer.rc:32 msgid "Location:" @@ -8512,16 +8510,12 @@ msgid "Size:" msgstr "Размер:" #: shell32.rc:365 shell32.rc:398 -#, fuzzy -#| msgid "Creation date" msgid "Creation date:" -msgstr "Дата создания" +msgstr "Дата создания:" #: shell32.rc:369 shell32.rc:406 -#, fuzzy -#| msgid "&Attributes:" msgid "Attributes:" -msgstr "&Свойства:" +msgstr "Атрибуты:" #: shell32.rc:371 shell32.rc:408 winefile.rc:174 msgid "H&idden" @@ -8532,28 +8526,20 @@ msgid "&Archive" msgstr "&Архивный" #: shell32.rc:386 -#, fuzzy -#| msgid "Open:" msgid "Open with:" -msgstr "Открыть:" +msgstr "Открывать в:" #: shell32.rc:389 -#, fuzzy -#| msgid "Change &Icon..." msgid "&Change..." -msgstr "Изменить &значок..." +msgstr "&Изменить..." #: shell32.rc:400 -#, fuzzy -#| msgid "Modified" msgid "Last modified:" -msgstr "Изменён" +msgstr "Изменён:" #: shell32.rc:402 -#, fuzzy -#| msgid "Last Change:" msgid "Last accessed:" -msgstr "Последнее изменение:" +msgstr "Открыт:" #: shell32.rc:138 shell32.rc:142 winefile.rc:108 msgid "Size"
1
0
0
0
Zebediah Figura : mp3dmod: Link to libmpg123.
by Alexandre Julliard
10 May '18
10 May '18
Module: wine Branch: master Commit: 328937151e91367b44f084d341ef872013a3984d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=328937151e91367b44f084d3…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed May 9 17:31:34 2018 -0500 mp3dmod: Link to libmpg123. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 1 + configure.ac | 1 + dlls/mp3dmod/Makefile.in | 2 ++ dlls/mp3dmod/mp3dmod.c | 7 +++++++ 4 files changed, 11 insertions(+) diff --git a/configure b/configure index c56e341..9e38228 100755 --- a/configure +++ b/configure @@ -14236,6 +14236,7 @@ This is an error since --with-mpg123 was requested." "$LINENO" 5 ;; esac enable_l3codeca_acm=${enable_l3codeca_acm:-no} fi +test "x$ac_cv_lib_mpg123_mpg123_feed" = xyes || enable_mp3dmod=${enable_mp3dmod:-no} if test "$ac_cv_header_AL_al_h" = "yes" then diff --git a/configure.ac b/configure.ac index d705fd8..4ea26b3 100644 --- a/configure.ac +++ b/configure.ac @@ -1763,6 +1763,7 @@ fi WINE_NOTICE_WITH(mpg123,[test "x$ac_cv_lib_mpg123_mpg123_feed" != xyes -a x"$ac_cv_header_CoreAudio_CoreAudio_h" != xyes], [libmpg123 ${notice_platform}development files not found (or too old), mp3 codec won't be supported.], [enable_l3codeca_acm]) +test "x$ac_cv_lib_mpg123_mpg123_feed" = xyes || enable_mp3dmod=${enable_mp3dmod:-no} dnl **** Check for OpenAL 1.1 **** if test "$ac_cv_header_AL_al_h" = "yes" diff --git a/dlls/mp3dmod/Makefile.in b/dlls/mp3dmod/Makefile.in index d892751..5bcef48 100644 --- a/dlls/mp3dmod/Makefile.in +++ b/dlls/mp3dmod/Makefile.in @@ -1,5 +1,7 @@ MODULE = mp3dmod.dll IMPORTS = dmoguids uuid wmcodecdspuuid +EXTRAINCL = $(MPG123_CFLAGS) +EXTRALIBS = $(MPG123_LIBS) C_SRCS = \ mp3dmod.c diff --git a/dlls/mp3dmod/mp3dmod.c b/dlls/mp3dmod/mp3dmod.c index c6cb0ad..0f1f069 100644 --- a/dlls/mp3dmod/mp3dmod.c +++ b/dlls/mp3dmod/mp3dmod.c @@ -19,6 +19,7 @@ */ #include <stdarg.h> +#include <mpg123.h> #include "windef.h" #include "winbase.h" #define COBJMACROS @@ -35,6 +36,7 @@ static HINSTANCE mp3dmod_instance; struct mp3_decoder { IMediaObject IMediaObject_iface; LONG ref; + mpg123_handle *mh; }; static inline struct mp3_decoder *impl_from_IMediaObject(IMediaObject *iface) @@ -80,6 +82,7 @@ static ULONG WINAPI MediaObject_Release(IMediaObject *iface) if (!refcount) { + mpg123_delete(This->mh); heap_free(This); } return refcount; @@ -264,6 +267,7 @@ static const IMediaObjectVtbl IMediaObject_vtbl = { static HRESULT create_mp3_decoder(REFIID iid, void **obj) { struct mp3_decoder *This; + int err; if (!(This = heap_alloc(sizeof(*This)))) return E_OUTOFMEMORY; @@ -271,6 +275,9 @@ static HRESULT create_mp3_decoder(REFIID iid, void **obj) This->IMediaObject_iface.lpVtbl = &IMediaObject_vtbl; This->ref = 0; + mpg123_init(); + This->mh = mpg123_new(NULL, &err); + return IMediaObject_QueryInterface(&This->IMediaObject_iface, iid, obj); }
1
0
0
0
Zebediah Figura : mp3dmod: Add stub MP3 Decoder DMO.
by Alexandre Julliard
10 May '18
10 May '18
Module: wine Branch: master Commit: 0aff95bfa014d7b793f321255036f2bb8d5bc34a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0aff95bfa014d7b793f32125…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed May 9 17:31:33 2018 -0500 mp3dmod: Add stub MP3 Decoder DMO. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 2 + configure.ac | 1 + dlls/mp3dmod/Makefile.in | 8 + dlls/mp3dmod/mp3dmod.c | 382 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/mp3dmod/mp3dmod.idl | 27 ++++ dlls/mp3dmod/mp3dmod.spec | 5 + 6 files changed, 425 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=0aff95bfa014d7b793f3…
1
0
0
0
← Newer
1
...
53
54
55
56
57
58
59
...
72
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
Results per page:
10
25
50
100
200