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
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2020
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
996 discussions
Start a n
N
ew thread
Zebediah Figura : ddraw: Retrieve the viewport from the primary stateblock.
by Alexandre Julliard
03 Mar '20
03 Mar '20
Module: wine Branch: master Commit: 8ac582762cd764e3891b021f6237b6569b5a11f0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8ac582762cd764e3891b021f…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Fri Feb 28 14:18:43 2020 -0600 ddraw: Retrieve the viewport from the primary stateblock. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 6603835ef0..240f79b432 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -3884,7 +3884,7 @@ static HRESULT WINAPI d3d_device7_GetClipStatus(IDirect3DDevice7 *iface, D3DCLIP FIXME("iface %p, clip_status %p stub.\n", iface, clip_status); - wined3d_device_get_viewports(device->wined3d_device, NULL, &vp); + vp = wined3d_stateblock_get_state(device->state)->viewport; clip_status->minx = vp.x; clip_status->maxx = vp.x + vp.width; clip_status->miny = vp.y; @@ -5391,7 +5391,7 @@ static HRESULT d3d_device7_GetViewport(IDirect3DDevice7 *iface, D3DVIEWPORT7 *vi return DDERR_INVALIDPARAMS; wined3d_mutex_lock(); - wined3d_device_get_viewports(device->wined3d_device, NULL, &wined3d_viewport); + wined3d_viewport = wined3d_stateblock_get_state(device->state)->viewport; wined3d_mutex_unlock(); viewport->dwX = wined3d_viewport.x;
1
0
0
0
Zebediah Figura : ddraw: Stop setting the device state in d3d_device7_SetMaterial().
by Alexandre Julliard
03 Mar '20
03 Mar '20
Module: wine Branch: master Commit: 356259038364f6f275ea08a8197032f0de1dba47 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=356259038364f6f275ea08a8…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Fri Feb 28 14:18:42 2020 -0600 ddraw: Stop setting the device state in d3d_device7_SetMaterial(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/device.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index fa79a98777..6603835ef0 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -5448,8 +5448,6 @@ static HRESULT d3d_device7_SetMaterial(IDirect3DDevice7 *iface, D3DMATERIAL7 *ma wined3d_mutex_lock(); /* Note: D3DMATERIAL7 is compatible with struct wined3d_material. */ wined3d_stateblock_set_material(device->update_state, (const struct wined3d_material *)material); - if (!device->recording) - wined3d_device_set_material(device->wined3d_device, (const struct wined3d_material *)material); wined3d_mutex_unlock(); return D3D_OK;
1
0
0
0
Zebediah Figura : ddraw: Retrieve the material from the primary stateblock.
by Alexandre Julliard
03 Mar '20
03 Mar '20
Module: wine Branch: master Commit: 955512d2087f22c9e792364f5d5bfd7384655fc3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=955512d2087f22c9e792364f…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Fri Feb 28 14:18:41 2020 -0600 ddraw: Retrieve the material from the primary stateblock. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 7acc8e0db0..fa79a98777 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -5495,7 +5495,7 @@ static HRESULT d3d_device7_GetMaterial(IDirect3DDevice7 *iface, D3DMATERIAL7 *ma wined3d_mutex_lock(); /* Note: D3DMATERIAL7 is compatible with struct wined3d_material. */ - wined3d_device_get_material(device->wined3d_device, (struct wined3d_material *)material); + memcpy(material, &wined3d_stateblock_get_state(device->state)->material, sizeof(*material)); wined3d_mutex_unlock(); return D3D_OK;
1
0
0
0
Jacek Caban : stdio.h: Fix calling convention of variadic inline functions.
by Alexandre Julliard
03 Mar '20
03 Mar '20
Module: wine Branch: master Commit: d34ae79dddd750523304a615c8aaaa2745a19adc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d34ae79dddd750523304a615…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Mar 3 14:37:00 2020 +0100 stdio.h: Fix calling convention of variadic inline functions. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48697
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/msvcrt/corecrt_wstdio.h | 2 +- include/msvcrt/stdio.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/msvcrt/corecrt_wstdio.h b/include/msvcrt/corecrt_wstdio.h index 3951a1c829..c1779fb81a 100644 --- a/include/msvcrt/corecrt_wstdio.h +++ b/include/msvcrt/corecrt_wstdio.h @@ -115,7 +115,7 @@ static inline int __cdecl _vsnwprintf_s(wchar_t *buffer, size_t size, size_t cou return ret < 0 ? -1 : ret; } -static inline int __cdecl _snwprintf_s(wchar_t *buffer, size_t size, size_t count, const wchar_t *format, ...) +static inline int WINAPIV _snwprintf_s(wchar_t *buffer, size_t size, size_t count, const wchar_t *format, ...) { int ret; __ms_va_list args; diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index e184704eb9..f2aef46e6f 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h @@ -174,7 +174,7 @@ static inline int __cdecl _vsnprintf_s(char *buffer, size_t size, size_t count, return ret < 0 ? -1 : ret; } -static inline int __cdecl _snprintf_s(char *buffer, size_t size, size_t count, const char *format, ...) +static inline int WINAPIV _snprintf_s(char *buffer, size_t size, size_t count, const char *format, ...) { int ret; __ms_va_list args;
1
0
0
0
Jacek Caban : winegcc: Add support for using clang directly.
by Alexandre Julliard
03 Mar '20
03 Mar '20
Module: wine Branch: master Commit: aabfd2dd3abc8b6cf1c42ce0adbd5b6dca6d5db0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aabfd2dd3abc8b6cf1c42ce0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Mar 3 14:02:28 2020 +0100 winegcc: Add support for using clang directly. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/winegcc.c | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index f2329e492c..d663103186 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -325,20 +325,23 @@ enum tool static const struct { const char *base; + const char *llvm_base; const char *deflt; } tool_names[] = { - { "gcc", CC }, - { "g++", CXX }, - { "cpp", CPP }, - { "ld", LD }, + { "gcc", "clang --driver-mode=gcc", CC }, + { "g++", "clang --driver-mode=g++", CXX }, + { "cpp", "clang --driver-mode=cpp", CPP }, + { "ld", "ld.lld", LD }, }; static strarray* build_tool_name( struct options *opts, enum tool tool ) { const char *base = tool_names[tool].base; + const char *llvm_base = tool_names[tool].llvm_base; const char *deflt = tool_names[tool].deflt; const char *path; + strarray *ret; char* str; if (opts->target && opts->version) @@ -357,8 +360,28 @@ static strarray* build_tool_name( struct options *opts, enum tool tool ) str = xstrdup(deflt); if ((path = find_binary( opts->prefix, str ))) return strarray_fromstring( path, " " ); - error( "Could not find %s\n", base ); - return NULL; + + if (!opts->version) str = xstrdup( llvm_base ); + else str = strmake( "%s-%s", llvm_base, opts->version ); + path = find_binary( opts->prefix, str ); + if (!path) + { + error( "Could not find %s\n", base ); + return NULL; + } + + ret = strarray_fromstring( path, " " ); + if (!strncmp( llvm_base, "clang", 5 )) + { + if (opts->target) + { + strarray_add( ret, "-target" ); + strarray_add( ret, opts->target ); + } + strarray_add( ret, "-Wno-unused-command-line-argument" ); + strarray_add( ret, "-fuse-ld=lld" ); + } + return ret; } static strarray* get_translator(struct options *opts)
1
0
0
0
Jacek Caban : winegcc: Pass tool by id to build_tool_name.
by Alexandre Julliard
03 Mar '20
03 Mar '20
Module: wine Branch: master Commit: 9a9f35a4df628e9e748fce3a14ae27eafbd52575 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9a9f35a4df628e9e748fce3a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Mar 3 14:02:18 2020 +0100 winegcc: Pass tool by id to build_tool_name. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/winegcc.c | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 6bcd157a26..f2329e492c 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -314,8 +314,30 @@ static char* get_temp_file(const char* prefix, const char* suffix) return tmp; } -static strarray* build_tool_name(struct options *opts, const char* base, const char* deflt) +enum tool { + TOOL_CC, + TOOL_CXX, + TOOL_CPP, + TOOL_LD, +}; + +static const struct +{ + const char *base; + const char *deflt; +} tool_names[] = +{ + { "gcc", CC }, + { "g++", CXX }, + { "cpp", CPP }, + { "ld", LD }, +}; + +static strarray* build_tool_name( struct options *opts, enum tool tool ) +{ + const char *base = tool_names[tool].base; + const char *deflt = tool_names[tool].deflt; const char *path; char* str; @@ -341,24 +363,24 @@ static strarray* build_tool_name(struct options *opts, const char* base, const c static strarray* get_translator(struct options *opts) { - strarray *tool; + enum tool tool; switch(opts->processor) { case proc_cpp: - tool = build_tool_name(opts, "cpp", CPP); + tool = TOOL_CPP; break; case proc_cc: case proc_as: - tool = build_tool_name(opts, "gcc", CC); + tool = TOOL_CC; break; case proc_cxx: - tool = build_tool_name(opts, "g++", CXX); + tool = TOOL_CXX; break; default: assert(0); } - return tool; + return build_tool_name( opts, tool ); } static int try_link( const strarray *prefix, const strarray *link_tool, const char *cflags ) @@ -680,8 +702,8 @@ static void compile(struct options* opts, const char* lang) /* mixing different C and C++ compilers isn't supported in configure anyway */ case proc_cc: case proc_cxx: - gcc = build_tool_name(opts, "gcc", CC); - gpp = build_tool_name(opts, "g++", CXX); + gcc = build_tool_name(opts, TOOL_CC); + gpp = build_tool_name(opts, TOOL_CXX); for ( j = 0; !gcc_defs && j < comp_args->size; j++ ) { const char *cc = comp_args->base[j]; @@ -1161,8 +1183,8 @@ static void build(struct options* opts) /* run winebuild to generate the .spec.o file */ spec_args = get_winebuild_args( opts ); - if ((tool = build_tool_name( opts, "gcc", CC ))) strarray_add( spec_args, strmake( "--cc-cmd=%s", strarray_tostring( tool, " " ))); - if (!is_pe && (tool = build_tool_name( opts, "ld", LD ))) strarray_add( spec_args, strmake( "--ld-cmd=%s", strarray_tostring( tool, " " ))); + if ((tool = build_tool_name( opts, TOOL_CC ))) strarray_add( spec_args, strmake( "--cc-cmd=%s", strarray_tostring( tool, " " ))); + if (!is_pe && (tool = build_tool_name( opts, TOOL_LD ))) strarray_add( spec_args, strmake( "--ld-cmd=%s", strarray_tostring( tool, " " ))); spec_o_name = get_temp_file(output_name, ".spec.o"); if (opts->force_pointer_size)
1
0
0
0
Jacek Caban : winegcc: Return build_tool_name result as strarray.
by Alexandre Julliard
03 Mar '20
03 Mar '20
Module: wine Branch: master Commit: 4cfe747772e0ac9d1c35caab5c3d989dc4cb1868 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4cfe747772e0ac9d1c35caab…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Mar 3 14:02:08 2020 +0100 winegcc: Return build_tool_name result as strarray. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/winegcc.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index f2802e2460..6bcd157a26 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -314,7 +314,7 @@ static char* get_temp_file(const char* prefix, const char* suffix) return tmp; } -static const char* build_tool_name(struct options *opts, const char* base, const char* deflt) +static strarray* build_tool_name(struct options *opts, const char* base, const char* deflt) { const char *path; char* str; @@ -334,31 +334,31 @@ static const char* build_tool_name(struct options *opts, const char* base, const else str = xstrdup(deflt); - if ((path = find_binary( opts->prefix, str ))) return path; + if ((path = find_binary( opts->prefix, str ))) return strarray_fromstring( path, " " ); error( "Could not find %s\n", base ); return NULL; } static strarray* get_translator(struct options *opts) { - const char *str = NULL; + strarray *tool; switch(opts->processor) { case proc_cpp: - str = build_tool_name(opts, "cpp", CPP); + tool = build_tool_name(opts, "cpp", CPP); break; case proc_cc: case proc_as: - str = build_tool_name(opts, "gcc", CC); + tool = build_tool_name(opts, "gcc", CC); break; case proc_cxx: - str = build_tool_name(opts, "g++", CXX); + tool = build_tool_name(opts, "g++", CXX); break; default: assert(0); } - return strarray_fromstring( str, " " ); + return tool; } static int try_link( const strarray *prefix, const strarray *link_tool, const char *cflags ) @@ -680,8 +680,8 @@ static void compile(struct options* opts, const char* lang) /* mixing different C and C++ compilers isn't supported in configure anyway */ case proc_cc: case proc_cxx: - gcc = strarray_fromstring(build_tool_name(opts, "gcc", CC), " "); - gpp = strarray_fromstring(build_tool_name(opts, "g++", CXX), " "); + gcc = build_tool_name(opts, "gcc", CC); + gpp = build_tool_name(opts, "g++", CXX); for ( j = 0; !gcc_defs && j < comp_args->size; j++ ) { const char *cc = comp_args->base[j]; @@ -993,7 +993,7 @@ static void add_library( struct options *opts, strarray *lib_dirs, strarray *fil static void build(struct options* opts) { strarray *lib_dirs, *files; - strarray *spec_args, *link_args; + strarray *spec_args, *link_args, *tool; char *output_file, *output_path; const char *spec_o_name, *libgcc = NULL; const char *output_name, *spec_file, *lang; @@ -1161,8 +1161,8 @@ static void build(struct options* opts) /* run winebuild to generate the .spec.o file */ spec_args = get_winebuild_args( opts ); - strarray_add( spec_args, strmake( "--cc-cmd=%s", build_tool_name( opts, "gcc", CC ))); - if (!is_pe) strarray_add( spec_args, strmake( "--ld-cmd=%s", build_tool_name( opts, "ld", LD ))); + if ((tool = build_tool_name( opts, "gcc", CC ))) strarray_add( spec_args, strmake( "--cc-cmd=%s", strarray_tostring( tool, " " ))); + if (!is_pe && (tool = build_tool_name( opts, "ld", LD ))) strarray_add( spec_args, strmake( "--ld-cmd=%s", strarray_tostring( tool, " " ))); spec_o_name = get_temp_file(output_name, ".spec.o"); if (opts->force_pointer_size)
1
0
0
0
Jacek Caban : winegcc: Lookup PATH in find_binary and don't try to run binaries that can't be found.
by Alexandre Julliard
03 Mar '20
03 Mar '20
Module: wine Branch: master Commit: 945c61c32d86fa7b3bac0641840f26897e55f1ee URL:
https://source.winehq.org/git/wine.git/?a=commit;h=945c61c32d86fa7b3bac0641…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Mar 3 14:01:59 2020 +0100 winegcc: Lookup PATH in find_binary and don't try to run binaries that can't be found. Based on winebuild. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/utils.c | 44 ++++++++++++++++++++++++++++++++++++++------ tools/winegcc/winegcc.c | 7 ++++++- 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/tools/winegcc/utils.c b/tools/winegcc/utils.c index 52f46c491b..1a9bc0a63c 100644 --- a/tools/winegcc/utils.c +++ b/tools/winegcc/utils.c @@ -34,6 +34,12 @@ # define min(x,y) (((x) < (y)) ? (x) : (y)) #endif +#if defined(_WIN32) && !defined(__CYGWIN__) +# define PATH_SEPARATOR ';' +#else +# define PATH_SEPARATOR ':' +#endif + int verbose = 0; void error(const char* s, ...) @@ -305,18 +311,44 @@ file_type get_lib_type(enum target_platform platform, strarray* path, const char const char *find_binary( const strarray* prefix, const char *name ) { + char *file_name, *args; + static strarray *path; unsigned int i; - if (!prefix) return name; if (strchr( name, '/' )) return name; - for (i = 0; i < prefix->size; i++) + file_name = xstrdup( name ); + if ((args = strchr( file_name, ' ' ))) *args++ = 0; + + if (prefix) + { + for (i = 0; i < prefix->size; i++) + { + struct stat st; + char *prog = strmake( "%s/%s%s", prefix->base[i], file_name, EXEEXT ); + if (stat( prog, &st ) == 0 && S_ISREG( st.st_mode ) && (st.st_mode & 0111)) + return args ? strmake( "%s %s", prog, args ) : prog; + free( prog ); + } + } + if (!path) { - struct stat st; - char *prog = strmake( "%s/%s%s", prefix->base[i], name, EXEEXT ); - if (stat( prog, &st ) == 0 && S_ISREG( st.st_mode ) && (st.st_mode & 0111)) return prog; + path = strarray_alloc(); + + /* then append the PATH directories */ + if (getenv( "PATH" )) + { + char *p = xstrdup( getenv( "PATH" )); + while (*p) + { + strarray_add( path, p ); + while (*p && *p != PATH_SEPARATOR) p++; + if (!*p) break; + *p++ = 0; + } + } } - return name; + return prefix == path ? NULL : find_binary( path, name ); } int spawn(const strarray* prefix, const strarray* args, int ignore_errors) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 20c72ec3c5..f2802e2460 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -316,6 +316,7 @@ static char* get_temp_file(const char* prefix, const char* suffix) static const char* build_tool_name(struct options *opts, const char* base, const char* deflt) { + const char *path; char* str; if (opts->target && opts->version) @@ -332,7 +333,10 @@ static const char* build_tool_name(struct options *opts, const char* base, const } else str = xstrdup(deflt); - return find_binary( opts->prefix, str ); + + if ((path = find_binary( opts->prefix, str ))) return path; + error( "Could not find %s\n", base ); + return NULL; } static strarray* get_translator(struct options *opts) @@ -877,6 +881,7 @@ static strarray *get_winebuild_args(struct options *opts) binary = strmake( "%s/winebuild%s", bindir, EXEEXT ); else binary = find_binary( opts->prefix, "winebuild" ); + if (!binary) error( "Could not find winebuild\n" ); strarray_add( spec_args, binary ); if (verbose) strarray_add( spec_args, "-v" ); if (keep_generated) strarray_add( spec_args, "--save-temps" );
1
0
0
0
Jacek Caban : winetest: Build with msvcrt.
by Alexandre Julliard
03 Mar '20
03 Mar '20
Module: wine Branch: master Commit: adc34d4a29c9e8a635cccfe4dfad374f7483672b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=adc34d4a29c9e8a635cccfe4…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Mar 3 14:11:10 2020 +0100 winetest: Build with msvcrt. Allows running tests on Windows without ucrtbase.dll. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/winetest/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/winetest/Makefile.in b/programs/winetest/Makefile.in index 0322e773c5..699ce7864c 100644 --- a/programs/winetest/Makefile.in +++ b/programs/winetest/Makefile.in @@ -1,5 +1,5 @@ MODULE = winetest.exe -IMPORTS = uuid comctl32 version user32 gdi32 advapi32 wsock32 +IMPORTS = uuid comctl32 version user32 gdi32 advapi32 wsock32 msvcrt DELAYIMPORTS = ole32 EXTRADLLFLAGS = -mconsole -mno-cygwin
1
0
0
0
Francois Gouget : kernel32/tests: Fix test_Toolhelp()'s nested process lookup.
by Alexandre Julliard
03 Mar '20
03 Mar '20
Module: wine Branch: master Commit: e4c15b5bbd567694dbcdb142751e7410e323c691 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e4c15b5bbd567694dbcdb142…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Mon Mar 2 18:27:30 2020 +0100 kernel32/tests: Fix test_Toolhelp()'s nested process lookup. On Windows, processes are not reassigned to pid 1 when their parent dies. This means many processes could have the same ppid despite being started by unrelated processes. It also means test_Toolhelp() cannot reliably look up the nested process by its ppid. So look up for the nested process by its pid and only then check its ppid, executable file, etc. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48664
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/process.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c index b32560358d..b5ed99062e 100644 --- a/dlls/kernel32/tests/process.c +++ b/dlls/kernel32/tests/process.c @@ -1157,6 +1157,7 @@ static void test_Toolhelp(void) STARTUPINFOA startup; PROCESS_INFORMATION info; HANDLE process, thread, snapshot; + DWORD nested_pid; PROCESSENTRY32 pe; THREADENTRY32 te; DWORD ret; @@ -1209,17 +1210,24 @@ static void test_Toolhelp(void) /* The following test fails randomly on some Windows versions, but Gothic 2 depends on it */ ok(i < 20 || broken(i == 20), "process object not released\n"); + /* Look for the nested process by pid */ + WritePrivateProfileStringA(NULL, NULL, NULL, resfile); + nested_pid = GetPrivateProfileIntA("Nested", "Pid", 0, resfile); + DeleteFileA(resfile); + snapshot = pCreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); ok(snapshot != INVALID_HANDLE_VALUE, "CreateToolhelp32Snapshot failed %u\n", GetLastError()); memset(&pe, 0, sizeof(pe)); pe.dwSize = sizeof(pe); if (pProcess32First(snapshot, &pe)) { - while (pe.th32ParentProcessID != info.dwProcessId) + while (pe.th32ProcessID != nested_pid) if (!pProcess32Next(snapshot, &pe)) break; } CloseHandle(snapshot); - ok(pe.th32ParentProcessID == info.dwProcessId, "failed to find nested child process\n"); + ok(pe.th32ProcessID == nested_pid, "failed to find nested child process\n"); + ok(pe.th32ParentProcessID == info.dwProcessId, "nested child process has parent %u instead of %u\n", pe.th32ParentProcessID, info.dwProcessId); + ok(stricmp(pe.szExeFile, exename) == 0, "nested executable is %s instead of %s\n", pe.szExeFile, exename); process = OpenProcess(PROCESS_ALL_ACCESS_NT4, FALSE, pe.th32ProcessID); ok(process != NULL, "OpenProcess failed %u\n", GetLastError()); @@ -1242,7 +1250,8 @@ static void test_Toolhelp(void) ok(ret == 1, "expected 1, got %u\n", ret); CloseHandle(thread); - ok(WaitForSingleObject(process, 30000) == WAIT_OBJECT_0, "Child process termination\n"); + ret = WaitForSingleObject(process, 30000); + ok(ret == WAIT_OBJECT_0, "Child process termination got %u le=%u\n", ret, GetLastError()); CloseHandle(process); WritePrivateProfileStringA(NULL, NULL, NULL, resfile); @@ -4048,6 +4057,7 @@ START_TEST(process) char buffer[MAX_PATH + 26]; STARTUPINFOA startup; PROCESS_INFORMATION info; + HANDLE hFile; memset(&startup, 0, sizeof(startup)); startup.cb = sizeof(startup); @@ -4058,6 +4068,14 @@ START_TEST(process) ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &startup, &info), "CreateProcess failed\n"); CloseHandle(info.hProcess); CloseHandle(info.hThread); + + /* The nested process is suspended so we can use the same resource + * file and it's up to the parent to read it before resuming the + * nested process. + */ + hFile = CreateFileA(myARGV[3], GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); + childPrintf(hFile, "[Nested]\nPid=%08u\n", info.dwProcessId); + CloseHandle(hFile); return; } else if (!strcmp(myARGV[2], "parent") && myARGC >= 5)
1
0
0
0
← Newer
1
...
91
92
93
94
95
96
97
...
100
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
Results per page:
10
25
50
100
200