summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2015-02-19 18:13:31 +0200
committerEli Zaretskii <eliz@gnu.org>2015-02-19 18:13:31 +0200
commitd10c3edaf21ebbc424d452f3f0ca5c1e51487201 (patch)
tree012755f3aabd700e882647517685a3862a272e65 /lib-src
parent37e3549055fc153657f0a04b28cf29b7e15a97d8 (diff)
downloademacs-d10c3edaf21ebbc424d452f3f0ca5c1e51487201.tar.gz
Fix generation of TAGS from compressed files (Bug#19735)
lib-src/etags.c (process_file_name) [!DOS_NT]: Use "r", not "rb" in the call to 'popen'.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog5
-rw-r--r--lib-src/etags.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 534d253cabb..05511164706 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-19 Eli Zaretskii <eliz@gnu.org>
+
+ * etags.c (process_file_name) [!DOS_NT]: Use "r", not "rb" in the
+ call to 'popen'. (Bug#19735)
+
2015-02-13 Paul Eggert <eggert@cs.ucla.edu>
Better support for future plugins
diff --git a/lib-src/etags.c b/lib-src/etags.c
index dc2ced50933..cdac9289230 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -1532,7 +1532,14 @@ process_file_name (char *file, language *lang)
if (real_name == compressed_name)
{
char *cmd = concat (compr->command, " ", real_name);
+
+ /* Unix implementations of 'popen' generally don't support "rb", whereas
+ DOS_NT needs it. */
+#ifdef DOS_NT
inf = popen (cmd, "rb");
+#else
+ inf = popen (cmd, "r");
+#endif
free (cmd);
}
else