aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Dudka <kdudka@redhat.com>2009-08-11 12:59:23 +0000
committerChristopher Li <sparse@chrisli.org>2009-08-11 20:57:20 +0000
commit03430d088f64a3b1d4b5bbbc86da3c352010702e (patch)
tree77fca4e07371e50445b5a4db4abeed3465863c85
parentshow_token: handle TOKEN_UNTAINT and TOKEN_ARG_COUNT types (diff)
downloadsparse-03430d088f64a3b1d4b5bbbc86da3c352010702e.tar.gz
sparse-03430d088f64a3b1d4b5bbbc86da3c352010702e.tar.bz2
sparse-03430d088f64a3b1d4b5bbbc86da3c352010702e.zip
make sparse headers self-compilable...
... and thus possible to include them in arbitrary order and without any external dependencies. Signed-off-by: Kamil Dudka <kdudka@redhat.com> Signed-off-by: Christopher Li <sparse@chrisli.org>
-rw-r--r--compile.h2
-rw-r--r--flow.h5
-rw-r--r--ptrlist.h2
-rw-r--r--scope.h2
-rw-r--r--storage.h3
5 files changed, 14 insertions, 0 deletions
diff --git a/compile.h b/compile.h
index 0db8fdb..177363a 100644
--- a/compile.h
+++ b/compile.h
@@ -1,6 +1,8 @@
#ifndef COMPILE_H
#define COMPILE_H
+struct symbol;
+
extern void emit_one_symbol(struct symbol *);
extern void emit_unit_begin(const char *);
extern void emit_unit_end(void);
diff --git a/flow.h b/flow.h
index fbc9505..370aadd 100644
--- a/flow.h
+++ b/flow.h
@@ -1,11 +1,16 @@
#ifndef FLOW_H
#define FLOW_H
+#include "lib.h"
+
extern unsigned long bb_generation;
#define REPEAT_CSE 1
#define REPEAT_SYMBOL_CLEANUP 2
+struct entrypoint;
+struct instruction;
+
extern int simplify_flow(struct entrypoint *ep);
extern void simplify_symbol_usage(struct entrypoint *ep);
diff --git a/ptrlist.h b/ptrlist.h
index dae0906..fbfc080 100644
--- a/ptrlist.h
+++ b/ptrlist.h
@@ -1,6 +1,8 @@
#ifndef PTR_LIST_H
#define PTR_LIST_H
+#include <stdlib.h>
+
/*
* Generic pointer list manipulation code.
*
diff --git a/scope.h b/scope.h
index 5f1f232..0fab286 100644
--- a/scope.h
+++ b/scope.h
@@ -9,6 +9,8 @@
* Licensed under the Open Software License version 1.1
*/
+struct symbol;
+
struct scope {
struct token *token; /* Scope start information */
struct symbol_list *symbols; /* List of symbols in this scope */
diff --git a/storage.h b/storage.h
index 610cbfd..e049e23 100644
--- a/storage.h
+++ b/storage.h
@@ -1,6 +1,9 @@
#ifndef STORAGE_H
#define STORAGE_H
+#include "allocate.h"
+#include "lib.h"
+
/*
* The "storage" that underlies an incoming/outgoing pseudo. It's
* basically the backing store for a pseudo, and may be a real hardware