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
April 2020
----- 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
1016 discussions
Start a n
N
ew thread
Ziqing Hui : windowscodecs: Implement stub for DdsDecoder.
by Alexandre Julliard
15 Apr '20
15 Apr '20
Module: wine Branch: master Commit: 9e81463de9af736ed53efb4abb57c75e60caaed8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9e81463de9af736ed53efb4a…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Wed Apr 15 18:42:07 2020 +0800 windowscodecs: Implement stub for DdsDecoder. Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/Makefile.in | 1 + dlls/windowscodecs/clsfactory.c | 1 + dlls/windowscodecs/ddsformat.c | 227 ++++++++++++++++++++++++++ dlls/windowscodecs/regsvr.c | 23 +++ dlls/windowscodecs/tests/ddsformat.c | 4 +- dlls/windowscodecs/wincodecs_private.h | 1 + dlls/windowscodecs/windowscodecs_wincodec.idl | 7 + 7 files changed, 262 insertions(+), 2 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=9e81463de9af736ed53e…
1
0
0
0
Ziqing Hui : windowscodecs/tests: Add tests for DDS format.
by Alexandre Julliard
15 Apr '20
15 Apr '20
Module: wine Branch: master Commit: 66a82d2595e5c8cc4f9bb5fe542baa750da04a32 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=66a82d2595e5c8cc4f9bb5fe…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Wed Apr 15 18:41:43 2020 +0800 windowscodecs/tests: Add tests for DDS format. Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/tests/Makefile.in | 1 + dlls/windowscodecs/tests/ddsformat.c | 121 +++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) diff --git a/dlls/windowscodecs/tests/Makefile.in b/dlls/windowscodecs/tests/Makefile.in index 3f9c9184e6..1450f056e9 100644 --- a/dlls/windowscodecs/tests/Makefile.in +++ b/dlls/windowscodecs/tests/Makefile.in @@ -5,6 +5,7 @@ C_SRCS = \ bitmap.c \ bmpformat.c \ converter.c \ + ddsformat.c \ gifformat.c \ icoformat.c \ info.c \ diff --git a/dlls/windowscodecs/tests/ddsformat.c b/dlls/windowscodecs/tests/ddsformat.c new file mode 100644 index 0000000000..97fb9f7c11 --- /dev/null +++ b/dlls/windowscodecs/tests/ddsformat.c @@ -0,0 +1,121 @@ +/* + * Copyright 2020 Ziqing Hui + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdarg.h> + +#define COBJMACROS + +#include "windef.h" +#include "wincodec.h" +#include "wine/test.h" + +/* 4x4 DDS image */ +static BYTE test_dds_image[] = { + 'D', 'D', 'S', ' ', 0x7C, 0x00, 0x00, 0x00, 0x07, 0x10, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x44, 0x58, 0x54, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xF5, 0xA7, 0x08, 0x69, 0x74, 0xC0, 0xBF, 0xD7 +}; + +static IWICImagingFactory *factory = NULL; + +static IWICStream *create_stream(const void *image_data, UINT image_size) +{ + HRESULT hr; + IWICStream *stream = NULL; + + hr = IWICImagingFactory_CreateStream(factory, &stream); + ok(SUCCEEDED(hr), "CreateStream failed, hr=%x\n", hr); + if (FAILED(hr)) goto fail; + + hr = IWICStream_InitializeFromMemory(stream, (BYTE *)image_data, image_size); + ok(SUCCEEDED(hr), "InitializeFromMemory failed, hr=%x\n", hr); + if (FAILED(hr)) goto fail; + + return stream; + +fail: + if (stream) IWICStream_Release(stream); + return NULL; +} + +static IWICBitmapDecoder *create_decoder(IWICStream *stream) +{ + HRESULT hr; + IWICBitmapDecoder *decoder = NULL; + GUID guidresult; + + hr = CoCreateInstance(&CLSID_WICDdsDecoder, NULL, CLSCTX_INPROC_SERVER, + &IID_IWICBitmapDecoder, (void **)&decoder); + if (FAILED(hr)) { + win_skip("Dds decoder is not supported\n"); + return NULL; + } + + memset(&guidresult, 0, sizeof(guidresult)); + hr = IWICBitmapDecoder_GetContainerFormat(decoder, &guidresult); + ok(SUCCEEDED(hr), "GetContainerFormat failed, hr=%x\n", hr); + ok(IsEqualGUID(&guidresult, &GUID_ContainerFormatDds), "Unexpected container format\n"); + + hr = IWICBitmapDecoder_Initialize(decoder, (IStream*)stream, WICDecodeMetadataCacheOnDemand); + ok(hr == S_OK, "Decoder Initialize failed, hr=%x\n", hr); + if (hr != S_OK) { + IWICBitmapDecoder_Release(decoder); + return NULL; + } + + return decoder; +} + +static void test_dds_decoder(void) +{ + IWICStream *stream = NULL; + IWICBitmapDecoder *decoder = NULL; + + stream = create_stream(test_dds_image, sizeof(test_dds_image)); + if (!stream) goto end; + + todo_wine decoder = create_decoder(stream); + if (!decoder) goto end; + +end: + if (decoder) IWICBitmapDecoder_Release(decoder); + if (stream) IWICStream_Release(stream); +} + +START_TEST(ddsformat) +{ + HRESULT hr; + CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + + hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, + &IID_IWICImagingFactory, (void **)&factory); + ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr); + if (FAILED(hr)) goto end; + + test_dds_decoder(); + +end: + if(factory) IWICImagingFactory_Release(factory); + CoUninitialize(); +}
1
0
0
0
Alexandre Julliard : winepath: Avoid CR characters in output.
by Alexandre Julliard
15 Apr '20
15 Apr '20
Module: wine Branch: master Commit: 4c391c1454ea5fcac0ac5d793651f3c20383ef6a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4c391c1454ea5fcac0ac5d79…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Apr 15 22:04:38 2020 +0200 winepath: Avoid CR characters in output. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48937
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/winepath/winepath.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/programs/winepath/winepath.c b/programs/winepath/winepath.c index 81944829dd..17cfdc1d2e 100644 --- a/programs/winepath/winepath.c +++ b/programs/winepath/winepath.c @@ -24,6 +24,8 @@ #include <windows.h> #include <stdio.h> #include <stdlib.h> +#include <fcntl.h> +#include <io.h> #include "wine/debug.h" @@ -140,6 +142,8 @@ int __cdecl wmain(int argc, WCHAR *argv[]) int i; int separator; + setmode( fileno(stdout), O_BINARY ); /* avoid crlf */ + outputformats = parse_options(argv); if (outputformats & PRINT0)
1
0
0
0
Alexandre Julliard : winegcc: Only use a constructor for dll modules.
by Alexandre Julliard
15 Apr '20
15 Apr '20
Module: wine Branch: master Commit: b336a084d650b9d0e59fc2a1120229794c3c3327 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b336a084d650b9d0e59fc2a1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Apr 15 17:52:04 2020 +0200 winegcc: Only use a constructor for dll modules. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/winegcc.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 7d55e19866..b2a4f9189e 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -532,20 +532,10 @@ static strarray *get_link_args( struct options *opts, const char *output_name ) strarray_add( link_args, "-Wl,-Bsymbolic" ); if (!opts->noshortwchar && opts->target_cpu == CPU_ARM) strarray_add( flags, "-Wl,--no-wchar-size-warning" ); - - /* Try all options first - this is likely to succeed on modern compilers */ - if (!try_link( opts->prefix, link_args, "-Wl,-z,defs -Wl,-init,__wine_spec_init,-fini,_wine_spec_fini" )) - { + if (!try_link( opts->prefix, link_args, "-Wl,-z,defs" )) strarray_add( flags, "-Wl,-z,defs" ); - strarray_add( flags, "-Wl,-init,__wine_spec_init,-fini,__wine_spec_fini" ); - } - else /* otherwise figure out which ones are allowed */ - { - if (!try_link( opts->prefix, link_args, "-Wl,-z,defs" )) - strarray_add( flags, "-Wl,-z,defs" ); - if (!try_link( opts->prefix, link_args, "-Wl,-init,__wine_spec_init,-fini,_wine_spec_fini" )) - strarray_add( flags, "-Wl,-init,__wine_spec_init,-fini,__wine_spec_fini" ); - } + if (opts->shared && !try_link( opts->prefix, link_args, "-Wl,-init,__wine_spec_init" )) + strarray_add( flags, "-Wl,-init,__wine_spec_init" ); strarray_addall( link_args, flags ); return link_args;
1
0
0
0
Alexandre Julliard : winebuild: Only generate a constructor for dll modules.
by Alexandre Julliard
15 Apr '20
15 Apr '20
Module: wine Branch: master Commit: a4677fa23aceabd0158edd816baa43c5f163dd64 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a4677fa23aceabd0158edd81…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Apr 15 17:49:09 2020 +0200 winebuild: Only generate a constructor for dll modules. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winebuild/main.c | 2 +- tools/winebuild/spec32.c | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c index 81f7678eae..db8587c3bd 100644 --- a/tools/winebuild/main.c +++ b/tools/winebuild/main.c @@ -386,7 +386,7 @@ static void set_exec_mode( enum exec_mode_values mode ) static const char *get_default_entry_point( const DLLSPEC *spec ) { if (spec->characteristics & IMAGE_FILE_DLL) return "__wine_spec_dll_entry"; - if (spec->subsystem == IMAGE_SUBSYSTEM_NATIVE) return "__wine_spec_drv_entry"; + if (spec->subsystem == IMAGE_SUBSYSTEM_NATIVE) return "DriverEntry"; if (spec->type == SPEC_WIN16) return "__wine_spec_exe16_entry"; return "__wine_spec_exe_entry"; } diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index ecfe4c5011..631a467a5e 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -680,7 +680,8 @@ void output_module( DLLSPEC *spec ) output( "\n\t.data\n" ); output( "\t.align %d\n", get_alignment(get_ptr_size()) ); - output( "%s\n", asm_globl("__wine_spec_nt_header") ); + output( "\t.globl %s\n", asm_name("__wine_spec_nt_header") ); + output( "%s:\n", asm_name("__wine_spec_nt_header") ); output( ".L__wine_spec_rva_base:\n" ); output( "\t.long 0x4550\n" ); /* Signature */ @@ -749,13 +750,16 @@ void output_module( DLLSPEC *spec ) output_data_directories( data_dirs ); - output( "\n\t%s\n", get_asm_string_section() ); - output( "%s\n", asm_globl("__wine_spec_file_name") ); - output( "\t%s \"%s\"\n", get_asm_string_keyword(), spec->file_name ); + if (spec->characteristics & IMAGE_FILE_DLL) + { + output( "\n\t%s\n", get_asm_string_section() ); + output( "%s\n", asm_globl("__wine_spec_file_name") ); + output( "\t%s \"%s\"\n", get_asm_string_keyword(), spec->file_name ); + output_asm_constructor( "__wine_spec_init_ctor" ); + } + if (target_platform == PLATFORM_APPLE) output( "\t.lcomm %s,4\n", asm_name("_end") ); - - output_asm_constructor( "__wine_spec_init_ctor" ); }
1
0
0
0
Alexandre Julliard : winecrt0: Remove constructor support for exe and native modules.
by Alexandre Julliard
15 Apr '20
15 Apr '20
Module: wine Branch: master Commit: 2ba1b7fd3b3db0c76f9d97e5142caf3fc947d72c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2ba1b7fd3b3db0c76f9d97e5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Apr 15 20:03:13 2020 +0200 winecrt0: Remove constructor support for exe and native modules. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winecrt0/Makefile.in | 1 - dlls/winecrt0/drv_entry.c | 41 ----------------------------------------- dlls/winecrt0/exe_entry.c | 8 +------- dlls/winecrt0/exe_wentry.c | 8 +------- 4 files changed, 2 insertions(+), 56 deletions(-) diff --git a/dlls/winecrt0/Makefile.in b/dlls/winecrt0/Makefile.in index 675002e938..909959dcb6 100644 --- a/dlls/winecrt0/Makefile.in +++ b/dlls/winecrt0/Makefile.in @@ -6,7 +6,6 @@ C_SRCS = \ delay_load.c \ dll_entry.c \ dll_main.c \ - drv_entry.c \ exception.c \ exe16_entry.c \ exe_entry.c \ diff --git a/dlls/winecrt0/drv_entry.c b/dlls/winecrt0/drv_entry.c deleted file mode 100644 index c7d39922e1..0000000000 --- a/dlls/winecrt0/drv_entry.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Default entry point for a native driver - * - * Copyright 2005 Alexandre Julliard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#if 0 -#pragma makedep unix -#endif - -#include <stdarg.h> -#include "windef.h" -#include "winternl.h" -#include "wine/library.h" -#include "crt0_private.h" - -struct _DRIVER_OBJECT; -extern NTSTATUS WINAPI DriverEntry( struct _DRIVER_OBJECT *obj, UNICODE_STRING *path ); - -NTSTATUS DECLSPEC_HIDDEN WINAPI __wine_spec_drv_entry( struct _DRIVER_OBJECT *obj, UNICODE_STRING *path ) -{ - BOOL needs_init = (__wine_spec_init_state != CONSTRUCTORS_DONE); - - if (needs_init) _init( 0, NULL, NULL ); - return DriverEntry( obj, path ); - /* there is no detach routine so we can't call destructors */ -} diff --git a/dlls/winecrt0/exe_entry.c b/dlls/winecrt0/exe_entry.c index 803d56e10e..93a323f42a 100644 --- a/dlls/winecrt0/exe_entry.c +++ b/dlls/winecrt0/exe_entry.c @@ -26,7 +26,6 @@ #include "windef.h" #include "winbase.h" #include "winternl.h" -#include "crt0_private.h" extern int __cdecl main( int argc, char *argv[] ); @@ -96,12 +95,7 @@ static char **build_argv( const char *src, int *ret_argc ) DWORD WINAPI DECLSPEC_HIDDEN __wine_spec_exe_entry( PEB *peb ) { int argc; - BOOL needs_init = (__wine_spec_init_state != CONSTRUCTORS_DONE); char **argv = build_argv( GetCommandLineA(), &argc ); - DWORD ret; - if (needs_init) _init( argc, argv, NULL ); - ret = main( argc, argv ); - if (needs_init) _fini(); - ExitProcess( ret ); + ExitProcess( main( argc, argv )); } diff --git a/dlls/winecrt0/exe_wentry.c b/dlls/winecrt0/exe_wentry.c index b01bfd6210..0524dce99a 100644 --- a/dlls/winecrt0/exe_wentry.c +++ b/dlls/winecrt0/exe_wentry.c @@ -26,7 +26,6 @@ #include "windef.h" #include "winbase.h" #include "winternl.h" -#include "crt0_private.h" extern int __cdecl wmain( int argc, WCHAR *argv[] ); @@ -96,12 +95,7 @@ static WCHAR **build_argv( const WCHAR *src, int *ret_argc ) DWORD WINAPI DECLSPEC_HIDDEN __wine_spec_exe_wentry( PEB *peb ) { int argc; - BOOL needs_init = (__wine_spec_init_state != CONSTRUCTORS_DONE); WCHAR **argv = build_argv( GetCommandLineW(), &argc ); - DWORD ret; - if (needs_init) _init( 0, NULL, NULL ); - ret = wmain( argc, argv ); - if (needs_init) _fini(); - ExitProcess( ret ); + ExitProcess( wmain( argc, argv )); }
1
0
0
0
Alexandre Julliard : ntdll: Support loading builtin modules that don't use a constructor.
by Alexandre Julliard
15 Apr '20
15 Apr '20
Module: wine Branch: master Commit: 6ac357667ee3f4739fff45d03f88e1bc19bd079a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6ac357667ee3f4739fff45d0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Apr 15 19:37:44 2020 +0200 ntdll: Support loading builtin modules that don't use a constructor. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/loader.c | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 9329dd2a9b..1e50e2b663 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -1780,6 +1780,7 @@ static void load_builtin_callback( void *module, const char *filename ) if (!module) { ERR("could not map image for %s\n", debugstr_us(builtin_load_info->filename) ); + builtin_load_info->status = STATUS_NO_MEMORY; return; } if (!(nt = RtlImageNtHeader( module ))) @@ -2555,6 +2556,7 @@ static NTSTATUS load_so_dll( LPCWSTR load_path, const UNICODE_STRING *nt_name, static const WCHAR soW[] = {'.','s','o',0}; DWORD len; void *handle; + const IMAGE_NT_HEADERS *nt; struct builtin_load_info info, *prev_info; ANSI_STRING unix_name; UNICODE_STRING win_name = *nt_name; @@ -2581,7 +2583,6 @@ static NTSTATUS load_so_dll( LPCWSTR load_path, const UNICODE_STRING *nt_name, prev_info = builtin_load_info; builtin_load_info = &info; handle = dlopen( so_name ? so_name : unix_name.Buffer, RTLD_NOW ); - builtin_load_info = prev_info; RtlFreeHeap( GetProcessHeap(), 0, unix_name.Buffer ); if (!handle) @@ -2589,15 +2590,39 @@ static NTSTATUS load_so_dll( LPCWSTR load_path, const UNICODE_STRING *nt_name, if (so_name) { ERR("failed to load .so lib %s: %s\n", debugstr_a(so_name), dlerror() ); - return STATUS_PROCEDURE_NOT_FOUND; + info.status = STATUS_PROCEDURE_NOT_FOUND; + } + else + { + WARN( "failed to load .so lib %s: %s\n", debugstr_us(nt_name), dlerror() ); + info.status = STATUS_INVALID_IMAGE_FORMAT; } - WARN( "failed to load .so lib %s: %s\n", debugstr_us(nt_name), dlerror() ); - return STATUS_INVALID_IMAGE_FORMAT; } if (info.status != STATUS_SUCCESS) goto failed; - if (!info.wm) + if (!info.wm && (nt = dlsym( handle, "__wine_spec_nt_header" ))) + { + HMODULE module = (HMODULE)((nt->OptionalHeader.ImageBase + 0xffff) & ~0xffff); + if ((info.wm = get_modref( module ))) /* already loaded */ + { + TRACE( "Found %s at %p for builtin %s\n", + debugstr_w(info.wm->ldr.FullDllName.Buffer), info.wm->ldr.BaseAddress, + debugstr_us(nt_name) ); + if (info.wm->ldr.LoadCount != -1) info.wm->ldr.LoadCount++; + dlclose( handle ); + } + else + { + __wine_dll_register( nt, NULL ); + if (!info.wm) goto failed; + TRACE_(loaddll)( "Loaded %s at %p: builtin\n", + debugstr_w(info.wm->ldr.FullDllName.Buffer), info.wm->ldr.BaseAddress ); + info.wm->ldr.LoadCount = 1; + info.wm->ldr.SectionHandle = handle; + } + } + else if (!info.wm) { /* The constructor wasn't called, this means the .so is already * loaded under a different name. Try to find the wm for it. */ @@ -2620,11 +2645,13 @@ static NTSTATUS load_so_dll( LPCWSTR load_path, const UNICODE_STRING *nt_name, info.wm->ldr.SectionHandle = handle; } + builtin_load_info = prev_info; *pwm = info.wm; return STATUS_SUCCESS; failed: - dlclose( handle ); + builtin_load_info = prev_info; + if (handle) dlclose( handle ); return info.status; }
1
0
0
0
Alexandre Julliard : winegcc: Use the CRT startup code also for non-PE builds.
by Alexandre Julliard
15 Apr '20
15 Apr '20
Module: wine Branch: master Commit: 3622b9ab153ce792aa3add8d3aa71b487edfda9a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3622b9ab153ce792aa3add8d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Apr 15 16:06:22 2020 +0200 winegcc: Use the CRT startup code also for non-PE builds. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/winegcc.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index d663103186..7d55e19866 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -1187,19 +1187,16 @@ static void build(struct options* opts) /* set default entry point, if needed */ if (!opts->entry_point) { - if (is_pe) + if (opts->subsystem && !strcmp( opts->subsystem, "native" )) + entry_point = (is_pe && opts->target_cpu == CPU_x86) ? "_DriverEntry@8" : "DriverEntry"; + else if (opts->use_msvcrt && !opts->shared && !opts->win16_app) { - if (opts->subsystem && !strcmp( opts->subsystem, "native" )) - entry_point = opts->target_cpu == CPU_x86 ? "_DriverEntry@8" : "DriverEntry"; - else if(opts->use_msvcrt && !opts->shared && !opts->win16_app) - { - if (opts->unicode_app) - entry_point = opts->target_cpu == CPU_x86 ? "_wmainCRTStartup" : "wmainCRTStartup"; - else - entry_point = opts->target_cpu == CPU_x86 ? "_mainCRTStartup" : "mainCRTStartup"; - } + if (opts->unicode_app) + entry_point = (is_pe && opts->target_cpu == CPU_x86) ? "_wmainCRTStartup" : "wmainCRTStartup"; + else + entry_point = (is_pe && opts->target_cpu == CPU_x86) ? "_mainCRTStartup" : "mainCRTStartup"; } - else if (!opts->shared && opts->unicode_app) + else if (!is_pe && !opts->shared && opts->unicode_app) entry_point = "__wine_spec_exe_wentry"; } else entry_point = opts->entry_point;
1
0
0
0
Alexandre Julliard : msvcrt: Build the CRT startup code also for non-PE builds.
by Alexandre Julliard
15 Apr '20
15 Apr '20
Module: wine Branch: master Commit: a2e1e499ade0c99ece2a7e4b9b28e4ca6c24ae22 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a2e1e499ade0c99ece2a7e4b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Apr 15 16:27:55 2020 +0200 msvcrt: Build the CRT startup code also for non-PE builds. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/crt_main.c | 9 +++------ dlls/msvcrt/crt_winmain.c | 4 ---- dlls/msvcrt/crt_wmain.c | 9 +++------ dlls/msvcrt/crt_wwinmain.c | 4 ---- 4 files changed, 6 insertions(+), 20 deletions(-) diff --git a/dlls/msvcrt/crt_main.c b/dlls/msvcrt/crt_main.c index fa325d64b3..8e4a00bac7 100644 --- a/dlls/msvcrt/crt_main.c +++ b/dlls/msvcrt/crt_main.c @@ -22,8 +22,6 @@ #pragma makedep implib #endif -#ifdef __MINGW32__ - #if _MSVCR_VER >= 140 #define _UCRT #endif @@ -34,13 +32,14 @@ #include "windef.h" #include "winbase.h" +#include "winternl.h" int __cdecl main(int argc, char **argv, char **env); static const IMAGE_NT_HEADERS *get_nt_header( void ) { - extern IMAGE_DOS_HEADER __ImageBase; - return (const IMAGE_NT_HEADERS *)((char *)&__ImageBase + __ImageBase.e_lfanew); + IMAGE_DOS_HEADER *dos = (IMAGE_DOS_HEADER *)NtCurrentTeb()->Peb->ImageBaseAddress; + return (const IMAGE_NT_HEADERS *)((char *)dos + dos->e_lfanew); } int __cdecl mainCRTStartup(void) @@ -65,5 +64,3 @@ int __cdecl mainCRTStartup(void) exit(ret); return ret; } - -#endif diff --git a/dlls/msvcrt/crt_winmain.c b/dlls/msvcrt/crt_winmain.c index 27e0283cbf..fda3d12f68 100644 --- a/dlls/msvcrt/crt_winmain.c +++ b/dlls/msvcrt/crt_winmain.c @@ -22,8 +22,6 @@ #pragma makedep implib #endif -#ifdef __MINGW32__ - #include <stdarg.h> #include "windef.h" #include "winbase.h" @@ -54,5 +52,3 @@ int __cdecl main( int argc, char *argv[] ) if (!(info.dwFlags & STARTF_USESHOWWINDOW)) info.wShowWindow = SW_SHOWNORMAL; return WinMain( GetModuleHandleA(0), 0, cmdline, info.wShowWindow ); } - -#endif diff --git a/dlls/msvcrt/crt_wmain.c b/dlls/msvcrt/crt_wmain.c index 6bc20e2e0f..6a51a1741b 100644 --- a/dlls/msvcrt/crt_wmain.c +++ b/dlls/msvcrt/crt_wmain.c @@ -22,8 +22,6 @@ #pragma makedep implib #endif -#ifdef __MINGW32__ - #if _MSVCR_VER >= 140 #define _UCRT #endif @@ -34,13 +32,14 @@ #include "windef.h" #include "winbase.h" +#include "winternl.h" int __cdecl wmain(int argc, WCHAR **argv, WCHAR **env); static const IMAGE_NT_HEADERS *get_nt_header( void ) { - extern IMAGE_DOS_HEADER __ImageBase; - return (const IMAGE_NT_HEADERS *)((char *)&__ImageBase + __ImageBase.e_lfanew); + IMAGE_DOS_HEADER *dos = (IMAGE_DOS_HEADER *)NtCurrentTeb()->Peb->ImageBaseAddress; + return (const IMAGE_NT_HEADERS *)((char *)dos + dos->e_lfanew); } int __cdecl wmainCRTStartup(void) @@ -65,5 +64,3 @@ int __cdecl wmainCRTStartup(void) exit(ret); return ret; } - -#endif diff --git a/dlls/msvcrt/crt_wwinmain.c b/dlls/msvcrt/crt_wwinmain.c index 2c53b744b5..b50f728025 100644 --- a/dlls/msvcrt/crt_wwinmain.c +++ b/dlls/msvcrt/crt_wwinmain.c @@ -22,8 +22,6 @@ #pragma makedep implib #endif -#ifdef __MINGW32__ - #include <stdarg.h> #include "windef.h" #include "winbase.h" @@ -56,5 +54,3 @@ int __cdecl wmain( int argc, WCHAR *argv[] ) if (!(info.dwFlags & STARTF_USESHOWWINDOW)) info.wShowWindow = SW_SHOWNORMAL; return wWinMain( GetModuleHandleW(0), 0, cmdline, info.wShowWindow ); } - -#endif
1
0
0
0
Jacek Caban : kernelbase: Implement CreateThreadpoolIo.
by Alexandre Julliard
15 Apr '20
15 Apr '20
Module: wine Branch: master Commit: b66e13ef249065abf693500faa77d0161bc92a11 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b66e13ef249065abf693500f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Apr 15 02:00:18 2020 +0200 kernelbase: Implement CreateThreadpoolIo. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/thread.c | 15 ++++++++++++--- dlls/ntdll/tests/threadpool.c | 4 +--- dlls/ntdll/threadpool.c | 1 + 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/dlls/kernelbase/thread.c b/dlls/kernelbase/thread.c index 94ea9c49de..99f64e072b 100644 --- a/dlls/kernelbase/thread.c +++ b/dlls/kernelbase/thread.c @@ -1187,14 +1187,23 @@ PTP_CLEANUP_GROUP WINAPI DECLSPEC_HOTPATCH CreateThreadpoolCleanupGroup(void) } +static void WINAPI tp_io_callback( TP_CALLBACK_INSTANCE *instance, void *userdata, void *cvalue, IO_STATUS_BLOCK *iosb, TP_IO *io ) +{ + PTP_WIN32_IO_CALLBACK callback = *(void **)io; + callback( instance, userdata, cvalue, RtlNtStatusToDosError( iosb->u.Status ), iosb->Information, io ); +} + + /*********************************************************************** * CreateThreadpoolIo (kernelbase.@) */ -PTP_IO WINAPI /* DECLSPEC_HOTPATCH */ CreateThreadpoolIo( HANDLE handle, PTP_WIN32_IO_CALLBACK callback, +PTP_IO WINAPI DECLSPEC_HOTPATCH CreateThreadpoolIo( HANDLE handle, PTP_WIN32_IO_CALLBACK callback, PVOID userdata, TP_CALLBACK_ENVIRON *environment ) { - FIXME( "(%p, %p, %p, %p): stub\n", handle, callback, userdata, environment ); - return FALSE; + TP_IO *io; + if (!set_ntstatus( TpAllocIoCompletion( &io, handle, tp_io_callback, userdata, environment ))) return NULL; + *(void **)io = callback; /* ntdll leaves us space to store our callback at the beginning of TP_IO struct */ + return io; } diff --git a/dlls/ntdll/tests/threadpool.c b/dlls/ntdll/tests/threadpool.c index 2984983a06..24f32346fb 100644 --- a/dlls/ntdll/tests/threadpool.c +++ b/dlls/ntdll/tests/threadpool.c @@ -2130,9 +2130,7 @@ static void test_kernel32_tp_io(void) environment.Pool = pool; io = NULL; io = pCreateThreadpoolIo(server, kernel32_io_cb, &userdata, &environment); - todo_wine ok(!!io, "expected non-NULL TP_IO\n"); - if (!io) - return; + ok(!!io, "expected non-NULL TP_IO\n"); pWaitForThreadpoolIoCallbacks(io, FALSE); diff --git a/dlls/ntdll/threadpool.c b/dlls/ntdll/threadpool.c index 215a5e9c53..87bfdb0751 100644 --- a/dlls/ntdll/threadpool.c +++ b/dlls/ntdll/threadpool.c @@ -153,6 +153,7 @@ struct io_completion /* internal threadpool object representation */ struct threadpool_object { + void *win32_callback; /* leave space for kernelbase to store win32 callback */ LONG refcount; BOOL shutdown; /* read-only information */
1
0
0
0
← Newer
1
...
57
58
59
60
61
62
63
...
102
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
Results per page:
10
25
50
100
200