Bump for 4.0-15
[LibreOffice.git] / liblangtag / liblangtag-0.4.0-mac.patch
blobdc447586463760e8ee3b5153ee3aace53646328d
1 diff -r -u liblangtag-0.4.0.org/data/reg2xml.c liblangtag-0.4.0/data/reg2xml.c
2 --- misc/liblangtag-0.4.0.org/data/reg2xml.c 2012-11-06 09:15:59.000000000 -0600
3 +++ misc/build/liblangtag-0.4.0/data/reg2xml.c 2012-11-06 09:33:59.000000000 -0600
4 @@ -111,7 +111,9 @@
5 fsetpos(fp, &pos);
7 token = strstr(buffer, ": ");
8 - tag = strndup(buffer, token - buffer);
9 + tag = malloc((token-buffer) + 1);
10 + strncpy(tag, buffer, token-buffer);
11 + tag[token-buffer] = 0;
12 token += 2;
13 xmlNewChild(ent, NULL,
14 (const xmlChar *)lt_strlower(tag),
15 diff -r -u liblangtag-0.4.0.org/liblangtag/lt-atomic.h liblangtag-0.4.0/liblangtag/lt-atomic.h
16 --- misc/liblangtag-0.4.0.org/liblangtag/lt-atomic.h 2012-11-06 09:15:59.000000000 -0600
17 +++ misc/build/liblangtag-0.4.0/liblangtag/lt-atomic.h 2012-11-06 09:24:15.000000000 -0600
18 @@ -93,7 +93,7 @@
20 lt_bool_t retval;
22 - lt_return_if_fail (v != NULL, FALSE);
23 + lt_return_val_if_fail (v != NULL, FALSE);
25 pthread_mutex_lock(&__lt_atomic_lock);
26 retval = --(*v) == 0;
27 diff -r -u liblangtag-0.4.0.org/liblangtag/lt-error.c liblangtag-0.4.0/liblangtag/lt-error.c
28 --- misc/liblangtag-0.4.0.org/liblangtag/lt-error.c 2012-11-06 09:15:59.000000000 -0600
29 +++ misc/build/liblangtag-0.4.0/liblangtag/lt-error.c 2012-11-06 09:18:23.000000000 -0600
30 @@ -14,7 +14,6 @@
31 #include "config.h"
32 #endif
34 -#include <execinfo.h>
35 #include <stdlib.h>
36 #include "lt-list.h"
37 #include "lt-mem.h"
38 @@ -98,9 +97,7 @@
39 ...)
41 va_list ap;
42 - void *traces[1024];
43 lt_error_data_t *d = lt_mem_alloc_object(sizeof (lt_error_data_t));
44 - int size;
45 lt_bool_t allocated;
47 lt_return_val_if_fail (error != NULL, NULL);
48 @@ -117,13 +114,9 @@
49 d->message = lt_strdup_vprintf(message, ap);
50 va_end(ap);
52 - size = backtrace(traces, 1024);
53 - if (size > 0)
54 - d->traces = backtrace_symbols(traces, size);
55 - d->stack_size = size;
56 + d->stack_size = 0;
58 lt_mem_add_ref(&d->parent, d->message, free);
59 - lt_mem_add_ref(&d->parent, d->traces, free);
61 allocated = (*error)->data == NULL;
62 (*error)->data = lt_list_append((*error)->data, d, (lt_destroy_func_t)lt_mem_unref);
63 diff -r -u liblangtag-0.4.0.org/liblangtag/lt-ext-module.c liblangtag-0.4.0/liblangtag/lt-ext-module.c
64 --- misc/liblangtag-0.4.0.org/liblangtag/lt-ext-module.c 2012-11-06 09:15:59.000000000 -0600
65 +++ misc/build/liblangtag-0.4.0/liblangtag/lt-ext-module.c 2012-11-06 09:30:31.000000000 -0600
66 @@ -399,7 +399,8 @@
68 if (len > suffix_len &&
69 lt_strcmp0(&filename[prefix_len + len - suffix_len], "." LT_MODULE_SUFFIX) == 0) {
70 - module = strndup(&filename[prefix_len], len - suffix_len);
71 + module = malloc((len-suffix_len) + 1);
72 + strncpy(module, &filename[prefix_len], len-suffix_len);
73 module[len - suffix_len] = 0;
76 diff -r -u liblangtag-0.4.0.org/liblangtag/lt-messages.c liblangtag-0.4.0/liblangtag/lt-messages.c
77 --- misc/liblangtag-0.4.0.org/liblangtag/lt-messages.c 2012-11-06 09:15:59.000000000 -0600
78 +++ misc/build/liblangtag-0.4.0/liblangtag/lt-messages.c 2012-11-06 09:20:58.000000000 -0600
79 @@ -17,7 +17,6 @@
80 #include "config.h"
81 #endif
83 -#include <execinfo.h>
84 #include <stdio.h>
85 #include <stdlib.h>
86 #include <string.h>
87 @@ -98,27 +97,6 @@
88 static void
89 _lt_message_stacktrace(void)
91 - void *traces[1024];
92 - char **strings;
93 - int size, i;
95 - size = backtrace(traces, 1024);
96 - if (size > 0) {
97 - strings = backtrace_symbols(traces, size);
98 - lt_debug(LT_MSGCAT_TRACE, "Stacktrace:");
99 - /*
100 - * XXX:
101 - * 0.. here.
102 - * 1.. _lt_message_default_handler
103 - * 2.. lt_message_vprintf
104 - * 3.. lt_message_printf
105 - * 4.. lt_* macros
106 - */
107 - for (i = 4; i < size; i++) {
108 - lt_debug(LT_MSGCAT_TRACE, " %d. %s", i - 3, strings[i]);
110 - free(strings);
114 static void
115 diff -r -u liblangtag-0.4.0.org/liblangtag/lt-utils.c liblangtag-0.4.0/liblangtag/lt-utils.c
116 --- misc/liblangtag-0.4.0.org/liblangtag/lt-utils.c 2012-11-06 09:15:59.000000000 -0600
117 +++ misc/build/liblangtag-0.4.0/liblangtag/lt-utils.c 2012-11-06 09:23:36.000000000 -0600
118 @@ -14,6 +14,7 @@
119 #include "config.h"
120 #endif
122 +#include <stdlib.h>
123 #include <ctype.h>
124 #include <stdio.h>
125 #include <string.h>