[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug report
From: |
Paul D. Smith |
Subject: |
Re: bug report |
Date: |
Wed, 18 Jul 2001 00:30:17 -0400 |
%% Francis Grolemund <address@hidden> writes:
fg> In any case, we ran into a subtle bug that was partially caused by
fg> our environment and how we've used gnumake, but I figured that
fg> since its such a pain in the ass, you guys may want to know about
fg> it. The problem is only occurring on a Windows 2000 system. To
fg> give some background, we've written a sort of macro language that
fg> created GNUMakefiles automatically to make it easier for
fg> developers to write the makefiles. In some cases developers were
fg> exporting environment variables that were devoid of a value. So
fg> in other words, when arr2envblk() in misc.c started to accumulate
fg> them into a block of memory for process_begin() in sub_proc.c,
fg> some would be added in the form:
fg> foo=<null>
fg> bar=<null>
fg> baz=<null>
You're saying, they had the literal string "<null>" in the value?
Did these strings appear in the makefile you generated? If so, this
sounds to me like a bug in your macro language. Many C runtime
implementations of printf(), fprintf(), etc. try to be "helpful" and if
you give a NULL pointer to them where a %s should go, they print the
constant string "<null>".
In that case you should check for the NULL pointer and handle it,
something like:
fprintf(fp, "%s=%s\n", variable, value ? value : "");
I'm not well-versed in the Windows-specific parts of the GNU make code,
but as far as I can tell GNU make would never construct an environment
variable of that syntax, from any input.
fg> Apparently CreateProcess really dislikes this because it would
fg> give a most unpleasant error, returning an ERROR_MORE_DATA from
fg> GetLastError. Although this makes sense now, the fact that it is
fg> undocumented caused weeks of pain for us.
CreateProcess() is a Windows function, not a GNU make function... ? I'm
not exactly sure what it is you are looking for here?
Thanks!
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
- bug report, Francis Grolemund, 2001/07/16
- bug report, Francis Grolemund, 2001/07/16
- Re: bug report,
Paul D. Smith <=