bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Max env-var size on Win-XP


From: Eli Zaretskii
Subject: Re: Max env-var size on Win-XP
Date: Sun, 02 Feb 2014 18:14:57 +0200

> From: "Gisle Vanem" <address@hidden>
> Date: Sun, 2 Feb 2014 15:06:23 +0100
> 
> According to:
>   
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms682653(v=vs.85).aspx
> 
> the total size of the environment is 32kByte. This has hit me several
> times in GNU-make when CreateProcess() triggers the mysterious error
> 87 (ERROR_INVALID_PARAMETER). Like in a very simple rule that involves
> 'echo':
> 
> process_begin: CreateProcess(g:\MingW32\msys\bin\echo.exe, echo "Generating 
> ...", ...) failed.
> make (e=87): Parameteren er feil  << Invalid parameter.
> 
> I've added a patch to arr2envblk() that checks the Win OS-version and prints 
> a warning
> if 'size_needed' exceeds 32 kByte. 

Wouldn't it be better to display the error only if CreateProcess fails
with e=87 _and_ the environment is larger than 32KB?  That would allow
us to avoid calling GetVersionEx, which MS wants to deprecate (see
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724451%28v=vs.85%29.aspx).

Would you like to write a modified patch along these lines?

> I'm not sure if the warning should be printed only when "--debug=jobs" is in 
> effect
> or always. But only once. Your choice.

I think always is better, if we only print it in the case of a
failure.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]