Closed stephenrkell closed 10 years ago
I'm unsure about that one. I've used many variants of -DFOO="bar" in the past with CIL without any issue. And the quoting seems necessary because the compiler is invoked using system
. I'm leaving this as wont-fix, unless you can provide a small shell script (or makefile) which exhibits the bug.
I've attached a test case. -DFOO="bar" is not a problem, but
-DFOO=
(Notice that unlike angle brackets, double-quotes are not touched by the code that I removed. So it's not a surprise that this works in either case.)
Oh, it doesn't seem to have included the e-mail attachment, and this UI doesn't seem to let me attach anything that isn't an image. How annoying. Anyway, the test case is simply a GNU Makefile
INCLUDE_DEF := -DSTDIO=<stdio.h>
CFLAGS += "$(INCLUDE_DEF)"
CC ?= cilly
default: hello-define
and a C source file
#include STDIO
int main(void)
{
printf("Hello, world!\n");
return 0;
}
Fixed, thanks.
To deal with a build system that wants to run the compiler with "-DSHA1_HEADER=<path/to/blah>" I had to apply the following patch to cilly.
Without this, the compiler was getting a string in its argv that contained literal quotes. To me, it doesn't look like the quoting is necessary at all, but I might be missing something.