aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-04-28 16:20:38 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:01:40 -0700
commitddaa4fc95836673ce96c144821fc4e0f752cf793 (patch)
tree10e949b00eb44ff67a0b42d4bd08513297d5d1a0 /target.h
parent[PATCH] Fix "return" target handling (diff)
downloadsparse-ddaa4fc95836673ce96c144821fc4e0f752cf793.tar.gz
sparse-ddaa4fc95836673ce96c144821fc4e0f752cf793.tar.bz2
sparse-ddaa4fc95836673ce96c144821fc4e0f752cf793.zip
Use variables for target data structure information,
instead of hardcoding it at compile time. This allows us to do "cross-checks" much more easily.
Diffstat (limited to 'target.h')
-rw-r--r--target.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/target.h b/target.h
index 7346325..9c5149e 100644
--- a/target.h
+++ b/target.h
@@ -1,44 +1,44 @@
#ifndef TARGET_H
#define TARGET_H
-#define size_t_ctype (&ulong_ctype)
-#define ssize_t_ctype (&long_ctype)
+extern struct symbol *size_t_ctype;
+extern struct symbol *ssize_t_ctype;
/*
* For "__attribute__((aligned))"
*/
-#define MAX_ALIGNMENT 16
+extern int MAX_ALIGNMENT;
/*
* Integer data types
*/
-#define BITS_IN_CHAR 8
-#define BITS_IN_SHORT 16
-#define BITS_IN_INT 32
-#define BITS_IN_LONG 32
-#define BITS_IN_LONGLONG 64
+extern int BITS_IN_CHAR;
+extern int BITS_IN_SHORT;
+extern int BITS_IN_INT;
+extern int BITS_IN_LONG;
+extern int BITS_IN_LONGLONG;
-#define MAX_INT_ALIGNMENT 4
+extern int MAX_INT_ALIGNMENT;
/*
* Floating point data types
*/
-#define BITS_IN_FLOAT 32
-#define BITS_IN_DOUBLE 64
-#define BITS_IN_LONGDOUBLE 80
+extern int BITS_IN_FLOAT;
+extern int BITS_IN_DOUBLE;
+extern int BITS_IN_LONGDOUBLE;
-#define MAX_FP_ALIGNMENT 8
+extern int MAX_FP_ALIGNMENT;
/*
* Pointer data type
*/
-#define BITS_IN_POINTER 32
-#define POINTER_ALIGNMENT 4
+extern int BITS_IN_POINTER;
+extern int POINTER_ALIGNMENT;
/*
* Enum data types
*/
-#define BITS_IN_ENUM 32
-#define ENUM_ALIGNMENT 4
+extern int BITS_IN_ENUM;
+extern int ENUM_ALIGNMENT;
#endif