From b62de9326d9844661458c8f83e4c7ded5fa02f2d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 25 Jan 2019 07:28:38 -0800 Subject: sysif: take advantage of i64_t in off_t handling. * sysif.c (num_off_t): Remove #ifdef here and just use num_64 if off_t fits into 64 bits. Now this code compiles even if HAVE_DOUBLE_INTPTR_T is missing. --- sysif.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'sysif.c') diff --git a/sysif.c b/sysif.c index ccca25cf..ae469b07 100644 --- a/sysif.c +++ b/sysif.c @@ -1347,17 +1347,11 @@ val num_off_t(off_t off) if (sizeof (off_t) <= sizeof (cnum)) { return num(off); } else if (NUM_MIN <= off && off <= NUM_MAX) { - return num(off); + return num(off); + } else if (sizeof (off_t) <= sizeof (i64_t)) { + return num_64(off); } else { -#if HAVE_DOUBLE_INTPTR_T - if (sizeof (off_t) <= sizeof (double_intptr_t)) { - return bignum_dbl_ipt(off); - } else { - internal_error("portme: unsupported off_t size"); - } -#else -#error port me! -#endif + internal_error("portme: unsupported off_t size"); } } -- cgit v1.2.3