mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Hack up dcgettext to try to fix CentOS build
https://github.com/fish-shell/fish-shell/issues/645
This commit is contained in:
parent
b936be8e34
commit
8bbd8ab073
3 changed files with 18 additions and 21 deletions
2
env.cpp
2
env.cpp
|
@ -357,7 +357,7 @@ static void handle_locale()
|
|||
extern int _nl_msg_cat_cntr;
|
||||
_nl_msg_cat_cntr++;
|
||||
|
||||
dcgettext("fish", "Changing language to English", LC_MESSAGES);
|
||||
fish_dcgettext("fish", "Changing language to English", LC_MESSAGES);
|
||||
|
||||
if (get_is_interactive())
|
||||
{
|
||||
|
|
19
fallback.cpp
19
fallback.cpp
|
@ -1141,28 +1141,33 @@ char * fish_textdomain(const char * domainname)
|
|||
|
||||
#else
|
||||
|
||||
char * fish_gettext(const char * msgid)
|
||||
char *fish_gettext(const char * msgid)
|
||||
{
|
||||
return (char *)msgid;
|
||||
}
|
||||
|
||||
char * fish_bindtextdomain(const char * domainname, const char * dirname)
|
||||
char *fish_bindtextdomain(const char * domainname, const char * dirname)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char * fish_textdomain(const char * domainname)
|
||||
char *fish_textdomain(const char * domainname)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DCGETTEXT
|
||||
#if HAVE_DCGETTEXT
|
||||
|
||||
char * dcgettext(const char * domainname,
|
||||
const char * msgid,
|
||||
int category)
|
||||
char *fish_dcgettext(const char * domainname, const char * msgid, int category)
|
||||
{
|
||||
return dcgettext(msgid);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
char *fish_dcgettext(const char * domainname, const char * msgid, int category)
|
||||
{
|
||||
return (char *)msgid;
|
||||
}
|
||||
|
|
18
fallback.h
18
fallback.h
|
@ -389,25 +389,17 @@ int futimes(int fd, const struct timeval *times);
|
|||
|
||||
/* autoconf may fail to detect gettext (645), so don't define a function call gettext or we'll get build errors */
|
||||
|
||||
/** Fallback implementation of gettext. Just returns the original string. */
|
||||
/** Cover for gettext() */
|
||||
char * fish_gettext(const char * msgid);
|
||||
|
||||
/** Fallback implementation of bindtextdomain. Does nothing. */
|
||||
/** Cover for bindtextdomain() */
|
||||
char * fish_bindtextdomain(const char * domainname, const char * dirname);
|
||||
|
||||
/** Fallback implementation of textdomain. Does nothing. */
|
||||
/** Cover for textdomain() */
|
||||
char * fish_textdomain(const char * domainname);
|
||||
|
||||
#ifndef HAVE_DCGETTEXT
|
||||
|
||||
/**
|
||||
Fallback implementation of dcgettext. Just returns the original string.
|
||||
*/
|
||||
char * dcgettext(const char * domainname,
|
||||
const char * msgid,
|
||||
int category);
|
||||
|
||||
#endif
|
||||
/* Cover for dcgettext */
|
||||
char * fish_dcgettext(const char * domainname, const char * msgid, int category);
|
||||
|
||||
#ifndef HAVE__NL_MSG_CAT_CNTR
|
||||
|
||||
|
|
Loading…
Reference in a new issue