summaryrefslogtreecommitdiffstats
path: root/stream.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-05-31 19:14:17 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-05-31 19:14:17 -0700
commit93a13ccd3838a1f9646b92b3fb8785f48885ac6e (patch)
treed6413f31d22ae813e01d3d64b46caebe15014e14 /stream.c
parent9d02e5e1120d36fb2c4284187de99e19d434dc98 (diff)
downloadtxr-93a13ccd3838a1f9646b92b3fb8785f48885ac6e.tar.gz
txr-93a13ccd3838a1f9646b92b3fb8785f48885ac6e.tar.bz2
txr-93a13ccd3838a1f9646b92b3fb8785f48885ac6e.zip
build: fix broken build when we don't HAVE_ZLIB.
* parser.c (open_txr_file): Use liberal heaps of #if HAVE_ZLIB. If there is no Zlib, and the caller explicitly requests a .tlo.gz file to be loaded, then throw. Do not implicitly look for a .tlo.gz file. * stream.c (open_file): #if HAVE_ZLIB around a goto label that is only used out of HAVE_ZLIB code, to eliminate unused label warning.
Diffstat (limited to 'stream.c')
-rw-r--r--stream.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/stream.c b/stream.c
index e0916d18..ca03cb7e 100644
--- a/stream.c
+++ b/stream.c
@@ -4237,7 +4237,9 @@ val open_file(val path, val mode_str)
struct stdio_mode m, m_r = stdio_mode_init_r;
val norm_mode = normalize_mode(&m, mode_str, m_r, self);
+#if HAVE_ZLIB
again:
+#endif
if (!m.gzip) {
FILE *f = w_fopen_mode(c_str(path, self), c_str(norm_mode, self), m);