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
August 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
461 discussions
Start a n
N
ew thread
Alexandre Julliard : winex11: Use a InitOnce function to initialize GDI device parameters.
by Alexandre Julliard
29 Aug '13
29 Aug '13
Module: wine Branch: master Commit: cf380c9c67f677fb5d3b4005fb5007577a2f2cc7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cf380c9c67f677fb5d3b4005f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Aug 29 16:49:04 2013 +0200 winex11: Use a InitOnce function to initialize GDI device parameters. --- dlls/winex11.drv/init.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index 8f8ff09..6e6ed17 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -39,10 +39,11 @@ static int log_pixels_y; /* pixels per logical inch in y direction */ static int horz_size; /* horz. size of screen in millimeters */ static int vert_size; /* vert. size of screen in millimeters */ static int palette_size; -static int device_init_done; static Pixmap stock_bitmap_pixmap; /* phys bitmap for the default stock bitmap */ +static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT; + static const WCHAR dpi_key_name[] = {'S','o','f','t','w','a','r','e','\\','F','o','n','t','s','\0'}; static const WCHAR dpi_value_name[] = {'L','o','g','P','i','x','e','l','s','\0'}; @@ -79,10 +80,8 @@ static DWORD get_dpi( void ) * * Perform initializations needed upon creation of the first device. */ -static void device_init(void) +static BOOL WINAPI device_init( INIT_ONCE *once, void *param, void **context ) { - device_init_done = TRUE; - /* Initialize XRender */ xrender_funcs = X11DRV_XRender_Init(); @@ -97,6 +96,7 @@ static void device_init(void) log_pixels_x = log_pixels_y = get_dpi(); horz_size = MulDiv( screen_width, 254, log_pixels_x * 10 ); vert_size = MulDiv( screen_height, 254, log_pixels_y * 10 ); + return TRUE; } @@ -104,7 +104,7 @@ static X11DRV_PDEVICE *create_x11_physdev( Drawable drawable ) { X11DRV_PDEVICE *physDev; - if (!device_init_done) device_init(); + InitOnceExecuteOnce( &init_once, device_init, NULL, NULL ); if (!(physDev = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*physDev) ))) return NULL;
1
0
0
0
Alexandre Julliard : ntdll: Use a RunOnce function to initialize relay debugging options.
by Alexandre Julliard
29 Aug '13
29 Aug '13
Module: wine Branch: master Commit: 3d83da047a06a7a089acb50058255ecd026dd8f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3d83da047a06a7a089acb5005…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Aug 29 16:49:43 2013 +0200 ntdll: Use a RunOnce function to initialize relay debugging options. --- dlls/ntdll/relay.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/dlls/ntdll/relay.c b/dlls/ntdll/relay.c index b6790da..57ad2e1 100644 --- a/dlls/ntdll/relay.c +++ b/dlls/ntdll/relay.c @@ -81,7 +81,7 @@ static const WCHAR **debug_from_relay_includelist; static const WCHAR **debug_from_snoop_excludelist; static const WCHAR **debug_from_snoop_includelist; -static BOOL init_done; +static RTL_RUN_ONCE init_once = RTL_RUN_ONCE_INIT; /* compare an ASCII and a Unicode string without depending on the current codepage */ static inline int strcmpAW( const char *strA, const WCHAR *strW ) @@ -172,7 +172,7 @@ static const WCHAR **load_list( HKEY hkey, const WCHAR *value ) * * Build the relay include/exclude function lists. */ -static void init_debug_lists(void) +static DWORD WINAPI init_debug_lists( RTL_RUN_ONCE *once, void *param, void **context ) { OBJECT_ATTRIBUTES attr; UNICODE_STRING name; @@ -189,9 +189,6 @@ static void init_debug_lists(void) static const WCHAR SnoopFromIncludeW[] = {'S','n','o','o','p','F','r','o','m','I','n','c','l','u','d','e',0}; static const WCHAR SnoopFromExcludeW[] = {'S','n','o','o','p','F','r','o','m','E','x','c','l','u','d','e',0}; - if (init_done) return; - init_done = TRUE; - RtlOpenCurrentUser( KEY_ALL_ACCESS, &root ); attr.Length = sizeof(attr); attr.RootDirectory = root; @@ -204,7 +201,7 @@ static void init_debug_lists(void) /* @@ Wine registry key: HKCU\Software\Wine\Debug */ if (NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr )) hkey = 0; NtClose( root ); - if (!hkey) return; + if (!hkey) return TRUE; debug_relay_includelist = load_list( hkey, RelayIncludeW ); debug_relay_excludelist = load_list( hkey, RelayExcludeW ); @@ -216,6 +213,7 @@ static void init_debug_lists(void) debug_from_snoop_excludelist = load_list( hkey, SnoopFromExcludeW ); NtClose( hkey ); + return TRUE; } @@ -698,7 +696,7 @@ void RELAY_SetupDLL( HMODULE module ) struct relay_private_data *data; const WORD *ordptr; - if (!init_done) init_debug_lists(); + RtlRunOnceExecuteOnce( &init_once, init_debug_lists, NULL, NULL ); exports = RtlImageDirectoryEntryToData( module, TRUE, IMAGE_DIRECTORY_ENTRY_EXPORT, &size ); if (!exports) return; @@ -855,7 +853,7 @@ void SNOOP_SetupDLL(HMODULE hmod) ULONG size32; IMAGE_EXPORT_DIRECTORY *exports; - if (!init_done) init_debug_lists(); + RtlRunOnceExecuteOnce( &init_once, init_debug_lists, NULL, NULL ); exports = RtlImageDirectoryEntryToData( hmod, TRUE, IMAGE_DIRECTORY_ENTRY_EXPORT, &size32 ); if (!exports || !exports->NumberOfFunctions) return;
1
0
0
0
Alexandre Julliard : ntdll: Use a RunOnce function to initialize directory lookup options.
by Alexandre Julliard
29 Aug '13
29 Aug '13
Module: wine Branch: master Commit: d191d5bca01c8e517daf3f7c4019cce09ede62bb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d191d5bca01c8e517daf3f7c4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Aug 29 16:48:23 2013 +0200 ntdll: Use a RunOnce function to initialize directory lookup options. --- dlls/ntdll/directory.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index cf89879..f65cc9f 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -157,7 +157,8 @@ union file_directory_info FILE_ID_FULL_DIRECTORY_INFORMATION id_full; }; -static int show_dot_files = -1; +static BOOL show_dot_files; +static RTL_RUN_ONCE init_once = RTL_RUN_ONCE_INIT; /* at some point we may want to allow Winelib apps to set this */ static const int is_case_sensitive = FALSE; @@ -1036,7 +1037,7 @@ static BOOLEAN get_dir_case_sensitivity( const char *dir ) * * Initialize the show_dot_files options. */ -static void init_options(void) +static DWORD WINAPI init_options( RTL_RUN_ONCE *once, void *param, void **context ) { static const WCHAR WineW[] = {'S','o','f','t','w','a','r','e','\\','W','i','n','e',0}; static const WCHAR ShowDotFilesW[] = {'S','h','o','w','D','o','t','F','i','l','e','s',0}; @@ -1046,8 +1047,6 @@ static void init_options(void) OBJECT_ATTRIBUTES attr; UNICODE_STRING nameW; - show_dot_files = 0; - RtlOpenCurrentUser( KEY_ALL_ACCESS, &root ); attr.Length = sizeof(attr); attr.RootDirectory = root; @@ -1077,6 +1076,7 @@ static void init_options(void) #ifdef linux ignore_file( "/sys" ); #endif + return TRUE; } @@ -1089,7 +1089,8 @@ BOOL DIR_is_hidden_file( const UNICODE_STRING *name ) { WCHAR *p, *end; - if (show_dot_files == -1) init_options(); + RtlRunOnceExecuteOnce( &init_once, init_options, NULL, NULL ); + if (show_dot_files) return FALSE; end = p = name->Buffer + name->Length/sizeof(WCHAR); @@ -2053,9 +2054,9 @@ NTSTATUS WINAPI NtQueryDirectoryFile( HANDLE handle, HANDLE event, io->Information = 0; - RtlEnterCriticalSection( &dir_section ); + RtlRunOnceExecuteOnce( &init_once, init_options, NULL, NULL ); - if (show_dot_files == -1) init_options(); + RtlEnterCriticalSection( &dir_section ); cwd = open( ".", O_RDONLY ); if (fchdir( fd ) != -1)
1
0
0
0
Jacek Caban : guiddef.h: Better GUID declaration for widl.
by Alexandre Julliard
29 Aug '13
29 Aug '13
Module: wine Branch: master Commit: 21c395cbfac70fafb4cb54da0299efc52cf63868 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=21c395cbfac70fafb4cb54da0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Aug 29 15:09:40 2013 +0200 guiddef.h: Better GUID declaration for widl. --- include/guiddef.h | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/include/guiddef.h b/include/guiddef.h index b7de1b1..36c932c 100644 --- a/include/guiddef.h +++ b/include/guiddef.h @@ -18,6 +18,16 @@ #ifndef GUID_DEFINED #define GUID_DEFINED + +#ifdef __WIDL__ +typedef struct +{ + unsigned long Data1; + unsigned short Data2; + unsigned short Data3; + byte Data4[ 8 ]; +} GUID; +#else typedef struct _GUID { #ifdef _MSC_VER @@ -29,6 +39,7 @@ typedef struct _GUID unsigned short Data3; unsigned char Data4[ 8 ]; } GUID; +#endif /* Macros for __uuidof emulation */ #if defined(__cplusplus) && !defined(_MSC_VER)
1
0
0
0
Jacek Caban : widl: Generate names for imported nameless typedefs.
by Alexandre Julliard
29 Aug '13
29 Aug '13
Module: wine Branch: master Commit: 7e4462e28e9f66b61891683b77180d04148b06f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7e4462e28e9f66b61891683b7…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Aug 29 15:09:21 2013 +0200 widl: Generate names for imported nameless typedefs. --- tools/widl/parser.y | 4 ++-- tools/widl/widl.c | 5 +++-- tools/widl/widl.h | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 5751598..97c3896 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -1840,7 +1840,7 @@ static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, at type_get_type_detect_alias(type) == TYPE_STRUCT || type_get_type_detect_alias(type) == TYPE_UNION || type_get_type_detect_alias(type) == TYPE_ENCAPSULATED_UNION) && - !type->name && !parse_only) + !type->name) { if (! is_attr(attrs, ATTR_PUBLIC) && ! is_attr (attrs, ATTR_HIDDEN)) attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) ); @@ -1980,7 +1980,7 @@ static char *gen_name(void) if (! file_id) { - char *dst = dup_basename(input_name, ".idl"); + char *dst = dup_basename(input_idl_name, ".idl"); file_id = dst; for (; *dst; ++dst) diff --git a/tools/widl/widl.c b/tools/widl/widl.c index 2ff1977..b37a0f8 100644 --- a/tools/widl/widl.c +++ b/tools/widl/widl.c @@ -118,6 +118,7 @@ int do_rt_extension = 0; static enum stub_mode stub_mode = MODE_Os; char *input_name; +char *input_idl_name; char *header_name; char *local_stubs_name; char *header_token; @@ -488,7 +489,7 @@ void write_id_data(const statement_list_t *stmts) } fprintf(idfile, "/*** Autogenerated by WIDL %s ", PACKAGE_VERSION); - fprintf(idfile, "from %s - Do not edit ***/\n\n", input_name); + fprintf(idfile, "from %s - Do not edit ***/\n\n", input_idl_name); fprintf(idfile, "#include <rpc.h>\n"); fprintf(idfile, "#include <rpcndr.h>\n\n"); fprintf(idfile, "#include <initguid.h>\n\n"); @@ -706,7 +707,7 @@ int main(int argc,char *argv[]) return 1; } else - input_name = xstrdup(argv[optind]); + input_idl_name = input_name = xstrdup(argv[optind]); } else { fprintf(stderr, "%s", usage); diff --git a/tools/widl/widl.h b/tools/widl/widl.h index 91054ad..9e09f76 100644 --- a/tools/widl/widl.h +++ b/tools/widl/widl.h @@ -52,6 +52,7 @@ extern int win64_packing; extern int do_rt_extension; extern char *input_name; +extern char *input_idl_name; extern char *header_name; extern char *header_token; extern char *local_stubs_name;
1
0
0
0
Jacek Caban : widl: Increase version number stored in custom data.
by Alexandre Julliard
29 Aug '13
29 Aug '13
Module: wine Branch: master Commit: 2510ec477bba134c753302795d55226a44f42df3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2510ec477bba134c753302795…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Aug 29 15:09:05 2013 +0200 widl: Increase version number stored in custom data. --- tools/widl/write_msft.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index d938d00..dd98486 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -2566,7 +2566,7 @@ int create_msft_typelib(typelib_t *typelib) const statement_t *stmt; time_t cur_time; char *time_override; - unsigned int version = 5 << 24 | 1 << 16 | 164; /* 5.01.0164 */ + unsigned int version = 7 << 24 | 555; /* 7.00.0555 */ GUID midl_time_guid = {0xde77ba63,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}}; GUID midl_version_guid = {0xde77ba64,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}}; GUID midl_info_guid = {0xde77ba65,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}};
1
0
0
0
Jacek Caban : widl: Include string info in tlb custom data.
by Alexandre Julliard
29 Aug '13
29 Aug '13
Module: wine Branch: master Commit: 02775123509652d0d7d09003a070b7ce0f83f95e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=02775123509652d0d7d09003a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Aug 29 15:08:51 2013 +0200 widl: Include string info in tlb custom data. --- tools/widl/write_msft.c | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index 53e1feb..d938d00 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -1232,7 +1232,7 @@ static void write_value(msft_typelib_t* typelib, int *out, int vt, const void *v } static HRESULT set_custdata(msft_typelib_t *typelib, REFGUID guid, - int vt, int value, int *offset) + int vt, const void *value, int *offset) { MSFT_GuidEntry guidentry; int guidoffset; @@ -1246,7 +1246,7 @@ static HRESULT set_custdata(msft_typelib_t *typelib, REFGUID guid, guidentry.next_hash = -1; guidoffset = ctl2_alloc_guid(typelib, &guidentry); - write_value(typelib, &data_out, vt, &value); + write_value(typelib, &data_out, vt, value); custoffset = ctl2_alloc_segment(typelib, MSFT_SEG_CUSTDATAGUID, 12, 0); @@ -2567,8 +2567,10 @@ int create_msft_typelib(typelib_t *typelib) time_t cur_time; char *time_override; unsigned int version = 5 << 24 | 1 << 16 | 164; /* 5.01.0164 */ - GUID midl_time_guid = {0xde77ba63,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}}; - GUID midl_version_guid = {0xde77ba64,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}}; + GUID midl_time_guid = {0xde77ba63,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}}; + GUID midl_version_guid = {0xde77ba64,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}}; + GUID midl_info_guid = {0xde77ba65,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}}; + char info_string[128]; pointer_size = (typelib_kind == SYS_WIN64) ? 8 : 4; @@ -2615,8 +2617,10 @@ int create_msft_typelib(typelib_t *typelib) and midl's version number */ time_override = getenv( "WIDL_TIME_OVERRIDE"); cur_time = time_override ? atol( time_override) : time(NULL); - set_custdata(msft, &midl_time_guid, VT_UI4, cur_time, &msft->typelib_header.CustomDataOffset); - set_custdata(msft, &midl_version_guid, VT_UI4, version, &msft->typelib_header.CustomDataOffset); + sprintf(info_string, "Created by WIDL version %s at %s\n", PACKAGE_VERSION, ctime(&cur_time)); + set_custdata(msft, &midl_info_guid, VT_BSTR, info_string, &msft->typelib_header.CustomDataOffset); + set_custdata(msft, &midl_time_guid, VT_UI4, &cur_time, &msft->typelib_header.CustomDataOffset); + set_custdata(msft, &midl_version_guid, VT_UI4, &version, &msft->typelib_header.CustomDataOffset); if (typelib->stmts) LIST_FOR_EACH_ENTRY( stmt, typelib->stmts, const statement_t, entry )
1
0
0
0
Jacek Caban : winedump: Improved TLB custom data handling.
by Alexandre Julliard
29 Aug '13
29 Aug '13
Module: wine Branch: master Commit: 30def32b6f0e0e703aed768fd2c6eac5fdd18cf2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=30def32b6f0e0e703aed768fd…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Aug 29 15:06:53 2013 +0200 winedump: Improved TLB custom data handling. --- tools/winedump/tlb.c | 38 ++++++++++++++++++++++++++++++++------ 1 files changed, 32 insertions(+), 6 deletions(-) diff --git a/tools/winedump/tlb.c b/tools/winedump/tlb.c index 4ed3162..d12831e 100644 --- a/tools/winedump/tlb.c +++ b/tools/winedump/tlb.c @@ -390,6 +390,15 @@ static int dump_msft_namehashtab(seg_t *seg) return -1; } +static void dump_string(int len, int align_off) +{ + printf("\""); + fwrite(tlb_read(len), len, 1, stdout); + printf("\" "); + while((len++ + align_off) & 3) + printf("\\%2.2x", tlb_read_byte()); +} + static void dump_msft_name(int base, int n) { int len; @@ -401,11 +410,8 @@ static void dump_msft_name(int base, int n) len = print_hex("namelen")&0xff; print_offset(); - printf("name = \""); - fwrite(tlb_read(len), len, 1, stdout); - printf("\" "); - while(len++ & 3) - printf("\\%2.2x", tlb_read_byte()); + printf("name = "); + dump_string(len, 0); printf("\n"); print_end_block(); @@ -470,9 +476,29 @@ static int dump_msft_arraydescs(seg_t *seg) static int dump_msft_custdata(seg_t *seg) { + unsigned short vt; + unsigned i, n; + print_begin_block("CustData"); - dump_binary(seg->length); /* FIXME */ + for(i=0; offset < seg->offset+seg->length; i++) { + print_offset(); + + vt = tlb_read_short(); + printf("vt %d", vt); + n = tlb_read_int(); + + switch(vt) { + case 8 /* VT_BSTR */: + printf(" len %d: ", n); + dump_string(n, 2); + printf("\n"); + break; + default: + printf(": %x ", n); + printf("\\%2.2x \\%2.2x\n", tlb_read_byte(), tlb_read_byte()); + } + } print_end_block(); return -1;
1
0
0
0
Piotr Caban : msvcrt: Add _wsetlocale implementation.
by Alexandre Julliard
29 Aug '13
29 Aug '13
Module: wine Branch: master Commit: 33d697c001049b6c20203d3332299dfc4c5af6c9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=33d697c001049b6c20203d333…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Aug 29 12:07:03 2013 +0200 msvcrt: Add _wsetlocale implementation. --- dlls/msvcrt/locale.c | 48 ++++++++++++++++++++++++++++++++++-------------- dlls/msvcrt/msvcrt.h | 1 + 2 files changed, 35 insertions(+), 14 deletions(-) diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index 14ccd0a..4e8467a 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -407,20 +407,6 @@ static inline char* construct_lc_all(MSVCRT_pthreadlocinfo locinfo) { /********************************************************************* - * wsetlocale (MSVCRT.@) - */ -MSVCRT_wchar_t* CDECL MSVCRT__wsetlocale(int category, const MSVCRT_wchar_t* locale) -{ - static MSVCRT_wchar_t fake[] = { - 'E','n','g','l','i','s','h','_','U','n','i','t','e','d',' ', - 'S','t','a','t','e','s','.','1','2','5','2',0 }; - - FIXME("%d %s\n", category, debugstr_w(locale)); - - return fake; -} - -/********************************************************************* * _Getdays (MSVCRT.@) */ char* CDECL _Getdays(void) @@ -1435,6 +1421,40 @@ char* CDECL MSVCRT_setlocale(int category, const char* locale) return locinfo->lc_category[category].locale; } +/********************************************************************* + * _wsetlocale (MSVCRT.@) + */ +MSVCRT_wchar_t* CDECL MSVCRT__wsetlocale(int category, const MSVCRT_wchar_t* wlocale) +{ + static MSVCRT_wchar_t current_lc_all[MAX_LOCALE_LENGTH]; + + char *locale = NULL; + const char *ret; + MSVCRT_size_t len; + + if(wlocale) { + len = MSVCRT_wcstombs(NULL, wlocale, 0); + if(len == -1) + return NULL; + + locale = MSVCRT_malloc(++len); + if(!locale) + return NULL; + + MSVCRT_wcstombs(locale, wlocale, len); + } + + LOCK_LOCALE; + ret = MSVCRT_setlocale(category, locale); + MSVCRT_free(locale); + + if(ret && MSVCRT_mbstowcs(current_lc_all, ret, MAX_LOCALE_LENGTH)==-1) + ret = NULL; + + UNLOCK_LOCALE; + return ret ? current_lc_all : NULL; +} + /* _configthreadlocale - not exported in native msvcrt */ int CDECL _configthreadlocale(int type) { diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 35e9c7d..98922af 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -953,6 +953,7 @@ int __cdecl _ismbclegal(unsigned int c); int __cdecl _ismbstrail(const unsigned char* start, const unsigned char* str); int __cdecl MSVCRT_mbtowc(MSVCRT_wchar_t*,const char*,MSVCRT_size_t); MSVCRT_size_t __cdecl MSVCRT_mbstowcs(MSVCRT_wchar_t*,const char*,MSVCRT_size_t); +MSVCRT_size_t __cdecl MSVCRT_wcstombs(char*,const MSVCRT_wchar_t*,MSVCRT_size_t); MSVCRT_intptr_t __cdecl MSVCRT__spawnve(int,const char*,const char* const *,const char* const *); MSVCRT_intptr_t __cdecl MSVRT__spawnvpe(int,const char*,const char* const *,const char* const *); MSVCRT_intptr_t __cdecl MSVCRT__wspawnve(int,const MSVCRT_wchar_t*,const MSVCRT_wchar_t* const *,const MSVCRT_wchar_t* const *);
1
0
0
0
Bruno Jesus : ws2_32/tests: Add SO_PROTOCOL_INFO tests.
by Alexandre Julliard
29 Aug '13
29 Aug '13
Module: wine Branch: master Commit: 4ce3ddedb916eb1d7a0b7d63b1a64b3e00169b06 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4ce3ddedb916eb1d7a0b7d63b…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Wed Aug 28 21:19:43 2013 -0300 ws2_32/tests: Add SO_PROTOCOL_INFO tests. --- dlls/ws2_32/tests/sock.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 87 insertions(+), 0 deletions(-) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 5ce4959..5d80fca 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -1105,6 +1105,18 @@ static void test_set_getsockopt(void) int timeout; LINGER lingval; int size; + WSAPROTOCOL_INFOA infoA; + WSAPROTOCOL_INFOW infoW; + char providername[WSAPROTOCOL_LEN + 1]; + struct _prottest + { + int family, type, proto; + } prottest[] = { + {AF_INET, SOCK_STREAM, IPPROTO_TCP}, + {AF_INET, SOCK_DGRAM, IPPROTO_UDP}, + {AF_INET6, SOCK_STREAM, IPPROTO_TCP}, + {AF_INET6, SOCK_DGRAM, IPPROTO_UDP} + }; s = socket(AF_INET, SOCK_STREAM, 0); ok(s!=INVALID_SOCKET, "socket() failed error: %d\n", WSAGetLastError()); @@ -1221,6 +1233,81 @@ todo_wine err, WSAGetLastError()); closesocket(s); + + /* test SO_PROTOCOL_INFOA invalid parameters */ + s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + ok(getsockopt(s, SOL_SOCKET, SO_PROTOCOL_INFOA, NULL, NULL), + "getsockopt should have failed\n"); + err = WSAGetLastError(); +todo_wine + ok(err == WSAEFAULT, "expected 10014, got %d instead\n", err); + ok(getsockopt(s, SOL_SOCKET, SO_PROTOCOL_INFOA, (char *) &infoA, NULL), + "getsockopt should have failed\n"); + err = WSAGetLastError(); +todo_wine + ok(err == WSAEFAULT, "expected 10014, got %d instead\n", err); + ok(getsockopt(s, SOL_SOCKET, SO_PROTOCOL_INFOA, NULL, &size), + "getsockopt should have failed\n"); + err = WSAGetLastError(); +todo_wine + ok(err == WSAEFAULT, "expected 10014, got %d instead\n", err); + + size = sizeof(WSAPROTOCOL_INFOA) / 2; + ok(getsockopt(s, SOL_SOCKET, SO_PROTOCOL_INFOA, (char *) &infoA, &size), + "getsockopt should have failed\n"); + err = WSAGetLastError(); +todo_wine + ok(err == WSAEFAULT, "expected 10014, got %d instead\n", err); + closesocket(s); + + /* test SO_PROTOCOL_INFO structure returned for different protocols */ + for (i = 0; i < sizeof(prottest) / sizeof(prottest[0]); i++) + { + s = socket(prottest[i].family, prottest[i].type, prottest[i].proto); + if (s == INVALID_SOCKET && prottest[i].family == AF_INET6) continue; + + ok(s != INVALID_SOCKET, "Failed to create socket: %d\n", + WSAGetLastError()); + + /* compare both A and W version */ + infoA.szProtocol[0] = 0; + size = sizeof(WSAPROTOCOL_INFOA); + err = getsockopt(s, SOL_SOCKET, SO_PROTOCOL_INFOA, (char *) &infoA, &size); +todo_wine + ok(!err,"getsockopt failed with %d\n", WSAGetLastError()); + + infoW.szProtocol[0] = 0; + size = sizeof(WSAPROTOCOL_INFOW); + err = getsockopt(s, SOL_SOCKET, SO_PROTOCOL_INFOW, (char *) &infoW, &size); +todo_wine + ok(!err,"getsockopt failed with %d\n", WSAGetLastError()); + + trace("provider name '%s', family %d, type %d, proto %d\n", + infoA.szProtocol, prottest[i].family, prottest[i].type, prottest[i].proto); + + todo_wine { + ok(infoA.szProtocol[0], "WSAPROTOCOL_INFOA was not filled\n"); + ok(infoW.szProtocol[0], "WSAPROTOCOL_INFOW was not filled\n"); + } + + WideCharToMultiByte(CP_ACP, 0, infoW.szProtocol, -1, + providername, sizeof(providername), NULL, NULL); + ok(!strcmp(infoA.szProtocol,providername), + "different provider names '%s' != '%s'\n", infoA.szProtocol, providername); + + todo_wine { + ok(!memcmp(&infoA, &infoW, FIELD_OFFSET(WSAPROTOCOL_INFOA, szProtocol)), + "SO_PROTOCOL_INFO[A/W] comparison failed\n"); + ok(infoA.iAddressFamily == prottest[i].family, "socket family invalid, expected %d received %d\n", + prottest[i].family, infoA.iAddressFamily); + ok(infoA.iSocketType == prottest[i].type, "socket type invalid, expected %d received %d\n", + prottest[i].type, infoA.iSocketType); + ok(infoA.iProtocol == prottest[i].proto, "socket protocol invalid, expected %d received %d\n", + prottest[i].proto, infoA.iProtocol); + } + + closesocket(s); + } } static void test_so_reuseaddr(void)
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
47
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
Results per page:
10
25
50
100
200