From 38ab553eb25d67567a0e51f75e7a3aeaa631404c Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 25 Dec 2016 21:18:04 +0300 Subject: clint: Allow including .c.h files multiple times Except when they are system just in case. There should be no .c.h system files though, but if there will be it is unlikely that they inherit the same convention. --- src/clint.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/clint.py b/src/clint.py index efc5f18378..07733d211e 100755 --- a/src/clint.py +++ b/src/clint.py @@ -3001,9 +3001,10 @@ def CheckIncludeLine(filename, clean_lines, linenum, include_state, error): include = match.group(2) is_system = (match.group(1) == '<') if include in include_state: - error(filename, linenum, 'build/include', 4, - '"%s" already included at %s:%s' % - (include, filename, include_state[include])) + if is_system or not include.endswith('.c.h'): + error(filename, linenum, 'build/include', 4, + '"%s" already included at %s:%s' % + (include, filename, include_state[include])) else: include_state[include] = linenum -- cgit