diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-01-01 13:18:03 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-01-01 13:18:03 -0800 |
commit | 8bfa4b48a39376ac056a7811f23efcd5f9144009 (patch) | |
tree | 9edafd3361b8d3fe0dad559c9c78a7b9887a47ff /sysif.c | |
parent | 4755c6832dcff075124cb54a72cc6f5cfed361e9 (diff) | |
download | txr-8bfa4b48a39376ac056a7811f23efcd5f9144009.tar.gz txr-8bfa4b48a39376ac056a7811f23efcd5f9144009.tar.bz2 txr-8bfa4b48a39376ac056a7811f23efcd5f9144009.zip |
sysif.h: remove dependency on off_t.
The sysif.h header breaks on some systems because it
references off_t, which requires <sys/types.h>. But the off_t
materials in this header are unnecessary; we can remove
them.
* sysif.c (off_t_num, num_off_t): Extern functions become static,
and are wrapped with #if HAVE_FSEEKO. These functions are
only called from sysif.c, only from code relying on fseeko.
* sysif.h (OFF_T_MAX, OFF_T_MIN): Macros not used anywhere are removed.
(off_t_num, num_off_t): Declarations removed.
Diffstat (limited to 'sysif.c')
-rw-r--r-- | sysif.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1492,7 +1492,9 @@ static val crypt_wrap(val wkey, val wsalt) #endif -off_t off_t_num(val num, val self) +#if HAVE_FSEEKO + +static off_t off_t_num(val num, val self) { switch (CHAR_BIT * sizeof(off_t)) { case 32: @@ -1504,7 +1506,7 @@ off_t off_t_num(val num, val self) } } -val num_off_t(off_t off) +static val num_off_t(off_t off) { if (sizeof (off_t) <= sizeof (cnum)) { return num(off); @@ -1517,6 +1519,8 @@ val num_off_t(off_t off) } } +#endif + val stdio_ftell(FILE *f) { #if HAVE_FSEEKO |