diff options
Diffstat (limited to 'libcpp/internal.h')
-rw-r--r-- | libcpp/internal.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libcpp/internal.h b/libcpp/internal.h index 4c1100b..e629cbc 100644 --- a/libcpp/internal.h +++ b/libcpp/internal.h @@ -628,22 +628,22 @@ typedef unsigned char uchar; #define UC (const uchar *) /* Intended use: UC"string" */ -/* Macros. */ +/* Accessors. */ -static inline int cpp_in_system_header (cpp_reader *); -static inline int -cpp_in_system_header (cpp_reader *pfile) +inline int +_cpp_in_system_header (cpp_reader *pfile) { return pfile->buffer ? pfile->buffer->sysp : 0; } #define CPP_PEDANTIC(PF) CPP_OPTION (PF, cpp_pedantic) #define CPP_WTRADITIONAL(PF) CPP_OPTION (PF, cpp_warn_traditional) -static inline int cpp_in_primary_file (cpp_reader *); -static inline int -cpp_in_primary_file (cpp_reader *pfile) +/* Return true if we're in the main file (unless it's considered to be + an include file in its own right. */ +inline int +_cpp_in_main_source_file (cpp_reader *pfile) { - return pfile->line_table->depth == 1; + return pfile->buffer->file == pfile->main_file; } /* True if NODE is a macro for the purposes of ifdef, defined etc. */ |