From d10c3edaf21ebbc424d452f3f0ca5c1e51487201 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 19 Feb 2015 18:13:31 +0200 Subject: [PATCH] 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'. --- lib-src/ChangeLog | 5 +++++ lib-src/etags.c | 7 +++++++ 2 files changed, 12 insertions(+) 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 -- 2.39.2