]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ye/http-accept-language'
authorJunio C Hamano <gitster@pobox.com>
Fri, 6 Mar 2015 23:02:24 +0000 (15:02 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 6 Mar 2015 23:02:25 +0000 (15:02 -0800)
Compilation fix for a recent topic in 'master'.

* ye/http-accept-language:
  gettext.c: move get_preferred_languages() from http.c

1  2 
gettext.h
http.c

diff --cc gettext.h
index dc1722dd4bc6b1aa7d998cb055a40000c05a0b5e,e539482ae798d3c781c9d56cddd9f048d6b1badc..33696a40b8a11262d090a2eec4dfdce0fed6af0f
+++ b/gettext.h
@@@ -63,30 -63,8 +63,32 @@@ const char *Q_(const char *msgid, cons
  }
  
  /* Mark msgid for translation but do not translate it. */
 +#if !USE_PARENS_AROUND_GETTEXT_N
  #define N_(msgid) msgid
 +#else
 +/*
 + * Strictly speaking, this will lead to invalid C when
 + * used this way:
 + *    static const char s[] = N_("FOO");
 + * which will expand to
 + *    static const char s[] = ("FOO");
 + * and in valid C, the initializer on the right hand side must
 + * be without the parentheses.  But many compilers do accept it
 + * as a language extension and it will allow us to catch mistakes
 + * like:
 + *    static const char *msgs[] = {
 + *            N_("one")
 + *            N_("two"),
 + *            N_("three"),
 + *            NULL
 + *    };
 + * (notice the missing comma on one of the lines) by forcing
 + * a compilation error, because parenthesised ("one") ("two")
 + * will not get silently turned into ("onetwo").
 + */
 +#define N_(msgid) (msgid)
 +#endif
  
+ const char *get_preferred_languages(void);
  #endif
diff --cc http.c
Simple merge