Version 4.3.0.0.beta1, tag libreoffice-4.3.0.0.beta1
[LibreOffice.git] / external / liblangtag / liblangtag-0.5.1-msvc-snprintf.patch
blob61067e21b40757a665fe79b5351d22f059c84325
1 diff -ru langtag.orig/liblangtag/lt-messages.c langtag/liblangtag/lt-messages.c
2 --- UnpackedTarball/langtag.orig/liblangtag/lt-messages.c 2013-04-22 10:06:57.000000000 +0200
3 +++ UnpackedTarball/langtag/liblangtag/lt-messages.c 2013-04-30 11:38:04.116532065 +0200
4 @@ -85,13 +85,21 @@
5 clen = strlen(cs);
6 if (clen > 0) {
7 catstring = malloc(sizeof (char) * (clen + 6));
8 +#ifdef _WIN32
9 + _snprintf(catstring, clen + 6, "[%s]: ", cs);
10 +#else
11 snprintf(catstring, clen + 6, "[%s]: ", cs);
12 +#endif
13 clen = strlen(catstring);
15 len = tlen + clen + 1;
16 retval = malloc(sizeof (char) * len);
17 if (retval) {
18 +#ifdef _WIN32
19 + _snprintf(retval, len, "%s%s ", ts, catstring ? catstring : "");
20 +#else
21 snprintf(retval, len, "%s%s ", ts, catstring ? catstring : "");
22 +#endif
24 if (catstring)
25 free(catstring);