From: Eli Zaretskii Date: Thu, 19 Feb 2015 16:13:31 +0000 (+0200) Subject: Fix generation of TAGS from compressed files (Bug#19735) X-Git-Tag: emacs-25.0.90~2564^2~347 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d10c3edaf21ebbc424d452f3f0ca5c1e51487201;p=emacs.git 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'. --- 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 + + * etags.c (process_file_name) [!DOS_NT]: Use "r", not "rb" in the + call to 'popen'. (Bug#19735) + 2015-02-13 Paul Eggert 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