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
October 2013
----- 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
757 discussions
Start a n
N
ew thread
Jacek Caban : crypt32: Added support for CERT_CLOSE_STORE_CHECK_FLAG flag in MemStore_release.
by Alexandre Julliard
14 Oct '13
14 Oct '13
Module: wine Branch: master Commit: be023607cc7297f03844c33449125b482e60436e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=be023607cc7297f03844c3344…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 14 14:45:53 2013 +0200 crypt32: Added support for CERT_CLOSE_STORE_CHECK_FLAG flag in MemStore_release. --- dlls/crypt32/store.c | 4 ++-- dlls/crypt32/tests/store.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index a584ec2..4de427c 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -296,13 +296,13 @@ static DWORD MemStore_release(WINECRYPT_CERTSTORE *cert_store, DWORD flags) WINE_MEMSTORE *store = (WINE_MEMSTORE*)cert_store; LONG ref; - if(flags) + if(flags & ~CERT_CLOSE_STORE_CHECK_FLAG) FIXME("Unimplemented flags %x\n", flags); ref = InterlockedDecrement(&store->hdr.ref); TRACE("(%p) ref=%d\n", store, ref); if(ref) - return ERROR_SUCCESS; + return (flags & CERT_CLOSE_STORE_CHECK_FLAG) ? CRYPT_E_PENDING_CLOSE : ERROR_SUCCESS; ContextList_Free(store->certs); ContextList_Free(store->crls); diff --git a/dlls/crypt32/tests/store.c b/dlls/crypt32/tests/store.c index 221dfd7..25dd5f6 100644 --- a/dlls/crypt32/tests/store.c +++ b/dlls/crypt32/tests/store.c @@ -2557,10 +2557,41 @@ static void testEmptyStore(void) CertCloseStore(store, 0); + res = CertCloseStore(cert->hCertStore, CERT_CLOSE_STORE_CHECK_FLAG); + ok(!res && GetLastError() == E_UNEXPECTED, "CertCloseStore returned: %x(%x)\n", res, GetLastError()); + + res = CertCloseStore(cert->hCertStore, 0); + ok(!res && GetLastError() == E_UNEXPECTED, "CertCloseStore returned: %x(%x)\n", res, GetLastError()); + CertFreeCertificateContext(cert2); CertFreeCertificateContext(cert); } +static void testCloseStore(void) +{ + HCERTSTORE store, store2; + BOOL res; + + store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); + ok(store != NULL, "CertOpenStore failed\n"); + + res = CertCloseStore(store, CERT_CLOSE_STORE_CHECK_FLAG); + ok(res, "CertCloseStore failed\n"); + + store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); + ok(store != NULL, "CertOpenStore failed\n"); + + store2 = CertDuplicateStore(store); + ok(store2 != NULL, "CertCloneStore failed\n"); + ok(store2 == store, "unexpected store2\n"); + + res = CertCloseStore(store, CERT_CLOSE_STORE_CHECK_FLAG); + ok(!res && GetLastError() == CRYPT_E_PENDING_CLOSE, "CertCloseStore failed\n"); + + res = CertCloseStore(store2, CERT_CLOSE_STORE_CHECK_FLAG); + ok(res, "CertCloseStore failed\n"); +} + static void test_I_UpdateStore(void) { HMODULE lib = GetModuleHandleA("crypt32"); @@ -2659,6 +2690,7 @@ START_TEST(store) testFileNameStore(); testMessageStore(); testSerializedStore(); + testCloseStore(); testCertOpenSystemStore(); testCertEnumSystemStore();
1
0
0
0
Jacek Caban : crypt32: Moved store release implementation to vtbl.
by Alexandre Julliard
14 Oct '13
14 Oct '13
Module: wine Branch: master Commit: 2256a728fec06bf1585fbf1e39da49cb6e4710e0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2256a728fec06bf1585fbf1e3…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 14 14:45:43 2013 +0200 crypt32: Moved store release implementation to vtbl. --- dlls/crypt32/collectionstore.c | 19 +++++++++++++------ dlls/crypt32/crypt32_private.h | 2 +- dlls/crypt32/provstore.c | 21 +++++++++++++++------ dlls/crypt32/store.c | 34 +++++++++++++++++++--------------- 4 files changed, 48 insertions(+), 28 deletions(-) diff --git a/dlls/crypt32/collectionstore.c b/dlls/crypt32/collectionstore.c index 2278c4d..b64f089 100644 --- a/dlls/crypt32/collectionstore.c +++ b/dlls/crypt32/collectionstore.c @@ -46,23 +46,30 @@ static void Collection_addref(WINECRYPT_CERTSTORE *store) TRACE("ref = %d\n", ref); } -static void Collection_closeStore(WINECRYPT_CERTSTORE *store, DWORD dwFlags) +static DWORD Collection_release(WINECRYPT_CERTSTORE *store, DWORD flags) { WINE_COLLECTIONSTORE *cs = (WINE_COLLECTIONSTORE*)store; WINE_STORE_LIST_ENTRY *entry, *next; + LONG ref; - TRACE("(%p, %08x)\n", store, dwFlags); + if(flags) + FIXME("Unimplemented flags %x\n", flags); - LIST_FOR_EACH_ENTRY_SAFE(entry, next, &cs->stores, WINE_STORE_LIST_ENTRY, - entry) + ref = InterlockedDecrement(&cs->hdr.ref); + TRACE("(%p) ref=%d\n", store, ref); + if(ref) + return ERROR_SUCCESS; + + LIST_FOR_EACH_ENTRY_SAFE(entry, next, &cs->stores, WINE_STORE_LIST_ENTRY, entry) { TRACE("closing %p\n", entry); - CertCloseStore(entry->store, dwFlags); + entry->store->vtbl->release(entry->store, flags); CryptMemFree(entry); } cs->cs.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&cs->cs); CRYPT_FreeStore(store); + return ERROR_SUCCESS; } static void *CRYPT_CollectionCreateContextFromChild(WINE_COLLECTIONSTORE *store, @@ -484,7 +491,7 @@ static BOOL Collection_control(WINECRYPT_CERTSTORE *cert_store, DWORD dwFlags, static const store_vtbl_t CollectionStoreVtbl = { Collection_addref, - Collection_closeStore, + Collection_release, Collection_control }; diff --git a/dlls/crypt32/crypt32_private.h b/dlls/crypt32/crypt32_private.h index c939c5d..235db90 100644 --- a/dlls/crypt32/crypt32_private.h +++ b/dlls/crypt32/crypt32_private.h @@ -247,7 +247,7 @@ typedef struct _CONTEXT_PROPERTY_LIST CONTEXT_PROPERTY_LIST; typedef struct { void (*addref)(struct WINE_CRYPTCERTSTORE*); - void (*closeStore)(struct WINE_CRYPTCERTSTORE*,DWORD); + DWORD (*release)(struct WINE_CRYPTCERTSTORE*,DWORD); BOOL (*control)(struct WINE_CRYPTCERTSTORE*,DWORD,DWORD,void const*); } store_vtbl_t; diff --git a/dlls/crypt32/provstore.c b/dlls/crypt32/provstore.c index 06cfbc8..52f6a0b 100644 --- a/dlls/crypt32/provstore.c +++ b/dlls/crypt32/provstore.c @@ -47,17 +47,26 @@ static void ProvStore_addref(WINECRYPT_CERTSTORE *store) TRACE("ref = %d\n", ref); } -static void ProvStore_closeStore(WINECRYPT_CERTSTORE *cert_store, DWORD dwFlags) +static DWORD ProvStore_release(WINECRYPT_CERTSTORE *cert_store, DWORD flags) { WINE_PROVIDERSTORE *store = (WINE_PROVIDERSTORE*)cert_store; + LONG ref; - TRACE("(%p, %08x)\n", store, dwFlags); + if(flags) + FIXME("Unimplemented flags %x\n", flags); + + ref = InterlockedDecrement(&store->hdr.ref); + TRACE("(%p) ref=%d\n", store, ref); + + if(ref) + return ERROR_SUCCESS; if (store->provCloseStore) - store->provCloseStore(store->hStoreProv, dwFlags); + store->provCloseStore(store->hStoreProv, flags); if (!(store->dwStoreProvFlags & CERT_STORE_PROV_EXTERNAL_FLAG)) - CertCloseStore(store->memStore, dwFlags); - CRYPT_FreeStore((WINECRYPT_CERTSTORE*)store); + store->memStore->vtbl->release(store->memStore, flags); + CRYPT_FreeStore(&store->hdr); + return ERROR_SUCCESS; } static BOOL CRYPT_ProvAddCert(WINECRYPT_CERTSTORE *store, void *cert, @@ -269,7 +278,7 @@ static BOOL ProvStore_control(WINECRYPT_CERTSTORE *cert_store, DWORD dwFlags, DW static const store_vtbl_t ProvStoreVtbl = { ProvStore_addref, - ProvStore_closeStore, + ProvStore_release, ProvStore_control }; diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index 9623094..a584ec2 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -108,6 +108,7 @@ void CRYPT_FreeStore(WINECRYPT_CERTSTORE *store) { if (store->properties) ContextPropertyList_Free(store->properties); + store->dwMagic = 0; CryptMemFree(store); } @@ -290,18 +291,24 @@ static void MemStore_addref(WINECRYPT_CERTSTORE *store) TRACE("ref = %d\n", ref); } -static void MemStore_closeStore(WINECRYPT_CERTSTORE *cert_store, DWORD dwFlags) +static DWORD MemStore_release(WINECRYPT_CERTSTORE *cert_store, DWORD flags) { WINE_MEMSTORE *store = (WINE_MEMSTORE*)cert_store; + LONG ref; - TRACE("(%p, %08x)\n", store, dwFlags); - if (dwFlags) - FIXME("Unimplemented flags: %08x\n", dwFlags); + if(flags) + FIXME("Unimplemented flags %x\n", flags); + + ref = InterlockedDecrement(&store->hdr.ref); + TRACE("(%p) ref=%d\n", store, ref); + if(ref) + return ERROR_SUCCESS; ContextList_Free(store->certs); ContextList_Free(store->crls); ContextList_Free(store->ctls); - CRYPT_FreeStore((WINECRYPT_CERTSTORE*)store); + CRYPT_FreeStore(&store->hdr); + return ERROR_SUCCESS; } static BOOL MemStore_control(WINECRYPT_CERTSTORE *store, DWORD dwFlags, @@ -313,7 +320,7 @@ static BOOL MemStore_control(WINECRYPT_CERTSTORE *store, DWORD dwFlags, static const store_vtbl_t MemStoreVtbl = { MemStore_addref, - MemStore_closeStore, + MemStore_release, MemStore_control }; @@ -1227,6 +1234,7 @@ HCERTSTORE WINAPI CertDuplicateStore(HCERTSTORE hCertStore) BOOL WINAPI CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags) { WINECRYPT_CERTSTORE *hcs = hCertStore; + DWORD res; TRACE("(%p, %08x)\n", hCertStore, dwFlags); @@ -1236,16 +1244,12 @@ BOOL WINAPI CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags) if ( hcs->dwMagic != WINE_CRYPTCERTSTORE_MAGIC ) return FALSE; - if (hcs->ref <= 0) - ERR("%p's ref count is %d\n", hcs, hcs->ref); - if (InterlockedDecrement(&hcs->ref) == 0) - { - TRACE("%p's ref count is 0, freeing\n", hcs); - hcs->dwMagic = 0; - hcs->vtbl->closeStore(hcs, dwFlags); + res = hcs->vtbl->release(hcs, dwFlags); + if (res != ERROR_SUCCESS) { + SetLastError(res); + return FALSE; } - else - TRACE("%p's ref count is %d\n", hcs, hcs->ref); + return TRUE; }
1
0
0
0
Jacek Caban : crypt32: Added addref to store vtbl and use it instead of directly accessing ref.
by Alexandre Julliard
14 Oct '13
14 Oct '13
Module: wine Branch: master Commit: b3b1135d8433e0fb2c580668fd09197e326adb4d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b3b1135d8433e0fb2c580668f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 14 14:45:28 2013 +0200 crypt32: Added addref to store vtbl and use it instead of directly accessing ref. --- dlls/crypt32/collectionstore.c | 7 +++++++ dlls/crypt32/crypt32_private.h | 1 + dlls/crypt32/provstore.c | 7 +++++++ dlls/crypt32/rootstore.c | 2 +- dlls/crypt32/store.c | 9 ++++++++- 5 files changed, 24 insertions(+), 2 deletions(-) diff --git a/dlls/crypt32/collectionstore.c b/dlls/crypt32/collectionstore.c index c60ca20..2278c4d 100644 --- a/dlls/crypt32/collectionstore.c +++ b/dlls/crypt32/collectionstore.c @@ -40,6 +40,12 @@ typedef struct _WINE_COLLECTIONSTORE struct list stores; } WINE_COLLECTIONSTORE; +static void Collection_addref(WINECRYPT_CERTSTORE *store) +{ + LONG ref = InterlockedIncrement(&store->ref); + TRACE("ref = %d\n", ref); +} + static void Collection_closeStore(WINECRYPT_CERTSTORE *store, DWORD dwFlags) { WINE_COLLECTIONSTORE *cs = (WINE_COLLECTIONSTORE*)store; @@ -477,6 +483,7 @@ static BOOL Collection_control(WINECRYPT_CERTSTORE *cert_store, DWORD dwFlags, } static const store_vtbl_t CollectionStoreVtbl = { + Collection_addref, Collection_closeStore, Collection_control }; diff --git a/dlls/crypt32/crypt32_private.h b/dlls/crypt32/crypt32_private.h index 3fa5d98..c939c5d 100644 --- a/dlls/crypt32/crypt32_private.h +++ b/dlls/crypt32/crypt32_private.h @@ -246,6 +246,7 @@ typedef struct _CONTEXT_PROPERTY_LIST CONTEXT_PROPERTY_LIST; */ typedef struct { + void (*addref)(struct WINE_CRYPTCERTSTORE*); void (*closeStore)(struct WINE_CRYPTCERTSTORE*,DWORD); BOOL (*control)(struct WINE_CRYPTCERTSTORE*,DWORD,DWORD,void const*); } store_vtbl_t; diff --git a/dlls/crypt32/provstore.c b/dlls/crypt32/provstore.c index 38f0eab..06cfbc8 100644 --- a/dlls/crypt32/provstore.c +++ b/dlls/crypt32/provstore.c @@ -41,6 +41,12 @@ typedef struct _WINE_PROVIDERSTORE PFN_CERT_STORE_PROV_CONTROL provControl; } WINE_PROVIDERSTORE; +static void ProvStore_addref(WINECRYPT_CERTSTORE *store) +{ + LONG ref = InterlockedIncrement(&store->ref); + TRACE("ref = %d\n", ref); +} + static void ProvStore_closeStore(WINECRYPT_CERTSTORE *cert_store, DWORD dwFlags) { WINE_PROVIDERSTORE *store = (WINE_PROVIDERSTORE*)cert_store; @@ -262,6 +268,7 @@ static BOOL ProvStore_control(WINECRYPT_CERTSTORE *cert_store, DWORD dwFlags, DW } static const store_vtbl_t ProvStoreVtbl = { + ProvStore_addref, ProvStore_closeStore, ProvStore_control }; diff --git a/dlls/crypt32/rootstore.c b/dlls/crypt32/rootstore.c index ef0a0f7..efe8340 100644 --- a/dlls/crypt32/rootstore.c +++ b/dlls/crypt32/rootstore.c @@ -832,7 +832,7 @@ WINECRYPT_CERTSTORE *CRYPT_RootOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags) if (CRYPT_rootStore != root) CertCloseStore(root, 0); } - CertDuplicateStore(CRYPT_rootStore); + CRYPT_rootStore->vtbl->addref(CRYPT_rootStore); return CRYPT_rootStore; } diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index 0042d92..9623094 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -284,6 +284,12 @@ static BOOL CRYPT_MemDeleteCtl(WINECRYPT_CERTSTORE *store, void *pCtlContext) return ret; } +static void MemStore_addref(WINECRYPT_CERTSTORE *store) +{ + LONG ref = InterlockedIncrement(&store->ref); + TRACE("ref = %d\n", ref); +} + static void MemStore_closeStore(WINECRYPT_CERTSTORE *cert_store, DWORD dwFlags) { WINE_MEMSTORE *store = (WINE_MEMSTORE*)cert_store; @@ -306,6 +312,7 @@ static BOOL MemStore_control(WINECRYPT_CERTSTORE *store, DWORD dwFlags, } static const store_vtbl_t MemStoreVtbl = { + MemStore_addref, MemStore_closeStore, MemStore_control }; @@ -1213,7 +1220,7 @@ HCERTSTORE WINAPI CertDuplicateStore(HCERTSTORE hCertStore) TRACE("(%p)\n", hCertStore); if (hcs && hcs->dwMagic == WINE_CRYPTCERTSTORE_MAGIC) - InterlockedIncrement(&hcs->ref); + hcs->vtbl->addref(hcs); return hCertStore; }
1
0
0
0
Alexandre Julliard : jscript: Use the official Windows constant for MAXLONGLONG.
by Alexandre Julliard
14 Oct '13
14 Oct '13
Module: wine Branch: master Commit: a804cc711b773234ce74c27ae4aab5e4614b38ab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a804cc711b773234ce74c27ae…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 14 15:14:16 2013 +0200 jscript: Use the official Windows constant for MAXLONGLONG. --- dlls/jscript/global.c | 6 ++---- dlls/jscript/lex.c | 6 ++---- include/winnt.h | 1 + 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/dlls/jscript/global.c b/dlls/jscript/global.c index 0c0aa29..64546bd 100644 --- a/dlls/jscript/global.c +++ b/dlls/jscript/global.c @@ -29,8 +29,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(jscript); -#define LONGLONG_MAX (((LONGLONG)0x7fffffff<<32)|0xffffffff) - static const WCHAR NaNW[] = {'N','a','N',0}; static const WCHAR InfinityW[] = {'I','n','f','i','n','i','t','y',0}; static const WCHAR ArrayW[] = {'A','r','r','a','y',0}; @@ -554,7 +552,7 @@ static HRESULT JSGlobal_parseFloat(script_ctx_t *ctx, vdisp_t *jsthis, WORD flag while(isdigitW(*str)) { hlp = d*10 + *(str++) - '0'; - if(d>LONGLONG_MAX/10 || hlp<0) { + if(d>MAXLONGLONG/10 || hlp<0) { exp++; break; } @@ -573,7 +571,7 @@ static HRESULT JSGlobal_parseFloat(script_ctx_t *ctx, vdisp_t *jsthis, WORD flag while(isdigitW(*str)) { hlp = d*10 + *(str++) - '0'; - if(d>LONGLONG_MAX/10 || hlp<0) + if(d>MAXLONGLONG/10 || hlp<0) break; d = hlp; diff --git a/dlls/jscript/lex.c b/dlls/jscript/lex.c index 54c8fcf..8b881f3 100644 --- a/dlls/jscript/lex.c +++ b/dlls/jscript/lex.c @@ -33,8 +33,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(jscript); -#define LONGLONG_MAX (((LONGLONG)0x7fffffff<<32)|0xffffffff) - static const WCHAR breakW[] = {'b','r','e','a','k',0}; static const WCHAR caseW[] = {'c','a','s','e',0}; static const WCHAR catchW[] = {'c','a','t','c','h',0}; @@ -397,7 +395,7 @@ static int parse_double_literal(parser_ctx_t *ctx, LONG int_part, literal_t **li d = int_part; while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) { hlp = d*10 + *(ctx->ptr++) - '0'; - if(d>LONGLONG_MAX/10 || hlp<0) { + if(d>MAXLONGLONG/10 || hlp<0) { exp++; break; } @@ -414,7 +412,7 @@ static int parse_double_literal(parser_ctx_t *ctx, LONG int_part, literal_t **li while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) { hlp = d*10 + *(ctx->ptr++) - '0'; - if(d>LONGLONG_MAX/10 || hlp<0) + if(d>MAXLONGLONG/10 || hlp<0) break; d = hlp; diff --git a/include/winnt.h b/include/winnt.h index 293e05d..3e19225 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -742,6 +742,7 @@ typedef struct _MEMORY_BASIC_INFORMATION #define MAXBYTE 0xff #define MAXWORD 0xffff #define MAXDWORD 0xffffffff +#define MAXLONGLONG (((LONGLONG)0x7fffffff << 32) | 0xffffffff) #define UNICODE_STRING_MAX_CHARS 32767
1
0
0
0
Alexandre Julliard : winex11: Add a helper function to return the primary monitor rectangle.
by Alexandre Julliard
14 Oct '13
14 Oct '13
Module: wine Branch: master Commit: 0f03f264b772e8638d4f1311a2cbdfc515b7faa5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0f03f264b772e8638d4f1311a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 14 14:59:01 2013 +0200 winex11: Add a helper function to return the primary monitor rectangle. --- dlls/winex11.drv/desktop.c | 26 +++++++++++++++++++------- dlls/winex11.drv/init.c | 24 ++++++++++++++++-------- dlls/winex11.drv/mouse.c | 2 +- dlls/winex11.drv/settings.c | 3 ++- dlls/winex11.drv/x11drv.h | 8 ++++---- dlls/winex11.drv/x11drv_main.c | 2 -- dlls/winex11.drv/xinerama.c | 11 +++++++---- 7 files changed, 49 insertions(+), 27 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=0f03f264b772e8638d4f1…
1
0
0
0
Alexandre Julliard : winex11: Add a helper function to return the virtual screen rectangle.
by Alexandre Julliard
14 Oct '13
14 Oct '13
Module: wine Branch: master Commit: 9f1f29cc911178f47ae64f5ba6c859578eea1a3c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9f1f29cc911178f47ae64f5ba…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 14 14:38:58 2013 +0200 winex11: Add a helper function to return the virtual screen rectangle. --- dlls/winex11.drv/desktop.c | 14 ++++++++------ dlls/winex11.drv/init.c | 14 ++++++++++---- dlls/winex11.drv/mouse.c | 23 ++++++++++++++--------- dlls/winex11.drv/window.c | 19 ++++++++++--------- dlls/winex11.drv/x11drv.h | 31 ++++++++++++++++--------------- dlls/winex11.drv/x11drv_main.c | 1 - dlls/winex11.drv/xinerama.c | 7 +++++++ 7 files changed, 65 insertions(+), 44 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9f1f29cc911178f47ae64…
1
0
0
0
Alexandre Julliard : winex11: Add helper functions for converting between root and virtual screen coords .
by Alexandre Julliard
14 Oct '13
14 Oct '13
Module: wine Branch: master Commit: 0b71e0bf120f85001d35fc884ddbb592372807da URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0b71e0bf120f85001d35fc884…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 14 14:20:08 2013 +0200 winex11: Add helper functions for converting between root and virtual screen coords. --- dlls/winex11.drv/desktop.c | 6 +- dlls/winex11.drv/event.c | 86 ++++++++++++++++++++---------------------- dlls/winex11.drv/mouse.c | 49 +++++++++++++----------- dlls/winex11.drv/window.c | 32 +++++++++------- dlls/winex11.drv/x11drv.h | 2 + dlls/winex11.drv/xdnd.c | 5 +-- dlls/winex11.drv/xinerama.c | 16 ++++++++ 7 files changed, 107 insertions(+), 89 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=0b71e0bf120f85001d35f…
1
0
0
0
Alexandre Julliard : makedep: Generate correct dependencies for testlist.c.
by Alexandre Julliard
14 Oct '13
14 Oct '13
Module: wine Branch: master Commit: bb45a93d7198ee91174761c4645da1af31341c3b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bb45a93d7198ee91174761c46…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 14 12:12:26 2013 +0200 makedep: Generate correct dependencies for testlist.c. --- Make.rules.in | 5 +-- tools/makedep.c | 86 ++++++++++++++++++++++++++++++++----------------------- 2 files changed, 51 insertions(+), 40 deletions(-) diff --git a/Make.rules.in b/Make.rules.in index d912bcd..30a72fa 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -4,7 +4,6 @@ # C_SRCS : C sources for the module # OBJC_SRCS : Objective-C sources for the module # RC_SRCS : resource source files -# EXTRA_SRCS : extra source files for make depend # EXTRA_OBJS : extra object files # IMPORTS : dlls to import # DELAYIMPORTS : dlls to import in delayed mode @@ -147,7 +146,7 @@ $(IMPORTLIB:%=lib%.cross.a): $(MAINSPEC) $(IMPLIB_SRCS:.c=.cross.o) DEPEND_SRCS = $(C_SRCS) $(OBJC_SRCS) $(RC_SRCS) $(MC_SRCS) \ $(IDL_H_SRCS) $(IDL_C_SRCS) $(IDL_I_SRCS) $(IDL_P_SRCS) $(IDL_S_SRCS) \ $(IDL_GEN_C_SRCS) $(IDL_R_SRCS:.idl=_r.res) $(IDL_TLB_SRCS) $(IDL_TLB_SRCS:.idl=.tlb) \ - $(BISON_SRCS) $(LEX_SRCS) $(EXTRA_SRCS) + $(BISON_SRCS) $(LEX_SRCS) $(EXTRA_OBJS) depend: dummy $(MAKEDEP) $(MAKEDEPFLAGS) -C$(srcdir) -S$(top_srcdir) -T$(top_builddir) $(EXTRAINCL) $(DEPEND_SRCS) @@ -171,8 +170,6 @@ $(WINETEST_RES): $(TESTMODULE_STRIPPED) testlist.c: Makefile.in $(MAKECTESTS) $(MAKECTESTS) -o $@ $(C_SRCS) -testlist.o testlist.cross.o: testlist.c $(top_srcdir)/include/wine/test.h - testclean:: $(RM) *.ok diff --git a/tools/makedep.c b/tools/makedep.c index 8c5dcd0..498a05d 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -810,11 +810,6 @@ static void parse_generated_idl( struct incl_file *source ) add_include( source, "wine/exception.h", 1 ); add_include( source, header, 0 ); } - else if (!strcmp( source->name, "dlldata.c" )) - { - add_include( source, "objbase.h", 1 ); - add_include( source, "rpcproxy.h", 1 ); - } free( header ); free( basename ); @@ -823,46 +818,68 @@ static void parse_generated_idl( struct incl_file *source ) /******************************************************************* * parse_file */ -static void parse_file( struct incl_file *pFile, int src ) +static void parse_file( struct incl_file *source, int src ) { FILE *file; /* special case for source files generated from idl */ - if (strendswith( pFile->name, "_c.c" ) || - strendswith( pFile->name, "_i.c" ) || - strendswith( pFile->name, "_p.c" ) || - strendswith( pFile->name, "_s.c" ) || - !strcmp( pFile->name, "dlldata.c" )) + if (strendswith( source->name, "_c.c" ) || + strendswith( source->name, "_i.c" ) || + strendswith( source->name, "_p.c" ) || + strendswith( source->name, "_s.c" )) + { + parse_generated_idl( source ); + return; + } + + if (!strcmp( source->name, "dlldata.o" )) + { + source->filename = xstrdup( "dlldata.c" ); + add_include( source, "objbase.h", 1 ); + add_include( source, "rpcproxy.h", 1 ); + return; + } + + if (!strcmp( source->name, "testlist.o" )) { - parse_generated_idl( pFile ); + source->filename = xstrdup( "testlist.c" ); + add_include( source, "wine/test.h", 1 ); + return; + } + + if (strendswith( source->name, ".o" )) + { + /* default to .c for unknown extra object files */ + source->filename = xstrdup( source->name ); + source->filename[strlen(source->filename) - 1] = 'c'; return; } /* don't try to open certain types of files */ - if (strendswith( pFile->name, ".tlb" ) || - strendswith( pFile->name, ".res" ) || - strendswith( pFile->name, ".x" )) + if (strendswith( source->name, ".tlb" ) || + strendswith( source->name, ".res" ) || + strendswith( source->name, ".x" )) { - pFile->filename = xstrdup( pFile->name ); + source->filename = xstrdup( source->name ); return; } - file = src ? open_src_file( pFile ) : open_include_file( pFile ); + file = src ? open_src_file( source ) : open_include_file( source ); if (!file) return; - input_file_name = pFile->filename; - - if (pFile->sourcename && strendswith( pFile->sourcename, ".idl" )) - parse_idl_file( pFile, file, 1 ); - else if (strendswith( pFile->filename, ".idl" )) - parse_idl_file( pFile, file, 0 ); - else if (strendswith( pFile->filename, ".c" ) || - strendswith( pFile->filename, ".m" ) || - strendswith( pFile->filename, ".h" ) || - strendswith( pFile->filename, ".l" ) || - strendswith( pFile->filename, ".y" )) - parse_c_file( pFile, file ); - else if (strendswith( pFile->filename, ".rc" )) - parse_rc_file( pFile, file ); + input_file_name = source->filename; + + if (source->sourcename && strendswith( source->sourcename, ".idl" )) + parse_idl_file( source, file, 1 ); + else if (strendswith( source->filename, ".idl" )) + parse_idl_file( source, file, 0 ); + else if (strendswith( source->filename, ".c" ) || + strendswith( source->filename, ".m" ) || + strendswith( source->filename, ".h" ) || + strendswith( source->filename, ".l" ) || + strendswith( source->filename, ".y" )) + parse_c_file( source, file ); + else if (strendswith( source->filename, ".rc" )) + parse_rc_file( source, file ); fclose(file); input_file_name = NULL; } @@ -1151,11 +1168,8 @@ int main( int argc, char *argv[] ) free( path ); } - for (i = 1; i < argc; i++) - { - add_src_file( argv[i] ); - if (strendswith( argv[i], "_p.c" )) add_src_file( "dlldata.c" ); - } + for (i = 1; i < argc; i++) add_src_file( argv[i] ); + LIST_FOR_EACH_ENTRY( pFile, &includes, struct incl_file, entry ) parse_file( pFile, 0 ); output_dependencies(); return 0;
1
0
0
0
Alexandre Julliard : makedep: Add more helpers for file output and error handling.
by Alexandre Julliard
14 Oct '13
14 Oct '13
Module: wine Branch: master Commit: c3aa49529587aac1cc7e7eeb367102db091905db URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c3aa49529587aac1cc7e7eeb3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 14 11:11:07 2013 +0200 makedep: Add more helpers for file output and error handling. --- tools/makedep.c | 286 +++++++++++++++++++++++++++++++------------------------ 1 files changed, 161 insertions(+), 125 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=c3aa49529587aac1cc7e7…
1
0
0
0
Alexandre Julliard : makedep: Remove some unnecessary typedefs.
by Alexandre Julliard
14 Oct '13
14 Oct '13
Module: wine Branch: master Commit: cf34a967ccad82a6bff8992840e5c032673a13d9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cf34a967ccad82a6bff899284…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 14 10:51:37 2013 +0200 makedep: Remove some unnecessary typedefs. --- tools/makedep.c | 88 +++++++++++++++++++++++++++--------------------------- 1 files changed, 44 insertions(+), 44 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=cf34a967ccad82a6bff89…
1
0
0
0
← Newer
1
...
44
45
46
47
48
49
50
...
76
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Results per page:
10
25
50
100
200