On 04/01/14 13:35, Nicholas R. Markham wrote:
> I just discovered that the name "options.def" is magical in autogen 5.18, presumably in an unintended way. Specifically, if I run "autogen options.def" and then try to compile the resulting options.c, I get a stream of errors like this:
>
>
> In file included from options.c:22:0:
> options.h:39:3: error: #error option template version mismatches autoopts/options.h header
> # error option template version mismatches autoopts/options.h header
> ^
> options.h:40:3: error: unknown type name ‘Choke’
> Choke Me.
> ^
> options.h:40:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘.’ token
> Choke Me.
> ^
>
>
> However, if I rename the same file to, say, "something-else.def", the resulting .c file compiles fine. It looks like, in the first case, there are some preprocessor macros that cause my generated options.h to get confused with <autoopts/options.h>, which it #includes. (If nothing else, they both #define AUTOOPTS_OPTIONS_GUARD_H.)
>
> I'm guessing the problem (and hopefully the solution) will be obvious to anyone familiar with the autogen source, but let me know if I can provide any further information.
>
> Best,
> Nick
It probably is. Meanwhile, "Don't do that" :)
I'll take a peek this Sunday.
|