summaryrefslogtreecommitdiffstats
path: root/sysif.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-01-01 13:18:03 -0800
committerKaz Kylheku <kaz@kylheku.com>2020-01-01 13:18:03 -0800
commit8bfa4b48a39376ac056a7811f23efcd5f9144009 (patch)
tree9edafd3361b8d3fe0dad559c9c78a7b9887a47ff /sysif.h
parent4755c6832dcff075124cb54a72cc6f5cfed361e9 (diff)
downloadtxr-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.h')
-rw-r--r--sysif.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/sysif.h b/sysif.h
index 4556a752..c21ca969 100644
--- a/sysif.h
+++ b/sysif.h
@@ -35,16 +35,6 @@ extern val atime_s, mtime_s, ctime_s;
extern val atime_nsec_s, mtime_nsec_s, ctime_nsec_s;
extern val path_s;
-#if !HAVE_FTRUNCATE
-typedef long off_t;
-#define OFF_T_MAX LONG_MAX
-#define OFF_T_MIN LONG_MIN
-#else
-#define OFF_T_MAX ((((convert(off_t, 1) << \
- ((sizeof(off_t) * CHAR_BIT) - 2)) - 1) << 1) + 1)
-#define OFF_T_MIN (-OFF_T_MAX)
-#endif
-
val errno_to_file_error(int err);
val getenv_wrap(val name);
val at_exit_call(val func);
@@ -61,8 +51,6 @@ val stat_to_struct(struct stat st, val path);
#endif
val statp(val path);
val statf(val path);
-off_t off_t_num(val num, val self);
-val num_off_t(off_t offnum);
val stdio_ftell(FILE *);
int stdio_fseek(FILE *, val, int whence);
#if HAVE_GETEUID