Let's #define GMQCC by default

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-23 19:13:09 +01:00
parent f6b7ddf72b
commit 4a3921fcb9
2 changed files with 14 additions and 1 deletions

14
ftepp.c
View file

@ -1256,7 +1256,19 @@ bool ftepp_preprocess_string(const char *name, const char *str)
bool ftepp_init() bool ftepp_init()
{ {
ftepp = ftepp_new(); ftepp = ftepp_new();
return !!ftepp; if (!ftepp)
return false;
ftepp_add_define(NULL, "GMQCC");
return true;
}
void ftepp_add_define(const char *source, const char *name)
{
ppmacro *macro;
lex_ctx ctx = { "__builtin__", 0 };
ctx.file = source;
macro = ppmacro_new(ctx, name);
vec_push(ftepp->macros, macro);
} }
const char *ftepp_get() const char *ftepp_get()

View file

@ -804,6 +804,7 @@ bool ftepp_preprocess_string(const char *name, const char *str);
void ftepp_finish (); void ftepp_finish ();
const char *ftepp_get (); const char *ftepp_get ();
void ftepp_flush (); void ftepp_flush ();
void ftepp_add_define (const char *source, const char *name);
/*===================================================================*/ /*===================================================================*/
/*======================= main.c commandline ========================*/ /*======================= main.c commandline ========================*/