diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-01-25 07:28:38 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-01-25 07:28:38 -0800 |
commit | e3493d3b587f040033366d2e03fd784ab92fb1ef (patch) | |
tree | 9a16a5e9545fd9affc10919f4a2964ea89f73da3 /sysif.c | |
parent | 4e86cd9aa0b8303061837ba8f7989c8f53911297 (diff) | |
download | txr-e3493d3b587f040033366d2e03fd784ab92fb1ef.tar.gz txr-e3493d3b587f040033366d2e03fd784ab92fb1ef.tar.bz2 txr-e3493d3b587f040033366d2e03fd784ab92fb1ef.zip |
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.
Diffstat (limited to 'sysif.c')
-rw-r--r-- | sysif.c | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -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"); } } |