diff options
Diffstat (limited to 'libcpp/pch.c')
-rw-r--r-- | libcpp/pch.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libcpp/pch.c b/libcpp/pch.c index 2fb7ba5..a6d8cea 100644 --- a/libcpp/pch.c +++ b/libcpp/pch.c @@ -58,7 +58,9 @@ write_macdef (cpp_reader *pfile, cpp_hashnode *hn, void *file_p) return 1; case NT_MACRO: - if ((hn->flags & NODE_BUILTIN)) + if ((hn->flags & NODE_BUILTIN) + && (!pfile->cb.user_builtin_macro + || !pfile->cb.user_builtin_macro (pfile, hn))) return 1; { @@ -759,6 +761,12 @@ static int save_macros (cpp_reader *r, cpp_hashnode *h, void *data_p) { struct save_macro_data *data = (struct save_macro_data *)data_p; + + if ((h->flags & NODE_BUILTIN) + && h->type == NT_MACRO + && r->cb.user_builtin_macro) + r->cb.user_builtin_macro (r, h); + if (h->type != NT_VOID && (h->flags & NODE_BUILTIN) == 0) { |