[2/3] widl: Fix handling of circular imports that involve the file passed on the command line.

Alexandre Julliard julliard at winehq.org
Mon May 25 07:50:08 CDT 2015


Francois Gouget <fgouget at free.fr> writes:

> ---
>  tools/widl/parser.l | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/tools/widl/parser.l b/tools/widl/parser.l
> index b911186..2333687 100644
> --- a/tools/widl/parser.l
> +++ b/tools/widl/parser.l
> @@ -488,6 +488,9 @@ int do_import(char *fname)
>  	int ptr = import_stack_ptr;
>  	int ret, fd;
>  
> +	if (strcmp(import_stack_ptr ? import_stack[0].input_name : input_name,
> +	           fname) == 0)
> +		return 0; /* initial source file */

This won't work for out-of-tree builds.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list