Stub ngettext when libintl isn't available

This should have been included in #6547 as part of vim-patch:7.4.2152.

Closes #7352
This commit is contained in:
James McCoy
2017-10-03 14:53:11 -04:00
parent 01e53a5cbe
commit 235fda5f86
2 changed files with 2 additions and 0 deletions

View File

@@ -46,6 +46,7 @@ check_c_source_compiles("
int main(int argc, char** argv) { int main(int argc, char** argv) {
gettext(\"foo\"); gettext(\"foo\");
ngettext(\"foo\", \"bar\", 1);
bindtextdomain(\"foo\", \"bar\"); bindtextdomain(\"foo\", \"bar\");
bind_textdomain_codeset(\"foo\", \"bar\"); bind_textdomain_codeset(\"foo\", \"bar\");
textdomain(\"foo\"); textdomain(\"foo\");

View File

@@ -13,6 +13,7 @@
#else #else
# define _(x) ((char *)(x)) # define _(x) ((char *)(x))
# define N_(x) x # define N_(x) x
# define ngettext(x, xs, n) ((n) == 1 ? (x) : (xs))
# define bindtextdomain(x, y) // empty # define bindtextdomain(x, y) // empty
# define bind_textdomain_codeset(x, y) // empty # define bind_textdomain_codeset(x, y) // empty
# define textdomain(x) // empty # define textdomain(x) // empty