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
December 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
3 participants
462 discussions
Start a n
N
ew thread
Alexandre Julliard : makedep: Generate rules for test binaries.
by Alexandre Julliard
31 Dec '13
31 Dec '13
Module: wine Branch: master Commit: 8bf0f5fe6dc8de6986ed5eef40654d0d0ecdfb17 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8bf0f5fe6dc8de6986ed5eef4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 30 20:19:33 2013 +0100 makedep: Generate rules for test binaries. --- Make.rules.in | 19 +-------------- configure | 15 +----------- configure.ac | 15 +----------- tools/makedep.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 4 files changed, 68 insertions(+), 50 deletions(-) diff --git a/Make.rules.in b/Make.rules.in index 0a40ff4..52fdf9c 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -19,12 +19,9 @@ RCFLAGS = --nostdinc $(PORCFLAGS) $(TARGETFLAGS) $(DEFS) $(EXTRARCFLAGS) IDL_GEN_C_SRCS = $(IDL_C_SRCS:.idl=_c.c) $(IDL_I_SRCS:.idl=_i.c) \ $(IDL_P_SRCS:.idl=_p.c) $(IDL_S_SRCS:.idl=_s.c) -CLEAN_TARGETS = $(TESTMODULE) $(TESTMODULE_STRIPPED) $(CROSSTESTMODULE) - OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(IDL_GEN_C_SRCS:.c=.o) $(OBJC_SRCS:.m=.o) \ $(IDL_R_SRCS:.idl=_r.res) $(IDL_TLB_RES) $(RC_SRCS:.rc=.res) $(MC_SRCS:.mc=.res) $(EXTRA_OBJS) -CROSSOBJS = $(OBJS:.o=.cross.o) ALLCROSSCFLAGS = $(DEFS) -DWINE_CROSSTEST $(CPPFLAGS) $(CFLAGS) # Rules for dependencies @@ -34,20 +31,6 @@ depend: dummy .PHONY: depend -# Rules for tests - -$(TESTMODULE) $(TESTMODULE:%=%.so): $(OBJS) - $(WINEGCC) $(APPMODE) $(OBJS) -o $@ $(IMPORTS:%=-l%) $(LDFLAGS) $(LIBS) - -$(TESTMODULE_STRIPPED): $(OBJS) - $(WINEGCC) -s -Wb,-F,$(TESTMODULE) $(APPMODE) $(OBJS) -o $@ $(IMPORTS:%=-l%) $(LDFLAGS) $(LIBS) - -$(CROSSTESTMODULE): $(CROSSOBJS) - $(CROSSWINEGCC) $(CROSSOBJS) -o $@ $(IMPORTS:%=-l%) $(LDFLAGS) $(LIBS) - -$(WINETEST_RES): $(TESTMODULE_STRIPPED) - echo "$(TESTMODULE) TESTRES \"$(TESTMODULE_STRIPPED)\"" | $(WRC) $(RCFLAGS) -o $@ - # Rules for man pages all: $(MANPAGES:.man.in=.man) @@ -55,7 +38,7 @@ all: $(MANPAGES:.man.in=.man) # Rules for cleaning clean:: - $(RM) $(CLEAN_FILES) $(CLEAN_TARGETS) $(PROGRAMS) + $(RM) $(CLEAN_FILES) $(PROGRAMS) .PHONY: clean diff --git a/configure b/configure index 91bb070..5b2f013 100755 --- a/configure +++ b/configure @@ -16577,25 +16577,14 @@ DLLFLAGS = $DLLFLAGS MAKE_TEST_RULES=" DLLFLAGS = $DLLFLAGS -TESTMODULE = \$(TESTDLL:%.dll=%)_test.exe -TESTMODULE_STRIPPED = \$(TESTDLL:%.dll=%)_test-stripped.exe$DLLEXT -WINETEST_RES = \$(top_builddir)/programs/winetest/\$(TESTDLL:%.dll=%)_test.res -RUNTESTFLAGS = -q -P wine -T \$(top_builddir) -M \$(TESTDLL) -p \$(TESTMODULE)$DLLEXT +RUNTESTFLAGS = -q -P wine EXTRA_OBJS = testlist.o - -all: \$(TESTMODULE)$DLLEXT \$(WINETEST_RES) - -\$(C_SRCS:.c=.ok): \$(TESTMODULE)$DLLEXT \$(TESTDLL:%=../%$DLLEXT) " if test -n "$CROSSTARGET" then as_fn_append MAKE_TEST_RULES " MAKEDEPFLAGS = -xo -xcross.o -CROSSTESTMODULE = \$(TESTDLL:%.dll=%)_crosstest.exe - -crosstest: \$(CROSSTESTMODULE) -.PHONY: crosstest " fi @@ -17409,8 +17398,6 @@ zh_TW" -wine_fn_ignore_file "*.exe" -test -n "$DLLEXT" && wine_fn_ignore_file "*$DLLEXT" wine_fn_ignore_file ".gitignore" wine_fn_ignore_file "Makefile" wine_fn_ignore_file "TAGS" diff --git a/configure.ac b/configure.ac index 9d1948c..74950e3 100644 --- a/configure.ac +++ b/configure.ac @@ -2635,24 +2635,13 @@ dnl Test rules AC_SUBST(MAKE_TEST_RULES," DLLFLAGS = $DLLFLAGS -TESTMODULE = \$(TESTDLL:%.dll=%)_test.exe -TESTMODULE_STRIPPED = \$(TESTDLL:%.dll=%)_test-stripped.exe$DLLEXT -WINETEST_RES = \$(top_builddir)/programs/winetest/\$(TESTDLL:%.dll=%)_test.res -RUNTESTFLAGS = -q -P wine -T \$(top_builddir) -M \$(TESTDLL) -p \$(TESTMODULE)$DLLEXT +RUNTESTFLAGS = -q -P wine EXTRA_OBJS = testlist.o - -all: \$(TESTMODULE)$DLLEXT \$(WINETEST_RES) - -\$(C_SRCS:.c=.ok): \$(TESTMODULE)$DLLEXT \$(TESTDLL:%=../%$DLLEXT) ") if test -n "$CROSSTARGET" then AS_VAR_APPEND([MAKE_TEST_RULES]," MAKEDEPFLAGS = -xo -xcross.o -CROSSTESTMODULE = \$(TESTDLL:%.dll=%)_crosstest.exe - -crosstest: \$(CROSSTESTMODULE) -.PHONY: crosstest ") fi @@ -3455,8 +3444,6 @@ dnl End of auto-generated output commands dnl Main ignore file -WINE_IGNORE_FILE("*.exe") -test -n "$DLLEXT" && WINE_IGNORE_FILE("*$DLLEXT") WINE_IGNORE_FILE(".gitignore") WINE_IGNORE_FILE("Makefile") WINE_IGNORE_FILE("TAGS") diff --git a/tools/makedep.c b/tools/makedep.c index ee24bba..a9b4d6b 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -1367,7 +1367,6 @@ static struct strarray output_sources(void) struct incl_file *source; int i; const char *dllext = ".so"; - int is_test = find_src_file( "testlist.o" ) != NULL; struct strarray object_files = empty_strarray; struct strarray crossobj_files = empty_strarray; struct strarray res_files = empty_strarray; @@ -1385,6 +1384,7 @@ static struct strarray output_sources(void) struct strarray delayimports = get_expanded_make_var_array( "DELAYIMPORTS" ); char *module = get_expanded_make_variable( "MODULE" ); char *exeext = get_expanded_make_variable( "EXEEXT" ); + char *testdll = get_expanded_make_variable( "TESTDLL" ); char *appmode = get_expanded_make_variable( "APPMODE" ); char *staticlib = get_expanded_make_variable( "STATICLIB" ); char *crosstarget = get_expanded_make_variable( "CROSSTARGET" ); @@ -1602,11 +1602,12 @@ static struct strarray output_sources(void) output_filename( "$(ALLCROSSCFLAGS)" ); output( "\n" ); } - if (is_test && !strcmp( ext, "c" ) && !(source->flags & FLAG_GENERATED)) + if (testdll && !strcmp( ext, "c" ) && !(source->flags & FLAG_GENERATED)) { strarray_add( &test_files, source->name ); output( "%s.ok:\n", obj ); - output( "\t$(RUNTEST) $(RUNTESTFLAGS) %s && touch $@\n", obj ); + output( "\t$(RUNTEST) $(RUNTESTFLAGS) -T %s -M %s -p %s%s %s && touch $@\n", top_obj_dir, + testdll, replace_extension( testdll, ".dll", "_test.exe" ), dllext, obj ); } for (i = 0; i < object_extensions.count; i++) output( "%s.%s ", obj, object_extensions.str[i] ); @@ -1773,13 +1774,73 @@ static struct strarray output_sources(void) } } - if (is_test) + if (testdll) { struct strarray ok_files = strarray_replace_extension( &test_files, ".c", ".ok" ); + char *testmodule = replace_extension( testdll, ".dll", "_test.exe" ); + char *stripped = replace_extension( testdll, ".dll", "_test-stripped.exe" ); + struct strarray all_libs = empty_strarray; + + for (i = 0; i < imports.count; i++) strarray_add( &all_libs, strmake( "-l%s", imports.str[i] )); + strarray_addall( &all_libs, get_expanded_make_var_array( "LIBS" )); + + strarray_add( &all_targets, strmake( "%s%s", testmodule, dllext )); + strarray_add( &clean_files, strmake( "%s%s", stripped, dllext )); + output( "%s%s:\n", testmodule, dllext ); + output( "\t$(WINEGCC) -o $@" ); + if (appmode) output_filename( appmode ); + output_filenames( object_files ); + output_filenames( res_files ); + output_filenames( all_libs ); + output_filename( "$(LDFLAGS)" ); + output( "\n" ); + output( "%s%s:\n", stripped, dllext ); + output( "\t$(WINEGCC) -s -o $@ -Wb,-F,%s", testmodule ); + if (appmode) output_filename( appmode ); + output_filenames( object_files ); + output_filenames( res_files ); + output_filenames( all_libs ); + output_filename( "$(LDFLAGS)" ); + output( "\n" ); + output( "%s%s %s%s:", testmodule, dllext, stripped, dllext ); + output_filenames( object_files ); + output_filenames( res_files ); + output( "\n" ); + + if (top_obj_dir) + { + char *testres = replace_extension( testdll, ".dll", "_test.res" ); + output( "all: %s/programs/winetest/%s\n", top_obj_dir, testres ); + output( "%s/programs/winetest/%s: %s%s\n", top_obj_dir, testres, stripped, dllext ); + output( "\techo \"%s TESTRES \\\"%s%s\\\"\" | $(WRC) $(RCFLAGS) -o $@\n", + testmodule, stripped, dllext ); + } + + if (crosstarget) + { + char *crosstest = replace_extension( testdll, ".dll", "_crosstest.exe" ); + + strarray_add( &clean_files, crosstest ); + output( "crosstest: %s\n", crosstest ); + output( "%s:", crosstest ); + output_filenames( crossobj_files ); + output_filenames( res_files ); + output( "\n" ); + output( "\t$(CROSSWINEGCC) -o $@" ); + output_filenames( crossobj_files ); + output_filenames( res_files ); + output_filenames( all_libs ); + output_filename( "$(LDFLAGS)" ); + output( "\n" ); + strarray_add( &phony_targets, "crosstest" ); + } + output( "testlist.c: $(MAKECTESTS) %s\n", src_dir ? strmake("%s/Makefile.in", src_dir ) : "Makefile.in" ); output( "\t$(MAKECTESTS) -o $@" ); output_filenames( test_files ); output( "\n" ); + output_filenames( ok_files ); + output( ": %s%s ../%s%s\n", testmodule, dllext, testdll, dllext ); output( "check test:" ); output_filenames( ok_files ); output( "\n" );
1
0
0
0
Alexandre Julliard : makedep: Generate rules for static libraries.
by Alexandre Julliard
31 Dec '13
31 Dec '13
Module: wine Branch: master Commit: 908dada6620ce84df6044b786d348671d26a72d8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=908dada6620ce84df6044b786…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 30 20:17:36 2013 +0100 makedep: Generate rules for static libraries. --- Make.rules.in | 14 -------------- Make.vars.in | 2 -- configure | 2 -- configure.ac | 2 -- tools/makedep.c | 24 ++++++++++++++++++++++++ 5 files changed, 24 insertions(+), 20 deletions(-) diff --git a/Make.rules.in b/Make.rules.in index c368f9a..0a40ff4 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -27,20 +27,6 @@ OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(IDL_GEN_C_ CROSSOBJS = $(OBJS:.o=.cross.o) ALLCROSSCFLAGS = $(DEFS) -DWINE_CROSSTEST $(CPPFLAGS) $(CFLAGS) -# Rules for static libraries - -all: $(STATICLIB) - -$(STATICLIB): $(OBJS) - $(RM) $@ - $(AR) $(ARFLAGS) $@ $(OBJS) - $(RANLIB) $@ - -$(STATICLIB:.a=.cross.a): $(CROSSOBJS) - $(RM) $@ - $(CROSSAR) $(ARFLAGS) $@ $(CROSSOBJS) - $(CROSSRANLIB) $@ - # Rules for dependencies depend: dummy diff --git a/Make.vars.in b/Make.vars.in index 5246f89..bc19456 100644 --- a/Make.vars.in +++ b/Make.vars.in @@ -49,8 +49,6 @@ CROSSTARGET = @CROSSTARGET@ LINGUAS = @LINGUAS@ ALL_MO_FILES = $(LINGUAS:%=@top_builddir@/po/%.mo) PORCFLAGS = @PORCFLAGS@ -CROSSAR = $(CROSSTARGET)-ar -CROSSRANLIB = $(CROSSTARGET)-ranlib BUILDIMAGE = $(top_srcdir)/tools/buildimage C2MAN = $(top_srcdir)/tools/c2man.pl RUNTEST = $(top_srcdir)/tools/runtest diff --git a/configure b/configure index 8a254ad..91bb070 100755 --- a/configure +++ b/configure @@ -16549,7 +16549,6 @@ MAKE_IMPLIB_RULES="DLLFLAGS = $DLLFLAGS if test -n "$CROSSTARGET" then as_fn_append MAKE_IMPLIB_RULES "MAKEDEPFLAGS = -xo -xcross.o -all: \$(STATICLIB:.a=.cross.a) " fi @@ -17410,7 +17409,6 @@ zh_TW" -wine_fn_ignore_file "*.a" wine_fn_ignore_file "*.exe" test -n "$DLLEXT" && wine_fn_ignore_file "*$DLLEXT" wine_fn_ignore_file ".gitignore" diff --git a/configure.ac b/configure.ac index a8a7da4..9d1948c 100644 --- a/configure.ac +++ b/configure.ac @@ -2607,7 +2607,6 @@ AC_SUBST(MAKE_IMPLIB_RULES,"DLLFLAGS = $DLLFLAGS if test -n "$CROSSTARGET" then AS_VAR_APPEND([MAKE_IMPLIB_RULES],"MAKEDEPFLAGS = -xo -xcross.o -all: \$(STATICLIB:.a=.cross.a) ") fi @@ -3456,7 +3455,6 @@ dnl End of auto-generated output commands dnl Main ignore file -WINE_IGNORE_FILE("*.a") WINE_IGNORE_FILE("*.exe") test -n "$DLLEXT" && WINE_IGNORE_FILE("*$DLLEXT") WINE_IGNORE_FILE(".gitignore") diff --git a/tools/makedep.c b/tools/makedep.c index f7bba41..ee24bba 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -1386,6 +1386,7 @@ static struct strarray output_sources(void) char *module = get_expanded_make_variable( "MODULE" ); char *exeext = get_expanded_make_variable( "EXEEXT" ); char *appmode = get_expanded_make_variable( "APPMODE" ); + char *staticlib = get_expanded_make_variable( "STATICLIB" ); char *crosstarget = get_expanded_make_variable( "CROSSTARGET" ); if (exeext && !strcmp( exeext, ".exe" )) dllext = ""; @@ -1749,6 +1750,29 @@ static struct strarray output_sources(void) } } + if (staticlib) + { + strarray_add( &all_targets, staticlib ); + output( "%s:", staticlib ); + output_filenames( object_files ); + output( "\n\t$(RM) $@\n" ); + output( "\t$(AR) $(ARFLAGS) $@" ); + output_filenames( object_files ); + output( "\n\t$(RANLIB) $@\n" ); + if (crosstarget && object_extensions.count > 1) + { + char *name = replace_extension( staticlib, ".a", ".cross.a" ); + + strarray_add( &all_targets, name ); + output( "%s:", name ); + output_filenames( crossobj_files ); + output( "\n\t$(RM) $@\n" ); + output( "\t%s-ar $(ARFLAGS) $@", crosstarget ); + output_filenames( crossobj_files ); + output( "\n\t%s-ranlib $@\n", crosstarget ); + } + } + if (is_test) { struct strarray ok_files = strarray_replace_extension( &test_files, ".c", ".ok" );
1
0
0
0
Alexandre Julliard : makedep: Generate rules for import libraries.
by Alexandre Julliard
31 Dec '13
31 Dec '13
Module: wine Branch: master Commit: a37ef65ea83d5b1e9d257ed81fda7ab2be75d5bd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a37ef65ea83d5b1e9d257ed81…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 30 20:14:45 2013 +0100 makedep: Generate rules for import libraries. --- Make.rules.in | 16 +--------------- Make.vars.in | 1 - configure | 5 +---- configure.ac | 3 +-- tools/makedep.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 56 insertions(+), 23 deletions(-) diff --git a/Make.rules.in b/Make.rules.in index 004e5f1..c368f9a 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -19,8 +19,7 @@ RCFLAGS = --nostdinc $(PORCFLAGS) $(TARGETFLAGS) $(DEFS) $(EXTRARCFLAGS) IDL_GEN_C_SRCS = $(IDL_C_SRCS:.idl=_c.c) $(IDL_I_SRCS:.idl=_i.c) \ $(IDL_P_SRCS:.idl=_p.c) $(IDL_S_SRCS:.idl=_s.c) -CLEAN_TARGETS = $(IMPORTLIB:%=lib%.@IMPLIBEXT@) \ - $(TESTMODULE) $(TESTMODULE_STRIPPED) $(CROSSTESTMODULE) +CLEAN_TARGETS = $(TESTMODULE) $(TESTMODULE_STRIPPED) $(CROSSTESTMODULE) OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(IDL_GEN_C_SRCS:.c=.o) $(OBJC_SRCS:.m=.o) \ $(IDL_R_SRCS:.idl=_r.res) $(IDL_TLB_RES) $(RC_SRCS:.rc=.res) $(MC_SRCS:.mc=.res) $(EXTRA_OBJS) @@ -42,19 +41,6 @@ $(STATICLIB:.a=.cross.a): $(CROSSOBJS) $(CROSSAR) $(ARFLAGS) $@ $(CROSSOBJS) $(CROSSRANLIB) $@ -# Rules for import libraries - -$(IMPORTLIB:%=lib%.def.a): $(IMPLIB_SRCS:.c=.o) - $(RM) $@ - $(AR) $(ARFLAGS) $@ $(IMPLIB_SRCS:.c=.o) - $(RANLIB) $@ - -$(IMPORTLIB:%=lib%.a): $(MAINSPEC) $(IMPLIB_SRCS:.c=.o) - $(WINEBUILD) $(TARGETFLAGS) -w --implib -o $@ --export $(MAINSPEC) $(IMPLIB_SRCS:.c=.o) - -$(IMPORTLIB:%=lib%.cross.a): $(MAINSPEC) $(IMPLIB_SRCS:.c=.cross.o) - $(WINEBUILD) $(CROSSTARGET:%=-b %) -w --implib -o $@ --export $(MAINSPEC) $(IMPLIB_SRCS:.c=.cross.o) - # Rules for dependencies depend: dummy diff --git a/Make.vars.in b/Make.vars.in index 7b6e265..5246f89 100644 --- a/Make.vars.in +++ b/Make.vars.in @@ -30,7 +30,6 @@ FLEX = @FLEX@ EXEEXT = @EXEEXT@ DLLPREFIX = @DLLPREFIX@ TOOLSEXT = @TOOLSEXT@ -IMPLIBEXT = @IMPLIBEXT@ DLLTOOL = @DLLTOOL@ AR = @AR@ ARFLAGS = @ARFLAGS@ diff --git a/configure b/configure index 6fb5933..8a254ad 100755 --- a/configure +++ b/configure @@ -711,7 +711,6 @@ READELF LDD LDRPATH_LOCAL LDRPATH_INSTALL -IMPLIBEXT DLLFLAGS DLLPREFIX dlldir @@ -6908,14 +6907,13 @@ DLLPREFIX="" DLLFLAGS="-D_REENTRANT" -IMPLIBEXT="def" - LDRPATH_INSTALL="" LDRPATH_LOCAL="" LIBEXT="so" DLLEXT=".so" +IMPLIBEXT="def" STATIC_IMPLIBEXT="def.a" # Extract the first word of "ldd", so it can be a program name with args. set dummy ldd; ac_word=$2 @@ -17426,7 +17424,6 @@ wine_fn_ignore_file "config.status" wine_fn_ignore_file "configure.lineno" wine_fn_ignore_file "include/config.h" wine_fn_ignore_file "include/stamp-h" -wine_fn_ignore_file "dlls/*/*.def" test "x$enable_fonts" = xno || wine_fn_ignore_file "fonts/*.fon" test "x$enable_winetest" = xno || wine_fn_ignore_file "programs/winetest/build.nfo" test "x$enable_winetest" = xno || wine_fn_ignore_file "programs/winetest/build.rc" diff --git a/configure.ac b/configure.ac index 9d9078c..a8a7da4 100644 --- a/configure.ac +++ b/configure.ac @@ -675,11 +675,11 @@ dnl **** Check for working dll **** AC_SUBST(dlldir,"\${libdir}/wine") AC_SUBST(DLLPREFIX,"") AC_SUBST(DLLFLAGS,"-D_REENTRANT") -AC_SUBST(IMPLIBEXT,"def") AC_SUBST(LDRPATH_INSTALL,"") AC_SUBST(LDRPATH_LOCAL,"") LIBEXT="so" DLLEXT=".so" +IMPLIBEXT="def" STATIC_IMPLIBEXT="def.a" WINE_PATH_SONAME_TOOLS @@ -3470,7 +3470,6 @@ WINE_IGNORE_FILE("config.status") WINE_IGNORE_FILE("configure.lineno") WINE_IGNORE_FILE("include/config.h") WINE_IGNORE_FILE("include/stamp-h") -WINE_IGNORE_FILE("dlls/*/*.def") WINE_IGNORE_FILE("fonts/*.fon",enable_fonts) WINE_IGNORE_FILE("programs/winetest/build.nfo",enable_winetest) WINE_IGNORE_FILE("programs/winetest/build.rc",enable_winetest) diff --git a/tools/makedep.c b/tools/makedep.c index 0516cbb..f7bba41 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -1376,6 +1376,7 @@ static struct strarray output_sources(void) struct strarray mc_files = empty_strarray; struct strarray test_files = empty_strarray; struct strarray dlldata_files = empty_strarray; + struct strarray implib_objs = empty_strarray; struct strarray includes = empty_strarray; struct strarray subdirs = empty_strarray; struct strarray all_targets = empty_strarray; @@ -1385,6 +1386,7 @@ static struct strarray output_sources(void) char *module = get_expanded_make_variable( "MODULE" ); char *exeext = get_expanded_make_variable( "EXEEXT" ); char *appmode = get_expanded_make_variable( "APPMODE" ); + char *crosstarget = get_expanded_make_variable( "CROSSTARGET" ); if (exeext && !strcmp( exeext, ".exe" )) dllext = ""; @@ -1569,6 +1571,7 @@ static struct strarray output_sources(void) else { if (source->flags & FLAG_GENERATED) strarray_add( &clean_files, source->filename ); + if (source->flags & FLAG_C_IMPLIB) strarray_add( &implib_objs, strmake( "%s.o", obj )); for (i = 0; i < object_extensions.count; i++) { output( "%s.%s: %s\n", obj, object_extensions.str[i], sourcedep ); @@ -1589,7 +1592,7 @@ static struct strarray output_sources(void) output( "\n" ); } } - if (source->flags & FLAG_C_IMPLIB) + if (crosstarget && (source->flags & FLAG_C_IMPLIB)) { strarray_add( &crossobj_files, strmake( "%s.cross.o", obj )); output( "%s.cross.o: %s\n", obj, sourcedep ); @@ -1653,6 +1656,8 @@ static struct strarray output_sources(void) if (module) { + int is_win16 = strendswith( module, "16" ); + char *importlib = get_expanded_make_variable( "IMPORTLIB" ); struct strarray all_libs = empty_strarray; char *spec_file = appmode ? NULL : replace_extension( module, ".dll", ".spec" ); @@ -1695,6 +1700,53 @@ static struct strarray output_sources(void) output_filenames( all_libs ); output_filename( "$(LDFLAGS)" ); output( "\n" ); + + if (spec_file && importlib) + { + if (*dllext) + { + strarray_add( &clean_files, strmake( "lib%s.def", importlib )); + output( "lib%s.def: %s\n", importlib, spec_file ); + output( "\t$(WINEBUILD) -w --def -o $@ --export %s", spec_file ); + output_filenames( get_expanded_make_var_array( "TARGETFLAGS" )); + if (is_win16) output_filename( "-m16" ); + output( "\n" ); + if (implib_objs.count) + { + strarray_add( &clean_files, strmake( "lib%s.def.a", importlib )); + output( "lib%s.def.a:", importlib ); + output_filenames( implib_objs ); + output( "\n" ); + output( "\t$(RM) $@\n" ); + output( "\t$(AR) $(ARFLAGS) $@" ); + output_filenames( implib_objs ); + output( "\n" ); + output( "\t$(RANLIB) $@\n" ); + } + } + else + { + strarray_add( &clean_files, strmake( "lib%s.a", importlib )); + output( "lib%s.a: %s", importlib, spec_file ); + output_filenames( implib_objs ); + output( "\n" ); + output( "\t$(WINEBUILD) -w --implib -o $@ --export %s", spec_file ); + output_filenames( get_expanded_make_var_array( "TARGETFLAGS" )); + output_filenames( implib_objs ); + output( "\n" ); + } + if (crosstarget && !is_win16) + { + struct strarray cross_files = strarray_replace_extension( &implib_objs, ".o", ".cross.o" ); + strarray_add( &clean_files, strmake( "lib%s.cross.a", importlib )); + output( "lib%s.cross.a: %s", importlib, spec_file ); + output_filenames( cross_files ); + output( "\n" ); + output( "\t$(WINEBUILD) -b %s -w --implib -o $@ --export %s", crosstarget, spec_file ); + output_filenames( cross_files ); + output( "\n" ); + } + } } if (is_test)
1
0
0
0
Alexandre Julliard : makedep: Generate rules for the main module.
by Alexandre Julliard
31 Dec '13
31 Dec '13
Module: wine Branch: master Commit: f6479c051313e68946f31bb3bfa623e6940f84bf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f6479c051313e68946f31bb3b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 30 20:08:13 2013 +0100 makedep: Generate rules for the main module. --- Make.rules.in | 7 +----- configure | 14 ----------- configure.ac | 14 ----------- tools/makedep.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 66 insertions(+), 36 deletions(-) diff --git a/Make.rules.in b/Make.rules.in index 08b790d..004e5f1 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -19,7 +19,7 @@ RCFLAGS = --nostdinc $(PORCFLAGS) $(TARGETFLAGS) $(DEFS) $(EXTRARCFLAGS) IDL_GEN_C_SRCS = $(IDL_C_SRCS:.idl=_c.c) $(IDL_I_SRCS:.idl=_i.c) \ $(IDL_P_SRCS:.idl=_p.c) $(IDL_S_SRCS:.idl=_s.c) -CLEAN_TARGETS = $(MODULE) $(IMPORTLIB:%=lib%.@IMPLIBEXT@) \ +CLEAN_TARGETS = $(IMPORTLIB:%=lib%.@IMPLIBEXT@) \ $(TESTMODULE) $(TESTMODULE_STRIPPED) $(CROSSTESTMODULE) OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(IDL_GEN_C_SRCS:.c=.o) $(OBJC_SRCS:.m=.o) \ @@ -28,11 +28,6 @@ OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(IDL_GEN_C_ CROSSOBJS = $(OBJS:.o=.cross.o) ALLCROSSCFLAGS = $(DEFS) -DWINE_CROSSTEST $(CPPFLAGS) $(CFLAGS) -# Rules for main module - -$(MODULE) $(MODULE:%=%.so) $(MODULE:%=%.fake): $(MAINSPEC) $(OBJS) - $(WINEGCC) $(APPMODE) $(MODULEFLAGS) $(OBJS) -o $@ $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(DELAYIMPORTS:%=-Wb,-d%) -lwine $(LIBPORT) $(EXTRALIBS) $(LDFLAGS) $(LIBS) - # Rules for static libraries all: $(STATICLIB) diff --git a/configure b/configure index a3c36ce..6fb5933 100755 --- a/configure +++ b/configure @@ -16556,20 +16556,9 @@ all: \$(STATICLIB:.a=.cross.a) fi -if test -n "$DLLEXT" -then - deps="\$(MODULE)$DLLEXT \$(MODULE).fake" -else - deps="\$(MODULE)" -fi - MAKE_DLL_RULES=" DLLFLAGS = $DLLFLAGS MAINSPEC = \$(srcdir)/\$(MODULE:%.dll=%).spec -IDL_TLB_RES = \$(IDL_TLB_SRCS:.idl=_t.res) -MODULEFLAGS = -shared \$(MAINSPEC) \$(EXTRADLLFLAGS) - -all: $deps manpages:: dummy \$(C2MAN) -o \$(top_builddir)/documentation/man\$(api_manext) -R\$(top_builddir) -C\$(srcdir) \$(PARENTSRC:%=-P%) -I\$(top_srcdir)/include \$(MAINSPEC:%=-w %) \$(C_SRCS) @@ -16585,8 +16574,6 @@ xmlpages:: dummy MAKE_PROG_RULES=" DLLFLAGS = $DLLFLAGS - -all: $deps " @@ -17428,7 +17415,6 @@ zh_TW" wine_fn_ignore_file "*.a" wine_fn_ignore_file "*.exe" test -n "$DLLEXT" && wine_fn_ignore_file "*$DLLEXT" -test -n "$DLLEXT" && wine_fn_ignore_file "*.fake" wine_fn_ignore_file ".gitignore" wine_fn_ignore_file "Makefile" wine_fn_ignore_file "TAGS" diff --git a/configure.ac b/configure.ac index 964c068..9d9078c 100644 --- a/configure.ac +++ b/configure.ac @@ -2613,20 +2613,9 @@ fi dnl Dll and program rules -if test -n "$DLLEXT" -then - deps="\$(MODULE)$DLLEXT \$(MODULE).fake" -else - deps="\$(MODULE)" -fi - AC_SUBST(MAKE_DLL_RULES," DLLFLAGS = $DLLFLAGS MAINSPEC = \$(srcdir)/\$(MODULE:%.dll=%).spec -IDL_TLB_RES = \$(IDL_TLB_SRCS:.idl=_t.res) -MODULEFLAGS = -shared \$(MAINSPEC) \$(EXTRADLLFLAGS) - -all: $deps manpages:: dummy \$(C2MAN) -o \$(top_builddir)/documentation/man\$(api_manext) -R\$(top_builddir) -C\$(srcdir) \$(PARENTSRC:%=-P%) -I\$(top_srcdir)/include \$(MAINSPEC:%=-w %) \$(C_SRCS) @@ -2641,8 +2630,6 @@ xmlpages:: dummy AC_SUBST(MAKE_PROG_RULES," DLLFLAGS = $DLLFLAGS - -all: $deps ") dnl Test rules @@ -3472,7 +3459,6 @@ dnl Main ignore file WINE_IGNORE_FILE("*.a") WINE_IGNORE_FILE("*.exe") test -n "$DLLEXT" && WINE_IGNORE_FILE("*$DLLEXT") -test -n "$DLLEXT" && WINE_IGNORE_FILE("*.fake") WINE_IGNORE_FILE(".gitignore") WINE_IGNORE_FILE("Makefile") WINE_IGNORE_FILE("TAGS") diff --git a/tools/makedep.c b/tools/makedep.c index c8a3a6f..0516cbb 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -1366,6 +1366,7 @@ static struct strarray output_sources(void) { struct incl_file *source; int i; + const char *dllext = ".so"; int is_test = find_src_file( "testlist.o" ) != NULL; struct strarray object_files = empty_strarray; struct strarray crossobj_files = empty_strarray; @@ -1377,7 +1378,15 @@ static struct strarray output_sources(void) struct strarray dlldata_files = empty_strarray; struct strarray includes = empty_strarray; struct strarray subdirs = empty_strarray; + struct strarray all_targets = empty_strarray; struct strarray phony_targets = empty_strarray; + struct strarray imports = get_expanded_make_var_array( "IMPORTS" ); + struct strarray delayimports = get_expanded_make_var_array( "DELAYIMPORTS" ); + char *module = get_expanded_make_variable( "MODULE" ); + char *exeext = get_expanded_make_variable( "EXEEXT" ); + char *appmode = get_expanded_make_variable( "APPMODE" ); + + if (exeext && !strcmp( exeext, ".exe" )) dllext = ""; strarray_add( &includes, "-I." ); if (src_dir) strarray_add( &includes, strmake( "-I%s", src_dir )); @@ -1642,6 +1651,52 @@ static struct strarray output_sources(void) output( "\n" ); } + if (module) + { + struct strarray all_libs = empty_strarray; + char *spec_file = appmode ? NULL : replace_extension( module, ".dll", ".spec" ); + + if (spec_file && src_dir) spec_file = strmake( "%s/%s", src_dir, spec_file ); + for (i = 0; i < delayimports.count; i++) + strarray_add( &all_libs, strmake( "-l%s", delayimports.str[i] )); + for (i = 0; i < imports.count; i++) + strarray_add( &all_libs, strmake( "-l%s", imports.str[i] )); + for (i = 0; i < delayimports.count; i++) + strarray_add( &all_libs, strmake( "-Wb,-d%s", delayimports.str[i] )); + strarray_add( &all_libs, "-lwine" ); + strarray_addall( &all_libs, get_expanded_make_var_array( "LIBPORT" )); + strarray_addall( &all_libs, get_expanded_make_var_array( "EXTRALIBS" )); + strarray_addall( &all_libs, get_expanded_make_var_array( "LIBS" )); + + if (*dllext) + { + strarray_add( &all_targets, strmake( "%s%s", module, dllext )); + strarray_add( &all_targets, strmake( "%s.fake", module )); + output( "%s%s %s.fake:", module, dllext, module ); + } + else + { + strarray_add( &all_targets, module ); + output( "%s:", module ); + } + if (spec_file) output_filename( spec_file ); + output_filenames( object_files ); + output_filenames( res_files ); + output( "\n" ); + output( "\t$(WINEGCC) -o $@" ); + if (spec_file) + { + output( " -shared %s", spec_file ); + output_filenames( get_expanded_make_var_array( "EXTRADLLFLAGS" )); + } + else output_filename( appmode ); + output_filenames( object_files ); + output_filenames( res_files ); + output_filenames( all_libs ); + output_filename( "$(LDFLAGS)" ); + output( "\n" ); + } + if (is_test) { struct strarray ok_files = strarray_replace_extension( &test_files, ".c", ".ok" ); @@ -1662,9 +1717,17 @@ static struct strarray output_sources(void) strarray_add( &phony_targets, "testclean" ); } + if (all_targets.count) + { + output( "all:" ); + output_filenames( all_targets ); + output( "\n" ); + } + strarray_addall( &clean_files, object_files ); strarray_addall( &clean_files, crossobj_files ); strarray_addall( &clean_files, res_files ); + strarray_addall( &clean_files, all_targets ); if (clean_files.count) { @@ -1780,7 +1843,7 @@ static void output_dependencies( const char *path ) } if (fclose( output_file )) fatal_perror( "write" ); output_file = tmp_file; - if (!found && !list_empty(&sources)) output( "\n%s\n", Separator ); + if (!found) output( "\n%s\n", Separator ); } else { @@ -1788,7 +1851,7 @@ static void output_dependencies( const char *path ) fatal_perror( "%s", path ); } - if (!list_empty( &sources )) targets = output_sources(); + targets = output_sources(); fclose( output_file ); output_file = NULL;
1
0
0
0
Alexandre Julliard : makedep: Keep track of object files in separate arrays .
by Alexandre Julliard
31 Dec '13
31 Dec '13
Module: wine Branch: master Commit: 8d6e9161683d9be818412ef35cd775c13930acd9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8d6e9161683d9be818412ef35…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 30 20:07:02 2013 +0100 makedep: Keep track of object files in separate arrays. --- tools/makedep.c | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index 3c35a8a..c8a3a6f 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -1367,6 +1367,9 @@ static struct strarray output_sources(void) struct incl_file *source; int i; int is_test = find_src_file( "testlist.o" ) != NULL; + struct strarray object_files = empty_strarray; + struct strarray crossobj_files = empty_strarray; + struct strarray res_files = empty_strarray; struct strarray clean_files = empty_strarray; struct strarray po_files = empty_strarray; struct strarray mc_files = empty_strarray; @@ -1457,13 +1460,13 @@ static struct strarray output_sources(void) output( "\n" ); output( "%s.res:", obj ); } - strarray_add( &clean_files, strmake( "%s.res", obj )); + strarray_add( &res_files, strmake( "%s.res", obj )); } else if (!strcmp( ext, "mc" )) /* message file */ { output( "%s.res: $(WMC) $(ALL_MO_FILES) %s\n", obj, sourcedep ); output( "\t$(WMC) -U -O res $(PORCFLAGS) -o $@ %s\n", source->filename ); - strarray_add( &clean_files, strmake( "%s.res", obj )); + strarray_add( &res_files, strmake( "%s.res", obj )); strarray_add( &mc_files, source->filename ); output( "msg.pot %s.res:", obj ); } @@ -1551,7 +1554,7 @@ static struct strarray output_sources(void) } else if (!strcmp( ext, "res" )) { - strarray_add( &clean_files, source->name ); + strarray_add( &res_files, source->name ); continue; /* no dependencies */ } else @@ -1559,10 +1562,10 @@ static struct strarray output_sources(void) if (source->flags & FLAG_GENERATED) strarray_add( &clean_files, source->filename ); for (i = 0; i < object_extensions.count; i++) { - strarray_add( &clean_files, strmake( "%s.%s", obj, object_extensions.str[i] )); output( "%s.%s: %s\n", obj, object_extensions.str[i], sourcedep ); if (strstr( object_extensions.str[i], "cross" )) { + strarray_add( &crossobj_files, strmake( "%s.%s", obj, object_extensions.str[i] )); output( "\t$(CROSSCC) -c -o $@ %s", source->filename ); output_filenames( includes ); output_filename( "$(ALLCROSSCFLAGS)" ); @@ -1570,6 +1573,7 @@ static struct strarray output_sources(void) } else { + strarray_add( &object_files, strmake( "%s.%s", obj, object_extensions.str[i] )); output( "\t$(CC) -c -o $@ %s", source->filename ); output_filenames( includes ); output_filename( "$(ALLCFLAGS)" ); @@ -1578,7 +1582,7 @@ static struct strarray output_sources(void) } if (source->flags & FLAG_C_IMPLIB) { - strarray_add( &clean_files, strmake( "%s.cross.o", obj )); + strarray_add( &crossobj_files, strmake( "%s.cross.o", obj )); output( "%s.cross.o: %s\n", obj, sourcedep ); output( "\t$(CROSSCC) -c -o $@ %s", source->filename ); output_filenames( includes ); @@ -1658,6 +1662,10 @@ static struct strarray output_sources(void) strarray_add( &phony_targets, "testclean" ); } + strarray_addall( &clean_files, object_files ); + strarray_addall( &clean_files, crossobj_files ); + strarray_addall( &clean_files, res_files ); + if (clean_files.count) { output( "clean::\n" );
1
0
0
0
Piotr Caban : msvcrt: Don' t write to buffer in ungetc if _IOSTRG flag is specified.
by Alexandre Julliard
30 Dec '13
30 Dec '13
Module: wine Branch: master Commit: ed2d53a36aa413e00c577e11772915bc5de4161e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ed2d53a36aa413e00c577e117…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Dec 30 16:55:59 2013 +0100 msvcrt: Don't write to buffer in ungetc if _IOSTRG flag is specified. --- dlls/msvcrt/file.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 4665e6b..04651fb 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -4713,7 +4713,15 @@ int CDECL MSVCRT_ungetc(int c, MSVCRT_FILE * file) file->_ptr++; if(file->_ptr>file->_base) { file->_ptr--; - *file->_ptr=c; + if(file->_flag & MSVCRT__IOSTRG) { + if(*file->_ptr != c) { + file->_ptr++; + MSVCRT__unlock_file(file); + return MSVCRT_EOF; + } + }else { + *file->_ptr = c; + } file->_cnt++; MSVCRT_clearerr(file); MSVCRT__unlock_file(file);
1
0
0
0
Piotr Caban : msvcrt: Convert data to multibyte encoding in ungetwc if needed.
by Alexandre Julliard
30 Dec '13
30 Dec '13
Module: wine Branch: master Commit: 6122c2ba37a8871c6118d0596e9576b17660f581 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6122c2ba37a8871c6118d0596…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Dec 30 16:55:42 2013 +0100 msvcrt: Convert data to multibyte encoding in ungetwc if needed. --- dlls/msvcrt/file.c | 29 +++++++++++++++++++++++++---- 1 files changed, 25 insertions(+), 4 deletions(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 3796482..4665e6b 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -4730,18 +4730,39 @@ int CDECL MSVCRT_ungetc(int c, MSVCRT_FILE * file) MSVCRT_wint_t CDECL MSVCRT_ungetwc(MSVCRT_wint_t wc, MSVCRT_FILE * file) { MSVCRT_wchar_t mwc = wc; - unsigned char * pp = (unsigned char *)&mwc; - int i; if (wc == MSVCRT_WEOF) return MSVCRT_WEOF; MSVCRT__lock_file(file); - for(i=sizeof(MSVCRT_wchar_t)-1;i>=0;i--) { - if(pp[i] != MSVCRT_ungetc(pp[i],file)) { + + if((msvcrt_get_ioinfo(file->_file)->exflag & (EF_UTF8 | EF_UTF16)) + || !(msvcrt_get_ioinfo(file->_file)->wxflag & WX_TEXT)) { + unsigned char * pp = (unsigned char *)&mwc; + int i; + + for(i=sizeof(MSVCRT_wchar_t)-1;i>=0;i--) { + if(pp[i] != MSVCRT_ungetc(pp[i],file)) { + MSVCRT__unlock_file(file); + return MSVCRT_WEOF; + } + } + }else { + char mbs[MSVCRT_MB_LEN_MAX]; + int len; + + len = MSVCRT_wctomb(mbs, mwc); + if(len == -1) { MSVCRT__unlock_file(file); return MSVCRT_WEOF; } + + for(len--; len>=0; len--) { + if(mbs[len] != MSVCRT_ungetc(mbs[len], file)) { + MSVCRT__unlock_file(file); + return MSVCRT_WEOF; + } + } } MSVCRT__unlock_file(file);
1
0
0
0
Jacek Caban : qcap: Added AVI compressor output pin stub implementation.
by Alexandre Julliard
30 Dec '13
30 Dec '13
Module: wine Branch: master Commit: 71687bef17e5ebc02cc0d2ba7d85c33b0958d7c6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=71687bef17e5ebc02cc0d2ba7…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Dec 30 16:38:18 2013 +0100 qcap: Added AVI compressor output pin stub implementation. --- dlls/qcap/avico.c | 105 +++++++++++++++++++++++++++++++++++++++++++++-- dlls/qcap/tests/qcap.c | 14 ++++++- 2 files changed, 113 insertions(+), 6 deletions(-) diff --git a/dlls/qcap/avico.c b/dlls/qcap/avico.c index a4bc02e..70c3283 100644 --- a/dlls/qcap/avico.c +++ b/dlls/qcap/avico.c @@ -35,6 +35,7 @@ typedef struct { IPersistPropertyBag IPersistPropertyBag_iface; BaseInputPin *in; + BaseOutputPin *out; } AVICompressor; static inline AVICompressor *impl_from_BaseFilter(BaseFilter *filter) @@ -93,6 +94,8 @@ static ULONG WINAPI AVICompressor_Release(IBaseFilter *iface) if(!ref) { if(This->in) BaseInputPinImpl_Release(&This->in->pin.IPin_iface); + if(This->out) + BaseOutputPinImpl_Release(&This->out->pin.IPin_iface); heap_free(This); } @@ -171,8 +174,8 @@ static IPin* WINAPI AVICompressor_GetPin(BaseFilter *iface, int pos) ret = &This->in->pin.IPin_iface; break; case 1: - FIXME("out pin not implemented\n"); - return NULL; + ret = &This->out->pin.IPin_iface; + break; default: TRACE("No pin %d\n", pos); return NULL; @@ -184,9 +187,7 @@ static IPin* WINAPI AVICompressor_GetPin(BaseFilter *iface, int pos) static LONG WINAPI AVICompressor_GetPinCount(BaseFilter *iface) { - AVICompressor *This = impl_from_BaseFilter(iface); - FIXME("(%p)\n", This); - return 1; + return 2; } static const BaseFilterFuncTable filter_func_table = { @@ -351,9 +352,93 @@ static const BaseInputPinFuncTable AVICompressorBaseInputPinVtbl = { AVICompressorIn_Receive }; +static HRESULT WINAPI AVICompressorOut_QueryInterface(IPin *iface, REFIID riid, void **ppv) +{ + return BaseInputPinImpl_QueryInterface(iface, riid, ppv); +} + +static ULONG WINAPI AVICompressorOut_AddRef(IPin *iface) +{ + AVICompressor *This = impl_from_IPin(iface); + return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface); +} + +static ULONG WINAPI AVICompressorOut_Release(IPin *iface) +{ + AVICompressor *This = impl_from_IPin(iface); + return IBaseFilter_Release(&This->filter.IBaseFilter_iface); +} + +static const IPinVtbl AVICompressorOutputPinVtbl = { + AVICompressorOut_QueryInterface, + AVICompressorOut_AddRef, + AVICompressorOut_Release, + BaseOutputPinImpl_Connect, + BaseOutputPinImpl_ReceiveConnection, + BaseOutputPinImpl_Disconnect, + BasePinImpl_ConnectedTo, + BasePinImpl_ConnectionMediaType, + BasePinImpl_QueryPinInfo, + BasePinImpl_QueryDirection, + BasePinImpl_QueryId, + BasePinImpl_QueryAccept, + BasePinImpl_EnumMediaTypes, + BasePinImpl_QueryInternalConnections, + BaseOutputPinImpl_EndOfStream, + BaseOutputPinImpl_BeginFlush, + BaseOutputPinImpl_EndFlush, + BasePinImpl_NewSegment +}; + +static LONG WINAPI AVICompressorOut_GetMediaTypeVersion(BasePin *base) +{ + FIXME("(%p)\n", base); + return 0; +} + +static HRESULT WINAPI AVICompressorOut_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt) +{ + AVICompressor *This = impl_from_IBaseFilter(base->pinInfo.pFilter); + FIXME("(%p)->(%d %p)\n", This, iPosition, amt); + return E_NOTIMPL; +} + +static const BasePinFuncTable AVICompressorOutputBasePinVtbl = { + NULL, + BaseOutputPinImpl_AttemptConnection, + AVICompressorOut_GetMediaTypeVersion, + AVICompressorOut_GetMediaType +}; + +static HRESULT WINAPI AVICompressorOut_DecideBufferSize(BaseOutputPin *base, IMemAllocator *alloc, ALLOCATOR_PROPERTIES *ppropInputRequest) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI AVICompressorOut_DecideAllocator(BaseOutputPin *base, + IMemInputPin *pPin, IMemAllocator **pAlloc) +{ + TRACE("(%p)->(%p %p)\n", base, pPin, pAlloc); + return BaseOutputPinImpl_DecideAllocator(base, pPin, pAlloc); +} + +static HRESULT WINAPI AVICompressorOut_BreakConnect(BaseOutputPin *base) +{ + FIXME("(%p)\n", base); + return E_NOTIMPL; +} + +static const BaseOutputPinFuncTable AVICompressorBaseOutputPinVtbl = { + AVICompressorOut_DecideBufferSize, + AVICompressorOut_DecideAllocator, + AVICompressorOut_BreakConnect +}; + IUnknown* WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr) { PIN_INFO in_pin_info = {NULL, PINDIR_INPUT, {'I','n','p','u','t',0}}; + PIN_INFO out_pin_info = {NULL, PINDIR_OUTPUT, {'O','u','t','p','u','t',0}}; AVICompressor *compressor; HRESULT hres; @@ -380,6 +465,16 @@ IUnknown* WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr) return NULL; } + out_pin_info.pFilter = &compressor->filter.IBaseFilter_iface; + hres = BaseOutputPin_Construct(&AVICompressorOutputPinVtbl, sizeof(BaseOutputPin), &out_pin_info, + &AVICompressorOutputBasePinVtbl, &AVICompressorBaseOutputPinVtbl, + &compressor->filter.csFilter, (IPin**)&compressor->out); + if(FAILED(hres)) { + IBaseFilter_Release(&compressor->filter.IBaseFilter_iface); + *phr = hres; + return NULL; + } + *phr = S_OK; return (IUnknown*)&compressor->filter.IBaseFilter_iface; } diff --git a/dlls/qcap/tests/qcap.c b/dlls/qcap/tests/qcap.c index 942a120..b053bbd 100644 --- a/dlls/qcap/tests/qcap.c +++ b/dlls/qcap/tests/qcap.c @@ -1336,13 +1336,14 @@ static void test_AviMux(void) static void test_AviCo(void) { IPersistPropertyBag *persist_bag; - IPin *pin, *in_pin; + IPin *pin, *in_pin, *out_pin; IEnumPins *enum_pins; IBaseFilter *avico; PIN_INFO pin_info; HRESULT hres; static const WCHAR inputW[] = {'I','n','p','u','t',0}; + static const WCHAR outputW[] = {'O','u','t','p','u','t',0}; hres = CoCreateInstance(&CLSID_AVICo, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void**)&avico); if(hres == REGDB_E_CLASSNOTREG) { @@ -1371,8 +1372,19 @@ static void test_AviCo(void) ok(pin_info.dir == PINDIR_INPUT, "pin_info.dir = %d\n", pin_info.dir); ok(!lstrcmpW(pin_info.achName, inputW), "pin_info.achName = %s\n", wine_dbgstr_w(pin_info.achName)); + hres = IEnumPins_Next(enum_pins, 1, &out_pin, NULL); + ok(hres == S_OK, "Next failed: %08x\n", hres); + + hres = IPin_QueryPinInfo(out_pin, &pin_info); + ok(hres == S_OK, "QueryPinInfo failed: %08x\n", hres); + ok(pin_info.pFilter == avico, "pin_info.pFilter != avico\n"); + ok(pin_info.dir == PINDIR_OUTPUT, "pin_info.dir = %d\n", pin_info.dir); + ok(!lstrcmpW(pin_info.achName, outputW), "pin_info.achName = %s\n", wine_dbgstr_w(pin_info.achName)); + IEnumPins_Release(enum_pins); + IPin_Release(in_pin); + IPin_Release(out_pin); IBaseFilter_Release(avico); }
1
0
0
0
Jacek Caban : qcap: Added AVI compressor input pin stub implementation.
by Alexandre Julliard
30 Dec '13
30 Dec '13
Module: wine Branch: master Commit: 792c53ad256d2e9aa52914a70635bbd86f69dd99 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=792c53ad256d2e9aa52914a70…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Dec 30 16:38:03 2013 +0100 qcap: Added AVI compressor input pin stub implementation. --- dlls/qcap/avico.c | 142 ++++++++++++++++++++++++++++++++++++++++++++++-- dlls/qcap/tests/qcap.c | 21 +++++++- 2 files changed, 158 insertions(+), 5 deletions(-) diff --git a/dlls/qcap/avico.c b/dlls/qcap/avico.c index 6817bf6..a4bc02e 100644 --- a/dlls/qcap/avico.c +++ b/dlls/qcap/avico.c @@ -33,6 +33,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap); typedef struct { BaseFilter filter; IPersistPropertyBag IPersistPropertyBag_iface; + + BaseInputPin *in; } AVICompressor; static inline AVICompressor *impl_from_BaseFilter(BaseFilter *filter) @@ -46,6 +48,11 @@ static inline AVICompressor *impl_from_IBaseFilter(IBaseFilter *iface) return impl_from_BaseFilter(filter); } +static inline AVICompressor *impl_from_BasePin(BasePin *pin) +{ + return impl_from_IBaseFilter(pin->pinInfo.pFilter); +} + static HRESULT WINAPI AVICompressor_QueryInterface(IBaseFilter *iface, REFIID riid, void **ppv) { AVICompressor *This = impl_from_IBaseFilter(iface); @@ -83,8 +90,11 @@ static ULONG WINAPI AVICompressor_Release(IBaseFilter *iface) TRACE("(%p) ref=%d\n", This, ref); - if(!ref) + if(!ref) { + if(This->in) + BaseInputPinImpl_Release(&This->in->pin.IPin_iface); heap_free(This); + } return ref; } @@ -152,15 +162,31 @@ static const IBaseFilterVtbl AVICompressorVtbl = { static IPin* WINAPI AVICompressor_GetPin(BaseFilter *iface, int pos) { AVICompressor *This = impl_from_BaseFilter(iface); - FIXME("(%p)->(%d)\n", This, pos); - return NULL; + IPin *ret; + + TRACE("(%p)->(%d)\n", This, pos); + + switch(pos) { + case 0: + ret = &This->in->pin.IPin_iface; + break; + case 1: + FIXME("out pin not implemented\n"); + return NULL; + default: + TRACE("No pin %d\n", pos); + return NULL; + }; + + IPin_AddRef(ret); + return ret; } static LONG WINAPI AVICompressor_GetPinCount(BaseFilter *iface) { AVICompressor *This = impl_from_BaseFilter(iface); FIXME("(%p)\n", This); - return 0; + return 1; } static const BaseFilterFuncTable filter_func_table = { @@ -229,9 +255,107 @@ static const IPersistPropertyBagVtbl PersistPropertyBagVtbl = { AVICompressorPropertyBag_Save }; +static inline AVICompressor *impl_from_IPin(IPin *iface) +{ + BasePin *bp = CONTAINING_RECORD(iface, BasePin, IPin_iface); + return impl_from_IBaseFilter(bp->pinInfo.pFilter); +} + +static HRESULT WINAPI AVICompressorIn_QueryInterface(IPin *iface, REFIID riid, void **ppv) +{ + return BaseInputPinImpl_QueryInterface(iface, riid, ppv); +} + +static ULONG WINAPI AVICompressorIn_AddRef(IPin *iface) +{ + AVICompressor *This = impl_from_IPin(iface); + return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface); +} + +static ULONG WINAPI AVICompressorIn_Release(IPin *iface) +{ + AVICompressor *This = impl_from_IPin(iface); + return IBaseFilter_Release(&This->filter.IBaseFilter_iface); +} + +static HRESULT WINAPI AVICompressorIn_ReceiveConnection(IPin *iface, + IPin *pConnector, const AM_MEDIA_TYPE *pmt) +{ + AVICompressor *This = impl_from_IPin(iface); + FIXME("(%p)->(%p AM_MEDIA_TYPE(%p))\n", This, pConnector, pmt); + dump_AM_MEDIA_TYPE(pmt); + return E_NOTIMPL; +} + +static HRESULT WINAPI AVICompressorIn_Disconnect(IPin *iface) +{ + AVICompressor *This = impl_from_IPin(iface); + FIXME("(%p)\n", This); + return E_NOTIMPL; +} + +static const IPinVtbl AVICompressorInputPinVtbl = { + AVICompressorIn_QueryInterface, + AVICompressorIn_AddRef, + AVICompressorIn_Release, + BaseInputPinImpl_Connect, + AVICompressorIn_ReceiveConnection, + AVICompressorIn_Disconnect, + BasePinImpl_ConnectedTo, + BasePinImpl_ConnectionMediaType, + BasePinImpl_QueryPinInfo, + BasePinImpl_QueryDirection, + BasePinImpl_QueryId, + BasePinImpl_QueryAccept, + BasePinImpl_EnumMediaTypes, + BasePinImpl_QueryInternalConnections, + BaseInputPinImpl_EndOfStream, + BaseInputPinImpl_BeginFlush, + BaseInputPinImpl_EndFlush, + BaseInputPinImpl_NewSegment +}; + +static HRESULT WINAPI AVICompressorIn_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *pmt) +{ + FIXME("(%p)->(AM_MEDIA_TYPE(%p))\n", base, pmt); + dump_AM_MEDIA_TYPE(pmt); + return E_NOTIMPL; +} + +static LONG WINAPI AVICompressorIn_GetMediaTypeVersion(BasePin *base) +{ + return 0; +} + +static HRESULT WINAPI AVICompressorIn_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt) +{ + TRACE("(%p)->(%d %p)\n", base, iPosition, amt); + return S_FALSE; +} + +static const BasePinFuncTable AVICompressorInputBasePinVtbl = { + AVICompressorIn_CheckMediaType, + NULL, + AVICompressorIn_GetMediaTypeVersion, + AVICompressorIn_GetMediaType +}; + +static HRESULT WINAPI AVICompressorIn_Receive(BaseInputPin *base, IMediaSample *pSample) +{ + AVICompressor *This = impl_from_BasePin(&base->pin); + FIXME("(%p)->(%p)\n", This, pSample); + return E_NOTIMPL; +} + +static const BaseInputPinFuncTable AVICompressorBaseInputPinVtbl = { + AVICompressorIn_Receive +}; + IUnknown* WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr) { + PIN_INFO in_pin_info = {NULL, PINDIR_INPUT, {'I','n','p','u','t',0}}; AVICompressor *compressor; + HRESULT hres; TRACE("\n"); @@ -246,6 +370,16 @@ IUnknown* WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr) compressor->IPersistPropertyBag_iface.lpVtbl = &PersistPropertyBagVtbl; + in_pin_info.pFilter = &compressor->filter.IBaseFilter_iface; + hres = BaseInputPin_Construct(&AVICompressorInputPinVtbl, sizeof(BaseInputPin), &in_pin_info, + &AVICompressorInputBasePinVtbl, &AVICompressorBaseInputPinVtbl, + &compressor->filter.csFilter, NULL, (IPin**)&compressor->in); + if(FAILED(hres)) { + IBaseFilter_Release(&compressor->filter.IBaseFilter_iface); + *phr = hres; + return NULL; + } + *phr = S_OK; return (IUnknown*)&compressor->filter.IBaseFilter_iface; } diff --git a/dlls/qcap/tests/qcap.c b/dlls/qcap/tests/qcap.c index 8081bce..942a120 100644 --- a/dlls/qcap/tests/qcap.c +++ b/dlls/qcap/tests/qcap.c @@ -1336,10 +1336,14 @@ static void test_AviMux(void) static void test_AviCo(void) { IPersistPropertyBag *persist_bag; + IPin *pin, *in_pin; + IEnumPins *enum_pins; IBaseFilter *avico; - IPin *pin; + PIN_INFO pin_info; HRESULT hres; + static const WCHAR inputW[] = {'I','n','p','u','t',0}; + hres = CoCreateInstance(&CLSID_AVICo, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void**)&avico); if(hres == REGDB_E_CLASSNOTREG) { win_skip("CLSID_AVICo not restered\n"); @@ -1354,6 +1358,21 @@ static void test_AviCo(void) ok(hres == S_OK, "QueryInterface(IID_IPersistPropertyBag) returned: %08x\n", hres); IPersistPropertyBag_Release(persist_bag); + + hres = IBaseFilter_EnumPins(avico, &enum_pins); + ok(hres == S_OK, "EnumPins failed: %08x\n", hres); + + hres = IEnumPins_Next(enum_pins, 1, &in_pin, NULL); + ok(hres == S_OK, "Next failed: %08x\n", hres); + + hres = IPin_QueryPinInfo(in_pin, &pin_info); + ok(hres == S_OK, "QueryPinInfo failed: %08x\n", hres); + ok(pin_info.pFilter == avico, "pin_info.pFilter != avico\n"); + ok(pin_info.dir == PINDIR_INPUT, "pin_info.dir = %d\n", pin_info.dir); + ok(!lstrcmpW(pin_info.achName, inputW), "pin_info.achName = %s\n", wine_dbgstr_w(pin_info.achName)); + + IEnumPins_Release(enum_pins); + IBaseFilter_Release(avico); }
1
0
0
0
Jacek Caban : qcap: Added IPersistPropertyBag stub implementation to AVI compressor.
by Alexandre Julliard
30 Dec '13
30 Dec '13
Module: wine Branch: master Commit: cd90d8fdd84d5199fa15baf8f115816871cd904b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cd90d8fdd84d5199fa15baf8f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Dec 30 16:37:47 2013 +0100 qcap: Added IPersistPropertyBag stub implementation to AVI compressor. --- dlls/qcap/avico.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++ dlls/qcap/tests/qcap.c | 9 ++++++ 2 files changed, 76 insertions(+), 0 deletions(-) diff --git a/dlls/qcap/avico.c b/dlls/qcap/avico.c index a24a1c3..6817bf6 100644 --- a/dlls/qcap/avico.c +++ b/dlls/qcap/avico.c @@ -32,6 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap); typedef struct { BaseFilter filter; + IPersistPropertyBag IPersistPropertyBag_iface; } AVICompressor; static inline AVICompressor *impl_from_BaseFilter(BaseFilter *filter) @@ -61,6 +62,9 @@ static HRESULT WINAPI AVICompressor_QueryInterface(IBaseFilter *iface, REFIID ri }else if(IsEqualIID(riid, &IID_IBaseFilter)) { TRACE("(%p)->(IID_IBaseFilter %p)\n", This, ppv); *ppv = &This->filter.IBaseFilter_iface; + }else if(IsEqualIID(riid, &IID_IPersistPropertyBag)) { + TRACE("(%p)->(IID_IPersistPropertyBag %p)\n", This, ppv); + *ppv = &This->IPersistPropertyBag_iface; }else { FIXME("no interface for %s\n", debugstr_guid(riid)); *ppv = NULL; @@ -164,6 +168,67 @@ static const BaseFilterFuncTable filter_func_table = { AVICompressor_GetPinCount }; +static AVICompressor *impl_from_IPersistPropertyBag(IPersistPropertyBag *iface) +{ + return CONTAINING_RECORD(iface, AVICompressor, IPersistPropertyBag_iface); +} + +static HRESULT WINAPI AVICompressorPropertyBag_QueryInterface(IPersistPropertyBag *iface, REFIID riid, void **ppv) +{ + AVICompressor *This = impl_from_IPersistPropertyBag(iface); + return IBaseFilter_QueryInterface(&This->filter.IBaseFilter_iface, riid, ppv); +} + +static ULONG WINAPI AVICompressorPropertyBag_AddRef(IPersistPropertyBag *iface) +{ + AVICompressor *This = impl_from_IPersistPropertyBag(iface); + return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface); +} + +static ULONG WINAPI AVICompressorPropertyBag_Release(IPersistPropertyBag *iface) +{ + AVICompressor *This = impl_from_IPersistPropertyBag(iface); + return IBaseFilter_Release(&This->filter.IBaseFilter_iface); +} + +static HRESULT WINAPI AVICompressorPropertyBag_GetClassID(IPersistPropertyBag *iface, CLSID *pClassID) +{ + AVICompressor *This = impl_from_IPersistPropertyBag(iface); + return IBaseFilter_GetClassID(&This->filter.IBaseFilter_iface, pClassID); +} + +static HRESULT WINAPI AVICompressorPropertyBag_InitNew(IPersistPropertyBag *iface) +{ + AVICompressor *This = impl_from_IPersistPropertyBag(iface); + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI AVICompressorPropertyBag_Load(IPersistPropertyBag *iface, IPropertyBag *pPropBag, IErrorLog *pErrorLog) +{ + AVICompressor *This = impl_from_IPersistPropertyBag(iface); + FIXME("(%p)->(%p %p)\n", This, pPropBag, pErrorLog); + return E_NOTIMPL; +} + +static HRESULT WINAPI AVICompressorPropertyBag_Save(IPersistPropertyBag *iface, IPropertyBag *pPropBag, + BOOL fClearDirty, BOOL fSaveAllProperties) +{ + AVICompressor *This = impl_from_IPersistPropertyBag(iface); + FIXME("(%p)->(%p %x %x)\n", This, pPropBag, fClearDirty, fSaveAllProperties); + return E_NOTIMPL; +} + +static const IPersistPropertyBagVtbl PersistPropertyBagVtbl = { + AVICompressorPropertyBag_QueryInterface, + AVICompressorPropertyBag_AddRef, + AVICompressorPropertyBag_Release, + AVICompressorPropertyBag_GetClassID, + AVICompressorPropertyBag_InitNew, + AVICompressorPropertyBag_Load, + AVICompressorPropertyBag_Save +}; + IUnknown* WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr) { AVICompressor *compressor; @@ -179,6 +244,8 @@ IUnknown* WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr) BaseFilter_Init(&compressor->filter, &AVICompressorVtbl, &CLSID_AVICo, (DWORD_PTR)(__FILE__ ": AVICompressor.csFilter"), &filter_func_table); + compressor->IPersistPropertyBag_iface.lpVtbl = &PersistPropertyBagVtbl; + *phr = S_OK; return (IUnknown*)&compressor->filter.IBaseFilter_iface; } diff --git a/dlls/qcap/tests/qcap.c b/dlls/qcap/tests/qcap.c index 014a763..8081bce 100644 --- a/dlls/qcap/tests/qcap.c +++ b/dlls/qcap/tests/qcap.c @@ -1335,7 +1335,9 @@ static void test_AviMux(void) static void test_AviCo(void) { + IPersistPropertyBag *persist_bag; IBaseFilter *avico; + IPin *pin; HRESULT hres; hres = CoCreateInstance(&CLSID_AVICo, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void**)&avico); @@ -1345,6 +1347,13 @@ static void test_AviCo(void) } ok(hres == S_OK, "Could not create CLSID_AVICo class: %08x\n", hres); + hres = IBaseFilter_QueryInterface(avico, &IID_IPin, (void**)&pin); + ok(hres == E_NOINTERFACE, "QueryInterface(IID_IPin) returned: %08x\n", hres); + + hres = IBaseFilter_QueryInterface(avico, &IID_IPersistPropertyBag, (void**)&persist_bag); + ok(hres == S_OK, "QueryInterface(IID_IPersistPropertyBag) returned: %08x\n", hres); + + IPersistPropertyBag_Release(persist_bag); IBaseFilter_Release(avico); }
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