aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-12-15 09:29:11 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-12-16 10:28:25 +0100
commit8e0199b78ddbd4c203d2c4161748881593805fc5 (patch)
tree0b04cbfe259a828699dddf6bc72c7761f73a03e6
parent376c74980d759ea4f9e8c6c10ecf83ea6565394d (diff)
downloadsparse-8e0199b78ddbd4c203d2c4161748881593805fc5.tar.gz
arch: use an arch-specific default for -msize-long
This is for completeness and only useful for S390 which is not exactly the most common arch. But since it's now easy to do this kind of thing ... Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--target-s390.c1
-rw-r--r--target.c2
-rw-r--r--target.h1
3 files changed, 3 insertions, 1 deletions
diff --git a/target-s390.c b/target-s390.c
index 157779ce..277e0909 100644
--- a/target-s390.c
+++ b/target-s390.c
@@ -8,6 +8,7 @@ const struct target target_s390 = {
.bitness = ARCH_LP32,
.big_endian = 1,
.unsigned_char = 1,
+ .size_t_long = 1,
.bits_in_longdouble = 64,
.max_fp_alignment = 8,
diff --git a/target.c b/target.c
index 006292cc..1c7a4083 100644
--- a/target.c
+++ b/target.c
@@ -196,7 +196,7 @@ void target_init(void)
if (target->init)
target->init(target);
- if (arch_msize_long) {
+ if (arch_msize_long || target->size_t_long) {
size_t_ctype = &ulong_ctype;
ssize_t_ctype = &long_ctype;
}
diff --git a/target.h b/target.h
index c6aef959..ebd8f1b1 100644
--- a/target.h
+++ b/target.h
@@ -59,6 +59,7 @@ struct target {
enum bitness bitness;
unsigned int big_endian:1;
unsigned int unsigned_char:1;
+ unsigned int size_t_long:1;
struct symbol *wchar;
struct symbol *wint;