summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-03-06 15:02:24 -0800
committerJunio C Hamano <gitster@pobox.com>2015-03-06 15:02:25 -0800
commit74c91d1f7a1e7848a3614c1c5031755bfa5e80e1 (patch)
treeb7382658010579407ae0ec674aaf8f2272c8be31 /http.c
parent2588882df9541e4ef2e1fb56e86499283301fbd5 (diff)
parent93f7d9108a0edf808e1e3bbcdbe6078310c22f9e (diff)
downloadgit-74c91d1f7a1e7848a3614c1c5031755bfa5e80e1.tar.gz
Merge branch 'ye/http-accept-language'
Compilation fix for a recent topic in 'master'. * ye/http-accept-language: gettext.c: move get_preferred_languages() from http.c
Diffstat (limited to 'http.c')
-rw-r--r--http.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/http.c b/http.c
index 0153fb0b62..9c825afefd 100644
--- a/http.c
+++ b/http.c
@@ -8,6 +8,7 @@
#include "credential.h"
#include "version.h"
#include "pkt-line.h"
+#include "gettext.h"
int active_requests;
int http_is_verbose;
@@ -1002,32 +1003,6 @@ static void extract_content_type(struct strbuf *raw, struct strbuf *type,
strbuf_addstr(charset, "ISO-8859-1");
}
-
-/*
- * Guess the user's preferred languages from the value in LANGUAGE environment
- * variable and LC_MESSAGES locale category if NO_GETTEXT is not defined.
- *
- * The result can be a colon-separated list like "ko:ja:en".
- */
-static const char *get_preferred_languages(void)
-{
- const char *retval;
-
- retval = getenv("LANGUAGE");
- if (retval && *retval)
- return retval;
-
-#ifndef NO_GETTEXT
- retval = setlocale(LC_MESSAGES, NULL);
- if (retval && *retval &&
- strcmp(retval, "C") &&
- strcmp(retval, "POSIX"))
- return retval;
-#endif
-
- return NULL;
-}
-
static void write_accept_language(struct strbuf *buf)
{
/*