aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2017-10-03 14:53:11 -0400
committerJames McCoy <jamessan@jamessan.com>2017-10-03 14:54:50 -0400
commit235fda5f86d80b1aa7d7cbcb41e3399c556b7455 (patch)
tree3025edaf5be592e1ba42c6f735d08faba7322870
parent01e53a5cbe676181629ef63731b980c453c0bd62 (diff)
downloadrneovim-235fda5f86d80b1aa7d7cbcb41e3399c556b7455.tar.gz
rneovim-235fda5f86d80b1aa7d7cbcb41e3399c556b7455.tar.bz2
rneovim-235fda5f86d80b1aa7d7cbcb41e3399c556b7455.zip
Stub ngettext when libintl isn't available
This should have been included in #6547 as part of vim-patch:7.4.2152. Closes #7352
-rw-r--r--cmake/FindLibIntl.cmake1
-rw-r--r--src/nvim/gettext.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/cmake/FindLibIntl.cmake b/cmake/FindLibIntl.cmake
index 75926200c1..ab4632cf45 100644
--- a/cmake/FindLibIntl.cmake
+++ b/cmake/FindLibIntl.cmake
@@ -46,6 +46,7 @@ check_c_source_compiles("
int main(int argc, char** argv) {
gettext(\"foo\");
+ ngettext(\"foo\", \"bar\", 1);
bindtextdomain(\"foo\", \"bar\");
bind_textdomain_codeset(\"foo\", \"bar\");
textdomain(\"foo\");
diff --git a/src/nvim/gettext.h b/src/nvim/gettext.h
index aa0e97233e..60317b8484 100644
--- a/src/nvim/gettext.h
+++ b/src/nvim/gettext.h
@@ -13,6 +13,7 @@
#else
# define _(x) ((char *)(x))
# define N_(x) x
+# define ngettext(x, xs, n) ((n) == 1 ? (x) : (xs))
# define bindtextdomain(x, y) // empty
# define bind_textdomain_codeset(x, y) // empty
# define textdomain(x) // empty