office-gobmx/liblangtag/liblangtag-0.5.1-msvc-snprintf.patch
Eike Rathke 67a9f79219 new upstream release liblangtag-0.5.1
Change-Id: I4b71bbd3ff457d7b4fb2a409e8d34d8e4904acb3
Reviewed-on: https://gerrit.libreoffice.org/3676
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2013-04-30 20:21:30 +00:00

25 lines
820 B
Diff

diff -ru langtag.orig/liblangtag/lt-messages.c langtag/liblangtag/lt-messages.c
--- UnpackedTarball/langtag.orig/liblangtag/lt-messages.c 2013-04-22 10:06:57.000000000 +0200
+++ UnpackedTarball/langtag/liblangtag/lt-messages.c 2013-04-30 11:38:04.116532065 +0200
@@ -85,13 +85,21 @@
clen = strlen(cs);
if (clen > 0) {
catstring = malloc(sizeof (char) * (clen + 6));
+#ifdef _WIN32
+ _snprintf(catstring, clen + 6, "[%s]: ", cs);
+#else
snprintf(catstring, clen + 6, "[%s]: ", cs);
+#endif
clen = strlen(catstring);
}
len = tlen + clen + 1;
retval = malloc(sizeof (char) * len);
if (retval) {
+#ifdef _WIN32
+ _snprintf(retval, len, "%s%s ", ts, catstring ? catstring : "");
+#else
snprintf(retval, len, "%s%s ", ts, catstring ? catstring : "");
+#endif
}
if (catstring)
free(catstring);