Skip to content

Commit

Permalink
msgfmt: do not fail when --statistics is passed
Browse files Browse the repository at this point in the history
po.m4 from gnulib/gettext uses a check that this option is supported
in order to exclude the FreeBSD implementation, and force the GNU version
on them.

http://git.savannah.gnu.org/cgit/gettext.git/tree/gettext-runtime/m4/po.m4?id=d9cfbdfecb502b70c55e594bc897c217ac082f5f#n37

it does so since several years, so it's funny we haven't hit that earlier.
however this now triggers for "deadbeef" in version 0.7.2.
  • Loading branch information
rofl0r committed Mar 8, 2017
1 parent 1bb0dd7 commit bc018ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/msgfmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,16 @@ int main(int argc, char**argv) {
streq(A+2, "check-accelerators") ||
streq(A+2, "no-hash") ||
streq(A+2, "verbose") ||
streq(A+2, "statistics") ||
strstarts(A+2, "check-accelerators=") ||
strstarts(A+2, "resource=") ||
strstarts(A+2, "locale=")

) {
} else if((dest = strstarts(A+2, "output-file="))) {
set_file(1, dest, &out);
} else if(streq(A+2, "statistics")) {
fprintf(stdout, "No Statistics available.\n");
return 0;
} else if(streq(A+2, "version")) {
version();
} else if(streq(A+2, "help")) syntax();
Expand Down

0 comments on commit bc018ee

Please sign in to comment.