[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Max env-var size on Win-XP
From: |
Gisle Vanem |
Subject: |
Max env-var size on Win-XP |
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.
Googling for this error, returns approx 50.000 hits. So I think this warning is
warranted.
On Windows Vista and Windows Server 2008 (or above), MS has luckily removed
that limit. The command-line length has similar limit on Win-XP and below. But that
error is probably easier to spot.
I'm not sure if the warning should be printed only when "--debug=jobs" is in
effect
or always. But only once. Your choice.
Patch attached.
--gv
misc.diff
Description: Binary data
- Max env-var size on Win-XP,
Gisle Vanem <=