18110
|
1 |
diff -x '*.*~' -x '*.rej' -x '*.orig' -Nrup compizconfig-backend-gconf-0.7.6/configure.ac compizconfig-backend-gconf-0.7.6.modif/configure.ac
|
|
2 |
--- compizconfig-backend-gconf-0.7.6/configure.ac 2008-05-29 14:59:03.000000000 +0200
|
|
3 |
+++ compizconfig-backend-gconf-0.7.6.modif/configure.ac 2008-06-16 15:21:56.365882156 +0200
|
|
4 |
@@ -1,12 +1,12 @@
|
|
5 |
AC_PREREQ(2.57)
|
|
6 |
|
|
7 |
-AC_INIT([compizconfig-backend-gconf],esyscmd(. ./VERSION;echo -n $VERSION), [[email protected]])
|
|
8 |
+AC_INIT([compizconfig-backend-gconf],esyscmd(. ./VERSION;echo $VERSION | tr -d "\n"), [[email protected]])
|
|
9 |
|
|
10 |
#AC_CONFIG_AUX_DIR(config)
|
|
11 |
|
|
12 |
AM_INIT_AUTOMAKE([1.9 dist-bzip2])
|
|
13 |
|
|
14 |
-#AC_CONFIG_HEADER([config.h])
|
|
15 |
+AC_CONFIG_HEADER([config.h])
|
|
16 |
AM_MAINTAINER_MODE
|
|
17 |
|
|
18 |
AC_ISC_POSIX
|
|
19 |
@@ -15,6 +15,7 @@ AC_PROG_CPP
|
|
20 |
AC_PROG_LIBTOOL
|
|
21 |
AC_HEADER_STDC
|
|
22 |
AC_CHECK_HEADERS([stdlib.h sys/time.h unistd.h])
|
|
23 |
+AC_CHECK_FUNCS(va_copy __va_copy vasprintf asprintf strsep)
|
|
24 |
|
|
25 |
if test "x$GCC" = "xyes"; then
|
|
26 |
case " $CFLAGS " in
|
|
27 |
diff -x '*.*~' -x '*.rej' -x '*.orig' -Nrup compizconfig-backend-gconf-0.7.6/settings-backend/Makefile.am compizconfig-backend-gconf-0.7.6.modif/settings-backend/Makefile.am
|
|
28 |
--- compizconfig-backend-gconf-0.7.6/settings-backend/Makefile.am 2008-05-29 14:59:03.000000000 +0200
|
|
29 |
+++ compizconfig-backend-gconf-0.7.6.modif/settings-backend/Makefile.am 2008-06-16 15:21:56.367784131 +0200
|
|
30 |
@@ -6,7 +6,7 @@ INCLUDES = @GLIB_CFLAGS@ \
|
|
31 |
|
|
32 |
libgconf_la_LDFLAGS = -module -avoid-version -no-undefined $(all_libraries)
|
|
33 |
libgconf_la_LIBADD = @CCS_LIBS@ @GCONF_LIBS@ @GLIB_LIBS@
|
|
34 |
-libgconf_la_SOURCES = gconf.c
|
|
35 |
+libgconf_la_SOURCES = gconf.c compat.c
|
|
36 |
backenddir = $(libdir)/compizconfig/backends
|
|
37 |
|
|
38 |
METASOURCES = AUTO
|
|
39 |
diff -x '*.*~' -x '*.rej' -x '*.orig' -Nrup compizconfig-backend-gconf-0.7.6/settings-backend/compat.c compizconfig-backend-gconf-0.7.6.modif/settings-backend/compat.c
|
|
40 |
--- compizconfig-backend-gconf-0.7.6/settings-backend/compat.c 1970-01-01 01:00:00.000000000 +0100
|
|
41 |
+++ compizconfig-backend-gconf-0.7.6.modif/settings-backend/compat.c 2008-06-16 15:21:56.366247598 +0200
|
|
42 |
@@ -0,0 +1,131 @@
|
|
43 |
+/*
|
|
44 |
+ * Copyright (c) 2007 Albert Lee <[email protected]>.
|
|
45 |
+ *
|
|
46 |
+ * Copyright (c) 2004 Darren Tucker.
|
|
47 |
+ *
|
|
48 |
+ * Based originally on asprintf.c from OpenBSD:
|
|
49 |
+ * Copyright (c) 1997 Todd C. Miller <[email protected]>
|
|
50 |
+ *
|
|
51 |
+ * Permission to use, copy, modify, and distribute this software for any
|
|
52 |
+ * purpose with or without fee is hereby granted, provided that the above
|
|
53 |
+ * copyright notice and this permission notice appear in all copies.
|
|
54 |
+ *
|
|
55 |
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
56 |
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
57 |
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
58 |
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
59 |
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
60 |
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
61 |
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
62 |
+ * OTHER DEALINGS IN THE SOFTWARE.
|
|
63 |
+ */
|
|
64 |
+
|
|
65 |
+#include "config.h"
|
|
66 |
+#include "compat.h"
|
|
67 |
+
|
|
68 |
+#ifndef HAVE_VASPRINTF
|
|
69 |
+#include <errno.h>
|
|
70 |
+#include <stdio.h>
|
|
71 |
+#include <stdarg.h>
|
|
72 |
+#include <stdlib.h>
|
|
73 |
+#include <limits.h>
|
|
74 |
+
|
|
75 |
+#ifndef VA_COPY
|
|
76 |
+# ifdef HAVE_VA_COPY
|
|
77 |
+# define VA_COPY(dest, src) va_copy(dest, src)
|
|
78 |
+# else
|
|
79 |
+# ifdef HAVE___VA_COPY
|
|
80 |
+# define VA_COPY(dest, src) __va_copy(dest, src)
|
|
81 |
+# else
|
|
82 |
+# define VA_COPY(dest, src) (dest) = (src)
|
|
83 |
+# endif
|
|
84 |
+# endif
|
|
85 |
+#endif
|
|
86 |
+
|
|
87 |
+#define INIT_SZ 128
|
|
88 |
+
|
|
89 |
+static int vasprintf(char **str, const char *fmt, va_list ap);
|
|
90 |
+
|
|
91 |
+static int vasprintf(char **str, const char *fmt, va_list ap)
|
|
92 |
+{
|
|
93 |
+ int ret = -1;
|
|
94 |
+ va_list ap2;
|
|
95 |
+ char *string, *newstr;
|
|
96 |
+ size_t len;
|
|
97 |
+
|
|
98 |
+ VA_COPY(ap2, ap);
|
|
99 |
+ if ((string = malloc(INIT_SZ)) == NULL)
|
|
100 |
+ goto fail;
|
|
101 |
+
|
|
102 |
+ ret = vsnprintf(string, INIT_SZ, fmt, ap2);
|
|
103 |
+ if (ret >= 0 && ret < INIT_SZ) { /* succeeded with initial alloc */
|
|
104 |
+ *str = string;
|
|
105 |
+ } else if (ret == INT_MAX) { /* shouldn't happen */
|
|
106 |
+ goto fail;
|
|
107 |
+ } else { /* bigger than initial, realloc allowing for nul */
|
|
108 |
+ len = (size_t)ret + 1;
|
|
109 |
+ if ((newstr = realloc(string, len)) == NULL) {
|
|
110 |
+ free(string);
|
|
111 |
+ goto fail;
|
|
112 |
+ } else {
|
|
113 |
+ va_end(ap2);
|
|
114 |
+ VA_COPY(ap2, ap);
|
|
115 |
+ ret = vsnprintf(newstr, len, fmt, ap2);
|
|
116 |
+ if (ret >= 0 && (size_t)ret < len) {
|
|
117 |
+ *str = newstr;
|
|
118 |
+ } else { /* failed with realloc'ed string, give up */
|
|
119 |
+ free(newstr);
|
|
120 |
+ goto fail;
|
|
121 |
+ }
|
|
122 |
+ }
|
|
123 |
+ }
|
|
124 |
+ va_end(ap2);
|
|
125 |
+ return (ret);
|
|
126 |
+
|
|
127 |
+fail:
|
|
128 |
+ *str = NULL;
|
|
129 |
+ errno = ENOMEM;
|
|
130 |
+ va_end(ap2);
|
|
131 |
+ return (-1);
|
|
132 |
+}
|
|
133 |
+#endif
|
|
134 |
+
|
|
135 |
+#ifndef HAVE_ASPRINTF
|
|
136 |
+#include <stdio.h>
|
|
137 |
+#include <stdarg.h>
|
|
138 |
+#include <stdlib.h>
|
|
139 |
+
|
|
140 |
+int asprintf(char **str, const char *fmt, ...)
|
|
141 |
+{
|
|
142 |
+ va_list ap;
|
|
143 |
+ int ret;
|
|
144 |
+
|
|
145 |
+ *str = NULL;
|
|
146 |
+ va_start(ap, fmt);
|
|
147 |
+ ret = vasprintf(str, fmt, ap);
|
|
148 |
+ va_end(ap);
|
|
149 |
+
|
|
150 |
+ return ret;
|
|
151 |
+}
|
|
152 |
+#endif
|
|
153 |
+
|
|
154 |
+#ifndef HAVE_STRSEP
|
|
155 |
+#include <string.h>
|
|
156 |
+
|
|
157 |
+char *strsep(char **stringp, const char *delim)
|
|
158 |
+{
|
|
159 |
+ char *s = *stringp;
|
|
160 |
+ char *e;
|
|
161 |
+
|
|
162 |
+ if (!s)
|
|
163 |
+ return NULL;
|
|
164 |
+
|
|
165 |
+ e = strpbrk(s, delim);
|
|
166 |
+ if (e)
|
|
167 |
+ *e++ = '\0';
|
|
168 |
+
|
|
169 |
+ *stringp = e;
|
|
170 |
+ return s;
|
|
171 |
+}
|
|
172 |
+#endif
|
|
173 |
+
|
|
174 |
diff -x '*.*~' -x '*.rej' -x '*.orig' -Nrup compizconfig-backend-gconf-0.7.6/settings-backend/compat.h compizconfig-backend-gconf-0.7.6.modif/settings-backend/compat.h
|
|
175 |
--- compizconfig-backend-gconf-0.7.6/settings-backend/compat.h 1970-01-01 01:00:00.000000000 +0100
|
|
176 |
+++ compizconfig-backend-gconf-0.7.6.modif/settings-backend/compat.h 2008-06-16 15:21:56.366500278 +0200
|
|
177 |
@@ -0,0 +1,31 @@
|
|
178 |
+/*
|
|
179 |
+ * Copyright (c) 2007 Albert Lee <[email protected]>.
|
|
180 |
+ *
|
|
181 |
+ * Copyright (c) 2004 Darren Tucker.
|
|
182 |
+ *
|
|
183 |
+ * Based originally on asprintf.c from OpenBSD:
|
|
184 |
+ * Copyright (c) 1997 Todd C. Miller <[email protected]>
|
|
185 |
+ *
|
|
186 |
+ * Permission to use, copy, modify, and distribute this software for any
|
|
187 |
+ * purpose with or without fee is hereby granted, provided that the above
|
|
188 |
+ * copyright notice and this permission notice appear in all copies.
|
|
189 |
+ *
|
|
190 |
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
191 |
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
192 |
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
193 |
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
194 |
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
195 |
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
196 |
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
197 |
+ * OTHER DEALINGS IN THE SOFTWARE.
|
|
198 |
+ */
|
|
199 |
+
|
|
200 |
+#include "config.h"
|
|
201 |
+
|
|
202 |
+#ifndef HAVE_ASPRINTF
|
|
203 |
+int asprintf(char **str, const char *fmt, ...);
|
|
204 |
+#endif
|
|
205 |
+
|
|
206 |
+#ifndef HAVE_STRSEP
|
|
207 |
+char *strsep(char **stringp, const char *delim);
|
|
208 |
+#endif
|
|
209 |
diff -x '*.*~' -x '*.rej' -x '*.orig' -Nrup compizconfig-backend-gconf-0.7.6/settings-backend/gconf.c compizconfig-backend-gconf-0.7.6.modif/settings-backend/gconf.c
|
|
210 |
--- compizconfig-backend-gconf-0.7.6/settings-backend/gconf.c 2008-05-29 14:59:03.000000000 +0200
|
|
211 |
+++ compizconfig-backend-gconf-0.7.6.modif/settings-backend/gconf.c 2008-06-16 15:21:56.367512110 +0200
|
|
212 |
@@ -24,6 +24,9 @@
|
|
213 |
*
|
|
214 |
**/
|
|
215 |
|
|
216 |
+#include "config.h"
|
|
217 |
+#include "compat.h"
|
|
218 |
+
|
|
219 |
#define _GNU_SOURCE
|
|
220 |
#include <stdio.h>
|
|
221 |
#include <stdlib.h>
|