aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/token.h
diff options
authorJosh Triplett <josh@joshtriplett.org>2013-04-19 12:10:38 -0700
committerChristopher Li <sparse@chrisli.org>2013-04-21 20:55:10 -0700
commit9aadf85a29be2a74e46fc67b5313d41aee81dac7 (patch)
tree75a01db121c05159645cf68216db6b4f6f9b2506 /token.h
parentf022d1c8b777af93ef25205cbc34cb6b64c698a7 (diff)
downloadsparse-dev-9aadf85a29be2a74e46fc67b5313d41aee81dac7.tar.gz
Support #pragma once
"#pragma once" acts like a multiple-inclusion guard affecting the entire file, without an associated preprocessor symbol. This allows use of sparse on projects that rely on #pragma once without also using an ifndef-based multiple-inclusion guard, such as systemd; without this change, sparse will get into an include loop. Signed-off-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'token.h')
-rw-r--r--token.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/token.h b/token.h
index b0d58dfb..401bf5eb 100644
--- a/token.h
+++ b/token.h
@@ -40,7 +40,7 @@ struct stream {
/* Use these to check for "already parsed" */
enum constantfile constant;
- int dirty, next_stream;
+ int dirty, next_stream, once;
struct ident *protect;
struct token *ifndef;
struct token *top_if;